/* ==============================================================
   Julie · AI — Editorial ops console
   Dark navy · amber signal · Fraunces variable display · DM Sans body
   Hairline borders · tabular numerics · soft grain · staggered reveals
   ============================================================== */

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

:root {
  /* Navy bedrock (cohérent avec jarod-ads, écosystème partagé) */
  --bg:        #0A1628;
  --bg-2:      #0F1E33;
  --bg-3:      #152940;
  --bg-card:   #0E1D31;
  --bg-deep:   #071020;

  /* Ink */
  --ink:    #E8EEF7;
  --ink-2:  #C2CCDB;
  --ink-3:  #7B8AA3;
  --ink-4:  #4F5E78;
  --ink-5:  #2E3D55;

  /* Amber — la signature Julie (différenciée du cyan jarod) */
  --amber:        #FBBF24;
  --amber-soft:   #FCD34D;
  --amber-deep:   #D97706;
  --amber-dim:    rgba(251, 191, 36, 0.12);
  --amber-glow:   rgba(251, 191, 36, 0.45);
  --amber-faint:  rgba(251, 191, 36, 0.06);

  /* Status */
  --green:      #34D399;
  --green-dim:  rgba(52, 211, 153, 0.10);
  --green-glow: rgba(52, 211, 153, 0.4);
  --red:        #F87171;
  --red-dim:    rgba(248, 113, 113, 0.10);
  --red-glow:   rgba(248, 113, 113, 0.4);

  /* Hairlines */
  --line:    rgba(232, 238, 247, 0.07);
  --line-2:  rgba(232, 238, 247, 0.13);
  --line-3:  rgba(232, 238, 247, 0.24);

  --shadow-deep: 0 18px 60px -20px rgba(0, 0, 0, 0.6);
  --shadow-flat: 0 1px 0 rgba(255, 255, 255, 0.02) inset;

  /* Type stack */
  --f-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --f-body:    'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono:    'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --radius:    4px;
  --radius-md: 8px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; }
*::selection { background: var(--amber); color: var(--bg); }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 12% -10%, rgba(251, 191, 36, 0.07), transparent 55%),
    radial-gradient(ellipse 70% 50% at 92% 110%, rgba(251, 191, 36, 0.03), transparent 55%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
}

/* Hairline grid + subtle grain overlay */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(232, 238, 247, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 238, 247, 0.014) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 75% 80% at 50% 50%, black, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 75% 80% at 50% 50%, black, transparent 85%);
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.91 0 0 0 0 0.93 0 0 0 0 1 0 0 0 0.025 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
  mix-blend-mode: overlay;
}
body > * { position: relative; z-index: 1; }

a { color: var(--amber); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--amber-soft); }

/* ==============================================================
   Typography primitives
   ============================================================== */

.eyebrow {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow .dot {
  display: inline-block;
  width: 5px; height: 5px;
  background: var(--amber);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 10px var(--amber-glow);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.85); }
}

h1, h2, h3, .display {
  font-family: var(--f-display);
  font-weight: 350;
  font-variation-settings: "opsz" 96, "SOFT" 50;
  margin: 0;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.display em, h1 em, h2 em {
  font-style: italic;
  font-weight: 350;
  color: var(--amber);
  font-variation-settings: "opsz" 96, "SOFT" 80;
  text-shadow: 0 0 28px rgba(251, 191, 36, 0.35);
}

.num {
  font-family: var(--f-mono);
  font-feature-settings: "tnum" 1, "ss01";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.muted   { color: var(--ink-3); }
.faint   { color: var(--ink-4); }
.right   { text-align: right; }

/* ==============================================================
   Layout shell
   ============================================================== */

.shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 40px;
}
@media (max-width: 880px) {
  .shell { padding: 0 22px; }
}

/* ==============================================================
   Masthead
   ============================================================== */

.masthead {
  position: sticky; top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 22, 40, 0.7);
  backdrop-filter: saturate(1.5) blur(14px);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 400;
  font-variation-settings: "opsz" 24, "SOFT" 50;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.brand .glyph {
  display: inline-block;
  width: 9px; height: 9px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--amber-glow);
  margin-bottom: 1px;
}
.brand em {
  font-family: var(--f-mono);
  font-size: 0.62em;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-left: 2px;
  padding-top: 0.4em;
}
.brand:hover { color: var(--ink); }

.masthead-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13px;
}
.masthead-nav a.nav-link {
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: 0.01em;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.masthead-nav a.nav-link:hover { color: var(--ink); border-bottom-color: var(--amber); }
.user-chip {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
}
.user-chip a { color: var(--ink-3); border-bottom: 1px solid var(--line-2); padding-bottom: 1px; }
.user-chip a:hover { color: var(--amber); }

/* ==============================================================
   Hero (status block)
   ============================================================== */

.hero {
  padding: 64px 0 48px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: end;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 40px 0 28px; }
}

