/*
 * CallIQ Design System
 * Personality: MINIMAL-REFINED
 * Warm cream surfaces · Amber accent · DM Sans display · Purposeful motion
 * Built per css-design-system + css-components + css-animations skills
 */

/* ════════════════════════════════════════════════════════
   FONTS
════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,300;1,9..144,400&family=JetBrains+Mono:wght@400;500&display=swap');


/* ════════════════════════════════════════════════════════
   STEP 1 — PALETTE (raw, don't use in components)
════════════════════════════════════════════════════════ */
:root {
  --palette-cream:       #F6F3EE;
  --palette-cream-dark:  #EDE9E2;
  --palette-white:       #FFFFFF;
  --palette-ink:         #1A1714;
  --palette-ink-soft:    #2D2A26;
  --palette-smoke:       #6B6560;
  --palette-fog:         #A8A49E;
  --palette-amber:       #D97706;
  --palette-amber-light: #FEF3C7;
  --palette-amber-deep:  #92400E;
  --palette-green:       #059669;
  --palette-red:         #DC2626;
  --palette-yellow:      #D97706;

  /* ─── SEMANTIC TOKENS ─── */
  --color-bg:             var(--palette-cream);
  --color-surface:        var(--palette-white);
  --color-surface-raised: #FAF8F4;
  --color-text:           var(--palette-ink);
  --color-text-muted:     var(--palette-smoke);
  --color-primary:        var(--palette-amber);
  --color-primary-hover:  #B45309;
  --color-accent:         var(--palette-amber);
  --color-border:         rgba(26,23,20,0.08);
  --color-border-strong:  rgba(26,23,20,0.16);

  /* backward-compat aliases (used in templates) */
  --bg:      var(--color-bg);
  --bg2:     var(--palette-cream-dark);
  --card:    var(--color-surface);
  --card2:   var(--color-surface-raised);
  --sb:      var(--color-surface);
  --line:    var(--color-border);
  --line2:   var(--color-border-strong);
  --text:    var(--color-text);
  --sub:     var(--palette-fog);
  --sub2:    var(--palette-smoke);
  --a:       var(--palette-amber);
  --a2:      #F59E0B;
  --aglow:   rgba(217,119,6,0.09);
  --aborder: rgba(217,119,6,0.22);

  /* Status aliases */
  --g:   var(--palette-green);  --gbg: rgba(5,150,105,0.07);   --gl: rgba(5,150,105,0.2);
  --y:   var(--palette-yellow); --ybg: rgba(217,119,6,0.07);   --yl: rgba(217,119,6,0.2);
  --r:   var(--palette-red);    --rbg: rgba(220,38,38,0.07);   --rl: rgba(220,38,38,0.2);

  /* ─── TYPOGRAPHY ─── */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --text-xs:   clamp(0.70rem, 0.65rem + 0.20vw, 0.78rem);
  --text-sm:   clamp(0.82rem, 0.78rem + 0.20vw, 0.90rem);
  --text-base: clamp(0.95rem, 0.90rem + 0.25vw, 1.05rem);
  --text-lg:   clamp(1.10rem, 1.00rem + 0.50vw, 1.25rem);
  --text-xl:   clamp(1.25rem, 1.10rem + 0.75vw, 1.55rem);
  --text-2xl:  clamp(1.50rem, 1.25rem + 1.25vw, 2.10rem);
  --text-3xl:  clamp(2.00rem, 1.50rem + 2.50vw, 3.20rem);

  --leading-tight:   1.15;
  --leading-snug:    1.35;
  --leading-normal:  1.55;
  --leading-relaxed: 1.75;

  --tracking-tight:   -0.025em;
  --tracking-normal:   0;
  --tracking-wide:     0.04em;
  --tracking-wider:    0.08em;
  --tracking-widest:   0.16em;

  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* ─── SPACING ─── */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;

  /* ─── SHADOWS ─── */
  --shadow-xs: 0 1px 2px rgba(26,23,20,0.04), 0 1px 1px rgba(26,23,20,0.03);
  --shadow-sm: 0 2px 4px rgba(26,23,20,0.06), 0 1px 2px rgba(26,23,20,0.04);
  --shadow-md: 0 4px 14px rgba(26,23,20,0.08), 0 2px 4px rgba(26,23,20,0.05);
  --shadow-lg: 0 12px 32px rgba(26,23,20,0.11), 0 4px 8px rgba(26,23,20,0.06);
  --shadow-xl: 0 24px 64px rgba(26,23,20,0.15), 0 8px 16px rgba(26,23,20,0.07);
  --shadow-glow-accent: 0 0 28px rgba(217,119,6,0.30);
  --shadow-inset: inset 0 2px 4px rgba(26,23,20,0.07);

  /* ─── RADIUS ─── */
  --radius-xs:     2px;
  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     12px;
  --radius-xl:     18px;
  --radius-2xl:    28px;
  --radius-full:   9999px;
  --radius-button: var(--radius-md);
  --radius-card:   var(--radius-xl);
  --radius-input:  var(--radius-md);
  --radius-badge:  var(--radius-full);
  --rad:    var(--radius-lg);
  --rad-lg: var(--radius-xl);

  /* ─── MOTION TOKENS ─── */
  --duration-instant: 50ms;
  --duration-fast:   150ms;
  --duration-normal: 260ms;
  --duration-slow:   420ms;
  --duration-slower: 650ms;

  --ease-out:     cubic-bezier(0.0, 0, 0.2, 1);
  --ease-in:      cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out:  cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:  cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --transition-hover:  var(--duration-fast)   var(--ease-out);
  --transition-enter:  var(--duration-normal)  var(--ease-out);
  --transition-exit:   var(--duration-fast)    var(--ease-in);

  /* ─── Z-INDEX ─── */
  --z-raised:   10;
  --z-sticky:   30;
  --z-overlay:  40;
  --z-modal:    50;
  --z-toast:    60;

  /* ─── LAYOUT ─── */
  --sidebar-w: 232px;
}


