/* Login page — from the "SnapPOS Login" claude.ai/design comp (2026-07-11).
   Centered single card; comp colors are mapped to dot-base tokens (the comp's warm orange
   gradient IS the --accent/--accent-dark pair the shared .btn already uses). Global faces
   replace the comp's fonts per docs/web-design-system.md. */

/* Center the card in the viewport (chrome is hidden on this page). */
.page-shell.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

/* The layout wraps every page body in <main>, which is this flex row's only item. Left to itself
   it sizes to max-content, so a card with a long paragraph (ForgotPassword, ResetPassword) made
   <main> far wider than the 420px card and the card then sat at ITS left edge — visibly off-centre
   next to Login, whose short sub-line happens to shrink <main> to about the card width. Make <main>
   take the row and centre its own child instead, so every card in this shell lands identically
   regardless of how much text it holds. */
.page-shell.login-shell > main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: center;
}

.login-card {
    width: min(420px, 100%);
    background: var(--card);
    border: 1px solid var(--card-line);
    border-radius: 22px;
    padding: 40px;
    box-shadow: var(--shadow);
}

/* ── Brand lockup (same source as the portal header: set logo or the default mark) ── */

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.login-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: contain;
}

.login-lockup {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.login-name {
    font-family: "Fraunces", Georgia, serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.login-tagline {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Heading ── */

.login-title {
    margin: 0 0 6px;
    font-family: "Fraunces", Georgia, serif;
    font-size: 27px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.login-sub {
    margin: 0 0 26px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-soft);
}

/* ── Fields ── */

.login-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 8px;
}

.login-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--field-line);
    border-radius: 12px;
    background: var(--field-bg);
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    outline: none;
    margin-bottom: 18px;
}

.login-input::placeholder { color: var(--muted); }

.login-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring);
}

.login-input.input-validation-error { border-color: var(--danger); }

/* Password field with the inline Show/Hide toggle. */
.login-pw-wrap { position: relative; }

.login-input-pw {
    padding-right: 62px;
    margin-bottom: 0;
}

.login-pw-wrap { margin-bottom: 18px; }

.login-pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-dark);
    padding: 4px;
}

.login-field-error {
    display: block;
    min-height: 16px;
    margin: -12px 0 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--danger);
}

.login-pw-wrap + .login-field-error { margin-top: 4px; }

/* ── Remember me / forgot password row ── */

.login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 22px;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-soft);
    cursor: pointer;
}

.login-remember input {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    accent-color: var(--accent-dark);
    cursor: pointer;
}

.login-forgot {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-dark);
    text-decoration: none;
}

.login-forgot:hover { text-decoration: underline; }

/* Informational banner (session expired etc.) — a notice, not an error. */
.login-notice {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid var(--card-line);
    border-radius: 12px;
    background: var(--field-bg);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink-soft);
}

/* Masked addresses on the forgot-password verify step. Monospaced so the asterisk runs line up and
   the reader can count what is hidden; not a form control, just the prompt for what to re-type. */
.login-masked {
    margin: 0 0 18px;
    padding: 12px 14px;
    list-style: none;
    border: 1px solid var(--card-line);
    border-radius: 12px;
    background: var(--field-bg);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
    color: var(--ink);
}

.login-masked li + li { margin-top: 6px; }

/* ── Errors + submit ── */

.login-error {
    margin: 0 0 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--danger);
}

.login-error:empty,
.login-error.validation-summary-valid { display: none; }

.login-error ul {
    margin: 0;
    padding-left: 18px;
}

/* The shared .btn already carries the comp's gradient (--accent → --accent-dark). */
.login-submit {
    width: 100%;
    border-radius: 12px;
    letter-spacing: 0.02em;
}

@media (max-width: 480px) {
    .login-card { padding: 26px 22px; }
}