.hero-headline {
  font-size: clamp(48px, 6.5vw, 88px);
  font-variation-settings: "opsz" 96, "SOFT" 60;
  font-weight: 320;
  letter-spacing: -0.035em;
  line-height: 0.96;
  margin-top: 18px;
  color: var(--ink);
}
.hero-headline em {
  font-style: italic;
  color: var(--amber);
  font-variation-settings: "opsz" 96, "SOFT" 100;
  font-weight: 320;
  text-shadow: 0 0 36px rgba(251, 191, 36, 0.32);
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.hero-meta .ts {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

/* ── Toggle Julie ── */
.toggle-block {
  background:
    linear-gradient(180deg, rgba(15, 30, 51, 0.6), rgba(10, 22, 40, 0.45));
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  position: relative;
  overflow: hidden;
}
.toggle-block::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-3), transparent);
}
.toggle-block.is-on::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 90% at 90% 50%, rgba(52, 211, 153, 0.07), transparent 70%);
  pointer-events: none;
}
.toggle-block .label-stack { display: flex; flex-direction: column; gap: 6px; }
.toggle-block .toggle-headline {
  font-family: var(--f-display);
  font-size: 28px;
  font-variation-settings: "opsz" 36, "SOFT" 50;
  font-weight: 350;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.toggle-block .toggle-sub {
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
  max-width: 28ch;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  border: 1px solid;
  margin-bottom: 4px;
  align-self: flex-start;
}
.status-pill .led {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.status-pill.on  { background: var(--green-dim); color: var(--green); border-color: rgba(52, 211, 153, 0.3); }
.status-pill.on .led  { background: var(--green); box-shadow: 0 0 8px var(--green-glow); animation: pulse 2.4s ease-in-out infinite; }
.status-pill.off { background: var(--red-dim);   color: var(--red);   border-color: rgba(248, 113, 113, 0.3); }
.status-pill.off .led { background: var(--red); }

/* Switch */
.switch {
  position: relative;
  width: 68px; height: 36px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-2);
  border-radius: 36px;
  transition: background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}
.slider:before {
  content: "";
  position: absolute; height: 26px; width: 26px;
  left: 4px; bottom: 4px;
  background: var(--ink-4);
  border-radius: 50%;
  transition: transform 0.32s cubic-bezier(.4, 0, .2, 1),
              background 0.28s ease,
              box-shadow 0.28s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
input:checked + .slider {
  background: var(--green-dim);
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.06);
}
input:checked + .slider:before {
  transform: translateX(32px);
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.18),
              0 2px 10px rgba(52, 211, 153, 0.45);
}

/* ==============================================================
   Section frames
   ============================================================== */

section.block { padding: 26px 0 8px; }
section.block + section.block { padding-top: 14px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.section-title {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 350;
  font-variation-settings: "opsz" 36, "SOFT" 50;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.section-title em {
  font-style: italic;
  color: var(--amber);
  font-variation-settings: "opsz" 36, "SOFT" 80;
}
.section-aside {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ==============================================================
   Period filters (segmented)
   ============================================================== */

.period-filters {
  display: inline-flex;
  gap: 0;
  padding: 3px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 100px;
}
.period-btn {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-3);
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.period-btn:hover { color: var(--ink); }
.period-btn.active {
  background: var(--amber-dim);
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.3);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.04);
}

/* ==============================================================
   Stat cards (3 cols)
   ============================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 880px) {
  .stats-grid { grid-template-columns: 1fr; }
}

.stat {
  position: relative;
  background: linear-gradient(180deg, rgba(15, 30, 51, 0.55), rgba(10, 22, 40, 0.4));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  transition: border-color 0.25s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-flat);
  overflow: hidden;
}
.stat:hover {
  border-color: rgba(251, 191, 36, 0.22);
  transform: translateY(-1px);
  box-shadow: var(--shadow-deep), var(--shadow-flat);
}
.stat::before {
  content: "";
  position: absolute;
  top: 0; left: 24px;
  width: 36px; height: 1px;
  background: var(--amber);
  opacity: 0.7;
  box-shadow: 0 0 10px var(--amber-glow);
}
.stat-label {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.stat-value {
  font-family: var(--f-display);
  font-size: 56px;
  font-variation-settings: "opsz" 80, "SOFT" 50;
  font-weight: 320;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}
.stat-value.counting { color: var(--amber); }
.stat-value.small {
  font-size: 22px;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 30, "SOFT" 50;
}
.stat-sub {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-4);
  letter-spacing: 0.01em;
}

/* ==============================================================
   Topics list
   ============================================================== */

.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
}
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; }
}

.panel {
  background: linear-gradient(180deg, rgba(15, 30, 51, 0.4), rgba(10, 22, 40, 0.3));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
}

.topics-list {
  display: flex;
  flex-direction: column;
}
.topic-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}
.topic-row:last-child { border-bottom: none; }
.topic-row:hover .topic-name { color: var(--ink); }

