:root {
  --ac-blue-900: #0a1628;
  --ac-blue-800: #0f2744;
  --ac-blue-700: #153a5c;
  --ac-blue-600: #1e4fd6;
  --ac-blue-500: #3b82f6;
  --ac-blue-400: #60a5fa;
  --ac-accent: #22d3ee;
  --ac-surface: #f8fafc;
  --ac-card: #ffffff;
  --ac-text: #0f172a;
  --ac-muted: #64748b;
}

body.theme-app {
  background: linear-gradient(160deg, var(--ac-surface) 0%, #e0f2fe 45%, #f8fafc 100%);
  color: var(--ac-text);
  min-height: 100vh;
}

.navbar-ac {
  background: rgba(10, 22, 40, 0.92) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(96, 165, 250, 0.2);
}

.navbar-ac .nav-link {
  color: #e2e8f0 !important;
  transition: color 0.2s ease, transform 0.2s ease;
}

.navbar-ac .nav-link:hover {
  color: var(--ac-accent) !important;
  transform: translateY(-1px);
}

.hero-parallax {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.35), transparent 55%),
    radial-gradient(ellipse at 80% 60%, rgba(34, 211, 238, 0.25), transparent 50%),
    linear-gradient(135deg, var(--ac-blue-900) 0%, var(--ac-blue-700) 50%, #0c4a6e 100%);
}

.hero-parallax::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4V0H2v6H0v2h2v4H0v2h4v-4h2v4h2v-4h4v2H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.9;
  animation: drift 80s linear infinite;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-120px, -80px, 0);
  }
}

.floating-card {
  animation: floaty 6s ease-in-out infinite;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.price-pill {
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-weight: 600;
  font-size: 0.85rem;
  background: rgba(34, 211, 238, 0.15);
  color: #cffafe;
  border: 1px solid rgba(34, 211, 238, 0.35);
}

.glass-panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  backdrop-filter: blur(12px);
}

.btn-ac-primary {
  background: linear-gradient(135deg, var(--ac-blue-500), var(--ac-blue-600));
  border: none;
  color: #fff;
  box-shadow: 0 10px 30px rgba(30, 79, 214, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-ac-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(30, 79, 214, 0.45);
  color: #fff;
}

.section-fade {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

.alert-sangria-bar {
  background: linear-gradient(90deg, #fef3c7, #fde68a);
  color: #78350f;
  border: 1px solid #f59e0b;
}

.app-shell {
  min-height: 100vh;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 270px;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.97), rgba(15, 39, 68, 0.97));
  border-right: 1px solid rgba(96, 165, 250, 0.28);
  backdrop-filter: blur(8px);
  z-index: 1030;
  overflow: hidden;
}

.app-sidebar > .p-3 {
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 1.5rem;
}

.sidebar-brand {
  display: block;
  color: #f8fafc;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.sidebar-group {
  margin-bottom: 1rem;
}

.sidebar-group h6 {
  color: #93c5fd;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.55rem;
}

.sidebar-link {
  display: block;
  color: #e2e8f0;
  text-decoration: none;
  padding: 0.42rem 0.55rem;
  border-radius: 0.5rem;
  margin-bottom: 0.2rem;
  font-size: 0.95rem;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sidebar-link:hover {
  background: rgba(30, 79, 214, 0.25);
  color: #fff;
  transform: translateX(2px);
}

.sidebar-sublink {
  display: block;
  color: #cbd5e1;
  text-decoration: none;
  padding: 0.35rem 0.55rem 0.35rem 1.35rem;
  border-radius: 0.45rem;
  margin: -0.1rem 0 0.2rem;
  font-size: 0.86rem;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sidebar-sublink:hover {
  background: rgba(30, 79, 214, 0.2);
  color: #fff;
  transform: translateX(2px);
}

.sidebar-toggle::after {
  content: "▾";
  float: right;
  opacity: 0.85;
  font-size: 0.85rem;
}

.sidebar-mobile .sidebar-sublink {
  color: #334155;
}

/*
 * Bootstrap .text-muted assume fundo claro; na sidebar escura some quase por completo.
 * Afeta "Sessão: Caixa …" e o item desabilitado "Fechar caixa" (span com text-muted).
 */
.app-sidebar .text-muted {
  color: #b8c5d4 !important;
}

.app-sidebar .text-muted strong {
  color: #f1f5f9;
  font-weight: 600;
}

.sidebar-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.26);
  padding-top: 0.9rem;
}

.app-content {
  margin-left: 270px;
}

.app-topbar {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.85rem;
  padding: 0.65rem 0.9rem;
}

.app-topbar-title {
  color: #0f172a;
}

.sidebar-mobile .sidebar-link {
  color: var(--ac-text);
}

.sidebar-mobile .offcanvas-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 1.25rem;
}

@media (max-width: 991.98px) {
  .app-content {
    margin-left: 0;
  }
}
