/* Shared auth dialog, scoped so dashboard and floating controls are untouched. */
#authOverlay { background:rgba(1,8,20,.76); backdrop-filter:blur(12px); padding:24px 16px; overflow-y:auto; overscroll-behavior:contain; }
#authOverlay .auth-modal { width:100%; max-width:460px; margin:auto; padding:32px; max-height:calc(100dvh - 48px); overflow-y:auto; overscroll-behavior:contain; border-radius:24px; background:var(--surface); border:1px solid var(--border); box-shadow:0 32px 100px #0005; }
#authOverlay .auth-modal-close { width:40px; height:40px; top:14px; right:14px; display:grid; place-items:center; padding:0; background:var(--surface2); border:1px solid var(--border); color:var(--text); font-size:18px; }
.auth-brand { display:flex; align-items:center; gap:10px; margin:2px 48px 26px 0; color:var(--text); font-weight:800; font-size:20px; line-height:1.1; }
.auth-brand img { width:38px; height:38px; border-radius:10px; flex-shrink:0; }
.auth-brand small { display:block; margin-top:4px; color:var(--muted); font-size:12px; font-weight:600; }
#authOverlay .auth-title { font-size:26px; text-align:left; line-height:1.2; letter-spacing:-.035em; margin:0 0 10px; }
#authOverlay .auth-sub { margin:0 0 24px; font-size:14px; line-height:1.6; text-align:left; }
.auth-tabs { display:grid; grid-template-columns:1fr 1fr; padding:4px; gap:4px; background:var(--bg); border:1px solid var(--border); border-radius:14px; margin-bottom:22px; }
.auth-tabs button { min-height:42px; border:0; border-radius:10px; background:transparent; color:var(--muted); font:inherit; font-size:14px; font-weight:700; cursor:pointer; }
.auth-tabs button[aria-pressed=true] { background:#0969da; color:#fff; box-shadow:0 3px 12px var(--glow); }
#authOverlay .auth-google-btn { min-height:48px; margin-bottom:20px; border-width:1px; font-size:14px; background:var(--surface2); }
#authOverlay .auth-divider { font-size:12px; margin-bottom:20px; }
#authOverlay .auth-field { margin-bottom:16px; }
#authOverlay .auth-field label { color:var(--text); font-size:13px; margin-bottom:8px; }
.auth-input-wrap { position:relative; }
#authOverlay .auth-field input { min-height:48px; font-size:16px; border-width:1px; padding:12px 14px; border-radius:12px; }
#authOverlay .auth-field input[autocomplete*="password"] { padding-right:88px; }
.auth-password-toggle { position:absolute; right:6px; top:5px; min-height:38px; min-width:68px; border:0; border-radius:8px; background:var(--surface2); color:var(--text); font:inherit; font-size:12px; cursor:pointer; }
#authOverlay .auth-field input:focus-visible { outline:2px solid var(--accent2); outline-offset:2px; }
.auth-hint { font-size:12px; color:var(--muted); line-height:1.5; margin:-6px 0 16px; }
.auth-text-button { border:0; background:transparent; padding:8px 0; color:var(--accent2); font:inherit; font-weight:600; font-size:13px; cursor:pointer; }
.auth-forgot { display:block; margin:-8px 0 14px auto; }
.auth-back { margin-top:12px; }
#authOverlay .auth-submit-btn { min-height:48px; border-radius:12px; font-size:15px; margin:0; background:#0969da; }
#authOverlay .auth-submit-btn:hover { background:#0759ba; opacity:1; }
#authOverlay .auth-error { margin:14px 0 0; padding:12px 14px; border-radius:12px; border:1px solid var(--color-danger); color:var(--text); background:color-mix(in srgb,var(--color-danger) 9%,var(--surface)); font-size:13px; line-height:1.55; }
#authOverlay .auth-error:empty { display:none; }
#authOverlay .auth-error[data-status=success] { border-color:var(--color-success); background:color-mix(in srgb,var(--color-success) 9%,var(--surface)); }
.auth-footer { border-top:1px solid var(--border); padding-top:18px; margin:24px 0 0; font-size:12px; line-height:1.6; color:var(--muted); }
#authOverlay button:focus-visible { outline:2px solid var(--accent2); outline-offset:3px; }
#authOverlay button:disabled { opacity:.6; cursor:wait; }
@media(max-width:480px) { #authOverlay{padding:12px;} #authOverlay .auth-modal{padding:26px 20px;max-height:calc(100dvh - 24px);border-radius:20px;} #authOverlay .auth-title{font-size:24px;} }
@media(prefers-reduced-motion:reduce) { #authOverlay * { transition:none!important;animation:none!important; } }
