.auth-legal { display: flex; flex-wrap: wrap; gap: 8px 18px; line-height: 1.8; }
.auth-legal a { text-decoration: underline; text-underline-offset: 3px; }
.auth-legal a:hover { color: var(--text); }
.auth-dialog { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size:16px; }
.auth-dialog button, .auth-dialog input { font-family:inherit; }
.auth-legal { justify-content: center; margin-top: 14px; color: var(--secondary); font-size: 12px; }
.auth-dialog { position: fixed; width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; border: 1px solid var(--line); border-radius: 26px; padding: 30px; background: var(--surface); color: var(--text); box-shadow: 0 28px 80px rgba(26, 22, 8, .18); }
.auth-dialog::backdrop { background: rgba(36, 32, 20, .28); backdrop-filter: blur(2px); }
:root[data-theme=dark] .auth-dialog::backdrop { background: rgba(0, 0, 0, .46); }
.auth-close { position: absolute; right: 20px; top: 15px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--secondary); font-size: 26px; line-height: 1; }
.auth-close:hover { background: var(--muted); color: var(--text); }
.auth-brand { display: flex; justify-content: center; align-items: center; gap: 9px; margin-top: 4px; font-size: 20px; font-weight: 750; }
.auth-brand img { width: 54px; height: 54px; object-fit: contain; }
.auth-dialog h2 { margin: 24px 0 9px; font-size: 28px; letter-spacing: -.025em; text-align: center; }
.auth-subtitle { margin: 0 0 28px; color: var(--secondary); font-size: 14px; text-align: center; line-height: 1.6; }
.auth-tabs { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0; margin: 20px 0 0; background: none; color: var(--secondary); font-size: 13px; }
.auth-tabs button { flex: 0 0 auto; padding: 4px 0; min-height: 32px; border: 0; background: transparent; color: var(--text); font-size: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
.auth-google { display: flex; justify-content: center; align-items: center; gap: 12px; width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font-size: 15px; font-weight: 600; }
.auth-google:disabled { cursor: not-allowed; color: var(--secondary); }
.auth-google:not(:disabled):hover { background: var(--muted); }
.auth-provider-status { margin: 10px 0 0; color: var(--secondary); font-size: 12px; text-align: center; line-height: 1.5; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--secondary); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.auth-dialog input[readonly] { color: var(--secondary); background: var(--muted); }
.auth-dialog button:focus-visible { outline: 2px solid var(--control); outline-offset: 3px; }
.auth-dialog *, .auth-dialog { box-sizing: border-box; }
.auth-form { display: grid; gap: 15px; }
.auth-form label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; }
.auth-form input { width: 100%; height: 47px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; outline: 0; background: var(--bg); color: var(--text); font-size: 15px; }
.auth-form input:focus { border-color: var(--control); box-shadow: 0 0 0 3px var(--soft); }
.auth-primary { min-height: 49px; margin-top: 5px; border: 0; border-radius: 999px; background: var(--brand); color: #242523; font-weight: 700; }
.auth-primary:hover { background: var(--brand-hover, var(--hover)); }
.auth-primary:disabled { opacity: .6; cursor: wait; }
.auth-error { margin: 16px 0 0; color: var(--danger); font-size: 13px; line-height: 1.5; }
.auth-fallback, .auth-dev-mailbox { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.auth-help { margin: 21px 0 0; color: var(--secondary); font-size: 12px; line-height: 1.5; text-align: center; }
.auth-verify-copy { margin: 0; color: var(--secondary); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.auth-dev-mailbox { font-size: 13px; }
.auth-resend { justify-self: start; border: 0; padding: 4px 0; background: transparent; color: var(--secondary); font-size: 13px; }
.auth-resend:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 640px) { .auth-dialog { padding: 25px 21px; border-radius: 22px; } }
.auth-dialog [hidden] { display:none!important; }
.desktop-auth-secondary { min-height:47px; border:1px solid var(--line); border-radius:12px; background:var(--muted); color:var(--text); font-weight:650; }
.desktop-auth-secondary:hover { background:var(--soft); }
.desktop-auth-controls { display:flex; justify-content:space-between; gap:16px; margin-top:16px; }
