:root {
  --navy-950: #071b2b;
  --navy-900: #0b2538;
  --ink: #173042;
  --ink-soft: #405a69;
  --muted: #71838e;
  --line: #dfe8ec;
  --paper: #f4f7f8;
  --mint: #20bd91;
  --mint-dark: #0d9270;
  --mint-soft: #e8f8f3;
  --red: #b53f4c;
  --red-soft: #fdecef;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font: 14px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--mint-dark); font-weight: 750; text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(410px, .92fr) minmax(470px, 1.08fr); }
.auth-intro { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: clamp(32px, 5vw, 72px); color: #fff; background: radial-gradient(circle at 20% 0, rgba(32,189,145,.22), transparent 31%), radial-gradient(circle at 93% 82%, rgba(32,189,145,.18), transparent 31%), linear-gradient(145deg, #0b2538, #071b2b 72%); }
.auth-intro::before, .auth-intro::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; pointer-events: none; }
.auth-intro::before { width: 360px; height: 360px; right: -190px; top: 18%; }
.auth-intro::after { width: 520px; height: 520px; left: -360px; bottom: -340px; }
.auth-brand { z-index: 1; display: inline-flex; align-items: center; align-self: flex-start; gap: 13px; color: #fff; text-decoration: none; }
.auth-brand:hover { text-decoration: none; }
.auth-brand span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(145deg,#38d5a7,#12a47d); box-shadow: 0 12px 30px rgba(32,189,145,.25); font-size: 26px; font-weight: 850; }
.auth-brand strong { font-size: 19px; letter-spacing: -.02em; }
.intro-copy { z-index: 1; max-width: 640px; margin: auto 0; padding: 70px 0; }
.kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; color: #90cdbd; font-size: 11px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 6px rgba(32,189,145,.1); }
.intro-copy h1 { max-width: 670px; margin: 0; font-size: clamp(37px, 4.8vw, 66px); line-height: 1.06; letter-spacing: -.052em; }
.intro-copy > p:last-child { max-width: 550px; margin: 24px 0 0; color: #a8bfca; font-size: clamp(14px, 1.3vw, 18px); line-height: 1.7; }
.security-note { z-index: 1; display: flex; align-items: center; gap: 13px; max-width: 470px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.08); }
.security-note svg { width: 28px; flex: 0 0 auto; fill: var(--mint); }
.security-note strong, .security-note span { display: block; }
.security-note strong { font-size: 12px; }
.security-note span { margin-top: 2px; color: #7899a8; font-size: 10px; }

.auth-content { display: grid; align-content: center; justify-items: center; padding: 40px clamp(24px, 6vw, 100px); background: radial-gradient(circle at 100% 0, #e6f5f0, transparent 32%), var(--paper); }
.auth-card { width: min(470px, 100%); padding: clamp(30px, 4vw, 46px); border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.96); box-shadow: 0 25px 70px rgba(18,54,75,.11); }
.eyebrow { margin: 0 0 7px; color: var(--mint-dark); font-size: 9px; font-weight: 850; letter-spacing: .16em; }
.auth-card h2 { margin: 0; font-size: clamp(27px, 3vw, 35px); line-height: 1.18; letter-spacing: -.04em; }
.lead { margin: 11px 0 28px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.auth-form { display: grid; gap: 18px; }
.auth-form label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 11px; font-weight: 780; }
.auth-form input { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #cbd9df; border-radius: 12px; outline: none; color: var(--ink); background: #fff; transition: border-color .17s, box-shadow .17s; }
.auth-form input::placeholder { color: #9aa9b1; }
.auth-form input:focus { border-color: var(--mint-dark); box-shadow: 0 0 0 4px rgba(13,146,112,.1); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 77px; }
.password-field button { position: absolute; right: 7px; top: 50%; padding: 7px 8px; border: 0; border-radius: 8px; color: var(--mint-dark); background: transparent; transform: translateY(-50%); font-size: 9px; font-weight: 800; }
.password-field button:hover { background: var(--mint-soft); }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: -3px; font-size: 10px; }
.remember { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 7px !important; color: var(--muted) !important; font-weight: 600 !important; }
.remember input { width: 14px; min-height: 14px; accent-color: var(--mint-dark); }
.submit-button { min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--mint-dark); border-radius: 12px; color: #fff; background: var(--mint-dark); box-shadow: 0 10px 24px rgba(13,146,112,.2); font-weight: 800; transition: background .17s, transform .17s, box-shadow .17s; }
.submit-button:hover { background: #087b5e; transform: translateY(-1px); box-shadow: 0 13px 28px rgba(13,146,112,.25); }
.submit-button:disabled { cursor: wait; opacity: .72; transform: none; }
.submit-button.loading i { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .65s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-message { margin: -4px 0; padding: 10px 12px; border-radius: 10px; font-size: 10px; }
.form-message.error { color: var(--red); background: var(--red-soft); }
.support-copy, .privacy-copy { color: var(--muted); text-align: center; font-size: 10px; }
.support-copy { margin: 24px 0 0; }
.privacy-copy { max-width: 470px; margin: 18px 0 0; }
.back-link { display: inline-block; margin: 0 0 22px; font-size: 10px; }
.success-box { display: flex; align-items: flex-start; gap: 12px; margin-top: 20px; padding: 15px; border: 1px solid #cbe9df; border-radius: 13px; color: #1d6856; background: var(--mint-soft); }
.success-box > span { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--mint-dark); font-size: 11px; font-weight: 900; }
.success-box strong { font-size: 11px; }
.success-box p { margin: 3px 0; font-size: 10px; }
.success-box a { font-size: 10px; }
.token-loading { display: flex; align-items: center; gap: 10px; padding: 18px; border-radius: 12px; color: var(--muted); background: #f7fafb; font-size: 11px; }
.token-loading i { width: 17px; height: 17px; border: 2px solid #cbd9df; border-top-color: var(--mint-dark); border-radius: 50%; animation: spin .65s linear infinite; }
.account-chip { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbfb; }
.account-chip > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #19785f; background: var(--mint-soft); font-size: 10px; font-weight: 850; }
.account-chip strong, .account-chip small { display: block; }
.account-chip strong { font-size: 11px; }
.account-chip small { color: var(--muted); font-size: 9px; }
.password-hint { margin: -4px 0 0; color: var(--muted); font-size: 9px; }
.invalid-token { padding: 22px; border: 1px solid #f0ccd1; border-radius: 14px; text-align: center; background: var(--red-soft); }
.invalid-token > span { width: 32px; height: 32px; display: grid; place-items: center; margin: 0 auto 8px; border-radius: 50%; color: #fff; background: var(--red); font-weight: 900; }
.invalid-token h3 { margin: 0; font-size: 15px; }
.invalid-token p { margin: 6px 0 12px; color: #8d5360; font-size: 10px; }
.invalid-token a { font-size: 10px; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-intro { min-height: 300px; padding: 30px; }
  .intro-copy { padding: 50px 0 35px; }
  .intro-copy h1 { max-width: 680px; font-size: clamp(34px, 8vw, 54px); }
  .security-note { display: none; }
  .auth-content { min-height: 630px; padding: 35px 20px; }
}
@media (max-width: 520px) {
  .auth-intro { min-height: 245px; padding: 23px; }
  .auth-brand span { width: 41px; height: 41px; }
  .intro-copy { padding: 36px 0 8px; }
  .intro-copy h1 { font-size: 34px; }
  .intro-copy > p:last-child { display: none; }
  .auth-content { align-content: start; min-height: calc(100vh - 245px); padding: 22px 14px 35px; }
  .auth-card { padding: 27px 21px; border-radius: 19px; }
  .form-row { align-items: flex-start; }
  .remember { max-width: 150px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
