/*
 * The public forms - sign in, register, forgot password, new password - in the style of the
 * landing page (docs/mockups/auth-bento.html). The frame is Components/Shared/Auth/AuthShell.razor:
 * a dark band with what the page is about, and the form in a white card on the light ground.
 * Colours and type come from landing.css (--lp-*). Everything here is prefixed au- and used
 * nowhere else. Global rather than scoped: the four pages and the shell share it.
 */

.au {
    --au-ok: #2E8F62;
    --au-ok-soft: #E2F3EA;
    --au-bad: #C2413B;
    --au-bad-soft: #FBEAE8;
    --au-info-soft: #E6F6F8;
    --au-info-ink: #17707C;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    min-height: calc(100vh - 64px); /* the main content starts under PublicLayout's 64px app bar */
    background: var(--lp-ground);
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    color: var(--lp-navy);
}

.au a { color: inherit; }

/* ---------- the dark band ---------- */

.au-aside {
    background: var(--lp-ink-dark);
    color: #FFFFFF;
    padding: 64px 56px 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.au-eyebrow {
    display: inline-flex;
    align-self: flex-start;
    padding: 7px 14px;
    border: 1px solid #2C3A58;
    border-radius: 999px;
    color: var(--lp-gold);
    font: 500 12px 'IBM Plex Mono', Consolas, monospace;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 26px;
}

.au-aside h2 {
    margin: 0 0 18px;
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    font-size: 52px;
    line-height: 1.05;
    max-width: 10em;
    color: #FFFFFF;
}

.au-aside h2 em { color: var(--lp-gold); }

.au-lead { margin: 0 0 28px; font-size: 17px; line-height: 1.6; color: var(--lp-on-dark-dim); max-width: 28em; }

.au-checks { list-style: none; margin: 0 0 32px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.au-checks li { display: flex; gap: 12px; align-items: center; font-size: 15px; color: var(--lp-on-dark-dim); }
.au-checks svg { width: 20px; height: 20px; fill: var(--lp-gold); flex: none; }

.au-shot {
    margin-top: auto;
    align-self: center;
    width: 280px;
    border-radius: 32px 32px 0 0;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
    display: block;
}

.au-steps { list-style: none; margin: 0 0 40px; padding: 0; display: flex; flex-direction: column; gap: 4px; max-width: 26em; }
.au-steps li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; padding: 12px 0; border-top: 1px solid #1F2A44; }
.au-steps li:first-child { border-top: 0; }
.au-steps .n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid #3A4765; color: var(--lp-on-dark-faint); font: 500 13px 'IBM Plex Mono', Consolas, monospace; }
.au-steps b { display: block; font-weight: 600; font-size: 15px; color: var(--lp-on-dark-faint); }
.au-steps small { color: var(--lp-on-dark-faint); font-size: 14px; }
.au-steps li.done b, .au-steps li.now b { color: #FFFFFF; }
.au-steps li.done .n { background: #1F3A33; border-color: #1F3A33; color: #7FD3A8; }
.au-steps li.now .n { background: var(--lp-gold); border-color: var(--lp-gold); color: var(--lp-ink-dark); }

.au-foot { margin-top: auto; padding: 0 0 40px; font: 500 13px 'IBM Plex Mono', Consolas, monospace; color: var(--lp-on-dark-faint); }

/* ---------- the card ---------- */

.au-main { display: flex; align-items: center; justify-content: center; padding: 56px 32px; }

.au-card {
    width: 100%;
    max-width: 460px;
    background: #FFFFFF;
    border: 1px solid var(--lp-line);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 48px rgba(29, 41, 74, .08);
}

.au-kicker { font: 500 12px 'IBM Plex Mono', Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--lp-muted); margin-bottom: 10px; }
.au-card h1 { margin: 0 0 8px; font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 40px; line-height: 1.1; color: var(--lp-navy); }
.au-sub { margin: 0 0 28px; color: var(--lp-body); font-size: 16px; line-height: 1.55; }
.au-sub b, .au-addr { font-weight: 600; color: var(--lp-navy); overflow-wrap: anywhere; }

.au-form { display: flex; flex-direction: column; gap: 18px; }
.au-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.au-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.au-field > label { font-size: 14px; font-weight: 600; color: var(--lp-navy); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0; }
.au-field > label a { font-weight: 500; color: var(--lp-indigo); font-size: 13px; text-decoration: none; }
.au-field > label a:hover { text-decoration: underline; }

.au-input { position: relative; display: flex; align-items: center; }
.au-input input {
    width: 100%;
    height: 48px;
    border: 1px solid #D1D5DB;
    border-radius: 12px;
    padding: 0 14px;
    font: 400 16px 'Inter', 'Helvetica Neue', sans-serif;
    color: var(--lp-navy);
    background: #FFFFFF;
    outline: none;
}
.au-input input::placeholder { color: #9CA3AF; }
.au-input input:focus { border-color: var(--lp-navy); box-shadow: 0 0 0 3px rgba(233, 199, 128, .55); }
.au-input input:disabled { background: var(--lp-ground); }
.au-input.has-eye input { padding-right: 48px; }

.au-eye { position: absolute; right: 6px; width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; cursor: pointer; display: grid; place-items: center; color: var(--lp-muted); padding: 0; }
.au-eye:hover { background: var(--lp-ground); color: var(--lp-navy); }
.au-eye svg { width: 20px; height: 20px; fill: currentColor; }

.au-help { font-size: 13px; color: var(--lp-muted); }
.au-err { font-size: 13px; color: var(--au-bad); }
.au-field.invalid .au-input input { border-color: var(--au-bad); }
.au-field.invalid .au-input input:focus { box-shadow: 0 0 0 3px rgba(194, 65, 59, .18); }

.au-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--lp-body); line-height: 1.5; cursor: pointer; margin: 0; font-weight: 400; }
.au-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--lp-navy); flex: none; }
.au-check a { color: var(--lp-indigo); font-weight: 500; }
.au-check small { display: block; color: var(--lp-muted); font-size: 13px; }

