:root {
  --gs-font-body: "Open Sans", "Roboto", "Segoe UI", sans-serif;
  --gs-font-heading: "Roboto Slab", "Roboto", Georgia, serif;
  --gs-surface-0: #f4f7fb;
  --gs-surface-1: rgba(255, 255, 255, 0.9);
  --gs-surface-2: rgba(255, 255, 255, 0.72);
  --gs-surface-3: rgba(255, 255, 255, 0.58);
  --gs-text-1: #142033;
  --gs-text-2: rgba(20, 32, 51, 0.72);
  --gs-line-soft: rgba(15, 23, 42, 0.08);
  --gs-line-strong: rgba(59, 80, 114, 0.18);
  --gs-primary-1: #0f6bff;
  --gs-primary-2: #32b3ff;
  --gs-primary-3: #7dd3fc;
  --gs-accent-1: #ff4d8d;
  --gs-accent-2: #ff7b54;
  --gs-success: #1f9d72;
  --gs-warning: #f59e0b;
  --gs-danger: #ef4444;
  --gs-shadow-1: 0 24px 60px -36px rgba(24, 39, 75, 0.35);
  --gs-shadow-2: 0 30px 80px -42px rgba(15, 23, 42, 0.5);
  --gs-radius-lg: 1.25rem;
  --gs-radius-xl: 1.6rem;
  --gs-radius-pill: 999px;
  --gs-page-bg:
    radial-gradient(circle at top left, rgba(50, 179, 255, 0.14), transparent 32%),
    radial-gradient(circle at top right, rgba(255, 77, 141, 0.12), transparent 28%),
    linear-gradient(180deg, #f6f8fc 0%, #edf3fb 100%);
}

body {
  background: var(--gs-page-bg);
  color: var(--gs-text-1);
  font-family: var(--gs-font-body);
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  color: var(--gs-text-1);
  font-family: var(--gs-font-heading);
  letter-spacing: -0.02em;
}

body[data-theme='dark'] {
  --gs-surface-0: #09111d;
  --gs-surface-1: rgba(14, 24, 40, 0.9);
  --gs-surface-2: rgba(18, 31, 52, 0.8);
  --gs-surface-3: rgba(24, 40, 63, 0.72);
  --gs-text-1: #eef4ff;
  --gs-text-2: rgba(227, 236, 250, 0.72);
  --gs-line-soft: rgba(130, 156, 196, 0.12);
  --gs-line-strong: rgba(139, 168, 214, 0.22);
  --gs-shadow-1: 0 30px 80px -46px rgba(2, 8, 23, 0.82);
  --gs-shadow-2: 0 40px 120px -56px rgba(2, 8, 23, 0.95);
  --gs-page-bg:
    radial-gradient(circle at top left, rgba(50, 179, 255, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 77, 141, 0.14), transparent 30%),
    linear-gradient(180deg, #07111d 0%, #0d1726 55%, #111d2f 100%);
}

body[data-theme='dark'] .text-muted,
body[data-theme='dark'] .small.text-muted {
  color: var(--gs-text-2) !important;
}

body.g-sidenav-show {
  min-height: 100vh;
}

body.g-sidenav-show .main-content {
  background: transparent;
  min-height: 100vh;
  padding-top: 1.35rem;
}

body.g-sidenav-show .container-fluid {
  max-width: 1440px;
}

.navbar-admin,
.navbar-custom {
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid var(--gs-line-soft);
  box-shadow: 0 18px 40px -34px rgba(24, 39, 75, 0.6);
}

body[data-theme='dark'] .navbar-admin,
body[data-theme='dark'] .navbar-custom {
  background: rgba(10, 18, 31, 0.74);
}

.navbar-admin .navbar-brand,
.navbar-admin .nav-link,
.navbar-admin .btn,
.navbar-admin .dropdown-item,
.navbar-custom .navbar-brand,
.navbar-custom .nav-link,
.navbar-custom .btn,
.navbar-custom .dropdown-item {
  color: var(--gs-text-1);
}

.navbar-admin .nav-link,
.navbar-custom .nav-link {
  border-radius: 999px;
  font-weight: 600;
  padding: 0.6rem 0.95rem;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.navbar-admin .nav-link:hover,
.navbar-admin .nav-link:focus-visible,
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link:focus-visible {
  background: rgba(15, 107, 255, 0.08);
  color: var(--gs-primary-1);
  transform: translateY(-1px);
}

#appSidebar,
.sidenav.bg-gradient-dark {
  background:
    radial-gradient(circle at top, rgba(50, 179, 255, 0.18), transparent 26%),
    linear-gradient(180deg, #07111d 0%, #0e1930 62%, #12203b 100%) !important;
  border-right: 1px solid rgba(126, 155, 201, 0.18);
  box-shadow: 22px 0 70px -48px rgba(2, 8, 23, 0.95);
}

.sidenav .nav-link {
  border: 1px solid transparent;
  border-radius: 1rem;
  margin: 0.22rem 0.7rem;
  padding: 0.72rem 0.9rem;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.sidenav .nav-link:hover,
.sidenav .nav-link:focus-visible {
  background: rgba(125, 211, 252, 0.12);
  border-color: rgba(125, 211, 252, 0.18);
  transform: translateX(3px);
}

.card,
.auth-card,
.hero-panel,
.feature-card,
.hero-screenshot {
  background: var(--gs-surface-1);
  border: 1px solid var(--gs-line-strong);
  box-shadow: var(--gs-shadow-1);
}

.card,
.auth-card,
.feature-card,
.hero-panel,
.hero-screenshot {
  border-radius: var(--gs-radius-lg);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--gs-line-soft);
  padding: 1.05rem 1.35rem 0.75rem;
}

.card-body,
.card .card-body {
  padding: 1.35rem;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--gs-text-1);
  --bs-table-border-color: var(--gs-line-soft);
  margin-bottom: 0;
}

.table thead th {
  border-bottom-width: 1px;
  color: var(--gs-text-2);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table tbody td,
.table tbody th {
  padding-top: 0.92rem;
  padding-bottom: 0.92rem;
  vertical-align: middle;
}

.table-responsive {
  border-radius: calc(var(--gs-radius-lg) - 0.2rem);
}

.form-control,
.form-select {
  background: var(--gs-surface-2);
  border-color: var(--gs-line-strong);
  border-radius: 0.95rem;
  box-shadow: none;
  color: var(--gs-text-1);
  min-height: 2.85rem;
  padding-left: 0.95rem;
  padding-right: 0.95rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.form-control::placeholder,
.form-select::placeholder {
  color: var(--gs-text-2);
}

.form-control:focus,
.form-select:focus {
  background: var(--gs-surface-1);
  border-color: rgba(15, 107, 255, 0.46);
  box-shadow: 0 0 0 4px rgba(15, 107, 255, 0.12);
  color: var(--gs-text-1);
}

.btn {
  border-radius: var(--gs-radius-pill);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gs-primary-1), var(--gs-primary-2));
  border: 0;
  box-shadow: 0 18px 30px -20px rgba(15, 107, 255, 0.7);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: 0 22px 36px -22px rgba(15, 107, 255, 0.78);
  filter: brightness(1.03);
}

.btn-outline-secondary,
.btn-outline-primary,
.btn-secondary {
  border-width: 1px;
}

.btn-outline-secondary {
  background: var(--gs-surface-2);
  border-color: var(--gs-line-strong);
  color: var(--gs-text-1);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus-visible {
  background: var(--gs-surface-3);
  border-color: rgba(15, 107, 255, 0.25);
}

.dashboard-welcome {
  background:
    radial-gradient(circle at top right, rgba(255, 77, 141, 0.14), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 255, 0.92));
  border: 1px solid rgba(59, 80, 114, 0.14);
  border-radius: var(--gs-radius-xl);
  box-shadow: var(--gs-shadow-2);
  margin-bottom: 2rem;
  overflow: hidden;
  padding: clamp(2rem, 3vw, 3rem);
  position: relative;
  text-align: left;
}

body[data-theme='dark'] .dashboard-welcome {
  background:
    radial-gradient(circle at top right, rgba(255, 77, 141, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(14, 24, 40, 0.96), rgba(19, 33, 55, 0.94));
  border-color: rgba(124, 157, 211, 0.2);
}

.dashboard-welcome::after {
  background:
    radial-gradient(circle, rgba(125, 211, 252, 0.22), transparent 62%);
  content: "";
  height: 17rem;
  pointer-events: none;
  position: absolute;
  right: -3rem;
  top: -5rem;
  width: 17rem;
}

.dashboard-welcome h4 {
  font-size: clamp(2rem, 3.2vw, 3rem);
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.dashboard-welcome p {
  color: var(--gs-text-2);
  font-size: 1.02rem;
  margin-bottom: 0;
  max-width: 40rem;
  position: relative;
  z-index: 1;
}

.auth-card,
.hero-panel,
.hero-screenshot,
.feature-card {
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
}

.rp-wrapper {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.rp-card {
  background: var(--gs-surface-1);
  border: 1px solid var(--gs-line-strong);
  border-radius: var(--gs-radius-lg);
  box-shadow: var(--gs-shadow-1);
  color: var(--gs-text-1);
  max-width: 30rem;
  padding: 2rem;
  width: min(100%, 30rem);
}

.rp-card h3 {
  color: var(--gs-text-1);
}

@media (max-width: 1200px) {
  body.g-sidenav-show .main-content {
    padding-top: 1rem;
  }
}

@media (max-width: 767.98px) {
  .dashboard-welcome {
    padding: 1.6rem;
    text-align: center;
  }

  .rp-card {
    padding: 1.4rem;
  }

  .dashboard-welcome p {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ==========================================================================
   Global chrome polish (2026-05-28) — sidebar active state + navbar user/bell
   These elements come from public/sidebar.js and were inheriting Material
   Dashboard's default white-pill styling, which clashes with the dark theme.
   ========================================================================== */

/* ---- SIDEBAR: active item becomes a cinematic gradient pill ---- */
body[data-theme='dark'] #appSidebar .nav-link.active,
#appSidebar .nav-link.active,
.sidenav.bg-gradient-dark .nav-link.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(139, 92, 246, 0.22)) !important;
  border: 1px solid rgba(125, 211, 252, 0.45) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 32px -22px rgba(14, 165, 233, 0.55) !important;
  color: #f8fbff !important;
}

body[data-theme='dark'] #appSidebar .nav-link.active::before,
#appSidebar .nav-link.active::before {
  content: '';
  position: absolute;
  left: -0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--gs-primary-2, #32b3ff), var(--gs-accent-1, #ff4d8d));
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.65);
}

body[data-theme='dark'] #appSidebar .nav-link.active .material-icons,
body[data-theme='dark'] #appSidebar .nav-link.active .material-icons-round,
#appSidebar .nav-link.active .material-icons,
#appSidebar .nav-link.active .material-icons-round {
  color: #bae6fd !important;
}

/* Sidebar non-active links: smoother hover */
body[data-theme='dark'] #appSidebar .nav-link:not(.active):hover,
#appSidebar .nav-link:not(.active):hover {
  background: rgba(125, 211, 252, 0.08) !important;
  border-color: rgba(125, 211, 252, 0.18) !important;
}

/* ---- NAVBAR (top): user dropdown button (`#avatarMenuBtn`) + notif bell ---- */

#mainNavbar #avatarMenuBtn,
#mainNavbar #notifToggle,
#mainNavbar .btn.btn-login,
#mainNavbar #loginBtn {
  background: rgba(15, 23, 42, 0.55) !important;
  border: 1px solid rgba(148, 175, 215, 0.22) !important;
  color: #e2f3ff !important;
  border-radius: 999px !important;
  padding: 0.4rem 0.85rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#mainNavbar #notifToggle {
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#mainNavbar #avatarMenuBtn:hover,
#mainNavbar #notifToggle:hover,
#mainNavbar .btn.btn-login:hover,
#mainNavbar #loginBtn:hover {
  background: rgba(56, 189, 248, 0.18) !important;
  border-color: rgba(125, 211, 252, 0.55) !important;
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -16px rgba(56, 189, 248, 0.55);
}

/* Avatar initials circle inside the user pill */
#mainNavbar #avatarMenuBtn .avatar,
#mainNavbar .avatar.avatar-xs {
  background: linear-gradient(135deg, #38bdf8, #8b5cf6) !important;
  color: #04070f !important;
  font-weight: 800 !important;
  width: 22px !important;
  height: 22px !important;
  font-size: 0.65rem !important;
  letter-spacing: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 10px rgba(56, 189, 248, 0.5);
}

#mainNavbar #navbarUsername {
  color: #e2f3ff !important;
  font-weight: 600 !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.04em;
}

