/* Ensyra — login flow · design tokens + styles (framework-free) */

/* ============================================================
   Ensyra — Colors & Type tokens
   The single source of truth for the Ensyra design language.
   Flat / minimal / hairline · monochrome-led · Plus Jakarta Sans
   ============================================================ */

:root {
  /* ---------- INK & NEUTRALS ---------- */
  --ink:        #0a0a0b;   /* primary text, black buttons, logo */
  --ink-2:      #2c2c30;   /* secondary text, nav labels */
  --muted:      #6c6c72;   /* tertiary text, descriptions */
  --muted-2:    #9a9aa1;   /* captions, timestamps, eyebrow */
  --paper:      #ffffff;   /* card + main surface */
  --rail-bg:    #fbfbfa;   /* sidebar / off-white rail */
  --hover:      #f4f4f2;   /* hover fill */
  --active:     #efefec;   /* active nav fill */

  /* ---------- HAIRLINES ---------- */
  --line:       rgba(10, 10, 11, 0.10);  /* default 1px border */
  --line-soft:  rgba(10, 10, 11, 0.06);  /* faint divider */

  /* ---------- SEMANTIC ---------- */
  --green:      #1f8a5b;   /* positive / opportunity / active capability */
  --green-bg:   #eef7f1;
  --red:        #dc2626;   /* error / blocked */
  --amber:      #9a6a13;   /* attention / missing output */
  --amber-bg:   #faf3e6;
  --teal:       #0e8a7d;   /* accent option + orb */
  --violet:     #5b4fd6;   /* accent option + discovery marker */
  --brand-blue: #8fc9fe;   /* signature hero gradient */
  --brand-blue-deep: #5aa9f8;
  --brand-lilac: #cfc9ff;
  --brand-violet: #9e97ff;

  /* ---------- ACCENT (tweakable; monochrome by default) ---------- */
  --accent:     #0a0a0b;   /* used by active tab underline, progress ring */
  --accent-bg:  #f4f4f2;
  --core-auth-bg: #060608;
  --core-auth-text: #ffffff;
  --core-auth-accent: #5fe0cf;

  /* ---------- TYPE SCALE ---------- */
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --t-display:  52px;  /* "Vandaag." page title */
  --t-h1:       36px;  /* report titles */
  --t-h2:       28px;  /* section heads */
  --t-h3:       19px;  /* card titles */
  --t-stat:     30px;  /* big numbers */
  --t-body:     15px;  /* paragraph */
  --t-sm:       14px;  /* nav, buttons */
  --t-xs:       12.5px;/* meta, captions */
  --t-cap:      11px;  /* uppercase labels */

  /* weights: Plus Jakarta Sans 400 / 500 / 530 / 540 / 560 / 600 */
  --w-reg: 400;
  --w-med: 500;
  --w-semi: 560;
  --w-bold: 600;

  /* tracking */
  --track-tight: -0.03em;  /* display + h1 */
  --track-snug:  -0.02em;  /* h2/h3 */
  --track-caps:  0.08em;   /* uppercase labels */

  /* ---------- RADII ---------- */
  --r-xl: 16px;   /* dark hero panel */
  --r-lg: 14px;   /* cards */
  --r-md: 10px;   /* selects, workspace switcher, menus */
  --r-sm: 8px;    /* buttons, nav items */

  /* ---------- SHADOW (used sparingly — flat system) ---------- */
  --shadow-menu: 0 16px 40px -16px rgba(10,10,11,0.28), 0 2px 6px -2px rgba(10,10,11,0.08);

  /* ---------- SPACING RHYTHM ---------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 14px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;

  /* ---------- LAYOUT ---------- */
  --sidebar-w: 248px;
  --sidebar-rail-w: 68px;
  --topbar-h: 56px;
  --content-max: 1180px;
  --content-pad-y: 40px;
  --content-pad-x: 48px;
}

/* ---------- SEMANTIC ELEMENT DEFAULTS ---------- */
.ds-display { font: var(--w-bold) var(--t-display)/1.0 var(--font-sans); letter-spacing: var(--track-tight); }
.ds-h1      { font: var(--w-bold) var(--t-h1)/1.08 var(--font-sans); letter-spacing: var(--track-tight); }
.ds-h2      { font: var(--w-bold) var(--t-h2)/1.15 var(--font-sans); letter-spacing: var(--track-snug); }
.ds-h3      { font: var(--w-semi) var(--t-h3)/1.25 var(--font-sans); letter-spacing: var(--track-snug); }
.ds-body    { font: var(--w-reg) var(--t-body)/1.5 var(--font-sans); color: var(--muted); }
.ds-eyebrow { font: var(--w-bold) 11.5px/1 var(--font-sans); letter-spacing: 0.10em; text-transform: uppercase; color: var(--muted-2); }
.ds-cap     { font: var(--w-bold) var(--t-cap)/1 var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }



* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  background: #060608;
  color: #fff;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.core-stage {
  position: fixed; inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
}

/* ---------- ambient field ---------- */
.core-glow {
  position: absolute; border-radius: 999px; filter: blur(110px);
  z-index: 0; pointer-events: none; transition: opacity 0.8s ease;
}
.core-glow.teal   { width: 720px; height: 720px; top: -10%; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(14,138,125,0.5), transparent 70%); }
.core-glow.violet { width: 640px; height: 640px; bottom: -20%; left: 28%;
  background: radial-gradient(circle, rgba(91,79,214,0.4), transparent 70%); }
.core-vignette {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 42%, transparent 38%, rgba(0,0,0,0.55) 100%);
}
.core-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 44%, #000 0%, transparent 72%);
}

