*{box-sizing:border-box}
:root{--auth-bg:#f5f7fb;--auth-card:#fff;--auth-text:#0f172a;--auth-muted:#64748b;--auth-line:#dbe3ee;--auth-input:#fff;--auth-shadow:0 24px 70px rgba(15,23,42,.10)}
html{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--auth-bg);color:var(--auth-text);-webkit-font-smoothing:antialiased}
html.dark{--auth-bg:#07111f;--auth-card:#0f1d30;--auth-text:#f1f5f9;--auth-muted:#94a3b8;--auth-line:#2a3b53;--auth-input:#0a1627;--auth-shadow:0 24px 70px rgba(0,0,0,.34);color-scheme:dark}
body{margin:0;min-width:320px;min-height:100vh;background:var(--auth-bg);color:var(--auth-text)}
.auth-shell{min-height:100vh;position:relative}
.auth-main{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:48px 20px;position:relative}
.auth-card{width:60%;max-width:640px;min-width:420px;background:var(--auth-card);border:1px solid var(--auth-line);border-radius:24px;padding:34px;box-shadow:var(--auth-shadow)}
.auth-brand{display:inline-block;margin-bottom:18px;text-decoration:none;font-size:15px;font-weight:850;letter-spacing:-.01em}
h1{margin:0 0 22px;font-size:30px;line-height:1.15;font-weight:850;letter-spacing:-.035em;color:var(--auth-text)}
.form{margin-top:20px}.field{margin-bottom:16px}.label{display:block;margin-bottom:7px;font-size:13px;font-weight:750;color:var(--auth-text)}
.input{width:100%;height:48px;padding:0 14px;border:1px solid var(--auth-line);border-radius:12px;background:var(--auth-input);color:var(--auth-text);font:inherit;outline:none;transition:.15s}.input::placeholder{color:var(--auth-muted);opacity:.75}.input:focus{border-color:var(--brand-primary,#2563eb);box-shadow:0 0 0 4px color-mix(in srgb,var(--brand-primary,#2563eb) 14%,transparent)}
.btn{width:100%;min-height:49px;border:0;border-radius:12px;color:#fff;font:inherit;font-weight:800;cursor:pointer;transition:.15s}.btn:hover{filter:brightness(.95)}.btn:disabled{opacity:.65;cursor:not-allowed}
.helper{text-align:center;margin-top:18px;font-size:13px;color:var(--auth-muted)}.helper a{font-weight:800;text-decoration:none}.helper a:hover{text-decoration:underline}
.google-btn{width:100%;min-height:50px;border:1px solid var(--auth-line);border-radius:12px;background:var(--auth-input);color:var(--auth-text);text-decoration:none;display:flex;align-items:center;justify-content:center;gap:10px;font-size:14px;font-weight:800;transition:.15s}.google-btn:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(15,23,42,.07)}.google-btn svg{width:20px;height:20px;flex:0 0 auto}
.oauth-divider{display:flex;align-items:center;gap:12px;margin:18px 0;color:var(--auth-muted);font-size:11px;font-weight:800;text-transform:uppercase}.oauth-divider:before,.oauth-divider:after{content:"";height:1px;flex:1;background:var(--auth-line)}
.theme-btn{position:fixed;right:22px;top:20px;z-index:20;width:42px;height:42px;border:1px solid var(--auth-line);border-radius:12px;background:var(--auth-card);color:var(--auth-text);display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 8px 24px rgba(15,23,42,.07);font-size:18px}
.alert{position:absolute;top:22px;left:50%;transform:translateX(-50%);width:min(90%,560px);z-index:15;padding:12px 14px;border-radius:12px;font-size:13px;font-weight:650}.alert-error{background:#fff1f2;color:#9f1239;border:1px solid #fecdd3}.alert-success{background:#ecfdf5;color:#047857;border:1px solid #a7f3d0}html.dark .alert-error{background:rgba(190,24,93,.12);color:#fda4af;border-color:rgba(251,113,133,.25)}html.dark .alert-success{background:rgba(5,150,105,.12);color:#6ee7b7;border-color:rgba(52,211,153,.25)}
@media(max-width:768px){.auth-main{padding:72px 12px 32px}.auth-card{width:80%;min-width:0;max-width:none;padding:26px 22px;border-radius:20px}.theme-btn{right:14px;top:14px}.alert{top:66px}h1{font-size:27px}}
@media(max-width:420px){.auth-card{width:80%;padding:24px 18px}.auth-main{padding-left:8px;padding-right:8px}}

/* V3.5.4 contrast hardening */
.auth-card,.auth-card h1,.auth-card label{color:var(--auth-text)}
.auth-brand{color:var(--auth-text)!important}
.btn{color:var(--brand-on-primary,#fff)!important}
.google-btn{background:var(--auth-input)!important;color:var(--auth-text)!important;border-color:var(--auth-line)!important}
.google-btn span{color:var(--auth-text)!important}
.helper{color:var(--auth-muted)!important}.helper a{color:var(--auth-text)!important;text-decoration:underline;text-underline-offset:3px}
html.dark .google-btn{box-shadow:inset 0 0 0 1px rgba(255,255,255,.02)}