/* ════════════════════════════════════════════════════════
   RESET & BASE
════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  min-height: 100vh;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font-family: var(--font-body); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--palette-smoke); }

/* ════════════════════════════════════════════════════════
   ACCESSIBILITY
════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ════════════════════════════════════════════════════════
   TYPOGRAPHY UTILITIES
════════════════════════════════════════════════════════ */
.t-display {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-light);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}
.t-heading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-regular);
  line-height: var(--leading-snug);
}
.t-subhead {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--weight-light);
  letter-spacing: var(--tracking-wide);
}
.t-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}
.t-mono { font-family: var(--font-mono); font-size: var(--text-sm); }


/* ════════════════════════════════════════════════════════
   KEYFRAMES
════════════════════════════════════════════════════════ */

/* Entrance animations */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes reveal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes reveal-scale {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes reveal-left {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Loaders */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes dot-bounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
  40%            { transform: scale(1); opacity: 1; }
}
@keyframes shimmer {
  0%   { background-position: -700px 0; }
  100% { background-position: 700px 0; }
}

/* Pulse for upload indicator */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.6); }
}

/* Progress bar shine */
@keyframes progress-shine {
  from { transform: translateX(-100%); }
  to   { transform: translateX(200%); }
}

/* Gradient text shift */
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


/* ════════════════════════════════════════════════════════
   SCROLL-TRIGGER ANIMATIONS
════════════════════════════════════════════════════════ */
[data-animate="fade-up"] {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.65s var(--ease-out),
    transform 0.65s var(--ease-out);
}
[data-animate="fade-up"].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-animate="fade"] {
  opacity: 0;
  transition: opacity 0.75s var(--ease-out);
}
[data-animate="fade"].is-visible { opacity: 1; }
[data-animate="scale"] {
  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity 0.55s var(--ease-out),
    transform 0.55s var(--ease-bounce);
}
[data-animate="scale"].is-visible { opacity: 1; transform: scale(1); }

[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }
[data-delay="4"] { transition-delay: 0.32s; }
[data-delay="5"] { transition-delay: 0.40s; }


/* ════════════════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════════════════ */
.layout { display: flex; min-height: 100vh; }


/* ════════════════════════════════════════════════════════
   === SIDEBAR ===
════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: var(--z-sticky);
  animation: reveal-left var(--duration-slow) var(--ease-out) both;
}

/* Brand */
.sb-brand {
  height: 62px;
  padding: 0 var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.sb-icon {
  width: 34px; height: 34px;
  background: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(217,119,6,.30);
  transition: transform var(--transition-hover), box-shadow var(--transition-hover);
}
.sb-icon:hover { transform: scale(1.05); box-shadow: var(--shadow-glow-accent); }
.sb-icon svg {
  width: 16px; height: 16px;
  stroke: #fff; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.sb-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
}
.sb-sub {
  font-size: var(--text-xs);
  color: var(--palette-fog);
  margin-top: 2px;
  letter-spacing: var(--tracking-wide);
}

/* Nav */
.sb-nav { flex: 1; overflow-y: auto; padding: var(--space-2) var(--space-2); }

.sb-sec {
  padding: var(--space-4) var(--space-3) var(--space-2);
  font-size: 10px;
  color: var(--palette-fog);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  font-weight: var(--weight-medium);
}

.sb-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  margin: 1px 0;
  transition:
    background-color var(--transition-hover),
    color var(--transition-hover),
    transform var(--transition-hover);
  position: relative;
}
.sb-link:hover {
  background: var(--color-surface-raised);
  color: var(--color-text);
}
.sb-link.active {
  background: var(--palette-amber-light);
  color: var(--palette-amber-deep);
}
.sb-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 25%; bottom: 25%;
  width: 3px;
  background: var(--color-primary);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}