/* Notif bell icon */
#mainNavbar #notifToggle .material-icons-round {
  font-size: 1.1rem;
  color: rgba(214, 226, 247, 0.85);
}

/* Notif badge (when count > 0) */
#mainNavbar #notifBadge {
  background: linear-gradient(135deg, #f472b6, #ef4444) !important;
  color: #04070f !important;
  font-weight: 800 !important;
  font-size: 0.55rem !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 12px rgba(244, 114, 182, 0.6);
}

/* Dropdown menus that open from the navbar */
#mainNavbar .dropdown-menu {
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.96), rgba(8, 14, 28, 0.94)) !important;
  border: 1px solid rgba(148, 175, 215, 0.22) !important;
  border-radius: 14px !important;
  box-shadow: 0 30px 60px -24px rgba(2, 6, 23, 0.95);
  padding: 0.4rem !important;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

#mainNavbar .dropdown-item {
  color: rgba(226, 232, 240, 0.88) !important;
  border-radius: 10px !important;
  padding: 0.5rem 0.85rem !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, color 0.15s ease;
}

#mainNavbar .dropdown-item:hover,
#mainNavbar .dropdown-item:focus {
  background: rgba(56, 189, 248, 0.14) !important;
  color: #e0f2fe !important;
}

#mainNavbar .dropdown-divider {
  border-color: rgba(148, 175, 215, 0.18) !important;
  margin: 0.35rem 0 !important;
}

