/* Authentication pages */
:root {
    --ink: #2b2723; --ink-soft: #55504a; --muted: #8a8177; --line: #e8e2d9;
    --bg: #f7f4ef; --card: #ffffff; --accent: #b0785a; --accent-ink: #8d5f46;
    --good: #4f7d62; --bad: #a1524b;
    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
body {
    font-family: var(--font-body); color: var(--ink); font-size: 15px; line-height: 1.55;
    min-height: 100vh;
    background:
        radial-gradient(900px 400px at 15% -10%, #efe2d5 0%, transparent 55%),
        radial-gradient(700px 500px at 110% 110%, #e9e0d2 0%, transparent 50%),
        var(--bg);
}
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; gap: 18px; }
.auth-card {
    background: var(--card); border: 1px solid var(--line); border-radius: 22px;
    padding: 42px 38px 36px; width: 100%; max-width: 420px;
    box-shadow: 0 24px 60px rgba(43, 39, 35, .1);
}
.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-logo { max-height: 64px; max-width: 200px; margin-bottom: 12px; }
.auth-mark {
    width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center;
    background: linear-gradient(135deg, #c98d6b, #96603f); color: #fff;
    font-family: var(--font-display); font-size: 28px; font-weight: 600;
    box-shadow: 0 10px 22px rgba(176, 120, 90, .35);
}
.auth-brand h1 { font-family: var(--font-display); font-size: 23px; font-weight: 600; letter-spacing: -.01em; }
.auth-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.auth-title { font-family: var(--font-display); font-size: 20px; margin-bottom: 6px; }
.auth-note { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }

.alert { border-radius: 12px; padding: 12px 16px; font-size: 13.5px; font-weight: 500; margin-bottom: 16px; }
.alert.error { background: rgba(161, 82, 75, .1); color: var(--bad); border: 1px solid rgba(161, 82, 75, .25); }
.alert.success { background: rgba(79, 125, 98, .1); color: var(--good); border: 1px solid rgba(79, 125, 98, .25); }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field input {
    font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 11px;
    padding: 12px 14px; width: 100%; transition: border-color .15s, box-shadow .15s; min-height: 44px;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(176, 120, 90, .16); }
.field.invalid input { border-color: var(--bad); }
.hint { font-size: 12.5px; color: var(--muted); }
.error { font-size: 12.5px; color: var(--bad); font-weight: 500; display: none; }
.error.show { display: block; }
.code-input { text-align: center; font-size: 24px; letter-spacing: .4em; font-variant-numeric: tabular-nums; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: transparent; cursor: pointer; border-radius: 8px; opacity: .55; }
.pw-toggle:hover { opacity: 1; background: #f1ece5; }
.pw-toggle::before {
    content: ""; display: block; width: 18px; height: 18px; margin: 0 auto; background: currentColor;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z"/><circle cx="12" cy="12" r="3"/></svg>') center / contain no-repeat;
            mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z"/><circle cx="12" cy="12" r="3"/></svg>') center / contain no-repeat;
}
.pw-toggle.showing { color: var(--accent-ink); opacity: .9; }

.btn {
    font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; border-radius: 999px;
    padding: 12px 24px; border: 1px solid transparent; min-height: 46px;
    transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: #443e37; box-shadow: 0 8px 20px rgba(43, 39, 35, .18); }
.btn.primary:disabled { opacity: .55; cursor: wait; }
.btn.block { width: 100%; }
.auth-link { text-align: center; font-size: 13.5px; color: var(--accent-ink); text-decoration: none; font-weight: 500; }
.auth-link:hover { text-decoration: underline; }
.auth-foot { color: var(--muted); font-size: 12.5px; }

@media (max-width: 480px) {
    .auth-card { padding: 32px 22px 28px; border-radius: 18px; }
}