.sb-link:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* .ico is the template class for sidebar icons */
.sb-link .ico {
  width: 26px; height: 26px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background-color var(--transition-hover);
}
.sb-link:hover .ico { background: var(--color-border); }
.sb-link.active .ico { background: rgba(217,119,6,.15); }
.sb-link .ico svg {
  width: 15px; height: 15px;
  stroke: currentColor; fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

.sb-badge {
  margin-left: auto;
  background: var(--rbg); color: var(--r); border: 1px solid var(--rl);
  border-radius: var(--radius-full);
  padding: 2px var(--space-2);
  font-size: 10px; font-family: var(--font-mono); font-weight: 500;
}

/* Footer */
.sb-footer {
  padding: var(--space-3);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}
.sb-user {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md); margin-bottom: var(--space-2);
  transition: background-color var(--transition-hover);
}
.sb-user:hover { background: var(--color-surface-raised); }
.sb-avatar {
  width: 30px; height: 30px;
  background: var(--palette-amber-light);
  border: 1.5px solid rgba(217,119,6,.22);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 13px; font-weight: var(--weight-medium);
  color: var(--palette-amber-deep); flex-shrink: 0;
}
.sb-uname { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-text); line-height: 1.25; }
.sb-urole { font-size: 11px; color: var(--palette-fog); }

.sb-logout {
  width: 100%; padding: var(--space-2) var(--space-3);
  background: transparent; border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md); color: var(--color-text-muted);
  font-size: var(--text-xs); font-weight: var(--weight-medium);
  text-align: center; display: block;
  transition:
    border-color var(--transition-hover),
    color var(--transition-hover),
    background-color var(--transition-hover);
}
.sb-logout:hover { border-color: var(--rl); color: var(--r); background: var(--rbg); }


/* ════════════════════════════════════════════════════════
   MAIN CONTENT
════════════════════════════════════════════════════════ */
.main {
  margin-left: var(--sidebar-w);
  flex: 1; display: flex; flex-direction: column; min-height: 100vh;
}

.topbar {
  height: 62px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--space-7);
  position: sticky; top: 0; z-index: var(--z-raised);
  animation: reveal-fade var(--duration-normal) var(--ease-out) both;
}
.topbar-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-regular);
  color: var(--color-text);
  letter-spacing: var(--tracking-tight);
}
.topbar-time {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--palette-fog);
  letter-spacing: var(--tracking-wide);
}

.page {
  padding: var(--space-7);
  flex: 1;
  animation: reveal-up var(--duration-slow) var(--ease-out) both;
}
/* page-content is an alias */
.page-content { padding: var(--space-7); flex: 1; animation: reveal-up var(--duration-slow) var(--ease-out) both; }


/* ════════════════════════════════════════════════════════
   === CARDS ===
════════════════════════════════════════════════════════ */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  transition:
    box-shadow var(--transition-enter),
    transform var(--transition-enter),
    border-color var(--transition-enter);
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-strong);
}

.card-head {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--color-surface);
}
.card-title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.card-body { padding: var(--space-5); }
.card__footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-raised);
  display: flex; align-items: center; gap: var(--space-3);
}

/* Card with feature accent line on top */
.card--feature::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}


/* ════════════════════════════════════════════════════════
   === KPI CARDS ===
════════════════════════════════════════════════════════ */
.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--space-3); margin-bottom: var(--space-5); }

.kpi {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-5) var(--space-5) var(--space-4);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-xs);
  /* staggered entrance */
  opacity: 0;
  transform: translateY(20px);
  animation: reveal-up var(--duration-slow) var(--ease-out) both;
  transition:
    transform var(--transition-enter),
    box-shadow var(--transition-enter),
    border-color var(--transition-enter);
}
.kpi:nth-child(1) { animation-delay: 0ms; }
.kpi:nth-child(2) { animation-delay: 70ms; }
.kpi:nth-child(3) { animation-delay: 140ms; }
.kpi:nth-child(4) { animation-delay: 210ms; }