/* Navbar primary links (Home / Orders / Submissions / ...) — keep tight + readable */
#mainNavbar .navbar-nav .nav-link {
  color: rgba(214, 226, 247, 0.82) !important;
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.01em;
  padding: 0.5rem 0.75rem !important;
  border-radius: 999px !important;
  transition: background 0.15s ease, color 0.15s ease;
}

#mainNavbar .navbar-nav .nav-link:hover,
#mainNavbar .navbar-nav .nav-link:focus {
  background: rgba(56, 189, 248, 0.12) !important;
  color: #e0f2fe !important;
}

/* ==========================================================================
   v2 GLOBAL CINEMATIC LAYER (2026-05-28)
   Apply the card-identifier visual language site-wide. Tokens defined in
   :root + body[data-theme='dark'] above; this layer wires them to the
   shared component classes used across pages.
   ========================================================================== */

:root,
body[data-theme='dark'] {
  --gx-cyan: #38bdf8;
  --gx-cyan-deep: #0ea5e9;
  --gx-violet: #8b5cf6;
  --gx-violet-deep: #7c3aed;
  --gx-magenta: #f472b6;
  --gx-pink: #ec4899;
  --gx-emerald: #34d399;
  --gx-amber: #fbbf24;
  --gx-rose: #fb7185;
  --gx-ink: #f4f8ff;
  --gx-ink-dim: rgba(214, 226, 247, 0.74);
  --gx-ink-faint: rgba(180, 200, 230, 0.55);
  --gx-stroke-soft: rgba(148, 175, 215, 0.16);
  --gx-stroke-strong: rgba(125, 211, 252, 0.32);
  --gx-surface-glass: linear-gradient(155deg, rgba(20, 30, 52, 0.92), rgba(8, 14, 28, 0.88));
  --gx-surface-glass-soft: linear-gradient(155deg, rgba(18, 28, 48, 0.78), rgba(9, 15, 28, 0.7));
  --gx-grad-primary: linear-gradient(135deg, #38bdf8 0%, #8b5cf6 100%);
  --gx-grad-success: linear-gradient(135deg, #34d399 0%, #22d3ee 100%);
  --gx-grad-warning: linear-gradient(135deg, #fbbf24 0%, #f472b6 100%);
  --gx-grad-danger:  linear-gradient(135deg, #fb7185 0%, #f472b6 100%);
  --gx-glow-primary: 0 0 0 1px rgba(56, 189, 248, 0.35), 0 18px 48px -22px rgba(14, 165, 233, 0.55);
}

/* ---- BODY: ensure dark page background everywhere ---- */
body[data-theme='dark'] {
  background:
    radial-gradient(120% 100% at 80% -10%, rgba(139, 92, 246, 0.20), transparent 55%),
    radial-gradient(110% 90% at 10% 110%, rgba(14, 165, 233, 0.22), transparent 50%),
    #04070f !important;
  color: var(--gx-ink) !important;
}

body[data-theme='dark'] .main-content,
body[data-theme='dark'] main.main-content {
  background: transparent !important;
}

/* Universal selection color */
::selection { background: rgba(56, 189, 248, 0.32); color: #f8fbff; }

/* ---- CARDS (Bootstrap .card + Material variants) ---- */
body[data-theme='dark'] .card,
body[data-theme='dark'] .glass-shell {
  background: var(--gx-surface-glass) !important;
  border: 1px solid var(--gx-stroke-soft) !important;
  border-radius: 20px !important;
  box-shadow: 0 28px 56px -32px rgba(2, 6, 23, 0.92) !important;
  color: var(--gx-ink) !important;
  overflow: hidden;
  position: relative;
}

body[data-theme='dark'] .card .card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--gx-stroke-soft) !important;
  padding: 1.05rem 1.35rem 0.85rem !important;
  color: var(--gx-ink) !important;
}

body[data-theme='dark'] .card .card-body {
  color: var(--gx-ink) !important;
}

body[data-theme='dark'] .card .card-title,
body[data-theme='dark'] .card h1,
body[data-theme='dark'] .card h2,
body[data-theme='dark'] .card h3,
body[data-theme='dark'] .card h4,
body[data-theme='dark'] .card h5,
body[data-theme='dark'] .card h6 {
  color: var(--gx-ink) !important;
}

body[data-theme='dark'] .card .text-muted,
body[data-theme='dark'] .card .small,
body[data-theme='dark'] .card p {
  color: var(--gx-ink-dim) !important;
}

/* Card hover lift (skip pages that opt out via .no-card-hover) */
body[data-theme='dark'] .card:not(.no-hover):hover {
  border-color: rgba(125, 211, 252, 0.35) !important;
  box-shadow: 0 36px 70px -32px rgba(14, 165, 233, 0.45) !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* ---- BUTTONS — cinematic gradients ---- */
body[data-theme='dark'] .btn {
  border-radius: 999px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease, border-color 0.2s ease, background 0.2s ease !important;
}

body[data-theme='dark'] .btn:hover,
body[data-theme='dark'] .btn:focus-visible {
  transform: translateY(-1px);
}

body[data-theme='dark'] .btn-primary {
  background: var(--gx-grad-primary) !important;
  border: 0 !important;
  color: #04070f !important;
  box-shadow: 0 18px 36px -16px rgba(56, 189, 248, 0.6) !important;
}

body[data-theme='dark'] .btn-primary:hover,
body[data-theme='dark'] .btn-primary:focus-visible {
  filter: brightness(1.06);
  box-shadow: 0 24px 44px -16px rgba(56, 189, 248, 0.7) !important;
}

body[data-theme='dark'] .btn-success {
  background: var(--gx-grad-success) !important;
  border: 0 !important;
  color: #04070f !important;
  box-shadow: 0 18px 36px -16px rgba(52, 211, 153, 0.55) !important;
}

body[data-theme='dark'] .btn-warning {
  background: var(--gx-grad-warning) !important;
  border: 0 !important;
  color: #04070f !important;
  box-shadow: 0 18px 36px -16px rgba(251, 191, 36, 0.55) !important;
}

body[data-theme='dark'] .btn-danger {
  background: var(--gx-grad-danger) !important;
  border: 0 !important;
  color: #04070f !important;
  box-shadow: 0 18px 36px -16px rgba(244, 114, 182, 0.55) !important;
}

body[data-theme='dark'] .btn-info {
  background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 100%) !important;
  border: 0 !important;
  color: #04070f !important;
  box-shadow: 0 18px 36px -16px rgba(56, 189, 248, 0.55) !important;
}

body[data-theme='dark'] .btn-secondary,
body[data-theme='dark'] .btn-outline-secondary {
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid var(--gx-stroke-soft) !important;
  color: var(--gx-ink) !important;
}

body[data-theme='dark'] .btn-secondary:hover,
body[data-theme='dark'] .btn-outline-secondary:hover {
  background: rgba(56, 189, 248, 0.14) !important;
  border-color: var(--gx-stroke-strong) !important;
  color: #e0f2fe !important;
}

body[data-theme='dark'] .btn-outline-primary {
  background: rgba(15, 23, 42, 0.55) !important;
  border: 1px solid rgba(125, 211, 252, 0.4) !important;
  color: #bae6fd !important;
}

body[data-theme='dark'] .btn-outline-primary:hover {
  background: rgba(56, 189, 248, 0.16) !important;
  border-color: rgba(125, 211, 252, 0.7) !important;
  color: #f0f9ff !important;
}

body[data-theme='dark'] .btn-outline-light,
body[data-theme='dark'] .btn-light {
  background: rgba(15, 23, 42, 0.55) !important;
  border: 1px solid var(--gx-stroke-soft) !important;
  color: var(--gx-ink) !important;
}

/* Re-color the red gradient sign-in / submit buttons used on auth pages */
body[data-theme='dark'] .btn-primary[type="submit"],
body[data-theme='dark'] .auth-card .btn-primary,
body[data-theme='dark'] form .btn-primary {
  background: var(--gx-grad-primary) !important;
}

/* ---- FORMS ---- */
body[data-theme='dark'] .form-control,
body[data-theme='dark'] .form-select,
body[data-theme='dark'] input[type="text"],
body[data-theme='dark'] input[type="email"],
body[data-theme='dark'] input[type="password"],
body[data-theme='dark'] input[type="number"],
body[data-theme='dark'] input[type="search"],
body[data-theme='dark'] input[type="tel"],
body[data-theme='dark'] input[type="url"],
body[data-theme='dark'] textarea,
body[data-theme='dark'] select {
  background: rgba(8, 14, 28, 0.78) !important;
  border: 1px solid var(--gx-stroke-soft) !important;
  border-radius: 14px !important;
  color: var(--gx-ink) !important;
  min-height: 2.85rem;
  padding: 0.6rem 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body[data-theme='dark'] .form-control:focus,
body[data-theme='dark'] .form-select:focus,
body[data-theme='dark'] input:focus,
body[data-theme='dark'] textarea:focus,
body[data-theme='dark'] select:focus {
  background: rgba(8, 14, 28, 0.92) !important;
  border-color: rgba(125, 211, 252, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16) !important;
  outline: none;
}

body[data-theme='dark'] .form-control::placeholder,
body[data-theme='dark'] textarea::placeholder,
body[data-theme='dark'] input::placeholder {
  color: rgba(180, 200, 230, 0.42) !important;
}

body[data-theme='dark'] .form-label,
body[data-theme='dark'] label {
  color: var(--gx-ink-dim) !important;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

body[data-theme='dark'] .input-group-text {
  background: rgba(8, 14, 28, 0.78) !important;
  border: 1px solid var(--gx-stroke-soft) !important;
  color: var(--gx-ink-dim) !important;
}

body[data-theme='dark'] .form-check-input {
  background: rgba(8, 14, 28, 0.85) !important;
  border: 1px solid var(--gx-stroke-strong) !important;
}

body[data-theme='dark'] .form-check-input:checked {
  background: var(--gx-grad-primary) !important;
  border-color: transparent !important;
}

body[data-theme='dark'] .form-check-label { color: var(--gx-ink) !important; }

/* ---- TABLES ---- */
body[data-theme='dark'] .table,
body[data-theme='dark'] table {
  --bs-table-bg: transparent !important;
  --bs-table-color: var(--gx-ink) !important;
  --bs-table-border-color: var(--gx-stroke-soft) !important;
  color: var(--gx-ink) !important;
}

body[data-theme='dark'] .table thead th,
body[data-theme='dark'] table thead th {
  background: rgba(8, 14, 28, 0.78) !important;
  color: rgba(186, 230, 253, 0.78) !important;
  font-size: 0.66rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase;
  border-bottom: 1px solid var(--gx-stroke-soft) !important;
  padding: 0.85rem 1rem !important;
}

body[data-theme='dark'] .table tbody td,
body[data-theme='dark'] table tbody td {
  background: transparent !important;
  border-color: var(--gx-stroke-soft) !important;
  color: var(--gx-ink) !important;
  padding: 0.85rem 1rem !important;
  vertical-align: middle;
}

body[data-theme='dark'] .table tbody tr:hover td {
  background: rgba(56, 189, 248, 0.06) !important;
}

body[data-theme='dark'] .table-responsive {
  border-radius: 16px;
  border: 1px solid var(--gx-stroke-soft);
  background: rgba(8, 14, 28, 0.55);
  overflow: hidden;
}

/* Material Dashboard light-cell overrides */
body[data-theme='dark'] .bg-gray-100,
body[data-theme='dark'] .bg-gray-200,
body[data-theme='dark'] .bg-light,
body[data-theme='dark'] .bg-white {
  background: rgba(15, 23, 42, 0.55) !important;
  color: var(--gx-ink) !important;
}

/* ---- BADGES + STATUS PILLS ---- */
body[data-theme='dark'] .badge {
  border-radius: 999px !important;
  font-size: 0.66rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  padding: 0.32rem 0.7rem !important;
  text-transform: uppercase;
}

body[data-theme='dark'] .badge.bg-primary,
body[data-theme='dark'] .bg-primary {
  background: var(--gx-grad-primary) !important;
  color: #04070f !important;
}

body[data-theme='dark'] .badge.bg-success,
body[data-theme='dark'] .bg-success {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.25), rgba(34, 211, 238, 0.25)) !important;
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #a7f3d0 !important;
}

body[data-theme='dark'] .badge.bg-warning,
body[data-theme='dark'] .bg-warning {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(244, 114, 182, 0.22)) !important;
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fde68a !important;
}

body[data-theme='dark'] .badge.bg-danger,
body[data-theme='dark'] .bg-danger {
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.25), rgba(244, 114, 182, 0.22)) !important;
  border: 1px solid rgba(251, 113, 133, 0.45);
  color: #fecaca !important;
}

