/* Medvedevo / Authentication. One layout, one token system, both themes. */
:root {
 --auth-ink:#182b45;--auth-secondary:#52657e;--auth-muted:#667a94;
 --auth-panel:rgba(250,252,255,.97);--auth-input:#fff;--auth-line:#d4dfed;
 --auth-accent:#007aff;--auth-hover:#0067db;--auth-focus:#007aff;
 --auth-shadow:0 32px 80px #041b3d33,0 2px 8px #041b3d0f;
 --auth-canvas:radial-gradient(ellipse at 50% -20%,#438fea 0%,transparent 70%),radial-gradient(ellipse at 105% 100%,#2a609e 0%,transparent 65%),#102b53;
 color-scheme:light;
}
[data-theme="dark"] {
 --auth-ink:#f0f5fc;--auth-secondary:#b3c5db;--auth-muted:#a1b6d0;
 --auth-panel:rgba(24,41,63,.97);--auth-input:#102139;--auth-line:#3b516c;
 --auth-accent:#087fff;--auth-hover:#278fff;--auth-focus:#75b5ff;
 --auth-shadow:0 32px 80px #0006,0 1px 0 #ffffff0a inset;
 --auth-canvas:radial-gradient(ellipse at 50% -20%,#245993 0%,transparent 72%),#08182b;
 color-scheme:dark;
}
*,*::before,*::after { box-sizing:border-box; }
html,body { margin:0;min-height:100%; }
body.auth-screen { font-family:'Tishte Sans',sans-serif;font-size:15px;line-height:1.5;color:var(--auth-ink);-webkit-font-smoothing:antialiased; }
button,input { font:inherit; }
button { cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent; }
.hidden { display:none!important; }
.login-page { min-height:100vh;min-height:100svh;display:flex;padding:40px 24px;background:var(--auth-canvas); }
.login-container { width:100%;max-width:440px;margin:auto; }
.login-card { position:relative;padding:34px 36px 36px;border:1px solid #ffffff38;border-radius:26px;background:var(--auth-panel);box-shadow:var(--auth-shadow); }
.login-header { display:flex;flex-direction:column;align-items:center;text-align:center;padding:0 0 28px; }
.login-logo { order:0;width:56px;height:67px;object-fit:contain;margin-bottom:20px; }
.login-header h1 { order:1;font-size:26px;font-weight:600;line-height:1.2;letter-spacing:-.025em;margin:0; }
.login-eyebrow { order:2;max-width:280px;margin:10px 0 0;font-size:13px;line-height:1.5;color:var(--auth-secondary); }
.login-form { border-top:1px solid var(--auth-line);padding-top:24px; }
.login-form-heading { margin-bottom:24px; }
.login-form-heading p { margin:0;color:var(--auth-secondary);font-size:14px; }
.form-group { margin-bottom:20px; }
.form-group label { display:block;margin-bottom:8px;font-size:13px;font-weight:500; }
.form-group input { display:block;width:100%;height:52px;border:1px solid var(--auth-line);border-radius:12px;padding:0 15px;background:var(--auth-input);color:var(--auth-ink);font-size:16px;line-height:normal;transition:border-color .15s,box-shadow .15s; }
.form-group input::placeholder { color:var(--auth-muted);opacity:1; }
.form-group input:focus { outline:3px solid color-mix(in srgb,var(--auth-focus) 25%,transparent);outline-offset:1px;border-color:var(--auth-focus); }
.form-group input:-webkit-autofill { -webkit-text-fill-color:var(--auth-ink);box-shadow:0 0 0 1000px var(--auth-input) inset; }
.password-wrapper { position:relative; }
.password-wrapper input { padding-right:54px; }
.toggle-password { position:absolute;right:4px;top:4px;width:44px;height:44px;display:flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:9px;background:transparent;color:var(--auth-secondary); }
.toggle-password svg { width:20px;height:20px;pointer-events:none; }
.toggle-password:hover { background:#007aff12;color:var(--auth-focus); }
.btn-primary { display:flex;align-items:center;justify-content:center;width:100%;height:52px;margin-top:26px;padding:0 20px;border:1px solid transparent;border-radius:12px;background:var(--auth-accent);color:white;font-size:16px;font-weight:600;box-shadow:0 3px 8px #007aff26;transition:background .15s,transform .1s; }
.btn-primary:hover { background:var(--auth-hover); }
.btn-primary:active { transform:scale(.99); }
.btn-primary:disabled { cursor:wait;opacity:.75;transform:none;box-shadow:none; }
button:focus-visible { outline:3px solid var(--auth-focus);outline-offset:3px; }
.theme-toggle-float { position:absolute;top:12px;right:12px;z-index:5;width:44px;height:44px;display:flex;align-items:center;justify-content:center;padding:0;border:1px solid var(--auth-line);border-radius:50%;background:transparent;color:var(--auth-secondary);transition:background .15s; }
.theme-toggle-float:hover { background:#007aff12; }
.theme-toggle-float svg { width:19px;height:19px;pointer-events:none; }
[data-theme="light"] .moon-icon,[data-theme="dark"] .sun-icon { display:none; }
.error-message { display:flex;align-items:flex-start;gap:9px;margin:0 0 18px;padding:12px;border:1px solid #ebc3ca;border-radius:12px;background:#fff0f2;color:#9d2538;font-size:14px; }
.error-message svg { flex-shrink:0;margin-top:3px; }
[data-theme="dark"] .error-message { background:#3b2030;border-color:#754052;color:#ffc4d0; }
@media(max-width:480px) {
 .login-page { padding:24px 16px; }
 .login-card { padding:28px 24px;border-radius:24px; }
 .login-header h1 { font-size:24px; }
}
@media(max-width:350px) {
 .login-card { padding:26px 20px; }
 .login-header h1 { font-size:22px; }
}
@media(max-height:650px) {
 .login-page { padding-top:20px;padding-bottom:20px; }
 .login-container { margin:0 auto; }
 .login-logo { width:46px;height:55px;margin-bottom:16px; }
}
@media(max-height:500px) and (min-width:650px) {
 .login-container { max-width:760px; }
 .login-card { display:grid;grid-template-columns:1fr 1fr;gap:32px;padding:28px 32px; }
 .login-header { align-self:center;padding:0; }
 .login-form { border-top:0;border-left:1px solid var(--auth-line);padding:0 0 0 32px; }
 .login-form-heading { margin-bottom:16px; }
 .form-group { margin-bottom:14px; }
 .btn-primary { margin-top:18px; }
 .theme-toggle-float { left:12px;right:auto; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important;animation:none!important; } }
@media(forced-colors:active) { .login-card,.form-group input,.btn-primary,.theme-toggle-float { border:1px solid CanvasText; } }