.kpi:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border-strong);
}
.kpi:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* Top stripe */
.kpi::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.kpi-all::after { background: linear-gradient(90deg, var(--palette-amber), var(--a2)); }
.kpi-g::after   { background: var(--palette-green); }
.kpi-y::after   { background: var(--palette-amber); }
.kpi-r::after   { background: var(--palette-red); }

/* Icon — template uses .kpi-icon with an svg inside */
.kpi-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
}
.kpi-all .kpi-icon { background: rgba(217,119,6,.10); }
.kpi-g   .kpi-icon { background: var(--gbg); }
.kpi-y   .kpi-icon { background: var(--ybg); }
.kpi-r   .kpi-icon { background: var(--rbg); }
.kpi-icon svg {
  width: 17px; height: 17px;
  fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.kpi-all .kpi-icon svg { stroke: var(--palette-amber); }
.kpi-g   .kpi-icon svg { stroke: var(--palette-green); }
.kpi-y   .kpi-icon svg { stroke: var(--palette-amber); }
.kpi-r   .kpi-icon svg { stroke: var(--palette-red); }

.kpi-num {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  font-weight: var(--weight-medium);
  line-height: 1; margin-bottom: var(--space-1);
}
.kpi-all .kpi-num { color: var(--palette-amber-deep); }
.kpi-g   .kpi-num { color: var(--palette-green); }
.kpi-y   .kpi-num { color: var(--palette-amber-deep); }
.kpi-r   .kpi-num { color: var(--palette-red); }

.kpi-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}


/* ════════════════════════════════════════════════════════
   === BUTTONS ===
════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  line-height: 1;
  border-radius: var(--radius-button);
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
  transition:
    background-color var(--transition-hover),
    border-color var(--transition-hover),
    box-shadow var(--transition-hover),
    transform var(--transition-hover),
    color var(--transition-hover);
}
.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn[disabled], .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary */
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-sm), 0 0 0 0 transparent;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md), var(--shadow-glow-accent);
  transform: translateY(-1px);
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 45%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  transform: skewX(-18deg);
  transition: left 0s;
}
.btn-primary:hover::after {
  left: 150%;
  transition: left 0.55s var(--ease-smooth);
}

/* Outline / Ghost */
.btn-outline {
  background: transparent;
  color: var(--color-text-muted);
  border-color: var(--color-border-strong);
}
.btn-outline:hover {
  background: var(--color-surface-raised);
  border-color: var(--palette-amber);
  color: var(--palette-amber-deep);
  transform: translateY(-1px);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--color-surface-raised);
  color: var(--color-text);
  border-color: var(--color-border);
}

/* Danger */
.btn-danger {
  background: var(--rbg);
  border-color: var(--rl);
  color: var(--r);
}
.btn-danger:hover { background: rgba(220,38,38,.14); transform: translateY(-1px); }

/* Sizes */
.btn-sm  { padding: var(--space-1) var(--space-3); font-size: var(--text-xs); border-radius: var(--radius-sm); }
.btn-lg  { padding: var(--space-3) var(--space-6); font-size: var(--text-base); }

/* Loading state */
.btn--loading { pointer-events: none; }
.btn--loading::after {
  content: '';
  width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
  margin-left: var(--space-2);
}


/* ════════════════════════════════════════════════════════
   === TABLES ===
════════════════════════════════════════════════════════ */
.table { width: 100%; border-collapse: collapse; }

.table thead th {
  padding: var(--space-2) var(--space-4);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--palette-fog);
  font-weight: var(--weight-semibold);
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  background: var(--color-surface-raised);
}
.table tbody tr {
  transition: background-color var(--transition-hover);
}
.table tbody tr:hover td {
  background: var(--color-surface-raised);
}
.table tbody tr:not(:last-child) td {
  border-bottom: 1px solid var(--color-border);
}
.table td {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  vertical-align: middle;
  color: var(--color-text);
}


/* ════════════════════════════════════════════════════════
   === BADGES (vbadge + status) ===
════════════════════════════════════════════════════════ */
.vbadge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 3px 10px;
  border-radius: var(--radius-badge);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
}
.vbadge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: var(--radius-full);
  background: currentColor;
  flex-shrink: 0;
}
.vg { background: var(--gbg); color: var(--g); border: 1px solid var(--gl); }
.vy { background: var(--ybg); color: var(--y); border: 1px solid var(--yl); }
.vr { background: var(--rbg); color: var(--r); border: 1px solid var(--rl); }