/* drifting shadow-decisions */
.core-shadows { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.sd {
  position: absolute;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 999px;
  background: rgba(255,255,255,0.018);
  font-size: 11.5px; letter-spacing: 0; color: rgba(255,255,255,0.34);
  white-space: nowrap;
  will-change: transform, opacity;
}
.sd .d { width: 6px; height: 6px; border-radius: 999px; flex: 0 0 auto; }

/* ---------- top bar ---------- */
.core-top {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 30px 40px;
}
.core-lockup { display: flex; align-items: center; gap: 11px; }
.core-lockup img { width: 26px; height: 26px; }
.core-lockup b { font-weight: 600; font-size: 19px; letter-spacing: 0; }
.core-ws {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 13px 8px 9px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.core-ws:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.18); }
.core-ws .av { width: 24px; height: 24px; border-radius: 7px; background: #16161a; display: flex; align-items: center; justify-content: center; }
.core-ws .av img { width: 15px; height: 15px; }
.core-ws .lbl { font-size: 13px; font-weight: 540; }
.core-ws .lbl span { color: rgba(255,255,255,0.4); font-weight: 400; margin-right: 4px; }
.core-ws svg { color: rgba(255,255,255,0.4); }

/* ---------- center column ---------- */
.core-center {
  position: relative; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; padding: 0 24px;
  min-height: 0;
}

/* orb */
.core-orb { position: relative; width: 340px; height: 340px; }
.core-orb canvas { position: relative; z-index: 2; display: block; }
.core-ring {
  position: absolute; inset: 0; border-radius: 999px; border: 1px solid rgba(255,255,255,0.07);
  z-index: 1;
}
.core-ring.r1 { inset: -18px; animation: spin 38s linear infinite; border-style: solid;
  border-color: rgba(255,255,255,0.09) transparent rgba(255,255,255,0.04) transparent; }
.core-ring.r2 { inset: 30px; animation: spin 26s linear infinite reverse;
  border-color: transparent rgba(63,208,189,0.18) transparent rgba(138,123,255,0.16); }
@keyframes spin { to { transform: rotate(360deg); } }
.core-orb-center {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; pointer-events: none;
}
.core-orb-state { font-weight: 600; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; transition: color 0.4s; color: rgba(255,255,255,0.5); }
.core-orb-state.awake { color: #5fe0cf; }
.core-orb-sub { font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.32); margin-top: 5px; }

/* auth module */
.core-auth { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; }
.core-auth-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-bottom: 18px;
}
.core-auth-eyebrow .live { width: 6px; height: 6px; border-radius: 999px; background: #3fd0bd;
  box-shadow: 0 0 0 0 rgba(63,208,189,0.5); animation: lgPulse 2.4s ease-out infinite; }
@keyframes lgPulse { 0% { box-shadow: 0 0 0 0 rgba(63,208,189,0.5); } 70%,100% { box-shadow: 0 0 0 9px rgba(63,208,189,0); } }

