/* Sign-in and account-settings pages. Loaded after index.css. */

/* ---------- Sign-in ---------- */

.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 12%, rgba(118, 75, 162, 0.35), transparent 55%),
        radial-gradient(circle at 82% 88%, rgba(102, 126, 234, 0.32), transparent 55%),
        linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-shell {
    width: 100%;
    max-width: 430px;
}

.auth-card {
    background: var(--surface);
    border-radius: 18px;
    padding: 2.1rem 2rem 1.8rem;
    box-shadow: 0 26px 60px rgba(21, 24, 45, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.3rem;
}

.auth-brand .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    box-shadow: 0 8px 18px rgba(102, 126, 234, 0.35);
}

.auth-eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-weight: 700;
    color: var(--muted);
}

.auth-brand h1 {
    font-size: 1.45rem;
    line-height: 1.15;
    color: var(--ink);
}

.auth-lede {
    color: var(--ink-soft);
    font-size: 0.92rem;
    margin-bottom: 1.35rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.9rem;
}

.auth-form .field label {
    font-size: 0.82rem;
}

.auth-form .field input {
    padding: 0.72rem 0.8rem;
    font-size: 0.95rem;
}

.auth-submit {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.auth-hint {
    font-size: 0.8rem;
    color: var(--muted);
}

.auth-hint-dev {
    color: var(--warn);
    background: var(--warn-soft);
    border: 1px solid #f0dcae;
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
}

.auth-footnote {
    margin-top: 1.35rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--line);
    font-size: 0.78rem;
    color: var(--muted);
    text-align: center;
}

.captcha-slot {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-slot:empty::before {
    content: 'Loading CAPTCHA…';
    font-size: 0.8rem;
    color: var(--muted);
}

.auth-card .status {
    margin-bottom: 0.85rem;
}

/* ---------- Account settings ---------- */

.settings-page {
    background: var(--bg);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.header-actions .btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.header-actions .btn-ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.14);
}

.header-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.34);
    color: #fff;
}

.header-actions .btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.24);
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.settings-main {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 1.6rem 1.2rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
}

.account-grid dt {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
    color: var(--muted);
}

.account-grid dd {
    margin-top: 0.2rem;
    font-size: 0.95rem;
    color: var(--ink);
    word-break: break-word;
}

.security-list {
    list-style: none;
    display: grid;
    gap: 0.7rem;
}

.security-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0.8rem;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 0.9rem;
}

.security-key {
    font-weight: 600;
    color: var(--ink-soft);
}

.settings-main code {
    font-family: 'Cascadia Mono', Consolas, 'Courier New', monospace;
    font-size: 0.85rem;
    background: var(--surface-alt);
    padding: 0.1rem 0.35rem;
    border-radius: 5px;
}

/* Keeps the password-manager username field out of sight without hiding it
   from assistive technology. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 560px) {
    .auth-card {
        padding: 1.6rem 1.3rem 1.4rem;
    }

    .security-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}
