
.auth-page{
  min-height:100dvh;
  background:var(--bg);
  color:var(--text);
}

body.pregate .auth-shell{visibility:hidden}
.gate{
  position:fixed;inset:0;display:none;align-items:center;justify-content:center;
  background:var(--bg);color:var(--muted);font-weight:var(--site-font-strong);z-index:50;
}
body.pregate .gate{display:flex}

.auth-shell{
  position:relative;
  min-height:100dvh;
  display:grid;
  place-items:center;
  padding:64px 16px 40px;
  overflow:hidden;
}

.auth-beams{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.auth-beams svg{display:none}
.auth-beams::before{
  content:"";position:absolute;left:50%;top:0;transform:translateX(-50%);
  width:min(720px,calc(100vw - 32px));height:1px;background:var(--line-soft);
  opacity:.72;
}
.auth-beams::after{
  content:"";position:absolute;left:50%;top:1px;transform:translateX(-50%);
  width:min(420px,62vw);height:1px;background:var(--accent);
  opacity:.24;
}

.auth-brand{
  position:absolute;top:18px;left:50%;transform:translateX(-50%);
  display:inline-flex;align-items:center;gap:9px;
  color:var(--text-strong);font-weight:800;font-size:18px;
}
.auth-brand:hover{color:var(--text-strong)}
.auth-brand-mark{
  width:34px;height:34px;border-radius:10px;
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--card-soft);border:1px solid var(--line);
  color:var(--accent);font-size:14px;font-weight:900;font-style:italic;
}

.auth-card{
  position:relative;width:100%;max-width:420px;
  background:var(--card);border:1px solid var(--line-soft);border-radius:var(--radius-xl);
  box-shadow:var(--shadow-lg);
  padding:22px 22px 20px;
  display:grid;gap:14px;
}

.auth-card-head{display:grid;gap:2px}
.auth-kicker{
  font-size:11.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;
  color:var(--accent);
}
.auth-title-sr{
  position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;
  clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;
}

.auth-card .tabs{
  display:grid;grid-template-columns:1fr 1fr;gap:2px;padding:3px;
  background:var(--card-soft);border:1px solid var(--line-soft);border-radius:var(--radius-md);
  overflow:visible;
}
.auth-card .tab{
  height:34px;padding:0;border:0;border-radius:calc(var(--radius-md) - 3px);
  background:none;color:var(--muted);font-size:14px;font-weight:var(--site-font-strong);
  cursor:pointer;transition:var(--transition);
}
.auth-card .tab:hover{color:var(--text)}
.auth-card .tab.active{background:var(--card);color:var(--text-strong);box-shadow:var(--shadow-sm)}
.auth-card .tab.is-active::after,
.auth-card .tab.active::after{content:none}

.auth-security-note{
  font-size:12.5px;
  padding:9px 12px;border-radius:var(--radius-md);
  background:var(--card-soft);color:var(--muted);
  border:1px solid var(--line-soft);
}

.auth-form{display:grid;gap:12px}
.auth-form[hidden],
[hidden]{display:none !important}
.auth-form .field{display:grid;gap:6px}
.auth-form .field > span{font-size:13px;color:var(--muted);font-weight:var(--site-font-strong)}
.auth-form input[type="tel"],
.auth-form input[type="email"],
.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input:not([type]){
  width:100%;padding:10px 13px;border:1px solid var(--line);border-radius:var(--radius-md);
  background:var(--bg);color:var(--text);font-size:15px;line-height:1.4;
  transition:border-color var(--dur-fast) var(--ease-out),box-shadow var(--dur-fast) var(--ease-out);
}
html[data-theme="light"] .auth-form input[type="tel"],
html[data-theme="light"] .auth-form input[type="email"],
html[data-theme="light"] .auth-form input[type="text"],
html[data-theme="light"] .auth-form input[type="password"],
html[data-theme="light"] .auth-form input:not([type]){background:var(--card-soft)}
.auth-form input::placeholder{color:var(--muted-2)}
.auth-form input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}

.auth-form .btn-primary,
.profile-nudge .btn-primary{
  height:42px;border:0;border-radius:var(--radius-md);
  background:var(--accent);color:var(--on-accent);font-size:15px;font-weight:var(--site-font-strong);
  cursor:pointer;transition:var(--transition);
}
.auth-form .btn-primary:hover,
.profile-nudge .btn-primary:hover{background:var(--accent-hover);color:var(--on-accent)}
.auth-form .btn-primary:active{transform:scale(.985)}