/* ════════════════════════════════════════════════════════
   === FORM INPUTS ===
════════════════════════════════════════════════════════ */
.form-group { margin-bottom: var(--space-4); }

.form-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-input);
  outline: none;
  transition:
    border-color var(--transition-hover),
    box-shadow var(--transition-hover),
    background-color var(--transition-hover);
  -webkit-appearance: none;
}
.form-input::placeholder { color: var(--palette-fog); opacity: .8; }
.form-input:hover { border-color: var(--palette-smoke); }
.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(217,119,6,.12);
  background: var(--color-surface);
}
.form-input:focus-visible { outline: none; }
textarea.form-input { resize: vertical; line-height: var(--leading-relaxed); }
select.form-input option { background: var(--color-surface); }


/* ════════════════════════════════════════════════════════
   FLASH MESSAGES
════════════════════════════════════════════════════════ */
.flash {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  animation: reveal-up var(--duration-normal) var(--ease-out) both;
}
.flash-error   { background: var(--rbg); border: 1px solid var(--rl); color: var(--r); }
.flash-success { background: var(--gbg); border: 1px solid var(--gl); color: var(--g); }


/* ════════════════════════════════════════════════════════
   === DROPZONE ===
════════════════════════════════════════════════════════ */
.dropzone {
  position: relative;
  border: 1.5px dashed var(--color-border-strong);
  border-radius: var(--radius-card);
  padding: var(--space-8) var(--space-5);
  text-align: center; cursor: pointer;
  background: var(--color-surface-raised);
  transition:
    border-color var(--transition-enter),
    background-color var(--transition-enter),
    transform var(--transition-enter);
}
.dropzone:hover, .dropzone.over {
  border-color: var(--color-primary);
  background: rgba(217,119,6,.04);
  transform: translateY(-2px);
}
.dropzone input {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.dz-icon {
  width: 52px; height: 52px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-hover), transform var(--transition-hover);
}
.dropzone:hover .dz-icon { box-shadow: var(--shadow-md); transform: scale(1.04); }
.dz-icon svg {
  width: 22px; height: 22px;
  stroke: var(--color-primary); fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.dz-title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text); margin-bottom: var(--space-1);
}
.dz-sub { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-4); }
.dz-formats { display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: center; }
.dz-fmt {
  background: var(--color-surface); border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm); padding: 2px 9px;
  font-family: var(--font-mono); font-size: 10px; color: var(--palette-fog);
  font-weight: var(--weight-medium);
}


/* ════════════════════════════════════════════════════════
   MANAGER INPUT WRAP
════════════════════════════════════════════════════════ */
.manager-input-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-xs);
}


/* ════════════════════════════════════════════════════════
   === UPLOAD QUEUE ===
════════════════════════════════════════════════════════ */
.uqueue { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-3); }

.uq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  display: flex; align-items: center; gap: var(--space-3);
  animation: reveal-up var(--duration-normal) var(--ease-out) both;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition-hover);
}
.uq-item:hover { box-shadow: var(--shadow-sm); }

.uq-icon {
  width: 30px; height: 30px;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.uq-icon svg { width: 14px; height: 14px; stroke: var(--color-text-muted); fill: none; stroke-width: 1.75; stroke-linecap: round; }
.uq-info { flex: 1; min-width: 0; }
.uq-name { font-size: var(--text-sm); font-weight: var(--weight-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.uq-status { font-size: var(--text-xs); color: var(--palette-fog); }
.uq-pbar-wrap { width: 68px; height: 3px; background: var(--color-surface-raised); border-radius: var(--radius-full); overflow: hidden; }
.uq-pbar { height: 100%; background: var(--color-primary); transition: width 0.5s var(--ease-out); border-radius: var(--radius-full); position: relative; overflow: hidden; }
.uq-pbar::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: progress-shine 1.5s infinite;
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: var(--radius-full);
  background: var(--color-primary);
  animation: pulse-dot 1.3s ease-in-out infinite; flex-shrink: 0;
}


/* ════════════════════════════════════════════════════════
   === CALL CARDS ===
════════════════════════════════════════════════════════ */
.call-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
  overflow: hidden; margin-bottom: var(--space-3);
  animation: reveal-up var(--duration-slow) var(--ease-out) both;
  transition:
    box-shadow var(--transition-enter),
    border-color var(--transition-enter),
    transform var(--transition-enter);
}
.call-card:hover { box-shadow: var(--shadow-md); }

.call-card.vg { border-left: 3px solid var(--g); }
.call-card.vy { border-left: 3px solid var(--y); }
.call-card.vr { border-left: 3px solid var(--r); }

.call-top {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); cursor: pointer;
  transition: background-color var(--transition-hover);
}
.call-top:hover { background: var(--color-surface-raised); }

