﻿/* ============================================================================
   auth.css - Login, Logout, AccessDenied and first-run Setup.

   Deliberately self-contained: these pages load no Bootstrap and no CDN, so
   they still render if the network is unreachable. Every class is auth-
   prefixed. The old .mark class collided with Bootstrap's .mark (yellow
   highlight) - do not reintroduce unprefixed names here.

   Palette below is the pre-redesign plum set, carried over unchanged. The
   status colours match the tokens already used in LoanInfo/Collectibles so
   messages look the same before and after sign-in.
   ============================================================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --ink: #1a1a2e;
    --plum: #3d2b6e;
    --plum-hover: #2f2055;
    --paper: #f5f4f8;
    --line: #dcd9e5;
    --text: #1a1a2e;
    --muted: #666378;
    /* Status palette - shared with the signed-in pages */
    --danger: #8E2B1B;
    --danger-bg: #F7E1DC;
    --danger-line: #EBC9C1;
    --warning: #7A5410;
    --warning-bg: #FBF3E4;
    --warning-line: #EFDFC0;
    --success: #2F5B2E;
    --success-bg: #E4EFE3;
    --success-line: #CBDFC9;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
    font-size: 14px;
    background: var(--ink);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* ── Shell ───────────────────────────────────────────────────────────────── */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr minmax(380px, 460px);
}

/* ── Left: brand panel ───────────────────────────────────────────────────── */
.auth-aside {
    color: #fff;
    padding: 44px 64px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-brand__tile {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--plum);
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.auth-brand__name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.auth-brand__sub {
    font-size: 12px;
    color: rgba(255,255,255,.5);
}

.auth-statement h1 {
    font-size: 30px;
    font-weight: 600;
    line-height: 1.35;
    max-width: 15ch;
    margin: 0;
}

.auth-note {
    font-size: 12px;
    color: rgba(255,255,255,.5);
    max-width: 52ch;
    line-height: 1.7;
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.1);
}

/* ── Right: the form ─────────────────────────────────────────────────────── */
.auth-main {
    background: var(--paper);
    display: flex;
    align-items: center;
    padding: 40px;
}

.auth-card {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}

    .auth-card h2 {
        font-size: 22px;
        font-weight: 600;
        letter-spacing: -.01em;
        margin: 0 0 6px;
    }

    .auth-card .auth-sub {
        font-size: 13px;
        color: var(--muted);
        margin: 0 0 28px;
    }

.auth-field {
    margin-bottom: 16px;
}

.auth-card .form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #3b3950;
    margin-bottom: 6px;
}

.auth-card .form-control {
    display: block;
    width: 100%;
    font-family: inherit;
    color: var(--text);
    outline: none;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    padding: 10px 12px;
}

    .auth-card .form-control:focus {
        border-color: var(--plum);
        box-shadow: 0 0 0 3px rgba(61,43,110,.15);
    }

.auth-caps {
    display: none;
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
}

    .auth-caps.is-on {
        display: block;
    }

/* asp:CheckBox renders <span class="auth-remember"><input/><label/></span> */
.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 24px;
    font-size: 13px;
    color: #3b3950;
}

    .auth-remember input {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: var(--plum);
    }

    .auth-remember label {
        margin: 0;
        cursor: pointer;
    }

.auth-submit {
    background: var(--plum);
    color: #fff;
    border: none;
    width: 100%;
    padding: 11px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

    .auth-submit:hover,
    .auth-submit:focus {
        background: var(--plum-hover);
        color: #fff;
    }

    .auth-submit:focus-visible {
        outline: 3px solid rgba(61,43,110,.4);
        outline-offset: 2px;
    }

    .auth-submit:disabled {
        background: #b9b4c9;
        cursor: not-allowed;
    }

/* ── Alerts ──────────────────────────────────────────────────────────────────
   The base class carries layout only. Colour comes from a variant modifier,
   set in Login.aspx.vb - the code-behind must never replace CssClass outright
   or the box loses its styling entirely.
   ─────────────────────────────────────────────────────────────────────────── */
.auth-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.5;
    padding: 10px 12px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid transparent;
    /* Default to the danger palette so an unrecognised variant still reads
       as a problem rather than rendering as invisible black-on-paper text. */
    color: var(--danger);
    background: var(--danger-bg);
    border-color: var(--danger-line);
}

.auth-alert--danger {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: var(--danger-line);
}

.auth-alert--warning {
    color: var(--warning);
    background: var(--warning-bg);
    border-color: var(--warning-line);
}

.auth-alert--success {
    color: var(--success);
    background: var(--success-bg);
    border-color: var(--success-line);
}

/* All three icons sit in the markup; the variant class reveals the right one.
   Keeps icon choice out of the code-behind. */
.auth-alert__icon {
    display: none;
    flex: none;
    margin-top: 2px;
}

.auth-alert--danger .auth-alert__icon--danger,
.auth-alert--warning .auth-alert__icon--warning,
.auth-alert--success .auth-alert__icon--success {
    display: block;
}

/* No variant applied - fall back to the danger glyph. */
.auth-alert:not(.auth-alert--danger):not(.auth-alert--warning):not(.auth-alert--success)
.auth-alert__icon--danger {
    display: block;
}

.auth-foot {
    font-size: 12px;
    color: #8a8799;
    margin: 28px 0 0;
    line-height: 1.6;
}

/* ── Narrow screens ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .auth-aside {
        padding: 24px;
        gap: 20px;
    }

    .auth-statement h1 {
        font-size: 22px;
        max-width: none;
    }

    .auth-note {
        display: none;
    }

    .auth-main {
        align-items: flex-start;
        padding: 32px 24px 48px;
    }
}

/* ── Account type selector ───────────────────────────────────────────────────
   asp:RadioButtonList with RepeatLayout="Flow" renders a bare sequence of
   <input> + <label> pairs with no wrapper per item, so the gap is set on the
   container and the spacing between input and its own label on the input.
   ─────────────────────────────────────────────────────────────────────────── */
.auth-accttype {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 13px;
    color: #3b3950;
}

    .auth-accttype input[type="radio"] {
        width: 15px;
        height: 15px;
        margin: 0 6px 0 0;
        accent-color: var(--plum);
        vertical-align: middle;
    }

    .auth-accttype label {
        margin: 0 4px 0 0;
        cursor: pointer;
        vertical-align: middle;
    }