.auth-switch-line{text-align:center;font-size:13.5px;color:var(--muted)}
.auth-legal-links{
  display:flex;justify-content:center;gap:8px;
  font-size:12px;color:var(--muted-2);
}
.auth-legal-links a{color:var(--muted-2)}
.auth-legal-links a:hover{color:var(--accent)}
.auth-form .hint{min-height:18px;font-size:13px;color:var(--danger);text-align:center}
.auth-form-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:-2px}
.auth-remember{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12.5px;cursor:pointer}
.auth-remember input{width:auto;accent-color:var(--accent)}
.auth-link-button,.auth-beta-link{
  padding:0;border:0;background:none;color:var(--accent);font:inherit;font-size:12.5px;font-weight:700;cursor:pointer
}
.auth-link-button:hover,.auth-beta-link:hover{text-decoration:underline;text-underline-offset:3px}
.auth-beta-link{justify-self:center;color:var(--muted);font-size:12px}
.auth-oauth{display:grid;gap:9px}
.auth-divider{display:flex;align-items:center;gap:10px;color:var(--muted-2);font-size:11.5px;text-transform:uppercase;letter-spacing:.05em}
.auth-divider::before,.auth-divider::after{content:"";height:1px;flex:1;background:var(--line-soft)}
.auth-google{
  height:42px;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--card-soft);color:var(--text-strong);
  display:flex;align-items:center;justify-content:center;gap:10px;font:inherit;font-size:14px;font-weight:800;cursor:pointer;transition:var(--transition)
}
.auth-google:hover{border-color:var(--muted-2);background:var(--card)}
.auth-google svg{width:19px;height:19px}
.auth-google-note{margin:0;color:var(--muted-2);font-size:11.5px;line-height:1.45;text-align:center}

.auth-flow{
  position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:18px;
  background:rgba(5,7,12,.7);backdrop-filter:blur(8px)
}
.auth-flow[hidden]{display:none}
.auth-flow-card{
  width:min(460px,100%);max-height:calc(100dvh - 28px);overflow:auto;background:var(--bg-elev);
  border:1px solid var(--line);border-radius:var(--radius-xl);box-shadow:var(--shadow-pop);padding:20px
}
.auth-flow-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding-bottom:16px;border-bottom:1px solid var(--line-soft)}
.auth-flow-head>div{display:grid;gap:5px}
.auth-flow-head h2{font-size:21px;line-height:1.15;color:var(--text-strong)}
.auth-flow-head p:last-child{font-size:13px;line-height:1.45;color:var(--muted)}
.auth-flow-close{flex:0 0 auto;width:38px;height:38px;border:1px solid var(--line);border-radius:12px;background:var(--card-soft);color:var(--text);cursor:pointer}
.auth-flow-form{display:grid;gap:12px;padding-top:16px}
.auth-confirm-address{padding:14px;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--card-soft);color:var(--text-strong);overflow-wrap:anywhere;font-size:16px;font-weight:700}
.auth-confirm-note{font-size:13px;line-height:1.5;color:var(--muted)}
.auth-confirm-support{justify-self:start;font-size:12px;color:var(--muted);text-underline-offset:3px}
.auth-flow-form[data-mode="verify-email"] .auth-flow-actions{flex-wrap:wrap}
.auth-flow-form[data-mode="verify-email"] .auth-flow-actions button{height:auto;min-height:42px;padding:10px 14px}
.auth-flow-actions button:disabled{opacity:.6;cursor:wait}
.auth-flow-form .field{display:grid;gap:6px}
.auth-flow-form .field>span{font-size:13px;color:var(--muted);font-weight:var(--site-font-strong)}
.auth-flow-form input{
  width:100%;min-height:44px;padding:10px 13px;border:1px solid var(--line);border-radius:var(--radius-md);
  background:var(--bg);color:var(--text);font:inherit;font-size:15px
}
html[data-theme="light"] .auth-flow-form input{background:var(--card-soft)}
.auth-flow-form input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.auth-flow-actions{display:flex;justify-content:flex-end;gap:9px;padding-top:5px}
.auth-flow-actions button{height:40px;padding:0 15px;border-radius:var(--radius-md);font:inherit;font-size:13.5px;font-weight:800;cursor:pointer}
.auth-flow-actions .secondary{border:1px solid var(--line);background:none;color:var(--text)}
.auth-flow-actions .primary{border:0;background:var(--accent);color:var(--on-accent)}
.auth-flow-card>.hint{min-height:18px;margin-top:10px;text-align:center;color:var(--danger);font-size:13px}
.auth-flow-card>.hint.ok{color:var(--success)}
.auth-flow-card>.hint.warn{
  padding:10px 12px;border:1px solid var(--line);border-radius:var(--radius-md);
  background:var(--card-soft);color:var(--text);line-height:1.45;text-align:left
}