.topic-name {
  font-size: 14px;
  color: var(--ink-2);
  text-transform: capitalize;
  letter-spacing: 0;
  transition: color 0.15s ease;
}
.topic-bar {
  display: flex;
  align-items: center;
  gap: 14px;
}
.topic-bar-track {
  position: relative;
  width: 90px; height: 2px;
  background: var(--line);
  border-radius: 1px;
  overflow: hidden;
}
.topic-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber-glow);
  transition: width 0.55s cubic-bezier(.4, 0, .2, 1);
}
.topic-count {
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  text-align: right;
}
.topics-empty {
  padding: 28px 0;
  text-align: center;
  color: var(--ink-4);
  font-size: 13px;
  font-style: italic;
}

/* ==============================================================
   Chart
   ============================================================== */

.chart-card {
  background: linear-gradient(180deg, rgba(15, 30, 51, 0.4), rgba(10, 22, 40, 0.3));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 26px 26px;
}
.chart-wrap {
  position: relative;
  height: 240px;
}

/* ==============================================================
   Configuration (channels + topics)
   ============================================================== */

.config-panel {
  background: linear-gradient(180deg, rgba(15, 30, 51, 0.4), rgba(10, 22, 40, 0.3));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
@media (max-width: 880px) {
  .config-panel { grid-template-columns: 1fr; gap: 28px; }
}

.config-group h3 {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

.opt-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.opt:hover { background: rgba(255, 255, 255, 0.02); border-color: var(--line); }
.opt.is-on  { border-color: rgba(251, 191, 36, 0.18); background: rgba(251, 191, 36, 0.025); }

.checkbox {
  position: relative;
  width: 18px; height: 18px;
  flex-shrink: 0;
  border-radius: 4px;
  border: 1px solid var(--line-3);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.18s ease;
}
.opt input[type="checkbox"] {
  opacity: 0; position: absolute; pointer-events: none;
}
.opt input[type="checkbox"]:checked + .checkbox {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 12px var(--amber-glow);
}
.opt input[type="checkbox"]:checked + .checkbox::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8.5 L6.8 11.6 L12.6 4.8' stroke='%230A1628' stroke-width='2.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: 16px 16px;
  background-position: center;
  background-repeat: no-repeat;
}
.opt-label {
  font-size: 14px;
  color: var(--ink-2);
  text-transform: capitalize;
  letter-spacing: 0;
}
.opt-meta {
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--ink-4);
  margin-left: auto;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.save-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.save-status {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
}
.save-status.ok    { color: var(--green); }
.save-status.fail  { color: var(--red); }

.btn {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 9px 18px;
  background: var(--amber);
  color: var(--bg);
  border: 1px solid var(--amber);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}
.btn:hover {
  background: var(--amber-soft);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12), 0 4px 14px rgba(251, 191, 36, 0.25);
}
.btn:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  border-color: var(--ink-4);
  box-shadow: none;
}

/* ==============================================================
   Footer
   ============================================================== */

.footer {
  margin-top: 80px;
  padding: 32px 0 60px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.06em;
}
.footer .left  { letter-spacing: 0.1em; text-transform: uppercase; }
.footer .right { display: flex; gap: 18px; }
.footer a { color: var(--ink-4); border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.footer a:hover { color: var(--amber); border-color: var(--amber); }

/* ==============================================================
   Login page
   ============================================================== */

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 22px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  padding: 44px 42px 36px;
  background: linear-gradient(180deg, rgba(15, 30, 51, 0.6), rgba(10, 22, 40, 0.4));
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 32px; right: 32px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0.7;
}
.login-card .brand {
  font-size: 26px;
  margin-bottom: 4px;
}
.login-card .lead {
  font-family: var(--f-display);
  font-size: 32px;
  font-variation-settings: "opsz" 48, "SOFT" 60;
  font-weight: 320;
  letter-spacing: -0.025em;
  margin: 28px 0 8px;
  line-height: 1.05;
}
.login-card .lead em {
  font-style: italic;
  color: var(--amber);
  font-variation-settings: "opsz" 48, "SOFT" 100;
}
.login-card .lead-sub {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 28px;
  letter-spacing: 0.005em;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.field label {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input[type="password"],
.field input[type="text"] {
  font-family: var(--f-body);
  font-size: 15px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

.field-error {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--red);
  letter-spacing: 0.04em;
  margin-top: -10px;
  margin-bottom: 14px;
}

.login-card .btn {
  width: 100%;
  padding: 12px 18px;
  font-size: 11.5px;
}

/* ==============================================================
   Stagger reveal at load
   ============================================================== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal-in 0.85s cubic-bezier(.2, .7, 0, 1) forwards;
}
.reveal.d1  { animation-delay: 0.05s; }
.reveal.d2  { animation-delay: 0.13s; }
.reveal.d3  { animation-delay: 0.22s; }
.reveal.d4  { animation-delay: 0.32s; }
.reveal.d5  { animation-delay: 0.42s; }
.reveal.d6  { animation-delay: 0.52s; }

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(18px); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0);  filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; animation: none; filter: none; }
  .stat-value.counting { color: var(--ink); }
  .topic-bar-fill { transition: none; }
  .status-pill .led, .brand .glyph, .eyebrow .dot { animation: none; }
}
