html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ── Global dark theme ───────────────────────── */
body {
  background: radial-gradient(ellipse at center top, #1a3a5c 0%, #0d1f2f 50%, #050a15 100%) !important;
  color: rgba(160, 196, 228, 0.9);
  margin-bottom: 0;
}

/* ── Dark navbar (global) ──────────────────── */
header nav.navbar {
  background: rgba(5, 10, 21, 0.85) !important;
  backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(0, 212, 255, 0.15) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5) !important;
  margin-bottom: 0 !important;
}

header nav .navbar-brand,
header nav .nav-link {
  color: rgba(160, 196, 228, 0.85) !important;
}

header nav .navbar-brand:hover,
header nav .nav-link:hover {
  color: #00d4ff !important;
}

/* ── Hover dropdowns (desktop) ─────────────── */
@media (min-width: 576px) {
  .navbar .nav-item.dropdown:hover > .dropdown-menu {
    display: block;
    margin-top: 0;
    top: 100%;
    bottom: auto;
  }
}

/* ── Dark dropdown menu (global) ───────────── */
.dropdown-menu {
  background-color: rgba(5, 10, 21, 0.95) !important;
  border:           1px solid rgba(0, 212, 255, 0.15) !important;
  backdrop-filter:  blur(12px);
  box-shadow:       0 8px 32px rgba(0, 0, 0, 0.5) !important;
  z-index:          1050 !important;
}

.dropdown-item {
  color:          rgba(160, 196, 228, 0.85) !important;
  font-size:      13px;
  letter-spacing: 0.04em;
}

.dropdown-item:hover {
  background-color: rgba(0, 212, 255, 0.08) !important;
  color:            #00d4ff !important;
}

.dropdown-divider {
  border-color: rgba(0, 212, 255, 0.1) !important;
}

/* ── Logged-in username ─────────────────────── */
.nav-username {
  color:       #00d4ff !important;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.45);
}

/* ── Nested submenu (AI Analyst flyout) ─────── */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  display:    none;
  top:        0;
  left:       100%;
  margin-top: -2px;
}

.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}

/* Show arrow on the submenu trigger */
.dropdown-submenu > .dropdown-item::after {
  content:      "›";
  float:        right;
  margin-left:  8px;
  border:       none;
  font-size:    14px;
  line-height:  1;
  opacity:      0.6;
}