.privacy-consents{display:grid;gap:8px}
.privacy-consents-title{font-size:13px;color:var(--muted);font-weight:var(--site-font-strong)}
.privacy-option{
  display:flex;gap:10px;align-items:flex-start;
  padding:10px 12px;border:1px solid var(--line);border-radius:var(--radius-md);
  cursor:pointer;transition:var(--transition);
}
.privacy-option:hover{border-color:var(--muted-2)}
.privacy-option:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.privacy-option input{width:auto;margin-top:3px;accent-color:var(--accent)}
.privacy-option-text{display:grid;gap:1px;font-size:13.5px}
.privacy-option-text b{color:var(--text-strong)}
.privacy-option-text small{color:var(--muted);font-size:12px;line-height:1.4}
.privacy-consents-note{font-size:11.5px;color:var(--muted-2)}

.legal-consents{display:grid;gap:8px}
.legal-check{display:flex;gap:9px;align-items:flex-start;font-size:12.5px;color:var(--muted);cursor:pointer;line-height:1.45}
.legal-check input{width:auto;margin-top:2px;accent-color:var(--accent)}
.legal-check a{color:var(--accent)}

.auth-beta-link:disabled,
.auth-link-button:disabled{
  opacity:.5;
  cursor:not-allowed;
}

.auth-welcome{
  position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;
  background:var(--bg);opacity:0;transition:opacity .3s var(--ease-out);
}
.auth-welcome.active{opacity:1}
.auth-welcome.leaving{opacity:0}
.auth-welcome-inner{text-align:center;display:grid;gap:6px}
.auth-welcome-inner p{color:var(--muted);font-size:15px}
.auth-welcome-inner strong{
  font-size:34px;font-weight:900;font-style:italic;
  color:var(--text-strong);
}

.profile-nudge{
  position:fixed;inset:0;z-index:70;display:flex;align-items:center;justify-content:center;
  padding:20px;background:rgba(5,7,12,.66);backdrop-filter:blur(6px);
}
.profile-nudge[hidden]{display:none}
.profile-nudge-card{
  width:100%;max-width:400px;text-align:center;
  max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;
  background:var(--bg-elev);border:1px solid var(--line);border-radius:var(--radius-xl);
  box-shadow:var(--shadow-pop);padding:26px 22px 18px;
  display:grid;gap:10px;justify-items:center;
}
.profile-nudge-glyph{
  width:52px;height:52px;border-radius:16px;display:flex;align-items:center;justify-content:center;
  background:var(--accent-soft);color:var(--accent);
}
.profile-nudge-kicker{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--accent)}
.profile-nudge-card h2{font-size:19px}
.profile-nudge-card p{font-size:13.5px;color:var(--muted);line-height:1.5}
.profile-nudge-actions{display:grid;gap:8px;width:100%;margin-top:6px}
.profile-nudge-ghost{
  height:38px;border:1px solid var(--line);border-radius:var(--radius-md);
  background:none;color:var(--text);font-size:14px;font-weight:var(--site-font-strong);cursor:pointer;
  transition:var(--transition);
}
.profile-nudge-ghost:hover{background:var(--card-soft)}
.profile-nudge-never{
  border:0;background:none;color:var(--muted-2);font-size:12px;cursor:pointer;padding:4px;
}
.profile-nudge-never:hover{color:var(--muted)}

@media (max-width:480px){
  .auth-card{padding:18px 16px 16px}
  .auth-shell{padding-top:76px}
  .profile-nudge{padding:12px}
  .profile-nudge-card{padding:20px 16px 14px;gap:8px}
  .auth-form-tools{align-items:flex-start}
  .auth-flow{padding:10px;align-items:end}
  .auth-flow-card{border-radius:20px 20px 14px 14px;padding:17px 15px calc(15px + env(safe-area-inset-bottom))}
  .auth-flow-head h2{font-size:19px}
}

@media (max-height:520px){
  .profile-nudge{align-items:flex-start;padding:12px;overflow-y:auto}
  .profile-nudge-card{margin:auto 0;padding:16px;gap:7px}
  .profile-nudge-glyph{width:44px;height:44px;border-radius:14px}
}
html[data-staff-portal="1"] .tabs,
html[data-staff-portal="1"] #form-register,
html[data-staff-portal="1"] [data-switch="register"],
html[data-staff-portal="1"] .auth-switch-line,
html[data-staff-portal="1"] .auth-beta-link,
html[data-staff-portal="1"] #auth_google_wrap,
html[data-staff-portal="1"] #auth_google_register_wrap{display:none!important}
html[data-staff-portal="1"] .auth-card-head{gap:5px;padding-bottom:2px}
html[data-staff-portal="1"] .auth-title-sr{
  position:static;width:auto;height:auto;margin:0;padding:0;border:0;clip:auto;overflow:visible;white-space:normal;
  color:var(--text-strong);font-size:24px;line-height:1.12;letter-spacing:-.025em
}
html[data-staff-portal="1"] .auth-card{
  max-width:410px;border-color:color-mix(in srgb,var(--line,rgba(255,255,255,.14)) 86%,var(--text,#fff) 14%);
  box-shadow:0 24px 70px rgba(0,0,0,.28)
}
html[data-staff-portal="1"] .auth-security-note{line-height:1.45}
