/* ============================================================
   AUTH — the front door.
   One glass surface, centered on a dark, moving canvas. Nothing
   else competes for attention: no split panel, no sales copy —
   the same institutional system as the board itself, just lit
   differently for the one screen nobody is signed in yet to see.
   ============================================================ */

.auth-canvas{
  --auth-bg-0:#0B1013;
  --auth-bg-1:#141C21;
  --auth-ink:#EDF1F3;
  --auth-ink-dim:rgba(237,241,243,.60);
  --auth-ink-faint:rgba(237,241,243,.40);
  --auth-line:rgba(255,255,255,.13);
  --auth-line-soft:rgba(255,255,255,.08);
  --auth-accent:#B9CBD8;

  position:relative;
  min-height:100vh;
  display:flex;flex-direction:column;
  color:var(--auth-ink);
  overflow:hidden;
  isolation:isolate;
  background:
    radial-gradient(1200px 800px at 14% -10%,rgba(112,128,144,.22),transparent 60%),
    radial-gradient(950px 720px at 104% 6%,rgba(75,91,103,.32),transparent 55%),
    radial-gradient(1100px 900px at 50% 118%,rgba(28,38,44,.7),transparent 60%),
    linear-gradient(180deg,var(--auth-bg-1) 0%,var(--auth-bg-0) 100%);
}
body.auth-body{background:var(--auth-bg-0,#0B1013);}

/* blueprint ruling, faded toward the edges — texture, not a message */
.auth-canvas-grid{
  position:absolute;inset:0;z-index:0;pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.028) 1px,transparent 1px);
  background-size:56px 56px;
  -webkit-mask-image:radial-gradient(120% 90% at 50% 22%,#000 28%,transparent 78%);
  mask-image:radial-gradient(120% 90% at 50% 22%,#000 28%,transparent 78%);
}
/* a hair of film grain — the one detail that keeps a dark gradient from
   looking like a flat digital wash rather than a designed surface */
.auth-canvas-grain{
  position:absolute;inset:0;z-index:0;pointer-events:none;opacity:.05;mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* aurora glows — brand-tinted, heavily blurred, barely-there movement */
.auth-orb{position:absolute;z-index:0;pointer-events:none;border-radius:50%;filter:blur(84px);}
.auth-orb-1{
  width:560px;height:560px;top:-180px;left:-140px;opacity:.55;
  background:radial-gradient(circle,rgba(112,128,144,.55),transparent 68%);
  animation:auth-float 18s ease-in-out infinite;
}
.auth-orb-2{
  width:480px;height:480px;bottom:-190px;right:-110px;opacity:.4;
  background:radial-gradient(circle,rgba(88,110,132,.5),transparent 68%);
  animation:auth-float 22s ease-in-out infinite reverse;
}
@keyframes auth-float{
  0%,100%{transform:translate3d(0,0,0);}
  50%{transform:translate3d(0,26px,0);}
}

/* ---------- topbar ---------- */
.auth-topbar{
  position:relative;z-index:2;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:26px 40px;
}
.auth-brand-mini{display:flex;align-items:center;gap:10px;text-decoration:none;}
.auth-brand-mini .brand-mark{width:30px;height:30px;border-radius:8px;font-size:14px;}
.auth-brand-mini span:last-child{
  font-family:var(--font-head);font-size:12.5px;font-weight:700;letter-spacing:.09em;
  color:var(--auth-ink);
}
.auth-switch{font-size:12.5px;color:var(--auth-ink-dim);display:flex;align-items:center;gap:6px;white-space:nowrap;}
.auth-switch a{color:var(--auth-accent);font-weight:600;text-decoration:none;}
.auth-switch a:hover{color:#fff;text-decoration:underline;}

/* ---------- stage ---------- */
.auth-stage{
  position:relative;z-index:2;
  flex:1;display:flex;align-items:center;justify-content:center;
  padding:16px 24px 40px;
}

.auth-canvas-foot{
  position:relative;z-index:2;
  text-align:center;font-size:11px;color:var(--auth-ink-faint);
  padding:0 24px 28px;
}

/* ---------- the card ---------- */
.auth-card{
  position:relative;
  width:100%;max-width:412px;
  background:linear-gradient(165deg,rgba(255,255,255,.09) 0%,rgba(255,255,255,.03) 100%);
  border:1px solid var(--auth-line);
  border-radius:20px;
  padding:38px 36px 32px;
  overflow:hidden;
  backdrop-filter:blur(22px) saturate(160%);
  -webkit-backdrop-filter:blur(22px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 1px 1px rgba(0,0,0,.2),
    0 30px 70px -22px rgba(0,0,0,.65),
    0 12px 30px -14px rgba(0,0,0,.5);
  animation:auth-card-in .55s cubic-bezier(.16,1,.3,1) both;
}
@keyframes auth-card-in{
  from{opacity:0;transform:translateY(14px) scale(.98);}
  to{opacity:1;transform:translateY(0) scale(1);}
}
/* a thread of light along the glass edge, the way a beveled pane catches it */
.auth-card::before{
  content:"";position:absolute;left:16px;right:16px;top:0;height:1px;z-index:1;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);
}
.auth-card > *{position:relative;z-index:1;}
.auth-card.wide{max-width:660px;}

.auth-mark{display:flex;justify-content:center;margin-bottom:20px;}
.auth-card.wide .auth-mark{justify-content:flex-start;margin-bottom:16px;}
.auth-mark .brand-mark{
  width:46px;height:46px;border-radius:13px;font-size:19px;
  box-shadow:0 14px 30px -10px rgba(0,0,0,.65),inset 0 1px 0 rgba(255,255,255,.55),0 0 0 6px rgba(255,255,255,.035);
}

.auth-card-head{margin-bottom:24px;}
.auth-card-head h2{
  font-family:var(--font-head);font-size:22px;font-weight:650;
  letter-spacing:-.02em;color:#fff;margin:0;
}
.auth-card-head p{
  font-size:12.5px;color:var(--auth-ink-dim);line-height:1.6;margin:8px 0 0;max-width:52ch;
}
.auth-card.centered .auth-card-head{text-align:center;}
.auth-card.centered .auth-card-head p{margin-left:auto;margin-right:auto;max-width:34ch;}

/* section rule inside the wider registration form */
.form-section{
  display:flex;align-items:center;gap:10px;
  font-size:10px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;
  color:var(--auth-ink-faint);margin:4px 0 14px;
}
.form-section::after{content:"";flex:1;height:1px;background:var(--auth-line-soft);}
.form-section + .form-section,.field + .form-section,.field-row + .form-section{margin-top:22px;}
.form-section .idx{
  display:inline-flex;align-items:center;justify-content:center;
  width:18px;height:18px;border-radius:5px;background:rgba(255,255,255,.09);
  color:var(--auth-accent);font-family:var(--font-mono);font-size:10px;font-weight:700;
}

/* ---------- fields, re-lit for the glass surface ----------
   .f-label / .f-control are the shared board controls, styled for a
   white panel everywhere else in the app; this is the one screen they
   sit on dark glass, so every state is re-declared here rather than
   touching the shared rule the rest of the app depends on. */
.auth-card .f-label{color:rgba(237,241,243,.55);}
.auth-card .f-control{
  background:rgba(255,255,255,.055);
  border-color:rgba(255,255,255,.14);
  color:#F5F7F8;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.3);
}
.auth-card .f-control::placeholder{color:rgba(237,241,243,.32);}
.auth-card .f-control:hover{border-color:rgba(255,255,255,.24);}
.auth-card .f-control:focus{
  background:rgba(255,255,255,.09);
  border-color:rgba(185,203,216,.6);
  box-shadow:0 0 0 3px rgba(159,178,194,.24),inset 0 1px 2px rgba(0,0,0,.25);
}
.auth-card .f-control.is-invalid{border-color:#EF8B82;background:rgba(239,139,130,.08);}
.auth-card .f-control.is-invalid:focus{box-shadow:0 0 0 3px rgba(239,139,130,.22);}
.auth-card select.f-control{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C7D2D9' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>");
}
.auth-card .field-meta a{color:var(--auth-accent);}
.auth-card .field-meta a:hover{color:#fff;}
.auth-card .hint{color:rgba(237,241,243,.42);}
.auth-card .f-error{color:#F5A9A0;}
.auth-card .f-optional{color:rgba(237,241,243,.4);}

/* a leading glyph inside a field — email, password, anything that reads
   better named by an icon than left to the label alone */
.field-icon{position:relative;}
.field-icon-glyph{
  position:absolute;left:13px;top:50%;transform:translateY(-50%);z-index:1;
  display:flex;pointer-events:none;transition:color .15s;
  color:rgba(237,241,243,.42);
}
.field-icon-glyph svg{width:16px;height:16px;}
.field-icon .f-control{padding-left:38px;}
.field-icon:focus-within .field-icon-glyph{color:var(--auth-accent);}

/* password field with a reveal control */
.field-affix{position:relative;}
.field-affix .f-control{padding-right:44px;}
.affix-btn{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  width:30px;height:30px;border:0;background:none;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  border-radius:6px;color:rgba(237,241,243,.5);transition:background .15s,color .15s;
}
.affix-btn:hover{background:rgba(255,255,255,.09);color:#fff;}
.affix-btn svg{width:16px;height:16px;}

/* password strength — discrete ticks again, not a smooth bar */
.pw-meter{display:flex;gap:4px;margin-top:8px;}
.pw-meter i{
  flex:1;height:4px;border-radius:2px;background:rgba(255,255,255,.1);
  transition:background .18s;
}
.pw-meter.s1 i:nth-child(1){background:var(--red);}
.pw-meter.s2 i:nth-child(-n+2){background:var(--amber);}
.pw-meter.s3 i:nth-child(-n+3){background:var(--amber);}
.pw-meter.s4 i{background:var(--green);}
.pw-note{font-size:11px;color:rgba(237,241,243,.42);margin-top:6px;min-height:15px;}

.check-row{display:flex;align-items:flex-start;gap:9px;font-size:12.5px;color:rgba(237,241,243,.68);}
.check-row input[type=checkbox]{
  width:16px;height:16px;margin-top:1px;flex-shrink:0;accent-color:#9FB2C2;cursor:pointer;
  border-radius:4px;transition:transform .1s;
}
.check-row input[type=checkbox]:hover{transform:scale(1.08);}
.check-row input[type=checkbox]:focus-visible{outline:2px solid var(--auth-accent);outline-offset:2px;}
.check-row label{cursor:pointer;line-height:1.45;}
.check-row a{color:var(--auth-accent);font-weight:600;}

.auth-foot-note{
  text-align:center;font-size:12.5px;color:rgba(237,241,243,.45);margin-top:22px;
  padding-top:18px;border-top:1px solid rgba(255,255,255,.09);
}
.auth-foot-note a{color:var(--auth-accent);font-weight:600;text-decoration:none;}
.auth-foot-note a:hover{color:#fff;text-decoration:underline;}

/* ---------- flash + validation summary ---------- */
.notice{
  display:flex;gap:9px;align-items:flex-start;
  padding:11px 13px;border-radius:8px;font-size:12.5px;
  margin-bottom:18px;font-weight:500;line-height:1.5;
}
.notice.err{background:rgba(239,139,130,.14);color:#F6B9B1;}
.notice.ok{background:rgba(110,231,183,.14);color:#93E8C1;}
.notice svg{width:15px;height:15px;flex-shrink:0;margin-top:1px;}

/* ---------- responsive ---------- */
@media (max-width:900px){
  .auth-topbar{padding:20px 22px;}
  .auth-stage{padding:8px 18px 32px;}
  .auth-card{padding:30px 26px 26px;border-radius:18px;}
  .auth-card.wide{max-width:520px;}
  .auth-canvas-foot{font-size:10.5px;}
}
@media (max-width:560px){
  .field-row{grid-template-columns:1fr;gap:0;}
  .auth-card-head h2{font-size:19px;}
  .auth-topbar{padding:18px 16px;}
  .auth-switch{font-size:11.5px;}
}

/* ---------- utilities that replace one-off inline styles ---------- */

/* the agreement error hangs off the checkbox row above it */
.f-error.attached{margin-top:-6px;margin-bottom:12px;}

/* confirmation feedback — state carried by a class, never a written colour */
.pw-note.is-match{color:var(--green);}
.pw-note.is-mismatch{color:var(--amber);}
