/* Docket Book — refined dark aesthetic
   Premium typography (Inter + Jakarta), subtle depth, smooth micro-animations.
   Compact spacing preserved. Monochromatic with a single soft accent. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700&display=swap');

:root {
  color-scheme: dark;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top:    env(safe-area-inset-top, 0px);

  /* Surfaces */
  --bg-0:       #07080a;
  --bg-1:       #0b0d11;        /* page bg */
  --bg-2:       #11141a;        /* elevated */
  --bg-card:    #14171e;
  --bg-card-hi: #181c24;
  --bg-input:   #0f1217;
  --bg-hover:   #1a1f27;

  /* Lines */
  --line-1: rgba(255,255,255,0.06);
  --line-2: rgba(255,255,255,0.10);
  --line-3: rgba(255,255,255,0.16);

  /* Text */
  --fg:      #ecedef;
  --fg-soft: #c8ccd2;
  --muted:   #8b94a1;
  --faint:   #5e6671;

  /* Accent — refined platinum (light steel) for primary CTAs */
  --acc:      #d6dae3;
  --acc-hi:   #eef0f4;
  --acc-dark: #b5bbc6;
  --acc-soft: rgba(214,218,227,0.10);
  --acc-glow: rgba(214,218,227,0.18);

  /* Semantic */
  --warn:      #f59e0b;
  --warn-soft: rgba(245,158,11,0.14);
  --ok:        #2dd4a4;
  --ok-soft:   rgba(45,212,164,0.14);
  --err:       #f87171;
  --err-soft:  rgba(248,113,113,0.14);

  /* Shadows */
  --shadow-card:  0 1px 0 rgba(255,255,255,0.04) inset,
                  0 1px 2px rgba(0,0,0,0.5),
                  0 12px 32px -16px rgba(0,0,0,0.65);
  --shadow-pop:   0 8px 32px rgba(0,0,0,0.55), 0 2px 6px rgba(0,0,0,0.35);
  --shadow-glow:  0 6px 22px -8px var(--acc-glow);

  /* Radii */
  --r-sm: 6px;
  --r:    8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
}

.light {
  color-scheme: light;
  --bg-0:       #f8f9fa;
  --bg-1:       #ffffff;
  --bg-2:       #f8f9fa;
  --bg-card:    #ffffff;
  --bg-card-hi: #f3f4f6;
  --bg-input:   #f3f4f6;
  --bg-hover:   #f3f4f6;

  --line-1: rgba(0,0,0,0.08);
  --line-2: rgba(0,0,0,0.12);
  --line-3: rgba(0,0,0,0.20);

  --fg:      #111827;
  --fg-soft: #374151;
  --muted:   #6b7280;
  --faint:   #9ca3af;

  --acc:      #f6821f;
  --acc-hi:   #f97316;
  --acc-dark: #e57928;
  --acc-soft: rgba(246,130,31,0.12);
  --acc-glow: rgba(246,130,31,0.25);

  --warn:      #f59e0b;
  --warn-soft: rgba(245,158,11,0.14);
  --ok:        #2dd4a4;
  --ok-soft:   rgba(45,212,164,0.14);
  --err:       #ef4444;
  --err-soft:  rgba(239,68,68,0.14);

  --shadow-card:  0 1px 0 rgba(255,255,255,0.6) inset,
                  0 1px 3px rgba(0,0,0,0.08),
                  0 8px 24px -12px rgba(0,0,0,0.12);
  --shadow-pop:   0 8px 32px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-glow:  0 6px 22px -8px var(--acc-glow);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg-1);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'salt';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

/* Subtle ambient background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(214,218,227,0.05), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(245,158,11,0.025), transparent 55%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 24%, var(--bg-1) 100%);
}

input, textarea, select, button { font-family: inherit; }

::selection { background: rgba(214,218,227,0.22); color: #fff; }

@media (max-width: 640px) {
  input, textarea, select { font-size: 16px !important; }
}

h1, h2, h3 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  letter-spacing: -0.022em;
  margin: 0;
}

/* ──────────────── Form fields ──────────────── */

.field-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.field-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 10px 13px;
  font-size: 14px;
  color: var(--fg);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: 0 1px 0 rgba(255,255,255,0.02) inset;
  letter-spacing: -0.005em;
}
.field-input::placeholder { color: var(--faint); }
.field-input:hover { border-color: var(--line-3); }
.field-input:focus {
  border-color: rgba(255,255,255,0.32);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05), 0 1px 0 rgba(255,255,255,0.04) inset;
  background: var(--bg-2);
}
.field-input.is-error { border-color: rgba(248,113,113,0.6); }
.field-input.is-error:focus { box-shadow: 0 0 0 3px var(--err-soft); }
textarea.field-input { min-height: 96px; resize: vertical; line-height: 1.5; }