body[data-theme='dark'] .badge.bg-info,
body[data-theme='dark'] .bg-info {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(125, 211, 252, 0.22)) !important;
  border: 1px solid rgba(125, 211, 252, 0.42);
  color: #bae6fd !important;
}

body[data-theme='dark'] .badge.bg-secondary,
body[data-theme='dark'] .bg-secondary {
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid var(--gx-stroke-soft);
  color: var(--gx-ink-dim) !important;
}

/* ---- ALERTS ---- */
body[data-theme='dark'] .alert {
  border-radius: 14px !important;
  border-width: 1px !important;
  padding: 0.85rem 1.1rem !important;
  font-weight: 500;
}

body[data-theme='dark'] .alert-success {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.14), rgba(34, 211, 238, 0.10)) !important;
  border-color: rgba(52, 211, 153, 0.35) !important;
  color: #a7f3d0 !important;
}

body[data-theme='dark'] .alert-warning {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.14), rgba(244, 114, 182, 0.10)) !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
  color: #fde68a !important;
}

body[data-theme='dark'] .alert-danger {
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.14), rgba(244, 114, 182, 0.10)) !important;
  border-color: rgba(251, 113, 133, 0.4) !important;
  color: #fecaca !important;
}

body[data-theme='dark'] .alert-info {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(125, 211, 252, 0.10)) !important;
  border-color: rgba(125, 211, 252, 0.4) !important;
  color: #bae6fd !important;
}