.call-file-icon {
  width: 34px; height: 34px;
  background: var(--color-surface-raised); border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background-color var(--transition-hover);
}
.call-top:hover .call-file-icon { background: var(--color-border); }
.call-file-icon svg { width: 14px; height: 14px; stroke: var(--color-text-muted); fill: none; stroke-width: 1.75; stroke-linecap: round; }

.call-info { flex: 1; min-width: 0; }
.call-name {
  font-size: var(--text-sm); font-weight: var(--weight-semibold);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px; color: var(--color-text);
}
.call-meta { font-size: 11.5px; color: var(--palette-fog); }
.call-right { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }

/* Donut chart */
.donut { position: relative; width: 46px; height: 46px; flex-shrink: 0; }
.donut svg { transform: rotate(-90deg); }
.d-bg { fill: none; stroke: var(--color-surface-raised); stroke-width: 3.5; }
.d-fg { fill: none; stroke-width: 3.5; stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease-smooth); }
.vg .d-fg { stroke: var(--g); }
.vy .d-fg { stroke: var(--y); }
.vr .d-fg { stroke: var(--r); }
.d-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: var(--weight-medium);
}
.vg .d-text { color: var(--g); } .vy .d-text { color: var(--y); } .vr .d-text { color: var(--r); }

.chevron { color: var(--palette-fog); font-size: 11px; transition: transform var(--transition-enter); }
.call-card.open .chevron { transform: rotate(180deg); }
.call-body { display: none; border-top: 1px solid var(--color-border); }
.call-card.open .call-body { display: block; }


/* ════════════════════════════════════════════════════════
   AMO BAR
════════════════════════════════════════════════════════ */
.amo-bar {
  display: flex; align-items: stretch;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-raised);
}
.amo-textarea {
  flex: 1; padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--color-text-muted); background: none; border: none;
  resize: none; outline: none; min-height: 46px; line-height: var(--leading-relaxed);
}
.amo-copy-btn {
  flex-shrink: 0; padding: 0 var(--space-4);
  background: transparent; border: none;
  border-left: 1px solid var(--color-border);
  color: var(--palette-amber-deep); font-size: var(--text-xs);
  font-weight: var(--weight-semibold); letter-spacing: var(--tracking-wide);
  transition:
    background-color var(--transition-hover),
    color var(--transition-hover);
  font-family: var(--font-body);
  text-transform: uppercase;
}
.amo-copy-btn:hover { background: rgba(217,119,6,.08); }
.amo-copy-btn.copied { color: var(--g); background: var(--gbg); }


/* ════════════════════════════════════════════════════════
   === TABS ===
════════════════════════════════════════════════════════ */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-raised);
}
.tab {
  padding: var(--space-3) var(--space-4);
  font-size: 10.5px; color: var(--color-text-muted);
  border-bottom: 2px solid transparent; cursor: pointer;
  transition:
    color var(--transition-hover),
    border-color var(--transition-hover);
  text-transform: uppercase; letter-spacing: var(--tracking-wider);
  font-weight: var(--weight-semibold);
}
.tab:hover { color: var(--color-text); }
.tab.active { color: var(--palette-amber-deep); border-bottom-color: var(--color-primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: reveal-fade var(--duration-normal) var(--ease-out) both; }


/* ════════════════════════════════════════════════════════
   BLOCKS TABLE
════════════════════════════════════════════════════════ */
.btable { width: 100%; border-collapse: collapse; }
.btable thead th {
  padding: var(--space-2) var(--space-4);
  font-size: 10px; text-transform: uppercase; letter-spacing: var(--tracking-widest);
  color: var(--palette-fog); background: var(--color-surface-raised);
  border-bottom: 1px solid var(--color-border); text-align: left;
  font-weight: var(--weight-semibold);
}
.btable tbody tr:not(:last-child) td { border-bottom: 1px solid var(--color-border); }
.btable tbody tr:hover td { background: var(--color-surface-raised); }
.btable td { padding: var(--space-3) var(--space-4); font-size: var(--text-sm); vertical-align: top; }

.score-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 24px;
  border-radius: var(--radius-md); padding: 0 var(--space-2);
  font-family: var(--font-mono); font-size: 12.5px; font-weight: var(--weight-medium);
  border: 1px solid;
}
.s1  { background: var(--gbg); border-color: var(--gl); color: var(--g); }
.s05 { background: var(--ybg); border-color: var(--yl); color: var(--y); }
.s0  { background: var(--rbg); border-color: var(--rl); color: var(--r); }
.sna { background: var(--color-surface-raised); border-color: var(--color-border-strong); color: var(--palette-fog); font-size: 10px; }