.field-input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
  cursor: pointer;
  opacity: 0.85;
}

/* ──────────────── Buttons ──────────────── */

.btn, .btn-primary, .btn-secondary, .btn-ghost, .btn-warn, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--r);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  transition: transform 0.12s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.15s ease, filter 0.15s ease;
}
.btn:active, .btn-primary:active, .btn-secondary:active, .btn-ghost:active, .btn-warn:active, .btn-danger:active {
  transform: translateY(0.5px);
}

.btn-primary {
  color: #0b0d11;
  background: linear-gradient(180deg, var(--acc-hi) 0%, var(--acc) 100%);
  border-color: rgba(0,0,0,0.18);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 0 0 1px rgba(0,0,0,0.06),
    var(--shadow-glow);
  font-weight: 600;
}
.btn-primary:hover {
  filter: brightness(1.04);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 0 0 1px rgba(0,0,0,0.08),
    0 10px 26px -8px var(--acc-glow);
}

.btn-secondary {
  color: var(--fg);
  background: var(--bg-2);
  border-color: var(--line-2);
}
.btn-secondary:hover {
  border-color: var(--line-3);
  background: var(--bg-card-hi);
}

.btn-ghost {
  color: var(--muted);
  background: transparent;
}
.btn-ghost:hover {
  color: var(--fg);
  background: rgba(255,255,255,0.04);
}

.btn-warn {
  color: #fff;
  background: linear-gradient(180deg, #fbbf24, var(--warn));
  border-color: rgba(0,0,0,0.18);
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 6px 18px -8px rgba(245,158,11,0.45);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(180deg, #ef4444, #dc2626);
  border-color: rgba(0,0,0,0.18);
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 6px 18px -8px rgba(220,38,38,0.45);
}

.btn:disabled, .btn-primary:disabled, .btn-secondary:disabled, .btn-ghost:disabled, .btn-warn:disabled, .btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none !important;
}

@media (hover: none) and (pointer: coarse) {
  .btn, .btn-primary, .btn-secondary, .btn-ghost, .btn-warn, .btn-danger { min-height: 42px; }
}

/* ──────────────── Card ──────────────── */

.card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0) 28%),
    var(--bg-card);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.card-hover {
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.card-hover:hover {
  border-color: var(--line-2);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0) 22%),
    var(--bg-card-hi);
}

/* ──────────────── Badge ──────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: rgba(255,255,255,0.05);
  color: var(--fg-soft);
  border: 1px solid var(--line-1);
}

/* ──────────────── Scrollbar ──────────────── */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #20242c; border-radius: 8px; border: 2px solid var(--bg-1); }
::-webkit-scrollbar-thumb:hover { background: #2a2f38; }
::-webkit-scrollbar-track { background: transparent; }

/* ──────────────── Toast ──────────────── */

.toast {
  padding: 11px 16px;
  border-radius: var(--r);
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow-pop);
  animation: tslide 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast-success { background: rgba(45,212,164,0.16);  border-color: rgba(45,212,164,0.35);  color: #b8f3da; }
.toast-error   { background: rgba(248,113,113,0.16); border-color: rgba(248,113,113,0.35); color: #fecaca; }
.toast-info    { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.16); color: #fff; }

@keyframes tslide {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ──────────────── Signature overlay ──────────────── */

.sig-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,8,10,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 200;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sig-overlay .sig-canvas-wrap {
  flex: 1;
  margin: 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  background: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-pop);
}
.sig-overlay canvas { width: 100%; height: 100%; display: block; }
.sig-overlay .sig-hint {
  position: absolute;
  bottom: 10px;
  left: 0; right: 0;
  text-align: center;
  font-size: 12px;
  color: rgba(0,0,0,0.32);
  pointer-events: none;
  letter-spacing: 0.04em;
}

/* ──────────────── Toggle ──────────────── */

.toggle {
  position: relative; height: 26px; width: 46px; border-radius: 999px;
  background: var(--bg-hover); border: 1px solid var(--line-2);
  cursor: pointer; transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.toggle.on {
  background: linear-gradient(180deg, var(--acc-hi), var(--acc));
  border-color: rgba(0,0,0,0.18);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.4) inset, 0 4px 14px -4px var(--acc-glow);
}
.toggle::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  height: 20px; width: 20px; border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.45);
  transition: left 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.toggle.on::after { left: 22px; }

/* ──────────────── Utilities ──────────────── */

.pb-safe { padding-bottom: calc(0.75rem + var(--safe-bottom)); }
.pt-safe { padding-top: calc(0.5rem + var(--safe-top)); }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 50%, transparent);
}