body[data-theme='dark'] .alert-primary {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(139, 92, 246, 0.10)) !important;
  border-color: rgba(125, 211, 252, 0.4) !important;
  color: #bae6fd !important;
}

/* ---- MODALS ---- */
body[data-theme='dark'] .modal-content {
  background: var(--gx-surface-glass) !important;
  border: 1px solid var(--gx-stroke-soft) !important;
  border-radius: 22px !important;
  box-shadow: 0 40px 90px -32px rgba(2, 6, 23, 0.95) !important;
  color: var(--gx-ink) !important;
  overflow: hidden;
}

body[data-theme='dark'] .modal-header {
  background: transparent !important;
  border-bottom: 1px solid var(--gx-stroke-soft) !important;
  padding: 1.1rem 1.4rem !important;
}

body[data-theme='dark'] .modal-title {
  color: var(--gx-ink) !important;
  font-family: "Roboto Slab", "Roboto", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

body[data-theme='dark'] .modal-body { color: var(--gx-ink) !important; }

body[data-theme='dark'] .modal-footer {
  background: transparent !important;
  border-top: 1px solid var(--gx-stroke-soft) !important;
  padding: 1rem 1.4rem !important;
}

body[data-theme='dark'] .btn-close {
  filter: invert(1) opacity(0.7);
}

body[data-theme='dark'] .btn-close:hover { filter: invert(1) opacity(1); }

/* ---- PAGE HEADERS (h1/h2 at the top of pages) ---- */
body[data-theme='dark'] main h1,
body[data-theme='dark'] main h2,
body[data-theme='dark'] .container-fluid > h1,
body[data-theme='dark'] .container-fluid > h2 {
  color: var(--gx-ink) !important;
  font-family: "Roboto Slab", "Roboto", Georgia, serif;
  letter-spacing: -0.02em;
}

body[data-theme='dark'] main h1 + p,
body[data-theme='dark'] main h2 + p,
body[data-theme='dark'] main h3 + p {
  color: var(--gx-ink-dim) !important;
}

/* ---- PAGINATION ---- */
body[data-theme='dark'] .pagination .page-link {
  background: rgba(8, 14, 28, 0.65) !important;
  border: 1px solid var(--gx-stroke-soft) !important;
  color: var(--gx-ink-dim) !important;
  border-radius: 10px !important;
  margin: 0 2px;
}

body[data-theme='dark'] .pagination .page-link:hover {
  background: rgba(56, 189, 248, 0.14) !important;
  color: #e0f2fe !important;
}

body[data-theme='dark'] .pagination .page-item.active .page-link {
  background: var(--gx-grad-primary) !important;
  color: #04070f !important;
  border-color: transparent !important;
}

/* ---- DROPDOWNS (any, not just navbar) ---- */
body[data-theme='dark'] .dropdown-menu {
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.96), rgba(8, 14, 28, 0.94)) !important;
  border: 1px solid var(--gx-stroke-soft) !important;
  border-radius: 14px !important;
  padding: 0.4rem !important;
  color: var(--gx-ink) !important;
  box-shadow: 0 30px 60px -24px rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

body[data-theme='dark'] .dropdown-item {
  color: var(--gx-ink) !important;
  border-radius: 10px !important;
  padding: 0.5rem 0.85rem !important;
}

body[data-theme='dark'] .dropdown-item:hover,
body[data-theme='dark'] .dropdown-item:focus {
  background: rgba(56, 189, 248, 0.14) !important;
  color: #e0f2fe !important;
}

body[data-theme='dark'] .dropdown-divider {
  border-color: var(--gx-stroke-soft) !important;
}

/* ---- NAV TABS / PILLS ---- */
body[data-theme='dark'] .nav-tabs {
  border-bottom: 1px solid var(--gx-stroke-soft) !important;
}

body[data-theme='dark'] .nav-tabs .nav-link {
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--gx-ink-dim) !important;
  border-radius: 12px 12px 0 0 !important;
  font-weight: 600;
  padding: 0.6rem 1rem !important;
}

body[data-theme='dark'] .nav-tabs .nav-link:hover {
  background: rgba(56, 189, 248, 0.08) !important;
  color: #e0f2fe !important;
}

body[data-theme='dark'] .nav-tabs .nav-link.active {
  background: rgba(56, 189, 248, 0.14) !important;
  border-color: var(--gx-stroke-soft) var(--gx-stroke-soft) transparent !important;
  color: #f0f9ff !important;
}

/* ---- LIST GROUPS ---- */
body[data-theme='dark'] .list-group-item {
  background: rgba(8, 14, 28, 0.55) !important;
  border: 1px solid var(--gx-stroke-soft) !important;
  color: var(--gx-ink) !important;
  border-radius: 12px !important;
  margin-bottom: 0.3rem;
  padding: 0.85rem 1rem !important;
}

body[data-theme='dark'] .list-group-item:hover {
  background: rgba(56, 189, 248, 0.06) !important;
}

/* ---- PROGRESS BARS ---- */
body[data-theme='dark'] .progress {
  background: rgba(8, 14, 28, 0.65) !important;
  border: 1px solid var(--gx-stroke-soft) !important;
  border-radius: 999px !important;
  height: 10px;
  overflow: hidden;
}