.block-name    { font-weight: var(--weight-semibold); margin-bottom: 3px; font-size: var(--text-sm); }
.block-comment { font-size: 12.5px; color: var(--color-text-muted); line-height: var(--leading-relaxed); }


/* ════════════════════════════════════════════════════════
   VIOLATIONS + CONCLUSION
════════════════════════════════════════════════════════ */
.violations {
  padding: var(--space-3) var(--space-4);
  background: rgba(220,38,38,.03); border-top: 1px solid var(--rl);
}
.viols-title {
  font-size: 10px; text-transform: uppercase; letter-spacing: var(--tracking-widest);
  color: var(--r); font-weight: var(--weight-bold); margin-bottom: var(--space-2);
}
.viol-item {
  display: flex; align-items: flex-start; gap: var(--space-2);
  font-size: var(--text-sm); color: var(--r); padding: 3px 0; line-height: var(--leading-normal);
}
.viol-item::before { content: "—"; font-weight: var(--weight-bold); flex-shrink: 0; }

.conclusion {
  padding: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm); color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  background: var(--color-surface-raised); font-style: italic;
}


/* ════════════════════════════════════════════════════════
   COACHING
════════════════════════════════════════════════════════ */
.coaching-wrap { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }

.coach-block {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); overflow: hidden;
  animation: reveal-up var(--duration-slow) var(--ease-out) both;
}
.coach-head {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  font-size: 10px; font-weight: var(--weight-bold);
  text-transform: uppercase; letter-spacing: var(--tracking-widest);
  color: var(--color-text-muted); background: rgba(0,0,0,.02);
}
.coach-body { padding: var(--space-3) var(--space-4); }

.strength-item {
  display: flex; align-items: flex-start; gap: var(--space-2);
  padding: var(--space-2) 0; font-size: var(--text-sm);
  line-height: var(--leading-normal); color: var(--color-text);
  transition: background-color var(--transition-hover);
}
.strength-item:not(:last-child) { border-bottom: 1px solid var(--color-border); }
.strength-item::before { content: "✓"; color: var(--g); font-size: 11px; margin-top: 2px; flex-shrink: 0; font-weight: var(--weight-bold); }

.improve-item { padding: var(--space-2) 0; }
.improve-item:not(:last-child) { border-bottom: 1px solid var(--color-border); }
.improve-point {
  display: flex; align-items: flex-start; gap: var(--space-2);
  font-size: var(--text-sm); color: var(--r);
  line-height: var(--leading-normal); margin-bottom: var(--space-2); font-weight: var(--weight-medium);
}
.improve-point::before { content: "—"; font-size: 12px; margin-top: 1px; flex-shrink: 0; font-weight: var(--weight-bold); }
.improve-how {
  font-size: 12.5px; color: var(--color-text-muted); line-height: var(--leading-relaxed);
  padding: var(--space-2) var(--space-3); background: var(--color-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
  border-left: 3px solid var(--color-primary);
}

.moments-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.moment-box {
  padding: var(--space-3);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); font-size: var(--text-sm);
  color: var(--color-text-muted); line-height: var(--leading-relaxed);
  transition: box-shadow var(--transition-hover);
}
.moment-box:hover { box-shadow: var(--shadow-sm); }
.moment-box.best   { border-left: 3px solid var(--g); }
.moment-box.missed { border-left: 3px solid var(--r); }
.moment-label {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: var(--tracking-widest);
  margin-bottom: var(--space-2); font-weight: var(--weight-bold);
}
.moment-box.best   .moment-label { color: var(--g); }
.moment-box.missed .moment-label { color: var(--r); }
.impression-text {
  font-family: var(--font-display); font-size: var(--text-base);
  color: var(--color-text); line-height: var(--leading-relaxed);
  text-align: center; font-style: italic;
}


/* ════════════════════════════════════════════════════════
   TRANSCRIPT
════════════════════════════════════════════════════════ */
.transcript-body {
  padding: var(--space-4); font-family: var(--font-mono); font-size: 12px;
  color: var(--color-text-muted); line-height: 1.9;
  background: var(--color-surface-raised); max-height: 300px;
  overflow-y: auto; white-space: pre-wrap;
}


/* ════════════════════════════════════════════════════════
   MANAGERS RATING
════════════════════════════════════════════════════════ */
.manager-row {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition-hover);
}
.manager-row:last-child { border-bottom: none; }
.manager-row:hover { background: var(--color-surface-raised); margin: 0 calc(-1 * var(--space-3)); padding-left: var(--space-3); padding-right: var(--space-3); border-radius: var(--radius-md); }