.text-balance { text-wrap: balance; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.34s cubic-bezier(0.22, 1, 0.36, 1) both; }
main     { animation: fadeUp 0.36s cubic-bezier(0.22, 1, 0.36, 1) both; }

:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,0.08); }

a { color: inherit; }

/* ──────────────── Brand mark — Jensen Bowers ──────────────── */

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-mark .jb-square {
  position: relative;
  width: 38px;
  height: 38px;
  background: #ee6b1f;
  color: #fff;
  display: grid;
  place-items: center;
  font-family: 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 900;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.06em;
  box-shadow: 0 8px 20px -8px rgba(238, 107, 31, 0.55);
}
.brand-mark .jb-square::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 4px;
  background: #fff;
  transform: skewX(-12deg) translateX(2px);
  opacity: 0.85;
}
.brand-mark .jb-square span {
  position: relative;
  z-index: 1;
  transform: translateX(-2px);
}
.brand-mark .jb-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
  font-family: 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0.01em;
}
.brand-mark .jb-wordmark .top {
  font-weight: 900;
  font-size: 14px;
  color: var(--fg);
}
.brand-mark .jb-wordmark .bot {
  font-weight: 500;
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}
.brand-mark .sep {
  width: 1px;
  height: 20px;
  background: var(--line-2);
  margin: 0 4px;
}
.brand-mark .sub {
  font-weight: 600;
  font-size: 14px;
  color: var(--fg-soft);
  letter-spacing: -0.005em;
}
.brand-mark.compact .jb-wordmark { display: none; }

/* ──────────────── Page heading ──────────────── */

.page-eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.page-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.025em;
  margin-top: 4px;
  line-height: 1.15;
}
.page-subtle {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 6px;
}

/* ──────────────── Tabs ──────────────── */

.tab {
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r);
  color: var(--muted);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: color 0.15s ease, background 0.18s ease, border-color 0.18s ease;
}
.tab:hover { color: var(--fg-soft); background: rgba(255,255,255,0.03); }
.tab.is-active {
  color: var(--fg);
  background: var(--bg-card);
  border-color: var(--line-2);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
}

/* ──────────────── Stat tile ──────────────── */

.stat {
  padding: 14px 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0) 30%),
    var(--bg-card);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