body[data-theme='dark'] .progress-bar {
  background: var(--gx-grad-primary) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

/* ---- LINKS ---- */
body[data-theme='dark'] a {
  color: #7dd3fc;
  text-decoration: none;
}

body[data-theme='dark'] a:hover {
  color: #bae6fd;
}

/* Skip recoloring auth, brand, and button links */
body[data-theme='dark'] .btn a,
body[data-theme='dark'] a.btn,
body[data-theme='dark'] .navbar-brand,
body[data-theme='dark'] .auth-card a {
  color: inherit;
}

/* ---- STAT BLOCKS (.stat-card / .info-card-style patterns) ---- */
body[data-theme='dark'] .stat-card,
body[data-theme='dark'] .info-card,
body[data-theme='dark'] .metric-card {
  background: var(--gx-surface-glass) !important;
  border: 1px solid var(--gx-stroke-soft) !important;
  border-radius: 18px !important;
  padding: 1.1rem 1.3rem !important;
  color: var(--gx-ink) !important;
  box-shadow: 0 22px 44px -28px rgba(2, 6, 23, 0.85);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

body[data-theme='dark'] .stat-card:hover,
body[data-theme='dark'] .info-card:hover,
body[data-theme='dark'] .metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.35) !important;
  box-shadow: 0 28px 56px -28px rgba(14, 165, 233, 0.45);
}

/* ---- LOADING / SPINNER ---- */
body[data-theme='dark'] .spinner-border,
body[data-theme='dark'] .spinner-grow {
  color: var(--gx-cyan) !important;
}

/* ---- AUTH CARD specific brand color shift (was red gradient) ---- */
body[data-theme='dark'] .auth-card .btn-primary,
body[data-theme='dark'] .auth-card button[type="submit"].btn,
body[data-theme='dark'] form#loginForm button[type="submit"],
body[data-theme='dark'] form#registerForm button[type="submit"],
body[data-theme='dark'] form#forgotForm button[type="submit"],
body[data-theme='dark'] form#resetForm button[type="submit"],
body[data-theme='dark'] form#verifyForm button[type="submit"] {
  background: var(--gx-grad-primary) !important;
  color: #04070f !important;
  border: 0 !important;
  box-shadow: 0 18px 36px -16px rgba(56, 189, 248, 0.6) !important;
}

body[data-theme='dark'] .auth-card,
body[data-theme='dark'] .login-page .card {
  background: var(--gx-surface-glass) !important;
  border: 1px solid var(--gx-stroke-soft) !important;
  border-radius: 22px !important;
  box-shadow: 0 40px 90px -28px rgba(2, 6, 23, 0.95) !important;
  position: relative;
  overflow: hidden;
}

/* Aurora behind the auth card */
body[data-theme='dark'] .auth-card::before,
body[data-theme='dark'] .login-page .card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from 180deg at 50% 50%, rgba(56, 189, 248, 0) 0deg, rgba(56, 189, 248, 0.5) 90deg, rgba(139, 92, 246, 0.5) 180deg, rgba(244, 114, 182, 0.35) 270deg, rgba(56, 189, 248, 0) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.6;
  pointer-events: none;
}

body[data-theme='dark'] .auth-logo {
  background: var(--gx-grad-primary) !important;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 28px rgba(56, 189, 248, 0.45);
  margin: 0 auto;
}

body[data-theme='dark'] .auth-logo img {
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

/* Auth divider */
body[data-theme='dark'] .auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--gx-ink-faint);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body[data-theme='dark'] .auth-divider::before,
body[data-theme='dark'] .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gx-stroke-soft);
}

/* ---- FOOTER ---- */
body[data-theme='dark'] footer,
body[data-theme='dark'] .footer {
  background: transparent !important;
  border-top: 1px solid var(--gx-stroke-soft);
  color: var(--gx-ink-faint) !important;
  padding: 1.4rem 0;
}

body[data-theme='dark'] footer a {
  color: var(--gx-ink-dim);
}

/* ---- ACCESSIBILITY: focus rings ---- */
body[data-theme='dark'] :focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.6);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---- ANIMATIONS used across pages ---- */
@keyframes gx-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

body[data-theme='dark'] .card,
body[data-theme='dark'] .glass-shell,
body[data-theme='dark'] .stat-card,
body[data-theme='dark'] .metric-card {
  animation: gx-rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  body[data-theme='dark'] .card,
  body[data-theme='dark'] .glass-shell,
  body[data-theme='dark'] .stat-card,
  body[data-theme='dark'] .metric-card { animation: none; }
}

/* ==========================================================================
   Reusable cinematic page-ribbon (2026-05-29)
   Drop a <header class="gx-ribbon"> at the top of any page; markup expected:
     <header class="gx-ribbon" data-tone="cyan|violet|magenta|emerald|amber">
       <div class="gx-ribbon__aurora" aria-hidden="true"></div>
       <div class="gx-ribbon__head">
         <div class="gx-ribbon__title">
           <span class="gx-overline"><span class="gx-overline__dot"></span>EYEBROW</span>
           <h1 class="gx-ribbon__heading">Page Title</h1>
           <p class="gx-ribbon__sub">Tagline.</p>
         </div>
         <div class="gx-ribbon__actions">...</div>
       </div>
     </header>
   ========================================================================== */

.gx-ribbon { position: relative; overflow: hidden; border-radius: 26px; border: 1px solid rgba(148, 175, 215, 0.18); background: linear-gradient(155deg, rgba(15, 23, 42, 0.85), rgba(7, 12, 24, 0.85)); box-shadow: 0 30px 70px -40px rgba(2, 6, 23, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.04); padding: clamp(1.4rem, 2vw + 0.85rem, 2rem); margin-bottom: 1.4rem; isolation: isolate; }
.gx-ribbon__aurora { position: absolute; inset: -25%; z-index: 0; pointer-events: none; filter: blur(60px); animation: gx-ribbon-aurora 28s linear infinite; background: conic-gradient(from 160deg at 50% 50%, transparent 0deg, rgba(56, 189, 248, 0.28) 60deg, rgba(139, 92, 246, 0.28) 180deg, rgba(244, 114, 182, 0.2) 260deg, transparent 360deg); }
.gx-ribbon[data-tone="violet"]  .gx-ribbon__aurora { background: conic-gradient(from 180deg at 50% 50%, transparent 0deg, rgba(139, 92, 246, 0.32) 90deg, rgba(56, 189, 248, 0.24) 200deg, rgba(244, 114, 182, 0.22) 280deg, transparent 360deg); }
.gx-ribbon[data-tone="magenta"] .gx-ribbon__aurora { background: conic-gradient(from 200deg at 50% 50%, transparent 0deg, rgba(244, 114, 182, 0.32) 90deg, rgba(139, 92, 246, 0.3) 200deg, rgba(56, 189, 248, 0.2) 280deg, transparent 360deg); }
.gx-ribbon[data-tone="emerald"] .gx-ribbon__aurora { background: conic-gradient(from 120deg at 50% 50%, transparent 0deg, rgba(52, 211, 153, 0.3) 90deg, rgba(34, 211, 238, 0.25) 200deg, rgba(56, 189, 248, 0.22) 280deg, transparent 360deg); }
.gx-ribbon[data-tone="amber"]   .gx-ribbon__aurora { background: conic-gradient(from 140deg at 50% 50%, transparent 0deg, rgba(251, 191, 36, 0.26) 90deg, rgba(244, 114, 182, 0.22) 200deg, rgba(139, 92, 246, 0.2) 280deg, transparent 360deg); }
@keyframes gx-ribbon-aurora { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gx-ribbon__aurora { animation: none; } }

