/* ==========================================================================
   SwiftCap EAs — Auth pages (login, forgot, reset, set password)
   Split layout: brand panel + form. Loaded after dashboard.css.
   ========================================================================== */

body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }

.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px clamp(32px, 5vw, 72px);
    border-right: 1px solid var(--line);
    background:
        radial-gradient(70% 60% at 20% 10%, color-mix(in oklch, var(--ember) 16%, transparent), transparent 70%),
        var(--bg-sunk);
    overflow: hidden;
}

.auth-aside::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: .35;
    mask-image: radial-gradient(ellipse 70% 60% at 30% 30%, #000 10%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 30% 30%, #000 10%, transparent 75%);
    pointer-events: none;
}

.auth-aside > * { position: relative; z-index: 1; }

.aside-brand { display: inline-flex; align-items: center; gap: 11px; }
.aside-brand img { width: 34px; height: 34px; border-radius: var(--r-md); }
.aside-brand span { font-family: var(--f-serif); font-size: 1.2rem; font-weight: 500; }

.aside-copy h2 {
    max-width: 14ch;
    margin-bottom: 18px;
    font: 400 clamp(2.4rem, 4vw, 3.6rem)/1 var(--f-serif);
    letter-spacing: -0.04em;
}

.aside-copy h2 em { color: var(--ember); }
.aside-copy p { max-width: 42ch; color: var(--ink-3); font-size: 0.95rem; line-height: 1.7; }

.aside-list { display: grid; gap: 12px; margin-top: 30px; list-style: none; }
.aside-list li { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 0.88rem; }

.aside-list li span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--ember-soft);
    color: var(--ember);
}

.aside-list svg { width: 15px; height: 15px; }

.aside-foot { color: var(--ink-4); font: 0.7rem/1.6 var(--f-mono); }

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.auth-container { width: 100%; max-width: 400px; }

.auth-brand { margin-bottom: 28px; }
.auth-brand img { display: none; width: 56px; height: 56px; border-radius: var(--r-md); margin-bottom: 16px; }

.auth-brand h1 {
    font: 400 2.2rem/1.05 var(--f-serif);
    letter-spacing: -0.03em;
    color: var(--ink);
    margin-bottom: 8px;
}

.auth-brand p { font-size: 0.9rem; color: var(--ink-3); }

.auth-card {
    background: linear-gradient(180deg, var(--bg-elev), color-mix(in oklch, var(--bg-elev) 70%, var(--bg)));
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 28px;
    box-shadow: var(--shadow-lg);
}

.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row a { color: var(--ember); font-size: 0.76rem; font-weight: 500; margin-bottom: 7px; }
.label-row a:hover { text-decoration: underline; }

/* Full-width submit button */
.btn-auth {
    width: 100%;
    padding: 13px;
    margin-top: 6px;
    background: linear-gradient(180deg, oklch(0.82 0.13 78), var(--ember));
    color: var(--ember-ink);
    border: 1px solid var(--ember);
    border-radius: var(--r-md);
    font-family: var(--f-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 0 oklch(1 0 0 / .25) inset, 0 10px 24px -10px color-mix(in oklch, var(--ember) 60%, transparent);
    transition: filter var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.btn-auth:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-auth:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Alerts */
.auth-alert {
    display: none;
    padding: 11px 14px;
    border-radius: var(--r-md);
    font-size: 0.82rem;
    margin-bottom: 18px;
    line-height: 1.5;
}

.auth-alert-error { background: var(--danger-soft); border: 1px solid var(--danger-line); color: var(--danger); }
.auth-alert-success { background: var(--signal-soft); border: 1px solid oklch(0.40 0.08 150); color: var(--signal); }

.auth-footer {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--ink-3);
    font-size: 0.8rem;
    line-height: 1.6;
    text-align: center;
}

.auth-footer a { color: var(--ember); font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }

.auth-back { margin-top: 22px; text-align: center; }
.auth-back a { color: var(--ink-4); font-size: 0.8rem; transition: color var(--t-fast) var(--ease); }
.auth-back a:hover { color: var(--ink); }

@media (max-width: 900px) {
    body { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-brand { text-align: center; }
    .auth-brand img { display: inline-block; }
}


/* Link-check, success and invalid states */
.auth-checking {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 0;
    color: var(--ink-3);
    font-size: 0.86rem;
}

.auth-checking .loader { margin: 0; width: 18px; height: 18px; }

.auth-state { text-align: center; padding: 8px 0 4px; }

.auth-state-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    border-radius: 50%;
}

.auth-state-icon svg { width: 24px; height: 24px; }
.auth-state-icon.is-ok { background: var(--signal-soft); color: var(--signal); }
.auth-state-icon.is-bad { background: var(--danger-soft); color: var(--danger); }

.auth-state h2 { margin-bottom: 8px; font: 400 1.5rem/1.15 var(--f-serif); letter-spacing: -0.02em; }
.auth-state p { margin-bottom: 20px; color: var(--ink-3); font-size: 0.86rem; line-height: 1.6; }
.auth-state a { color: var(--ember); font-size: 0.86rem; font-weight: 600; }
.auth-state a:hover { text-decoration: underline; }

/* Welcome note on the set-password page */
.welcome-note {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid var(--ember-line);
    border-radius: var(--r-md);
    background: color-mix(in oklch, var(--ember) 7%, var(--bg-sunk));
}

.welcome-note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--ember); }
.welcome-note p { margin: 0; color: var(--ink-2); font-size: 0.82rem; line-height: 1.55; }