.stat-label {
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.stat-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.stat-accent {
  box-shadow: var(--shadow-card), inset 0 0 0 1px rgba(214,218,227,0.10);
}

/* ──────────────── Theme toggle button ────────────────
   Sun/moon icon button. Use as: <button class="theme-toggle"></button>
   JS toggles class on <html> and updates the icon. */

.theme-toggle {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--fg);
  border-color: var(--line-3);
  background: rgba(255,255,255,0.04);
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
.theme-toggle .sun  { display: block; }
html.light .theme-toggle .sun  { display: none; }
html.light .theme-toggle .moon { display: block; }
html.light .theme-toggle:hover { background: rgba(0,0,0,0.04); }

.theme-toggle-floating {
  position: fixed;
  top: calc(14px + var(--safe-top));
  right: 14px;
  z-index: 50;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}

/* ──────────────── Light-mode adjustments ──────────────── */

html.light body::before {
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(246,130,31,0.08), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(44,76,255,0.04), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-0) 100%);
}
html.light ::-webkit-scrollbar-thumb {
  background: #d4d7de;
  border-color: #fff;
}
html.light ::-webkit-scrollbar-thumb:hover { background: #b5bbc6; }
html.light .btn-primary {
  color: #fff;
  border-color: rgba(0,0,0,0.18);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.35) inset,
    0 0 0 1px rgba(0,0,0,0.04),
    0 8px 20px -8px var(--acc-glow);
}
html.light .btn-ghost:hover { background: rgba(0,0,0,0.04); }
html.light .field-input { background: #fff; }
html.light .field-input:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--acc-soft);
  background: #fff;
}
html.light .field-input[type="date"]::-webkit-calendar-picker-indicator {
  filter: none;
}
html.light :focus-visible { box-shadow: 0 0 0 3px var(--acc-soft); }
html.light .card::after { border-top-color: rgba(255,255,255,0.6); }
html.light .tab:hover { background: rgba(0,0,0,0.04); }
html.light .toast {
  background: #fff;
  color: var(--fg);
}
html.light .toast-success { border-color: #34d399; color: #047857; background: #ecfdf5; }
html.light .toast-error   { border-color: #f87171; color: #b91c1c; background: #fef2f2; }
html.light .toast-info    { border-color: var(--acc); color: var(--acc); background: var(--acc-soft); }
html.light .badge { background: rgba(0,0,0,0.04); }
html.light .stat {
  background:
    linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(248,249,250,1) 100%);
}
html.light .toggle::after { box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
html.light::selection,
html.light *::selection {
  background: var(--acc-soft);
  color: var(--fg);
}

/* ════════════════════════════════════════════════════════════════════════
   Jensen Bowers premium app refresh
   Shared auth, dashboard, admin, list, and form styling.
   ════════════════════════════════════════════════════════════════════════ */

:root,
.light {
  --jb-orange: #f26a21;
  --jb-orange-2: #ff7a2d;
  --jb-blue: #244bd8;
  --jb-blue-2: #315ce9;
  --jb-blue-soft: #eef3ff;
  --jb-ink: #0d1b2f;
  --jb-muted: #667085;
  --jb-line: rgba(15, 23, 42, 0.13);
  --jb-card: rgba(255, 255, 255, 0.92);
  --jb-shadow: 0 26px 80px -36px rgba(15, 34, 68, 0.40), 0 12px 30px -22px rgba(15, 23, 42, 0.28);
  --acc: var(--jb-blue);
  --acc-hi: var(--jb-blue-2);
  --acc-dark: #1739bd;
  --acc-soft: rgba(36, 75, 216, 0.12);
  --acc-glow: rgba(36, 75, 216, 0.32);
  --bg-0: #f5f8fc;
  --bg-1: #f7f9fd;
  --bg-2: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --fg: var(--jb-ink);
  --fg-soft: #263448;
  --muted: var(--jb-muted);
  --line-1: rgba(15, 23, 42, 0.08);
  --line-2: rgba(15, 23, 42, 0.12);
  --line-3: rgba(36, 75, 216, 0.28);
  --shadow-card: var(--jb-shadow);
}

body {
  background: #f7f9fd !important;
  color: var(--jb-ink);
  overflow-x: hidden;
}

body::before {
  background:
    linear-gradient(180deg, rgba(247,249,253,0.90), rgba(247,249,253,0.96)),
    url('/assets/images/jb-bg-auth.jpg') center / cover no-repeat fixed;
  opacity: 1;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(115deg, rgba(255,255,255,0.88) 0%, rgba(255,255,255,0.58) 44%, rgba(232,241,255,0.50) 100%),
    repeating-linear-gradient(105deg, rgba(36,75,216,0.08) 0 1px, transparent 1px 64px);
  mix-blend-mode: normal;
}

.auth-topbar {
  min-height: 92px;
  padding: calc(12px + var(--safe-top)) clamp(16px, 4vw, 42px) 12px;
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(15,23,42,0.08);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.auth-topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.auth-topbar .brand-lockup {
  grid-column: 2;
}

.auth-topbar .theme-toggle {
  grid-column: 3;
  justify-self: end;
}

.brand-lockup,
.auth-card-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.brand-lockup-logo {
  height: 62px;
  width: auto;
  max-width: 72px;
  object-fit: contain;
  display: block;
}

.brand-lockup-sep,
.auth-card-brand span {
  width: 1px;
  height: 40px;
  background: rgba(15,23,42,0.18);
}

.brand-lockup-title,
.auth-card-brand strong {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 800;
  color: #171a22;
  letter-spacing: -0.01em;
  font-size: clamp(18px, 2vw, 24px);
  white-space: nowrap;
}

.auth-shell {
  min-height: calc(100svh - 92px);
  display: grid;
  place-items: center;
  justify-items: center;
  padding: clamp(24px, 5vw, 72px) 18px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(247,250,255,0.82) 0%, rgba(247,250,255,0.42) 50%, rgba(228,239,255,0.66) 100%),
    url('/assets/images/jb-bg-auth.jpg') center / cover no-repeat;
  transform: scale(1.02);
}

.auth-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 82%, rgba(242,106,33,0.16), transparent 22%),
    radial-gradient(circle at 72% 26%, rgba(36,75,216,0.10), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.30), rgba(235,244,255,0.66));
}

.auth-panel {
  width: 100%;
  max-width: 520px;
  min-width: 0;
}

.auth-panel-login {
  max-width: 440px;
}

.auth-card-brand {
  justify-content: center;
  width: 100%;
  margin-bottom: 26px;
}

.auth-card-brand img {
  height: 82px;
  width: auto;
  max-width: 96px;
  object-fit: contain;
}

