/* Account pages: sign in, account, Allow Kalvyr, reset password. Builds on style.css. */
.auth-body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.auth-body .nav-row { justify-content: space-between; }
.auth-back { color: var(--text-2); font-size: 14px; transition: color .15s; }
.auth-back:hover { color: var(--text); }
.auth-main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 64px 0 80px; }
.auth-card { width: min(420px, calc(100% - 32px)); padding: 30px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-1); }
.auth-card--wide { width: min(620px, calc(100% - 32px)); }
.auth-card h1 { font-size: 23px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.auth-card h2 { font-size: 15px; font-weight: 600; }
.auth-lead { margin-top: 8px; color: var(--text-2); font-size: 14.5px; }
.auth-card form { display: grid; gap: 14px; margin-top: 22px; }
.auth-card [hidden] { display: none !important; }

.auth-oauth { display: grid; gap: 10px; }
.auth-oauth .btn { gap: 10px; }
.auth-oauth svg { width: 18px; height: 18px; flex: none; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12.5px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.auth-field { display: grid; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.auth-field-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth-field input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface-2); color: var(--text); font: 400 15px/1.4 var(--sans); }
.auth-field input:focus { outline: none; border-color: var(--accent-strong); box-shadow: 0 0 0 3px rgba(100, 112, 232, .25); }
.auth-field input::placeholder { color: var(--text-3); }

.link { padding: 0; border: 0; background: none; color: var(--accent-strong); font-size: 13.5px; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(169, 175, 236, .4); }
.link:hover { text-decoration-color: currentColor; }
.auth-switch { margin-top: 20px; color: var(--text-2); font-size: 14px; text-align: center; }
.auth-note { color: var(--text-3); font-size: 13px; }
.auth-consent { text-align: center; }
.auth-consent a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.auth-consent a:hover { color: var(--text); }

.auth-notice, .auth-error { padding: 11px 13px; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.auth-notice { margin-top: 18px; border: 1px solid rgba(82, 171, 137, .45); background: rgba(82, 171, 137, .1); color: var(--text); }
.auth-error { border: 1px solid rgba(232, 112, 112, .5); background: rgba(232, 112, 112, .1); color: #f2b4b4; }
.auth-card > .auth-error { margin-top: 18px; }

.auth-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.auth-actions .btn { flex: 1 1 160px; }

/* Allow Kalvyr */
.allow-device { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.allow-who { margin-top: 16px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text-2); font-size: 13.5px; overflow-wrap: anywhere; }
.allow-who strong { color: var(--text); font-weight: 500; }

/* Account */
.account-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.account-email { margin-top: 4px; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.account-section { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border); }
.plan-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.plan-badge { padding: 3px 9px; border-radius: 99px; border: 1px solid var(--border-strong); color: var(--text-2); font: 500 12px/1.5 var(--mono); }
.plan-badge--pro { border-color: rgba(169, 175, 236, .5); background: rgba(100, 112, 232, .16); color: var(--accent-strong); }
.plan-badge--warn { border-color: rgba(223, 154, 99, .5); background: rgba(223, 154, 99, .12); color: var(--waiting); }
.plan-detail { color: var(--text-2); font-size: 14px; }
.account-section .auth-actions { margin-top: 16px; }
.computers { display: grid; gap: 8px; margin-top: 12px; }
.computer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.computer-name { font-size: 14.5px; font-weight: 500; overflow-wrap: anywhere; }
.computer-meta { color: var(--text-3); font-size: 12.5px; }
.computer .btn { flex: none; }
.account-loading { margin-top: 22px; color: var(--text-3); font-size: 14px; }

@media (max-width: 520px) {
  .auth-main { padding: 28px 0 48px; }
  .auth-card { padding: 22px 18px; }
  .auth-card h1 { font-size: 21px; }
  .computer { flex-direction: column; align-items: stretch; }
}