.gx-ribbon > .gx-ribbon__head, .gx-ribbon > * { position: relative; z-index: 1; }

.gx-ribbon__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.4rem; flex-wrap: wrap; }
.gx-ribbon__title { max-width: 720px; min-width: 0; }

.gx-overline { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.38rem 0.85rem 0.38rem 0.55rem; border-radius: 999px; border: 1px solid rgba(125, 211, 252, 0.28); background: linear-gradient(120deg, rgba(56, 189, 248, 0.14), rgba(139, 92, 246, 0.14)); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: #cfe9ff; margin-bottom: 0.85rem; }
.gx-ribbon[data-tone="violet"]  .gx-overline { border-color: rgba(167, 139, 250, 0.4); background: linear-gradient(120deg, rgba(139, 92, 246, 0.14), rgba(56, 189, 248, 0.12)); color: #e9d5ff; }
.gx-ribbon[data-tone="magenta"] .gx-overline { border-color: rgba(244, 114, 182, 0.4); background: linear-gradient(120deg, rgba(244, 114, 182, 0.14), rgba(139, 92, 246, 0.14)); color: #fbcfe8; }
.gx-ribbon[data-tone="emerald"] .gx-overline { border-color: rgba(52, 211, 153, 0.4); background: linear-gradient(120deg, rgba(52, 211, 153, 0.14), rgba(34, 211, 238, 0.14)); color: #a7f3d0; }
.gx-ribbon[data-tone="amber"]   .gx-overline { border-color: rgba(251, 191, 36, 0.4); background: linear-gradient(120deg, rgba(251, 191, 36, 0.14), rgba(244, 114, 182, 0.12)); color: #fde68a; }

.gx-overline__dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #38bdf8, #8b5cf6); box-shadow: 0 0 12px rgba(56, 189, 248, 0.85); animation: gx-overline-dot 2.6s ease-in-out infinite; }
.gx-ribbon[data-tone="violet"]  .gx-overline__dot { background: linear-gradient(135deg, #8b5cf6, #38bdf8); box-shadow: 0 0 12px rgba(139, 92, 246, 0.85); }
.gx-ribbon[data-tone="magenta"] .gx-overline__dot { background: linear-gradient(135deg, #f472b6, #8b5cf6); box-shadow: 0 0 12px rgba(244, 114, 182, 0.85); }
.gx-ribbon[data-tone="emerald"] .gx-overline__dot { background: linear-gradient(135deg, #34d399, #22d3ee); box-shadow: 0 0 12px rgba(52, 211, 153, 0.85); }
.gx-ribbon[data-tone="amber"]   .gx-overline__dot { background: linear-gradient(135deg, #fbbf24, #f472b6); box-shadow: 0 0 12px rgba(251, 191, 36, 0.85); }
@keyframes gx-overline-dot { 0%,100%{transform:scale(1);opacity:1;} 50%{transform:scale(1.25);opacity:.7;} }
@media (prefers-reduced-motion: reduce) { .gx-overline__dot { animation: none; } }

.gx-ribbon__heading { margin: 0 0 0.55rem; font-family: "Roboto Slab", "Roboto", Georgia, serif; font-size: clamp(2rem, 2.4vw + 0.9rem, 3.1rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; background: linear-gradient(110deg, #e0f2fe 0%, #93c5fd 28%, #c4b5fd 55%, #f0abfc 80%, #fde68a 100%); background-clip: text; -webkit-background-clip: text; color: transparent; background-size: 220% 100%; animation: gx-ribbon-title 14s ease-in-out infinite; }
@keyframes gx-ribbon-title { 0%,100%{background-position:0% 50%;} 50%{background-position:100% 50%;} }
@media (prefers-reduced-motion: reduce) { .gx-ribbon__heading { animation: none; } }

.gx-ribbon__sub { margin: 0; color: rgba(214, 226, 247, 0.72); font-size: clamp(0.92rem, 0.32vw + 0.85rem, 1.04rem); line-height: 1.5; max-width: 64ch; }

.gx-ribbon__actions { display: inline-flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; justify-content: flex-end; }

/* Optional inline stats strip in a ribbon */
.gx-ribbon__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.85rem; margin-top: 1.2rem; }
.gx-stat { padding: 0.85rem 1rem; border-radius: 16px; border: 1px solid rgba(148, 175, 215, 0.18); background: linear-gradient(155deg, rgba(20, 30, 52, 0.6), rgba(9, 15, 28, 0.55)); transition: transform 0.25s ease, border-color 0.25s ease; }
.gx-stat:hover { transform: translateY(-2px); border-color: rgba(125, 211, 252, 0.32); }
.gx-stat__label { display: block; font-size: 0.58rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(186, 230, 253, 0.72); font-weight: 700; }
.gx-stat__value { display: block; font-family: "Roboto Slab", "Roboto", Georgia, serif; font-size: 1.35rem; font-weight: 800; color: #f8fbff; line-height: 1.1; margin-top: 0.2rem; font-variant-numeric: tabular-nums; }
.gx-stat__hint { font-size: 0.66rem; color: rgba(186, 230, 253, 0.55); margin-top: 0.15rem; }

/* ==========================================================================
   GLOBAL DYNAMIC FULL-WIDTH LAYOUT (2026-05-29)
   Every app page should fill the available viewport — no narrow centered
   column floating in empty space on wide monitors.
   ========================================================================== */

/* Container & main wrapper — span the full width, with viewport-adaptive padding. */
.wrapper main.main-content,
body main.main-content {
	width: auto;
	max-width: none;
	padding: 1.1rem clamp(1rem, 1.6vw, 2.6rem) 2.4rem;
}
main.main-content > .container-fluid,
main.main-content .container-fluid {
	width: 100%;
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

/* The ribbon component (used on most polished pages) needs to be a true
   horizontal hero — its inner head should never collapse into a narrow box. */
.gx-ribbon { width: 100%; }
.gx-ribbon__head { width: 100%; }

/* Stat tile grids — auto-fit so they spread across whatever space is available. */
.gx-ribbon__stats {
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* ---- 1600px+ — wider monitors get bigger headlines and tile values ---- */
@media (min-width: 1600px) {
	main.main-content {
		padding-left: clamp(1.4rem, 1.6vw, 2.6rem);
		padding-right: clamp(1.4rem, 1.6vw, 2.6rem);
	}
	.gx-ribbon__heading {
		font-size: clamp(2.4rem, 2.4vw + .9rem, 3.8rem);
	}
	.gx-ribbon__sub {
		font-size: 1.04rem;
		max-width: 80ch;
	}
	.gx-ribbon__stats {
		grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
		gap: 1rem;
	}
	.gx-stat__value { font-size: 1.55rem; }
}

/* ---- 2000px+ — ultrawide / 4K monitors get even more breathing room ---- */
@media (min-width: 2000px) {
	main.main-content {
		padding-left: clamp(2rem, 2vw, 3.5rem);
		padding-right: clamp(2rem, 2vw, 3.5rem);
	}
	.gx-ribbon { padding: clamp(1.8rem, 1.4vw + 1rem, 2.8rem); }
	.gx-ribbon__heading {
		font-size: clamp(2.8rem, 2.4vw + 1rem, 4.4rem);
	}
	.gx-ribbon__sub { font-size: 1.1rem; }
	.gx-ribbon__stats {
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
		gap: 1.1rem;
	}
	.gx-stat { padding: 1rem 1.2rem; }
	.gx-stat__value { font-size: 1.75rem; }
}

/* ---- Auth + marketing pages stay centered.
       (Login, register, forgot-password, reset, verify, privacy, terms, home, landing.)
       These don't have `.main-content` as their primary shell — they use their
       own card-centered layouts, so the rules above don't touch them.        */

/* ==========================================================================
   GLOBAL MOBILE SAFETY (2026-05-29 — applies to every page)
   ========================================================================== */

/* Belt-and-suspenders: never allow horizontal scroll on body.
   Decorative auroras / aurora-floor / marquee tracks can sometimes leak past
   their clipped container in subtle ways (transforms, will-change, etc.) and
   create a 20px horizontal scrollbar nobody asked for. */
html, body {
	max-width: 100vw;
	overflow-x: hidden;
}

/* Mobile-only fixes — kick in at the iPad-mini boundary so phones get them. */
@media (max-width: 760px) {
	/* Generic content padding for ALL .main-content pages */
	main.main-content {
		padding: 0.9rem 0.85rem 2rem !important;
	}

	/* Force fluid containers — Bootstrap's max-width clamps reverse on mobile */
	.container, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl,
	.container-fluid {
		width: 100% !important;
		max-width: 100% !important;
		padding-left: 0.85rem;
		padding-right: 0.85rem;
	}

	/* Hide every sidenav by default on mobile (they're 280px wide and cover the screen) */
	body:not(.home-page):not(.affiliate-page) #sidebar,
	body:not(.home-page):not(.affiliate-page) .sidenav {
		transform: translateX(-110%) !important;
	}
	/* Make the main content reclaim that space */
	body:not(.home-page):not(.affiliate-page) main.main-content,
	body:not(.home-page):not(.affiliate-page) #navbar,
	body:not(.home-page):not(.affiliate-page) .navbar-main {
		margin-left: 0 !important;
	}

	/* Bigger, easier-to-tap buttons everywhere */
	.btn, button:not(.btn-close):not(.navbar-toggler) {
		min-height: 38px;
	}

	/* The cinematic .gx-ribbon needs tighter padding on mobile */
	.gx-ribbon {
		padding: 1.15rem 1rem 1.1rem !important;
		border-radius: 20px;
	}
	.gx-ribbon__head {
		flex-direction: column;
		align-items: flex-start;
		gap: 1rem;
	}
	.gx-ribbon__heading {
		font-size: clamp(1.6rem, 6vw + .6rem, 2.4rem);
	}
	.gx-ribbon__stats {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.7rem;
		margin-top: 1rem;
	}
	.gx-ribbon__stats > * {
		min-width: 0; /* allow shrink */
	}
	.gx-stat {
		padding: 0.7rem 0.8rem;
	}
	.gx-stat__value {
		font-size: 1.05rem;
	}
	.gx-stat__label {
		font-size: 0.55rem;
	}
	.gx-ribbon__actions {
		width: 100%;
		justify-content: flex-start;
		flex-wrap: wrap;
	}
	.gx-ribbon__actions .btn {
		flex: 1 1 calc(50% - 0.4rem);
		min-width: 0;
		justify-content: center;
		font-size: .78rem;
		padding: .55rem .6rem;
	}

	/* Action toolbars (Orders, Submissions, etc.) wrap properly on mobile */
	main.main-content .d-flex.flex-wrap.gap-2.mb-3,
	main.main-content .d-flex.gap-2.mb-3.flex-wrap {
		flex-direction: column;
		align-items: stretch;
	}
	main.main-content .d-flex.flex-wrap.gap-2.mb-3 > .btn,
	main.main-content .d-flex.gap-2.mb-3.flex-wrap > .btn {
		width: 100%;
		justify-content: center;
	}

	/* Tables — horizontally scrollable instead of breaking the page */
	.table-responsive,
	main.main-content table {
		max-width: 100vw;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* Modals: full screen on mobile */
	.modal-dialog {
		margin: 0.5rem;
		max-width: calc(100vw - 1rem);
	}
	.modal-dialog.modal-lg, .modal-dialog.modal-xl {
		max-width: calc(100vw - 1rem) !important;
	}

	/* Form fields: never shorter than 44px (tappable) */
	input.form-control, select.form-select, textarea.form-control {
		min-height: 42px;
		font-size: 16px; /* prevents iOS auto-zoom on focus */
	}

	/* Section heading scale down */
	.pi-section__title,
	.an-ribbon__title { font-size: 1.15rem !important; }

	/* AI Assistant widget — collapse to just the floating FAB on mobile,
	   keep the dock hidden so it stops covering content. Tap the FAB to open. */
	.chatbot-dock {
		display: none !important;
	}
	.chatbot-fab {
		bottom: 16px !important;
		right: 16px !important;
		width: 52px !important;
		height: 52px !important;
		z-index: 2030;
	}
	/* When the panel is open on mobile, make it full-screen so it doesn't cover only part */
	.chatbot-panel.chatbot-open {
		top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		height: 100% !important;
		max-height: 100% !important;
		border-radius: 0 !important;
	}
	[data-ai-assistant], .ai-assistant-widget, #aiAssistantWidget,
	.assistant-widget, .gx-assistant {
		max-width: calc(100vw - 1rem) !important;
		width: auto !important;
	}
}

/* Very narrow phones (≤380px) — even tighter */
@media (max-width: 380px) {
	main.main-content {
		padding: 0.7rem 0.6rem 1.8rem !important;
	}
	.gx-ribbon {
		padding: 0.95rem 0.85rem 0.9rem !important;
	}
	.gx-ribbon__stats {
		grid-template-columns: 1fr 1fr;
		gap: 0.5rem;
	}
	.gx-ribbon__actions .btn {
		font-size: .72rem;
		padding: .5rem .45rem;
	}
}