.auth-card {
  padding: clamp(24px, 4vw, 44px) !important;
  border-radius: 24px !important;
  background: rgba(255,255,255,0.91) !important;
  border: 1px solid rgba(255,255,255,0.76) !important;
  box-shadow: var(--jb-shadow) !important;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.auth-card h1 {
  color: var(--jb-ink);
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.08;
  font-weight: 800;
  margin: 0 0 8px;
}

.auth-subtitle {
  color: #5f6b7c;
  font-size: 17px;
  margin: 0 0 28px;
}

.auth-terms {
  color: rgba(255,255,255,0.92);
  text-align: center;
  font-size: 13px;
  line-height: 1.55;
  margin: 24px 0 0;
  text-shadow: 0 1px 8px rgba(15,23,42,0.28);
}

.auth-error {
  border: 1px solid rgba(220,38,38,0.28);
  background: rgba(254,242,242,0.95);
  color: #b91c1c;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}

.field-label {
  color: #253044;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 800;
  margin-bottom: 8px;
}

.field-label .req,
.req {
  color: var(--jb-orange);
}

.field-input {
  min-height: 48px;
  border-radius: 10px;
  border-color: rgba(15,23,42,0.16);
  background: rgba(255,255,255,0.92);
  color: var(--jb-ink);
  font-size: 15px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.65) inset;
}

.field-input::placeholder {
  color: #9aa3b2;
}

.field-input:focus,
html.light .field-input:focus {
  border-color: var(--jb-blue);
  box-shadow: 0 0 0 4px rgba(36,75,216,0.12);
}

.btn-primary,
html.light .btn-primary {
  min-height: 48px;
  border-radius: 11px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(180deg, var(--jb-blue-2), var(--jb-blue)) !important;
  border-color: rgba(20,48,163,0.20) !important;
  box-shadow: 0 14px 30px -16px rgba(36,75,216,0.70), 0 1px 0 rgba(255,255,255,0.22) inset !important;
}

.btn-secondary,
.btn-ghost {
  min-height: 46px;
  border-radius: 11px;
  font-weight: 800;
}

.btn-secondary {
  color: var(--jb-blue);
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(36,75,216,0.70);
}

.btn-secondary:hover,
.btn-ghost:hover {
  background: var(--jb-blue-soft);
}

.card {
  border-radius: 18px;
  border-color: rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.90);
  box-shadow: var(--jb-shadow);
}

header:has(.brand-mark) {
  background: rgba(255,255,255,0.92) !important;
  border-color: rgba(15,23,42,0.08) !important;
  box-shadow: 0 8px 26px -24px rgba(15,23,42,0.45);
}

.brand-mark .sub {
  font-weight: 800;
  color: var(--jb-ink);
}

.brand-mark .sep {
  background: rgba(15,23,42,0.18);
}

.brand-mark-real {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark-logo {
  display: block;
  height: 42px;
  width: auto;
  max-width: 54px;
  object-fit: contain;
  flex: 0 0 auto;
}

.page-eyebrow {
  color: var(--jb-orange);
  font-weight: 800;
}

.page-title {
  color: var(--jb-ink);
  font-size: clamp(28px, 3vw, 38px);
}

.page-subtle {
  color: #536176;
}

.stat,
.tab.is-active,
html.light .stat {
  background: rgba(255,255,255,0.86);
  border-color: rgba(255,255,255,0.68);
  box-shadow: var(--jb-shadow);
}

.badge {
  border-radius: 999px;
  font-weight: 800;
}

@media (max-width: 640px) {
  .auth-topbar {
    min-height: 78px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-lockup-logo {
    height: 50px;
    max-width: 60px;
  }

  .brand-lockup,
  .auth-card-brand {
    gap: 10px;
  }

  .brand-lockup-title,
  .auth-card-brand strong {
    font-size: 17px;
  }

  .auth-shell {
    min-height: calc(100svh - 78px);
    padding: 26px 0 34px;
    align-items: start;
    width: 100vw;
    max-width: 100vw;
  }

  .auth-panel {
    width: 100vw;
    max-width: 100vw;
    margin-left: auto;
    margin-right: auto;
  }

  .auth-card {
    width: 300px !important;
    max-width: calc(100vw - 28px) !important;
    border-radius: 22px !important;
    padding: 24px 20px !important;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
  }

  .auth-card-brand {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    margin-bottom: 20px;
  }

  .auth-card-brand img {
    height: 68px;
    max-width: 82px;
  }

  .auth-terms {
    color: #ffffff;
  }
}