.manager-avatar {
  width: 32px; height: 32px;
  background: var(--palette-amber-light); border: 1.5px solid rgba(217,119,6,.22);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 13px; font-weight: var(--weight-medium);
  color: var(--palette-amber-deep); flex-shrink: 0;
}
.manager-info { flex: 1; min-width: 0; }
.manager-name  { font-size: var(--text-sm); font-weight: var(--weight-semibold); margin-bottom: 2px; color: var(--color-text); }
.manager-stats { font-size: 11.5px; color: var(--palette-fog); }
.manager-bar-wrap { width: 88px; height: 4px; background: var(--color-surface-raised); border-radius: var(--radius-full); overflow: hidden; }
.manager-bar { height: 100%; border-radius: var(--radius-full); transition: width 1s var(--ease-out); }
.manager-score { font-family: var(--font-mono); font-size: var(--text-base); font-weight: var(--weight-medium); width: 36px; text-align: right; }


/* ════════════════════════════════════════════════════════
   SETTINGS — block editor
════════════════════════════════════════════════════════ */
.block-edit-row {
  background: var(--color-surface-raised); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-4); margin-bottom: var(--space-3);
  animation: reveal-up var(--duration-normal) var(--ease-out) both;
  transition: box-shadow var(--transition-hover), border-color var(--transition-hover);
}
.block-edit-row:hover { box-shadow: var(--shadow-sm); border-color: var(--color-border-strong); }
.violation-edit-row { margin-bottom: var(--space-2); }


/* ════════════════════════════════════════════════════════
   === SKELETON LOADER ===
════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-surface-raised) 25%,
    var(--color-border) 50%,
    var(--color-surface-raised) 75%
  );
  background-size: 700px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-md);
}
.skeleton--text   { height: 1em; width: 100%; }
.skeleton--title  { height: 2em; width: 60%; }
.skeleton--avatar { width: 48px; height: 48px; border-radius: var(--radius-full); }
.skeleton--card   { height: 220px; width: 100%; border-radius: var(--radius-card); }


/* ════════════════════════════════════════════════════════
   === AUTH PAGE ===
════════════════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-bg); padding: var(--space-5);
  /* subtle ambient background */
  background-image:
    radial-gradient(ellipse 70% 50% at 20% 20%, rgba(217,119,6,.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 70% at 80% 80%, rgba(217,119,6,.05) 0%, transparent 60%);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl); overflow: hidden;
  box-shadow: var(--shadow-xl);
  animation: reveal-scale var(--duration-slow) var(--ease-out) both;
}
.auth-header { padding: var(--space-7) var(--space-7) 0; text-align: center; }
.auth-logo {
  font-family: var(--font-display);
  font-size: var(--text-3xl); font-weight: var(--weight-light);
  color: var(--palette-amber-deep); letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-2); line-height: 1;
}
.auth-tagline { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-6); }
.auth-body { padding: 0 var(--space-7) var(--space-7); }
.auth-tabs { display: flex; border-bottom: 1px solid var(--color-border); margin-bottom: var(--space-5); }
.auth-tab {
  flex: 1; padding: var(--space-3); text-align: center;
  font-size: var(--text-sm); color: var(--color-text-muted);
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: color var(--transition-hover), border-color var(--transition-hover);
  font-weight: var(--weight-semibold); letter-spacing: var(--tracking-wide);
}
.auth-tab:hover { color: var(--color-text); }
.auth-tab.active { color: var(--palette-amber-deep); border-bottom-color: var(--color-primary); }
.auth-pane { display: none; }
.auth-pane.active { display: block; animation: reveal-fade var(--duration-normal) var(--ease-out) both; }


/* ════════════════════════════════════════════════════════
   TOAST
════════════════════════════════════════════════════════ */
#toast {
  box-shadow: var(--shadow-lg);
  font-family: var(--font-body); font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}


/* ════════════════════════════════════════════════════════
   GRID HELPERS
════════════════════════════════════════════════════════ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-4); }
.mb-16  { margin-bottom: var(--space-4); }
.mb-24  { margin-bottom: var(--space-5); }
.text-muted { color: var(--color-text-muted); font-size: var(--text-sm); }

/* Dividers */
.divider       { border: none; border-top: 1px solid var(--color-border); margin: var(--space-5) 0; }
.divider--thick  { border-top-width: 2px; }
.divider--accent { border-top-color: var(--color-accent); }