.core-fields { width: 100%; display: flex; flex-direction: column; gap: 2px; }
.core-field-label { display: none; }
.core-field {
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  transition: border-color 0.25s;
  display: flex; align-items: center;
}
.core-field:focus-within { border-color: rgba(95,224,207,0.8); }
.core-field .ic { color: rgba(255,255,255,0.36); margin-right: 12px; transition: color 0.25s; }
.core-field:focus-within .ic { color: #5fe0cf; }
.core-input {
  flex: 1;
  background: transparent; border: none; outline: none;
  font-family: inherit; font-size: 16px; color: #fff; letter-spacing: 0;
  padding: 16px 0;
}
.core-input::placeholder { color: rgba(255,255,255,0.32); }
.core-input:-webkit-autofill,
.core-input:-webkit-autofill:hover,
.core-input:-webkit-autofill:focus,
.core-input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--core-auth-text) !important;
  caret-color: var(--core-auth-accent);
  background-color: var(--core-auth-bg) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--core-auth-bg) inset !important;
  box-shadow: 0 0 0 1000px var(--core-auth-bg) inset !important;
  transition: background-color 9999s ease-out, color 9999s ease-out;
}
.core-input:autofill,
.core-input:-moz-autofill {
  color: var(--core-auth-text) !important;
  caret-color: var(--core-auth-accent);
  background-color: var(--core-auth-bg) !important;
  box-shadow: 0 0 0 1000px var(--core-auth-bg) inset !important;
}
.core-eye {
  background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.4);
  padding: 6px; transition: color 0.15s;
}
.core-eye:hover { color: #fff; }

.core-meta { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.core-waiting { font-size: 12.5px; color: rgba(255,255,255,0.45); display: inline-flex; align-items: center; gap: 7px; }
.core-waiting b { color: rgba(255,255,255,0.85); font-weight: 560; }
.core-waiting .pip { width: 5px; height: 5px; border-radius: 999px; background: #e0a93c; }
.core-forgot { font-size: 12.5px; color: rgba(255,255,255,0.5); text-decoration: none; }
.core-forgot:hover { color: #fff; }

/* primary action */
.core-go {
  margin-top: 26px; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: inherit; font-weight: 560; font-size: 15px; color: #07110f;
  padding: 16px;
  background: #fff;
  border: none; border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(63,208,189,0);
  transition: box-shadow 0.3s, transform 0.08s, background 0.2s;
}
.core-go:hover { box-shadow: 0 10px 40px -8px rgba(63,208,189,0.55); }
.core-go:active { transform: translateY(0.5px); }
.core-go:disabled { cursor: wait; }
.core-go svg { transition: transform 0.18s; }
.core-go:hover svg { transform: translateX(3px); }

.core-alt { margin-top: 16px; font-size: 12.5px; color: rgba(255,255,255,0.4); }
.core-alt a { color: rgba(255,255,255,0.7); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 1px; }
.core-alt a:hover { color: #fff; }

.core-alert,
.flash-stack {
  width: 100%;
  margin: -2px 0 16px;
}
.core-alert,
.flash {
  border: 1px solid rgba(240,133,127,0.30);
  border-radius: var(--r-md);
  background: rgba(224,84,75,0.16);
  color: rgba(255,255,255,0.86);
  font-size: 12.5px;
  line-height: 1.45;
  padding: 11px 13px;
}
.flash-success {
  border-color: rgba(78,203,151,0.30);
  background: rgba(46,176,128,0.16);
}
.core-field-error {
  display: block;
  width: 100%;
  margin: 7px 0 5px 30px;
  color: #f0857f;
  font-size: 12px;
  line-height: 1.35;
}
.core-code-error {
  margin: 10px 0 0;
  text-align: center;
}

/* ---------- bottom heartbeat ---------- */
.core-bottom { position: relative; z-index: 2; padding: 0 0 4px; }
.core-ecg { display: block; width: 100%; height: 56px; }
.core-ecg .base { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 1.2; }
.core-ecg .blip { fill: none; stroke: #3fd0bd; stroke-width: 2; stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(63,208,189,0.9)); stroke-dasharray: 90 2400; }
.core-foot {
  position: absolute; bottom: 20px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 22px; z-index: 3;
}
.core-foot a { font-size: 12px; color: rgba(255,255,255,0.3); text-decoration: none; }
.core-foot a:hover { color: rgba(255,255,255,0.6); }

/* ============================================================
   2FA · 6-digit authenticator
   ============================================================ */
.core-heading { text-align: center; max-width: 420px; }
.core-heading h1 { font-weight: 600; font-size: 28px; letter-spacing: 0; line-height: 1.06; }
.core-heading p { margin-top: 11px; font-size: 14.5px; line-height: 1.55; color: rgba(255,255,255,0.55); }
.core-heading .em { color: rgba(255,255,255,0.9); font-weight: 540; }

.core-otp {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  justify-content: center;
  gap: 10px;
  width: min(100%, 408px);
  margin-top: 4px;
}
.core-otp input {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  text-align: center;
  font-family: inherit; font-weight: 560; font-size: 28px; color: #fff;
  letter-spacing: 0;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  outline: none;
  caret-color: #5fe0cf;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.1s;
}
.core-otp input::placeholder { color: rgba(255,255,255,0.18); }
.core-otp input:focus {
  border-color: rgba(95,224,207,0.85);
  background: rgba(95,224,207,0.06);
  box-shadow: 0 0 0 3px rgba(95,224,207,0.14);
}
.core-otp input.filled { border-color: rgba(255,255,255,0.4); color: #fff; }
.core-otp.shake { animation: otpShake 0.4s ease; }
@keyframes otpShake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-8px); } 40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(3px); }
}
.core-otp.bad input { border-color: rgba(214,68,127,0.7); }

.core-resend { margin-top: 18px; font-size: 13px; color: rgba(255,255,255,0.45); text-align: center; }
.core-resend b { color: rgba(255,255,255,0.85); font-weight: 540; }
.core-resend a { color: rgba(255,255,255,0.7); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 1px; }
.core-resend a:hover { color: #fff; }
.core-back {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 22px; font-size: 13px; color: rgba(255,255,255,0.5); text-decoration: none;
}
.core-back:hover { color: #fff; }

/* ---------- enter flood ---------- */
.core-flood {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background: radial-gradient(circle at 50% 46%, #eafffb, #ffffff 60%);
  opacity: 0; transition: opacity 0.9s ease;
}
.core-flood.on { opacity: 1; }

/* ============================================================
   Redesign split auth
   Desktop mockup: narrow white operator rail + dark decision orb.
   ============================================================ */
@media (min-width: 781px) {
  :root {
    --core-auth-panel-w: 304px;
    --core-auth-panel-pad: 64px;
    --core-auth-form-w: 176px;
    --core-auth-right-bg: #0b1118;
    --core-auth-right-bg-2: #05070b;
    --core-auth-panel-shadow: 18px 0 34px rgba(10,10,11,0.05);
  }

  body {
    background:
      radial-gradient(circle at 65% 44%, rgba(14,138,125,0.18), transparent 36%),
      linear-gradient(145deg, var(--core-auth-right-bg), var(--core-auth-right-bg-2));
    color: var(--ink);
  }

  .core-stage {
    display: block;
    min-height: 100vh;
    overflow: hidden;
    background:
      radial-gradient(circle at 62% 42%, rgba(14,138,125,0.20), transparent 35%),
      linear-gradient(145deg, var(--core-auth-right-bg), var(--core-auth-right-bg-2));
  }

  .core-stage::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 2;
    width: var(--core-auth-panel-w);
    background: var(--paper);
    box-shadow: var(--core-auth-panel-shadow);
  }

  .core-grid,
  .core-shadows,
  .core-vignette {
    left: var(--core-auth-panel-w);
  }

  .core-grid {
    opacity: 0.22;
  }

  .core-vignette {
    background: radial-gradient(90% 90% at 45% 45%, transparent 36%, rgba(0,0,0,0.42) 100%);
  }

  .core-glow.teal {
    left: calc(var(--core-auth-panel-w) + ((100vw - var(--core-auth-panel-w)) * 0.47));
    top: -18%;
    width: 760px;
    height: 760px;
  }

  .core-glow.violet {
    left: calc(var(--core-auth-panel-w) + ((100vw - var(--core-auth-panel-w)) * 0.18));
    bottom: -32%;
  }

  .core-top {
    position: absolute;
    z-index: 5;
    top: 57px;
    left: var(--core-auth-panel-pad);
    width: calc(var(--core-auth-panel-w) - var(--core-auth-panel-pad));
    padding: 0;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
  }

  .core-lockup {
    gap: 10px;
    height: 34px;
    color: var(--ink);
  }

  .core-lockup img {
    width: 32px;
    height: 32px;
  }

  .core-lockup b {
    color: var(--ink);
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
  }

  .core-ws {
    position: absolute;
    top: -6px;
    left: 112px;
    max-width: 132px;
    min-height: 42px;
    gap: 7px;
    padding: 7px 9px 7px 7px;
    border-color: var(--line-soft);
    border-radius: 14px;
    background: var(--hover);
    color: var(--ink);
    box-shadow: 0 8px 22px rgba(10,10,11,0.05);
  }

  .core-ws:hover {
    background: var(--hover);
    border-color: var(--line);
  }

  .core-ws .av {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: var(--ink);
  }

  .core-ws .av img {
    width: 15px;
    height: 15px;
    filter: invert(1) brightness(2);
  }

  .core-ws .lbl {
    overflow: hidden;
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
  }

  .core-ws .lbl span {
    display: block;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
    text-overflow: ellipsis;
  }

  .core-ws svg {
    color: var(--muted-2);
  }

  .core-center {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
    min-height: 100vh;
    padding: 0;
  }

  .core-orb {
    position: absolute;
    left: calc(var(--core-auth-panel-w) + ((100vw - var(--core-auth-panel-w) - 560px) / 2));
    top: max(50%, 410px);
    width: 560px;
    height: 560px;
    transform: translateY(-50%);
  }

  .core-orb canvas {
    width: 560px !important;
    height: 560px !important;
  }

  .core-ring.r1 {
    inset: -145px;
    border-color: rgba(255,255,255,0.08) transparent rgba(255,255,255,0.035) transparent;
  }

  .core-ring.r2 {
    inset: -72px;
    border-color: transparent rgba(63,208,189,0.16) transparent rgba(138,123,255,0.13);
  }

  .core-orb-state {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.26em;
  }

  .core-orb-sub {
    font-size: 10.5px;
    letter-spacing: 0.18em;
  }

  .core-auth {
    position: absolute;
    z-index: 5;
    top: 124px;
    left: var(--core-auth-panel-pad);
    align-items: flex-start;
    width: var(--core-auth-form-w);
    max-width: var(--core-auth-form-w);
    color: var(--ink);
  }

  .core-auth-eyebrow {
    gap: 7px;
    margin-bottom: 16px;
    color: var(--green);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.13em;
    line-height: 1.12;
  }

  .core-auth-eyebrow .live {
    width: 6px;
    height: 6px;
    background: var(--green);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 40%, transparent);
  }

  .core-heading {
    max-width: 215px;
    text-align: left;
  }

  .core-heading h1 {
    color: var(--ink);
    font-size: 38px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.02;
  }

  .core-heading p {
    margin-top: 16px;
    color: var(--muted);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.45;
  }

  .core-heading .em {
    color: var(--ink);
    font-weight: 800;
    white-space: nowrap;
  }

  .core-fields {
    gap: 8px;
    margin-top: 10px;
  }

  .core-field-label {
    display: block;
    margin-top: 10px;
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
  }

  .core-field {
    min-height: 50px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--paper);
    box-shadow: 0 10px 22px rgba(10,10,11,0.05);
  }

  .core-field:focus-within {
    border-color: color-mix(in srgb, var(--ink) 34%, var(--line));
  }

  .core-field .ic {
    flex: 0 0 auto;
    margin-right: 9px;
    color: var(--muted-2);
  }

  .core-field:focus-within .ic {
    color: var(--ink);
  }

  .core-input {
    min-width: 0;
    padding: 0;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
  }

  .core-input::placeholder {
    color: var(--muted);
  }

  .core-input:-webkit-autofill,
  .core-input:-webkit-autofill:hover,
  .core-input:-webkit-autofill:focus,
  .core-input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--ink) !important;
    caret-color: var(--ink);
    background-color: var(--paper) !important;
    -webkit-box-shadow: 0 0 0 1000px var(--paper) inset !important;
    box-shadow: 0 0 0 1000px var(--paper) inset !important;
  }

  .core-eye {
    position: absolute;
    right: -38px;
    top: 50%;
    transform: translateY(-50%);
    margin-right: -5px;
    color: var(--muted-2);
  }

  .core-eye:hover {
    color: var(--ink);
  }

  .core-meta {
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    margin-top: 12px;
    overflow: hidden;
    white-space: nowrap;
  }

  .core-waiting,
  .core-forgot,
  .core-alt,
  .core-back,
  .core-resend {
    color: var(--muted);
  }

  .core-waiting {
    min-width: 0;
    max-width: 91px;
    overflow: hidden;
    font-size: 11.5px;
    text-overflow: ellipsis;
  }

  .core-waiting b {
    color: var(--ink);
    font-weight: 800;
  }

  .core-forgot {
    font-size: 11.5px;
    font-weight: 600;
  }

  .core-forgot:hover,
  .core-alt a,
  .core-back:hover,
  .core-resend a {
    color: var(--ink);
  }

  .core-go {
    margin-top: 20px;
    min-height: 52px;
    padding: 0 17px;
    background: var(--ink);
    color: var(--paper);
    border-radius: 14px;
    font-size: 13px;
    font-weight: 800;
    box-shadow: none;
    white-space: nowrap;
  }

  .core-go:hover {
    box-shadow: 0 14px 30px rgba(10,10,11,0.14);
  }

  .core-alt {
    margin-top: 14px;
    font-size: 11.5px;
    line-height: 1.35;
  }

  .core-alert,
  .flash-stack {
    margin: 14px 0 0;
  }

  .core-alert,
  .flash {
    border-color: color-mix(in srgb, var(--red, #dc2626) 18%, var(--line));
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 10px 22px rgba(10,10,11,0.05);
  }

  .core-field-error {
    margin: -4px 0 2px;
    color: var(--red, #dc2626);
  }

  .core-otp {
    justify-content: stretch;
    gap: 8px;
    width: min(100%, 392px);
    margin-top: 24px !important;
  }

  .core-otp input {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--paper);
    font-size: 26px;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(10,10,11,0.05);
  }

  .core-otp input:focus {
    border-color: var(--ink);
    background: var(--paper);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 8%, transparent);
  }

  .core-otp input.filled {
    border-color: var(--ink);
    color: var(--ink);
  }

  .core-resend {
    margin-top: 14px;
    text-align: left;
    font-size: 13px;
    line-height: 1.35;
  }

  .core-resend b {
    color: var(--ink);
    font-weight: 800;
  }

  .core-back {
    color: var(--muted);
    font-weight: 600;
  }

  /* Full desktop auth mockup: wide white operator panel + right decision layer. */
  :root {
    --core-auth-panel-w: 56.25vw;
    --core-auth-panel-pad: clamp(48px, 4.5vw, 69px);
    --core-auth-form-w: min(400px, calc(var(--core-auth-panel-w) - (var(--core-auth-panel-pad) * 2)));
    --core-auth-right-glow: rgba(90, 116, 150, 0.13);
  }

  body,
  .core-stage {
    background:
      radial-gradient(circle at 77% 34%, var(--core-auth-right-glow), transparent 34%),
      linear-gradient(145deg, var(--core-auth-right-bg), var(--core-auth-right-bg-2));
  }

  .core-stage::before {
    width: var(--core-auth-panel-w);
  }

  .core-glow,
  .core-shadows {
    display: none;
  }

  .core-grid,
  .core-shadows,
  .core-vignette {
    left: var(--core-auth-panel-w);
  }

  .core-top {
    top: clamp(41px, 5.4vw, 62px);
    left: var(--core-auth-panel-pad);
    width: calc(var(--core-auth-panel-w) - (var(--core-auth-panel-pad) * 2));
    align-items: center;
    justify-content: space-between;
  }

  .core-lockup {
    height: 39px;
    gap: 11px;
  }

  .core-lockup img {
    width: 32px;
    height: 32px;
  }

  .core-lockup b {
    font-size: 21px;
    font-weight: 800;
  }

  .core-ws {
    position: static;
    max-width: min(194px, 42vw);
    min-height: 38px;
    gap: 9px;
    padding: 7px 11px 7px 8px;
    border-radius: 999px;
  }

  .core-ws .av {
    width: 23px;
    height: 23px;
    border-radius: 7px;
  }

  .core-ws .lbl {
    font-size: 13px;
    line-height: 1.1;
  }

  .core-ws .lbl span {
    display: none;
  }

  .core-orb {
    left: calc(var(--core-auth-panel-w) + ((100vw - var(--core-auth-panel-w) - 380px) / 2));
    top: 40.5%;
    width: 380px;
    height: 380px;
  }

  .core-orb canvas {
    width: 380px !important;
    height: 380px !important;
  }

  .core-ring.r1 {
    inset: -98px;
  }

  .core-ring.r2 {
    inset: -49px;
  }

  .core-auth {
    top: clamp(158px, 30vh, 330px);
    left: var(--core-auth-panel-pad);
    width: var(--core-auth-form-w);
    max-width: var(--core-auth-form-w);
  }

  .core-auth-eyebrow {
    margin-bottom: 20px;
    font-size: 11.5px;
    letter-spacing: 0.18em;
  }

  .core-auth-eyebrow .live {
    width: 7px;
    height: 7px;
  }

  .core-heading {
    max-width: var(--core-auth-form-w);
  }

  .core-heading h1 {
    font-size: clamp(30px, 2.45vw, 36px);
    line-height: 1.05;
  }

  .core-heading p {
    margin-top: 12px;
    font-size: clamp(13.5px, 1vw, 15.5px);
    line-height: 1.45;
  }

  .core-fields {
    gap: 10px;
    margin-top: 26px;
  }

  .core-field-label {
    margin-top: 0;
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .core-field {
    min-height: 48px;
    padding: 0 16px;
    border-radius: 14px;
  }

  .core-field .ic {
    width: 16px;
    height: 16px;
    margin-right: 12px;
  }

  .core-input {
    font-size: 15px;
  }

  .core-eye {
    right: 14px;
    margin-right: 0;
  }

  .core-meta {
    gap: 14px;
    justify-content: space-between;
    margin-top: 15px;
  }

  .core-waiting,
  .core-forgot {
    max-width: none;
    font-size: 13px;
  }

  .core-waiting .pip {
    width: 7px;
    height: 7px;
  }

  .core-go {
    margin-top: 22px;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 14px;
    font-size: 15px;
  }

  .core-go svg {
    width: 18px;
    height: 18px;
  }

  .core-alt {
    align-self: center;
    margin-top: 18px;
    font-size: 13px;
    text-align: center;
  }

  .core-bottom {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: block;
    padding: 0;
    pointer-events: none;
  }

  .core-bottom::before {
    content: "PROFIT DECISION LAYER · STANDBY";
    position: absolute;
    left: var(--core-auth-panel-w);
    right: 0;
    bottom: clamp(87px, 8.2vw, 122px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: rgba(255,255,255,0.48);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.18em;
  }

  .core-bottom::after {
    content: "";
    position: absolute;
    left: calc(var(--core-auth-panel-w) + ((100vw - var(--core-auth-panel-w)) / 2) - 5px);
    bottom: clamp(92px, 8.35vw, 126px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3fd0bd;
    box-shadow: 0 0 14px rgba(63,208,189,0.9);
    transform: translateX(-13.2em);
  }

  .core-ecg {
    position: absolute;
    right: 0;
    bottom: clamp(32px, 4.2vw, 53px);
    width: calc(100vw - var(--core-auth-panel-w));
    height: 62px;
  }

  .core-ecg .base {
    stroke: rgba(63,208,189,0.58);
    stroke-width: 1.5;
  }

  .core-ecg .blip {
    stroke: rgba(63,208,189,0.68);
    stroke-width: 2;
  }

  .core-foot {
    right: auto;
    left: var(--core-auth-panel-pad);
    bottom: clamp(41px, 4.8vw, 59px);
    justify-content: flex-start;
    gap: 26px;
    pointer-events: auto;
  }

  .core-foot a {
    color: var(--muted-2);
    font-size: 13px;
  }

  .core-foot a:hover {
    color: var(--ink);
  }
}

@media (max-width: 780px) {
  .core-stage {
    min-height: 100dvh;
  }

  .core-center {
    gap: 20px;
    padding: 0 24px 8px;
  }

  .core-orb {
    width: min(300px, calc(100vw - 58px));
    height: min(300px, calc(100vw - 58px));
  }

  .core-orb canvas {
    width: 100% !important;
    height: 100% !important;
  }

  .core-ring.r1 {
    inset: -16px;
  }

  .core-ring.r2 {
    inset: 26px;
  }

  .core-auth {
    max-width: min(330px, calc(100vw - 48px));
  }

  .core-auth-eyebrow {
    margin-bottom: 14px;
    font-size: 10px;
  }

  .core-heading h1 {
    font-size: 25px;
  }

  .core-heading p {
    margin-top: 9px;
    font-size: 13.5px;
    line-height: 1.45;
  }

  .core-fields {
    gap: 0;
  }

  .core-input {
    padding: 14px 0;
    font-size: 15px;
  }

  .core-meta {
    margin-top: 13px;
  }

  .core-go {
    margin-top: 20px;
    padding: 14px;
    font-size: 14px;
  }

  .core-alt {
    margin-top: 13px;
    font-size: 12px;
  }

  .core-foot {
    bottom: max(14px, env(safe-area-inset-bottom, 0px));
    gap: 16px;
  }
}

@media (max-height: 760px) and (max-width: 780px) {
  .core-orb { width: 260px; height: 260px; }
  .core-orb canvas { width: 260px !important; height: 260px !important; }
  .core-center { gap: 18px; }
}
@media (max-width: 520px) {
  .core-top { padding: 22px 20px; }
  .core-ws .lbl span { display: none; }
  .core-lockup img,
  .core-ws .av img {
    filter: invert(1) brightness(2);
  }
}
@media (prefers-reduced-motion: reduce) {
  .core-ring.r1, .core-ring.r2 { animation: none; }
}

/* ============================================================
   Calm SaaS login
   The regular login no longer uses the decision-sphere stage.
   ============================================================ */
.login-page {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100dvh;
  overflow: auto;
  background: var(--rail-bg);
  color: var(--ink);
}

body:has(.login-page) {
  background: var(--rail-bg);
  color: var(--ink);
}

.login-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: clamp(22px, 3.6vw, 42px) clamp(22px, 5vw, 56px) 0;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.login-brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.login-brand span {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 500px) minmax(320px, 1fr);
  gap: clamp(32px, 5vw, 78px);
  align-items: center;
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: clamp(40px, 6.4vw, 88px) clamp(22px, 5vw, 56px);
}

.login-panel {
  width: 100%;
  padding: clamp(26px, 3vw, 38px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 24px 70px -46px rgba(10, 10, 11, 0.32);
}

.login-eyebrow,
.login-summary-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.login-eyebrow span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
}

.login-heading {
  margin-top: 24px;
}

.login-heading h1 {
  color: var(--ink);
  font-size: clamp(38px, 4.5vw, 58px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.login-heading p {
  max-width: 440px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.55;
}

.login-page .login-form.core-auth {
  position: static;
  align-items: stretch;
  width: 100%;
  max-width: none;
  margin-top: 30px;
  color: var(--ink);
}

.login-page .core-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin: 0;
}

.login-page .core-field-label {
  display: block;
  margin: 0;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.login-page .core-field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.login-page .core-field:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(10, 10, 11, 0.06);
}

.login-page .core-field .ic {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-right: 12px;
  color: var(--muted-2);
}

.login-page .core-field:focus-within .ic {
  color: var(--ink);
}

.login-page .core-input {
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 650;
}

.login-page .core-input::placeholder {
  color: var(--muted-2);
}

.login-page .core-input:-webkit-autofill,
.login-page .core-input:-webkit-autofill:hover,
.login-page .core-input:-webkit-autofill:focus,
.login-page .core-input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--ink) !important;
  caret-color: var(--ink);
  background-color: var(--paper) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--paper) inset !important;
  box-shadow: 0 0 0 1000px var(--paper) inset !important;
}

.login-page .core-input:autofill,
.login-page .core-input:-moz-autofill {
  color: var(--ink) !important;
  caret-color: var(--ink);
  background-color: var(--paper) !important;
  box-shadow: 0 0 0 1000px var(--paper) inset !important;
}

.login-page .core-eye {
  position: static;
  flex: 0 0 auto;
  margin: 0 -6px 0 8px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  transform: none;
}

.login-page .core-eye:hover,
.login-page .core-eye:focus-visible {
  color: var(--ink);
}

.login-page .core-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin-top: 18px;
  overflow: visible;
  white-space: normal;
}

.login-page .core-waiting,
.login-page .core-forgot,
.login-page .core-alt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.login-page .core-waiting {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: none;
}

.login-page .core-waiting b {
  color: var(--ink);
  font-weight: 800;
}

.login-page .core-waiting .pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.login-page .core-forgot,
.login-page .core-alt a {
  color: var(--ink);
  text-decoration: none;
}

.login-page .core-forgot:hover,
.login-page .core-alt a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-page .core-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  margin-top: 24px;
  padding: 0 22px;
  border: 0;
  border-radius: 16px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.16s ease;
}

