/**
 * Anonymous Network Technologies - Unified Global Header & Layout Stylesheet
 * 100% Synchronized, Centered, and Mobile-Optimized across all pages
 */

/* ==========================================================================
   INSTANT THEME CANVAS BACKGROUND (Eliminates FOUC / White Flash)
   ========================================================================== */
html {
  background-color: var(--bg-base, #f8fafc);
  transition: background-color 0.25s ease;
}

html[data-theme="dark"] {
  background-color: var(--bg-base, #0a0f1d) !important;
  color-scheme: dark;
}

html[data-theme="light"] {
  background-color: var(--bg-base, #f8fafc) !important;
  color-scheme: light;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

body {
  padding-top: 76px !important;
}

.container {
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
  width: 100%;
}

/* ==========================================================================
   UNIFIED GLOBAL HEADER (76px Height, Mathematically Centered)
   ========================================================================== */
.site-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 76px;
  background: var(--bg-header, rgba(255, 255, 255, 0.94));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  z-index: 10000;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.header-inner {
  max-width: 1360px;
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* --------------------------------------------------------------------------
   Left Group: Mobile Menu Toggle + Brand Identity
   Generous margin-right creates clear, distinct breathing room before "Home"
   -------------------------------------------------------------------------- */
.header-left-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
  margin-right: 0;
  z-index: 2;
}

.mobile-menu-btn {
  display: inline-flex !important;
  background: transparent;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  color: var(--text-primary, #ffffff);
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
  background: var(--bg-surface-elevated, rgba(255, 255, 255, 0.05));
  border-color: var(--border-medium, rgba(255, 255, 255, 0.2));
}

.brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo-frame {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface, #090d16);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-name {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-white, #ffffff);
  line-height: 1.2;
}

.brand-text-desktop {
  display: inline;
  white-space: nowrap;
}

.brand-text-mobile {
  display: none;
}

.brand-meta {
  font-size: 0.64rem;
  color: var(--cyan, #0284c7);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  margin-top: 1px;
}

/* --------------------------------------------------------------------------
   Desktop Navigation Links (Dead Middle Centered)
   -------------------------------------------------------------------------- */
nav.desktop-nav {
  display: none !important;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
  transition: color 0.2s ease;
  padding: 0.35rem 0.1rem;
  position: relative;
  white-space: nowrap;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-white, #ffffff);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-gradient, linear-gradient(135deg, #0284c7 0%, #2563eb 100%));
  transition: width 0.22s ease;
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* --------------------------------------------------------------------------
   Right Group: Action Controls (Desktop & Mobile)
   -------------------------------------------------------------------------- */
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex: 0 0 auto;
  margin-left: auto;
  z-index: 2;
}

.header-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  font-size: 0.81rem;
  font-weight: 600;
  padding: 0.42rem 0.78rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}

.btn-aicte {
  background: rgba(2, 132, 199, 0.12);
  color: var(--cyan, #0284c7);
  border: 1px solid var(--border-accent, rgba(2, 132, 199, 0.4)) !important;
  font-weight: 700;
}

.btn-aicte:hover,
.btn-aicte.active {
  background: rgba(2, 132, 199, 0.24);
  transform: translateY(-1px);
}

.btn-career {
  background: transparent;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12)) !important;
  color: var(--text-secondary, #94a3b8);
}

.btn-career:hover,
.btn-career.active {
  border-color: var(--border-medium, rgba(255, 255, 255, 0.25)) !important;
  color: var(--text-white, #ffffff);
  transform: translateY(-1px);
}

.btn-career .status-dot {
  width: 6px;
  height: 6px;
  background: var(--emerald, #059669);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px rgba(5, 150, 105, 0.8);
  animation: pulseDot 2s infinite ease-in-out;
}

/* Google G Login Button */
.btn-login {
  background: var(--bg-surface, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12)) !important;
  color: var(--text-primary, #ffffff);
}

.btn-login:hover {
  border-color: var(--border-medium, rgba(255, 255, 255, 0.25)) !important;
  color: var(--text-white, #ffffff);
  transform: translateY(-1px);
}

.btn-login .google-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  color: var(--text-secondary, #94a3b8);
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  border-color: var(--border-medium, rgba(255, 255, 255, 0.25));
  color: var(--text-white, #ffffff);
  transform: translateY(-1px);
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ==========================================================================
   MOBILE SLIDE-OVER DRAWER & TWO STRUCTURED BOXES
   ========================================================================== */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-drawer-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  width: min(340px, 86vw);
  height: 100vh;
  height: 100dvh;
  background: var(--bg-surface, #ffffff);
  border-right: 1px solid var(--border-medium, rgba(255, 255, 255, 0.15));
  border-left: none;
  z-index: 99999;
  transform: translateX(-100%);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.28s ease;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  overflow-y: auto;
  box-shadow: 10px 0 35px rgba(0, 0, 0, 0.35);
}

.mobile-drawer.is-active {
  transform: translateX(0);
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
}

.mobile-drawer-header .drawer-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white, #ffffff);
  letter-spacing: -0.01em;
}

.mobile-drawer-close {
  background: transparent;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  color: var(--text-secondary, #94a3b8);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mobile-drawer-close:hover {
  color: var(--text-white, #ffffff);
  border-color: var(--border-medium);
}

/* Mobile Box 1: Core Navigation & Quick Controls */
.mobile-menu-box {
  background: var(--bg-surface-elevated, #f8fafc);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.mobile-box-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.mobile-box-controls .btn-login {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-medium, rgba(255, 255, 255, 0.15)) !important;
  color: var(--text-primary, #ffffff);
  cursor: pointer;
}

.mobile-box-controls .theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: auto;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-medium, rgba(255, 255, 255, 0.15));
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
}

.mobile-box-title {
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan, #0284c7);
  margin-bottom: 0.65rem;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-nav-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
  text-decoration: none;
  transition: all 0.18s ease;
}

.mobile-nav-list li a:hover,
.mobile-nav-list li a.active {
  background: var(--bg-surface, #ffffff);
  color: var(--text-white, #ffffff);
}

.mobile-nav-list li a.mobile-highlight {
  color: var(--cyan, #0284c7);
  font-weight: 700;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid var(--border-accent, rgba(2, 132, 199, 0.3));
}

/* Mobile Box 2: Programs & Contact Hub */
.mobile-menu-box.box-programs {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Responsive Mobile Breakpoint (<= 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  body {
    padding-top: 68px !important;
  }
  .site-header {
    height: 68px;
  }
  .header-inner {
    padding: 0 1rem;
    gap: 0.5rem;
  }
  .header-left-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
  margin-right: 0;
  z-index: 2;
}
  .mobile-menu-btn {
  display: inline-flex !important;
  background: transparent;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  color: var(--text-primary, #ffffff);
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
  nav.desktop-nav {
  display: none !important;
}
  .brand-logo-frame {
    width: 32px;
    height: 32px;
  }
  .brand-text-desktop {
    display: none !important;
  }
  .brand-text-mobile {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.15 !important;
  }
  .brand-row-top {
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    color: var(--text-white, #ffffff) !important;
    white-space: nowrap !important;
    letter-spacing: -0.01em !important;
  }
  .brand-row-sub {
    font-size: 0.62rem !important;
    font-weight: 600 !important;
    color: var(--cyan, #0284c7) !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    text-align: right !important; /* Aligns the 's' of Technologies right under the 'k' of Network */
    white-space: nowrap !important;
  }
  .brand-meta {
    display: none !important;
  }
  .header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex: 0 0 auto;
  margin-left: auto;
  z-index: 2;
}
  .header-actions .desktop-only {
    display: none !important;
  }
  .header-actions .btn-login {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 6px;
    justify-content: center;
  }
  .header-actions .btn-login .login-text {
    display: none;
  }
  .header-actions .theme-toggle-btn {
    width: 34px;
    height: 34px;
  }

  /* Verified Accreditations Bar (Mobile 2x2 Grid Layout - Strictly Contained) */
  .cred-bar {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
    padding: 0.55rem !important;
    border-radius: 12px !important;
    width: 100% !important;
    max-width: 360px !important;
    box-sizing: border-box !important;
    margin: 0 auto 1.85rem auto !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    overflow: hidden !important;
  }
  .cred-bar .cred-sep {
    display: none !important;
  }
  .cred-bar .cred-tag {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.2rem !important;
    padding: 0.45rem 0.55rem !important;
    background: var(--bg-surface-elevated, rgba(255, 255, 255, 0.04)) !important;
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08)) !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
  }
  .cred-tag-header {
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  .cred-tag-header svg {
    width: 14px !important;
    height: 14px !important;
    color: var(--cyan, #0284c7) !important;
    flex-shrink: 0 !important;
  }
  .cred-tag-header strong {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: var(--text-white, #ffffff) !important;
  }
  .cred-tag-desc {
    font-size: 0.65rem !important;
    color: var(--text-secondary, #94a3b8) !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    word-break: break-word !important;
    min-width: 0 !important;
  }

  /* Responsive Form Grid on Mobile */
  .crm-contact-card {
    padding: 1.5rem 1rem !important;
  }
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .form-group.full-width {
    grid-column: span 1 !important;
  }
}

/* ==========================================================================
   GLOBAL FORM & INPUT OVERFLOW IMMUNITY
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

.crm-contact-card {
  box-sizing: border-box;
  width: 100%;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.form-group.full-width {
  grid-column: span 2;
}

/* ==========================================================================
   PREMIUM ANIMATED INPUT FIELDS OVERHAUL (Zero Browser Defaults, Rich Micro-Interactions)
   ========================================================================== */
.form-input,
.form-select,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="url"],
textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  min-height: 48px;
  padding: 0.8rem 1.15rem !important;
  font-size: 0.94rem !important;
  font-family: inherit !important;
  color: var(--text-primary, #0f172a) !important;
  background: var(--card-bg, #ffffff) !important;
  border: 1.5px solid var(--border-medium, #cbd5e1) !important;
  border-radius: 10px !important;
  outline: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), inset 0 1px 1px rgba(0, 0, 0, 0.02) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  letter-spacing: 0.01em;
}

textarea.form-input,
textarea {
  min-height: 115px !important;
  line-height: 1.55 !important;
  resize: vertical;
}

/* Interactive Hover State */
.form-input:hover,
input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
input[type="password"]:hover,
input[type="url"]:hover,
textarea:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.15) !important;
  background: #fbfdff !important;
}

/* Animated Focus State with Subtle Lift & Glowing Ring */
.form-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
textarea:focus {
  border-color: #0284c7 !important;
  background: #ffffff !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.18), 0 8px 18px -4px rgba(2, 132, 199, 0.18) !important;
}

/* Micro-Animated Placeholder */
.form-input::placeholder,
input::placeholder,
textarea::placeholder {
  color: #94a3b8 !important;
  font-size: 0.88rem !important;
  font-weight: 400 !important;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-input:focus::placeholder,
input:focus::placeholder,
textarea:focus::placeholder {
  opacity: 0.45;
  transform: translateX(4px);
}

/* Dark Mode Overrides for Inputs */
[data-theme="dark"] .form-input,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] textarea {
  color: #f8fafc !important;
  background: rgba(15, 23, 42, 0.88) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.03) !important;
}

[data-theme="dark"] .form-input:hover,
[data-theme="dark"] input[type="text"]:hover,
[data-theme="dark"] input[type="email"]:hover,
[data-theme="dark"] input[type="tel"]:hover,
[data-theme="dark"] input[type="password"]:hover,
[data-theme="dark"] input[type="url"]:hover,
[data-theme="dark"] textarea:hover {
  border-color: #38bdf8 !important;
  background: rgba(30, 41, 59, 0.92) !important;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.18) !important;
}

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] input[type="text"]:focus,
[data-theme="dark"] input[type="email"]:focus,
[data-theme="dark"] input[type="tel"]:focus,
[data-theme="dark"] input[type="password"]:focus,
[data-theme="dark"] input[type="url"]:focus,
[data-theme="dark"] textarea:focus {
  border-color: #38bdf8 !important;
  background: rgba(15, 23, 42, 0.96) !important;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.28), 0 8px 22px -4px rgba(56, 189, 248, 0.24) !important;
}

[data-theme="dark"] .form-input::placeholder,
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: #64748b !important;
}

/* Enhanced Form Labels */
.form-label {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.015em !important;
  margin-bottom: 0.35rem !important;
  display: block;
  color: var(--text-primary, #0f172a);
  transition: color 0.2s ease;
}

[data-theme="dark"] .form-label {
  color: #e2e8f0 !important;
}

.form-group:focus-within .form-label {
  color: #0284c7 !important;
}

[data-theme="dark"] .form-group:focus-within .form-label {
  color: #38bdf8 !important;
}

/* ==========================================================================
   HUMAN PSYCHOLOGY DOTTED/DASHED ORANGE SELECTION BOX (Global Standardization)
   ========================================================================== */
.selected-domain-pill,
.track-badge-selected,
.role-selected-badge,
.topic-badge,
.no-domain-prompt,
.no-category-prompt,
.no-role-prompt,
.no-topic-prompt {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem !important;
  flex-wrap: wrap !important;
  background: #fff7ed !important;
  border: 1.5px dashed #f97316 !important;
  padding: 0.25rem 0.6rem !important;
  border-radius: 6px !important;
  margin-bottom: 0.85rem !important;
  box-shadow: 0 1px 4px rgba(234, 88, 12, 0.1) !important;
}

[data-theme="dark"] .selected-domain-pill,
[data-theme="dark"] .track-badge-selected,
[data-theme="dark"] .role-selected-badge,
[data-theme="dark"] .topic-badge,
[data-theme="dark"] .no-domain-prompt,
[data-theme="dark"] .no-category-prompt,
[data-theme="dark"] .no-role-prompt,
[data-theme="dark"] .no-topic-prompt {
  background: rgba(234, 88, 12, 0.08) !important;
  border: 1.5px dashed #f97316 !important;
  box-shadow: 0 1px 6px rgba(234, 88, 12, 0.16) !important;
}

/* Pure Blue Text Label (NO Blue Background Box!) - Compact, small & tight gap */
.selected-domain-pill .pill-badge,
.track-badge-selected .pill-badge,
.role-selected-badge .pill-badge,
.topic-badge .pill-badge {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  color: #0284c7 !important;
  font-size: 0.60rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  word-spacing: -0.06em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

.no-domain-prompt .pill-badge,
.no-category-prompt .pill-badge,
.no-role-prompt .pill-badge,
.no-topic-prompt .pill-badge {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  color: #64748b !important;
  font-size: 0.58rem !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

[data-theme="dark"] .no-domain-prompt .pill-badge,
.no-category-prompt .pill-badge,
.no-role-prompt .pill-badge,
.no-topic-prompt .pill-badge {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  color: #64748b !important;
  font-size: 0.58rem !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

/* Compact Emerald Green Value Badge */
.selected-domain-pill .pill-name,
.track-badge-selected .pill-name,
.role-selected-badge .pill-name,
.topic-badge .pill-name {
  background: #059669 !important;
  color: #ffffff !important;
  padding: 0.14rem 0.5rem !important;
  border-radius: 4px !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  white-space: nowrap !important;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.2) !important;
}

/* Orange Action Change / Choose Button */
.selected-domain-pill .pill-change,
.track-badge-selected .pill-change,
.role-selected-badge .pill-change,
.topic-badge .pill-change,
.no-domain-prompt .pill-change,
.no-category-prompt .pill-change,
.no-role-prompt .pill-change,
.no-topic-prompt .pill-change,
.btn-choose-topic,
.btn-choose-category,
.btn-choose-role,
.btn-choose-domain {
  background: #ea580c !important;
  color: #ffffff !important;
  border: none !important;
  padding: 0.14rem 0.48rem !important;
  border-radius: 4px !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}

.selected-domain-pill .pill-change:hover,
.track-badge-selected .pill-change:hover,
.role-selected-badge .pill-change:hover,
.topic-badge .pill-change:hover,
.no-domain-prompt .pill-change:hover,
.no-category-prompt .pill-change:hover,
.no-role-prompt .pill-change:hover,
.no-topic-prompt .pill-change:hover,
.btn-choose-topic:hover,
.btn-choose-category:hover,
.btn-choose-role:hover,
.btn-choose-domain:hover {
  background: #c2410c !important;
  transform: translateY(-1px) !important;
}

/* High-priority override to guarantee hidden states stay hidden */
[style*="display: none"],
[style*="display:none"],
.is-hidden {
  display: none !important;
}


/* ==========================================================================
   USER PROFILE POPUP (Pure Minimalist Modal)
   ========================================================================== */
.profile-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.profile-modal-card {
  position: relative;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2rem 1.5rem 1.5rem;
  width: 100%;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: profileModalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .profile-modal-card {
  background: #0f172a;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

@keyframes profileModalPop {
  0% { opacity: 0; transform: scale(0.92) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.profile-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.profile-modal-close:hover {
  color: #0f172a;
}
[data-theme="dark"] .profile-modal-close:hover {
  color: #ffffff;
}

.profile-avatar-wrap {
  margin: 0 auto 1rem;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #10b981, #0284c7);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #f1f5f9;
}
[data-theme="dark"] .profile-avatar-img {
  background: #1e293b;
}

.profile-user-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
}
[data-theme="dark"] .profile-user-name {
  color: #ffffff;
}

.profile-user-email {
  font-size: 0.84rem;
  color: #64748b;
  margin: 0 0 1.5rem 0;
  word-break: break-all;
}
[data-theme="dark"] .profile-user-email {
  color: #94a3b8;
}

.btn-profile-logout {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: #dc2626;
  color: #ffffff;
  border: none;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-profile-logout:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

/* Header Profile Icon Button */
.header-profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.btn-login.is-logged-in {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 2px solid #10b981 !important;
  background: transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.btn-login.is-logged-in:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4) !important;
}

.btn-login.is-logged-in .login-text,
.btn-login.is-logged-in span {
  display: none !important;
}

/* Mobile Drawer Logged-In Button: Show Avatar and User Name */
.mobile-box-controls .btn-login.is-logged-in {
  width: auto !important;
  height: auto !important;
  min-width: auto !important;
  padding: 0.45rem 0.75rem !important;
  border-radius: 8px !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  background: rgba(16, 185, 129, 0.08) !important;
  flex: 1 !important;
  justify-content: flex-start !important;
}

.mobile-box-controls .btn-login.is-logged-in span {
  display: inline-block !important;
  color: var(--text-primary, #ffffff) !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* ==========================================================================
   CUSTOM DROPDOWN SELECTION (Zero System Browser Defaults)
   ========================================================================== */
.custom-select-wrapper {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.custom-select-trigger {
  width: 100%;
  min-height: 48px;
  padding: 0.8rem 1.15rem;
  border-radius: 10px;
  border: 1.5px solid var(--border-medium, #cbd5e1);
  background: var(--card-bg, #ffffff);
  color: var(--text-primary, #0f172a);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .custom-select-trigger {
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.custom-select-trigger:hover {
  border-color: #38bdf8;
  background: #fbfdff;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.15);
}

[data-theme="dark"] .custom-select-trigger:hover {
  border-color: #38bdf8;
  background: rgba(30, 41, 59, 0.92);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.18);
}

.custom-select-trigger:focus,
.custom-select-wrapper.is-open .custom-select-trigger {
  border-color: #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.18), 0 8px 18px -4px rgba(2, 132, 199, 0.18);
  transform: translateY(-1.5px);
  outline: none;
}

[data-theme="dark"] .custom-select-trigger:focus,
[data-theme="dark"] .custom-select-wrapper.is-open .custom-select-trigger {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.28), 0 8px 22px -4px rgba(56, 189, 248, 0.24);
  transform: translateY(-1.5px);
}

.custom-select-arrow {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--cyan, #0284c7);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.custom-select-wrapper.is-open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-medium, rgba(255, 255, 255, 0.15));
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  z-index: 1050;
  padding: 0.35rem;
  max-height: 240px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  box-sizing: border-box;
}

[data-theme="dark"] .custom-select-dropdown {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.custom-select-wrapper.is-open .custom-select-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-select-option {
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-primary, #0f172a);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  transition: background 0.15s ease, color 0.15s ease;
}

[data-theme="dark"] .custom-select-option {
  color: #e2e8f0;
}

.custom-select-option:hover {
  background: rgba(2, 132, 199, 0.08);
  color: var(--cyan, #0284c7);
}

.custom-select-option.is-selected {
  background: rgba(2, 132, 199, 0.14);
  color: var(--cyan, #0284c7);
  font-weight: 600;
}

.custom-select-option .option-check {
  display: none;
  width: 14px;
  height: 14px;
  stroke: var(--cyan, #0284c7);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.custom-select-option.is-selected .option-check {
  display: block;
}

/* ==========================================================================
   CUSTOM TOAST & MODAL SYSTEM (Zero Browser Default Alerts / Confirms)
   ========================================================================== */
.custom-toast-container {
  position: fixed;
  top: 86px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  width: min(92vw, 420px);
}

.custom-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.2);
  animation: toastSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 0.88rem;
  font-weight: 500;
}

[data-theme="dark"] .custom-toast {
  background: #111827;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 40px -5px rgba(0, 0, 0, 0.65);
}

.custom-toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.custom-toast.warning .custom-toast-icon { color: #f59e0b; }
.custom-toast.success .custom-toast-icon { color: #10b981; }
.custom-toast.error .custom-toast-icon { color: #ef4444; }
.custom-toast.info .custom-toast-icon { color: #0284c7; }

.custom-toast-text {
  flex: 1;
  line-height: 1.35;
}

.custom-toast-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 0.2rem;
  font-size: 1.2rem;
  line-height: 1;
  transition: color 0.15s ease;
}

.custom-toast-close:hover {
  color: #0f172a;
}
[data-theme="dark"] .custom-toast-close:hover {
  color: #ffffff;
}

@keyframes toastSlideDown {
  0% { opacity: 0; transform: translateY(-14px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Custom Confirmation Modal */
.custom-confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: confirmFadeIn 0.2s ease;
}

.custom-confirm-card {
  position: relative;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  width: min(400px, 92vw);
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: confirmPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

[data-theme="dark"] .custom-confirm-card {
  background: #0f172a;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.custom-confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.custom-confirm-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}

.custom-confirm-desc {
  font-size: 0.86rem;
  color: #64748b;
  margin: 0 0 1.5rem;
  line-height: 1.45;
}

[data-theme="dark"] .custom-confirm-desc {
  color: #94a3b8;
}

.custom-confirm-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
}

.btn-confirm-cancel {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-medium, rgba(0, 0, 0, 0.15));
  background: transparent;
  color: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-confirm-cancel:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .btn-confirm-cancel:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-confirm-danger {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: none;
  background: #ef4444;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
}

.btn-confirm-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

@keyframes confirmFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes confirmPop {
  0% { opacity: 0; transform: scale(0.92) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