/* ---------- password rules ---------- */

.au-rules { border: 1px solid var(--lp-line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.au-rules .head { display: flex; justify-content: space-between; font-size: 12px; color: var(--lp-muted); }
.au-rules .head b { font-weight: 600; }
.au-rules .head b.weak { color: var(--au-bad); }
.au-rules .head b.almost { color: #B07A12; }
.au-rules .head b.strong { color: var(--au-ok); }
.au-meter { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.au-meter i { height: 5px; border-radius: 3px; background: var(--lp-line); }
.au-meter i.on.weak { background: var(--au-bad); }
.au-meter i.on.almost { background: #D9A441; }
.au-meter i.on.strong { background: var(--au-ok); }
.au-rules ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.au-rules li { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--lp-muted); }
.au-rules li svg { width: 16px; height: 16px; fill: #C4C9D2; flex: none; }
.au-rules li.ok { color: var(--au-ok); }
.au-rules li.ok svg { fill: var(--au-ok); }

.au-match { font-size: 13px; display: flex; gap: 6px; align-items: center; color: var(--au-ok); }
.au-match svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- buttons, banners, states ---------- */

.au-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    width: 100%;
    padding: 0 28px;
    border-radius: 12px;
    font: 600 16px 'Inter', 'Helvetica Neue', sans-serif;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}
.au-btn:hover { text-decoration: none; }
.au .au-btn-navy { background: var(--lp-navy); color: #FFFFFF; }
.au .au-btn-navy:hover:not(:disabled) { background: var(--lp-indigo); color: #FFFFFF; }
.au-btn-navy:disabled { background: #9AA3B5; cursor: not-allowed; }
.au .au-btn-outline { border-color: var(--lp-navy); color: var(--lp-navy); background: #FFFFFF; }
.au .au-btn-outline:hover { background: var(--lp-navy); color: #FFFFFF; }
.au-spin { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #FFFFFF; border-radius: 50%; animation: au-spin .8s linear infinite; }
@keyframes au-spin { to { transform: rotate(360deg); } }

.au-alt { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--lp-line); text-align: center; font-size: 15px; color: var(--lp-body); }
.au-alt a { color: var(--lp-navy); font-weight: 600; }
.au .au-back { display: inline-flex; gap: 6px; align-items: center; color: var(--lp-indigo); font-size: 14px; font-weight: 500; text-decoration: none; }
.au-back svg { width: 18px; height: 18px; fill: currentColor; }

.au-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.au-banner svg { width: 20px; height: 20px; fill: currentColor; flex: none; margin-top: 1px; }
.au-banner b { display: block; font-weight: 600; }
.au-banner a { font-weight: 600; }
.au-banner.bad { background: var(--au-bad-soft); color: #8E2A25; }
.au-banner.info { background: var(--au-info-soft); color: var(--au-info-ink); }
.au-banner.legacy-hint { margin-top: 18px; }

.au-state { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px; }
.au-state svg { width: 28px; height: 28px; fill: currentColor; }
.au-state.ok { background: var(--au-ok-soft); color: var(--au-ok); }
.au-state.bad { background: var(--au-bad-soft); color: var(--au-bad); }
.au-state.mail { background: #FBF3E2; color: #9A6B10; }
.au-stack { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }

/* ---------- smaller screens ---------- */

@media (max-width: 1000px) {
    .au { grid-template-columns: minmax(0, 1fr); align-content: start; }
    .au-aside { padding: 40px 28px 28px; }
    .au-aside h2 { font-size: 38px; margin-bottom: 0; }
    .au-shot, .au-checks, .au-steps, .au-lead, .au-foot { display: none; }
    .au-main { padding: 32px 16px 56px; align-items: flex-start; }
}

@media (max-width: 560px) {
    .au-card { padding: 28px 22px; border-radius: 16px; }
    .au-card h1 { font-size: 32px; }
    .au-row2, .au-rules ul { grid-template-columns: 1fr; }
}