.login-page .core-go:hover,
.login-page .core-go:focus-visible {
  box-shadow: 0 16px 30px rgba(10, 10, 11, 0.14);
}

.login-page .core-go:active {
  transform: translateY(1px);
}

.login-page .core-go svg {
  transition: transform 0.16s ease;
}

.login-page .core-go:hover svg {
  transform: translateX(3px);
}

.login-page .core-alt {
  margin-top: 18px;
  text-align: center;
}

.login-page .core-alert,
.login-page .flash-stack {
  width: 100%;
  margin: 22px 0 0;
}

.login-page .core-alert,
.login-page .flash {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
  font-size: 13.5px;
  line-height: 1.45;
  padding: 13px 15px;
}

.login-page .flash-success {
  border-color: color-mix(in srgb, var(--green) 30%, var(--line));
}

.login-page .core-field-error {
  display: block;
  width: 100%;
  margin: -5px 0 4px;
  color: var(--red, #dc2626);
  font-size: 12.5px;
  line-height: 1.35;
}

.login-page .login-back {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.login-page .login-back:hover,
.login-page .login-back:focus-visible {
  color: var(--ink);
}

.login-page .login-link-button {
  text-decoration: none;
}

.login-recovery-page .login-eyebrow {
  margin-top: 16px;
}

.login-recovery-steps {
  position: absolute;
  right: 36px;
  bottom: 36px;
  left: 36px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px 13px;
  align-items: center;
}

.login-recovery-steps span {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.login-recovery-steps strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-summary {
  width: 100%;
}

.login-summary-card {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 4.4vw, 54px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 24px 70px -52px rgba(10, 10, 11, 0.34);
}

.login-summary-card::after {
  content: "";
  position: absolute;
  top: 34px;
  right: 34px;
  width: 92px;
  height: 92px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 48%, var(--line-soft) 49% 61%, transparent 62%),
    var(--paper);
}

.login-summary-card h2 {
  max-width: 560px;
  margin-top: 20px;
  color: var(--ink);
  font-size: clamp(30px, 3.5vw, 48px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.login-summary-list {
  display: grid;
  gap: 0;
  margin-top: clamp(36px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.login-summary-list div {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 74px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.login-summary-list div:last-child {
  border-bottom: 0;
}

.login-summary-list strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.login-summary-list span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.login-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 0 clamp(22px, 5vw, 56px) clamp(24px, 3.8vw, 42px);
}

.login-footer a {
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.login-footer a:hover {
  color: var(--ink);
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 28px;
  }

  .login-summary {
    display: none;
  }
}

@media (max-width: 560px) {
  .login-top {
    padding-top: max(22px, env(safe-area-inset-top, 0px));
  }

  .login-brand img {
    width: 34px;
    height: 34px;
  }

  .login-brand span {
    font-size: 22px;
  }

  .login-shell {
    padding-top: 28px;
    padding-bottom: 30px;
  }

  .login-panel {
    padding: 22px 20px;
    border-radius: 22px;
  }

  .login-heading h1 {
    font-size: 34px;
    line-height: 1.02;
  }

  .login-heading p {
    margin-top: 14px;
    font-size: 15px;
    line-height: 1.48;
  }

  .login-page .login-form.core-auth {
    margin-top: 24px;
  }

  .login-page .core-field {
    min-height: 52px;
    border-radius: 14px;
  }

  .login-page .core-waiting,
  .login-page .core-forgot,
  .login-page .core-alt {
    font-size: 13px;
  }

  .login-page .core-go {
    min-height: 54px;
    margin-top: 22px;
    font-size: 15px;
  }

  .login-footer {
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 370px) {
  .login-page .core-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

/* Login mockup alignment: quiet SaaS surface + desktop signature panel. */
.login-page {
  grid-template-rows: auto 1fr auto;
  background: var(--paper);
}

body:has(.login-page) {
  background: var(--paper);
}

.login-top {
  width: 100%;
  max-width: none;
  padding: 28px 36px 0;
}

.login-brand {
  gap: 9px;
}

.login-brand img {
  width: 26px;
  height: 26px;
}

.login-brand span {
  font-size: 13px;
  letter-spacing: -0.03em;
}

.login-shell {
  width: min(100%, 1088px);
  grid-template-columns: 374px minmax(0, 412px);
  gap: 92px;
  justify-content: center;
  align-items: start;
  padding: 38px 8px 24px 34px;
}

.login-panel {
  max-width: 252px;
  margin-left: 90px;
  margin-top: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.login-eyebrow {
  min-height: 18px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--hover);
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
}

.login-heading {
  margin-top: 13px;
}

.login-heading h1 {
  max-width: 252px;
  font-size: 25px;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.login-heading p {
  max-width: 252px;
  margin-top: 8px;
  font-size: 10px;
  line-height: 1.55;
}

.login-page .login-form.core-auth {
  margin-top: 20px;
}

.login-page .core-fields {
  gap: 9px;
}

.login-page .core-field-label {
  color: var(--ink-2);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: none;
}

.login-password-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 4px;
}

.login-page .login-password-head .core-field-label {
  margin: 0;
}

.login-page .core-field {
  min-height: 31px;
  padding: 0 10px;
  border-radius: 7px;
  background: var(--paper);
}

.login-page .core-field .ic {
  display: none;
}

.login-page .core-input {
  font-size: 10px;
  font-weight: 500;
}

.login-page .core-input::placeholder {
  color: var(--ink);
}

.login-page .core-eye {
  color: var(--muted);
  width: 18px;
  height: 18px;
}

.login-page .core-meta {
  justify-content: flex-start;
  margin-top: 8px;
}

.login-page .core-waiting,
.login-page .core-forgot,
.login-page .core-alt {
  font-size: 9px;
  font-weight: 600;
}

.login-page .core-waiting {
  color: var(--ink-2);
}

.login-page .core-waiting b {
  color: var(--ink-2);
  font-weight: 600;
}

.login-page .core-go {
  min-height: 31px;
  margin-top: 13px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
}

.login-page .core-alt {
  margin-top: 13px;
}

.login-summary-card {
  position: relative;
  min-height: 501px;
  padding: 35px 34px;
  border: 0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 85% 9%, rgba(255,255,255,0.46) 0 15%, rgba(255,255,255,0.2) 16% 27%, transparent 28%),
    linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-lilac) 100%);
  box-shadow: none;
}

.login-summary {
  margin-top: -80px;
}

.login-summary-card::after {
  display: none;
}

.login-summary-eyebrow {
  color: color-mix(in srgb, var(--ink) 54%, transparent);
  font-size: 9px;
  letter-spacing: 0.19em;
}

.login-summary-card h2 {
  max-width: 330px;
  margin-top: 18px;
  font-size: 29px;
  line-height: 1.01;
  letter-spacing: -0.04em;
}

.login-insight {
  position: relative;
  min-height: 214px;
  margin-top: 26px;
}

.login-insight-card {
  position: absolute;
  left: 35px;
  right: 35px;
  bottom: 0;
  min-height: 154px;
  padding: 60px 20px 18px;
  border: 1px solid rgba(255,255,255,0.42);
  border-radius: 16px;
  background: rgba(255,255,255,0.20);
  color: var(--ink);
  backdrop-filter: blur(2px);
}

.login-insight-card > span {
  display: block;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.login-insight-card > strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
}

.login-insight-orb {
  position: absolute;
  z-index: 2;
  top: -4px;
  left: 50%;
  display: flex;
  width: 76px;
  height: 76px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  transform: translateX(-50%);
  box-shadow: 0 20px 42px rgba(75, 73, 151, 0.18);
}

.login-insight-orb strong {
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.login-insight-orb span {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 700;
}

.login-meter {
  margin-top: 11px;
}

.login-meter div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-size: 8px;
  font-weight: 800;
}

.login-meter i {
  display: block;
  height: 5px;
  margin-top: 5px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--ink) 0 var(--value), rgba(255,255,255,0.52) var(--value) 100%);
}

.login-quote {
  position: absolute;
  left: 33px;
  right: 36px;
  bottom: 34px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.login-quote span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 800;
}

.login-quote p {
  max-width: 280px;
  color: var(--ink);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.35;
}

.login-footer {
  position: fixed;
  right: auto;
  bottom: 34px;
  left: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 200px;
  width: auto;
  max-width: none;
  padding: 0;
}

.login-footer,
.login-footer a,
.login-footer span {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 600;
}

.login-footer nav {
  display: flex;
  gap: 24px;
}

@media (max-width: 900px) {
  .login-page {
    grid-template-rows: auto 1fr auto;
  }

  .login-top {
    width: min(100%, 390px);
    margin: 0 auto;
    padding: max(30px, env(safe-area-inset-top, 0px)) 22px 0;
  }

  .login-brand {
    gap: 11px;
  }

  .login-brand img {
    width: 34px;
    height: 34px;
  }

  .login-brand span {
    font-size: 22px;
  }

  .login-shell {
    display: block;
    width: min(100%, 390px);
    padding: 2px 22px 28px;
  }

  .login-panel {
    max-width: none;
    margin-left: 0;
    margin-top: 0;
  }

  .login-summary {
    margin-top: 0;
  }

  .login-eyebrow {
    margin-top: 0;
    min-height: 24px;
    padding: 7px 11px;
    font-size: 10px;
  }

  .login-heading {
    margin-top: 23px;
  }

  .login-heading h1 {
    max-width: 340px;
    font-size: 37px;
    line-height: 1.04;
  }

  .login-heading p {
    max-width: 330px;
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.45;
  }

  .login-page .login-form.core-auth {
    margin-top: 29px;
  }

  .login-page .core-fields {
    gap: 13px;
  }

  .login-page .core-field-label {
    font-size: 11px;
  }

  .login-page .core-field {
    min-height: 50px;
    border-radius: 12px;
    padding: 0 14px;
  }

  .login-page .core-input {
    font-size: 15px;
  }

  .login-page .core-meta {
    margin-top: 15px;
  }

  .login-page .core-waiting,
  .login-page .core-forgot,
  .login-page .core-alt {
    font-size: 13px;
  }

  .login-page .core-go {
    min-height: 51px;
    margin-top: 21px;
    border-radius: 11px;
    font-size: 15px;
  }

  .login-footer {
    position: static;
    display: flex;
    width: min(100%, 390px);
    margin: 0 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 0 22px max(22px, env(safe-area-inset-bottom, 0px));
  }

  .login-footer nav {
    flex-wrap: wrap;
    gap: 18px 24px;
  }
}

@media (max-width: 370px) {
  .login-top,
  .login-shell,
  .login-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .login-heading h1 {
    font-size: 34px;
  }
}

.login-recovery-page .login-back {
  display: flex;
  margin-bottom: 14px;
}

.login-recovery-page .login-eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-top: 0;
}

@media (max-width: 900px) {
  .login-recovery-page .login-back {
    margin-bottom: 15px;
  }
}
