/* ──────────────────────────────────────────────────────────
   Auth Shell — shared login layout
   Flat design: no gradients, no backdrop-filter, no oversized
   rounded cards. Token-based colors, clamp() spacing.

   Collapse breakpoint: ≤960px so 1366×768 and 1280×800 laptop
   widths stay two-column, even at 125% browser zoom
   (1366 / 1.25 = 1093px, 1280 / 1.25 = 1024px — both > 960).
   ────────────────────────────────────────────────────────── */

body {
    min-height: 100vh;
    overflow-x: hidden;
}

/* Shell: full-viewport, edge-to-edge panels, no outer padding */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    width: 100%;
}

.auth-panel {
    min-width: 0;
    box-sizing: border-box;
}

/* ── Brand panel ────────────────────────────────────────── */
.auth-panel-brand {
    padding: clamp(32px, 4vw, 52px);
    background: #0d1b33;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.auth-brand-lockup-copy {
    min-width: 0;
}

.auth-mark {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-mark img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.auth-brand-name {
    display: block;
    color: #fff;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
}

.auth-brand-context {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-panel-brand h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(24px, 2.4vw, 38px);
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -0.02em;
}

.auth-lead {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 15px;
    line-height: 1.65;
    max-width: 520px;
}

/* Feature grid */
.auth-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.auth-feature {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}

.auth-feature span {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-feature strong {
    display: block;
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

/* "by AARK Network" byline */
.auth-byline {
    margin: 0;
    margin-top: auto;
    color: rgba(255, 255, 255, 0.32);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* ── Form panel ─────────────────────────────────────────── */
.auth-panel-form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(32px, 4vw, 52px);
    background: #f5f6f8;
}

.auth-card {
    width: min(100%, 420px);
    box-sizing: border-box;
    padding: clamp(20px, 2.4vw, 28px);
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e2e6ed;
}

/* Badge chip in form card header */
.auth-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(13, 27, 51, 0.07);
    color: #21314f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-card-head {
    margin-bottom: 4px;
}

.auth-card-head h2 {
    margin: 8px 0 4px;
    font-size: 22px;
    font-weight: 700;
    color: #0d1b33;
    letter-spacing: -0.02em;
}

.auth-card-head p {
    margin: 0;
    color: #63708a;
    font-size: 14px;
    line-height: 1.5;
}

/* ── Auth notes (replaces error-message / info-message) ── */
.auth-note {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.45;
}

.auth-note p {
    margin: 0;
}

.auth-note p + p {
    margin-top: 6px;
}

.auth-note--error {
    background: #fff0ef;
    border: 1px solid #f2c7c2;
    color: #9d342f;
}

.auth-note--info {
    background: #f0f7ff;
    border: 1px solid #c8dcf8;
    color: #1a4a8a;
}

/* ── Form layout ────────────────────────────────────────── */
.auth-form {
    margin-top: 14px;
}

/* Tighten the vertical rhythm so the card fits a laptop viewport
   (~720–760px tall) without scrolling. Scoped to .auth-form so the
   global form system is unaffected. */
.auth-form .form-block {
    margin-bottom: 8px;
}

.auth-form .form-block label {
    margin-bottom: 4px;
}

.auth-form input {
    min-height: 44px;
}

/* Password field wrapper */
.auth-password-wrap {
    position: relative;
}

.auth-password-wrap input {
    padding-right: 48px;
}

.auth-password-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 5px;
    background: transparent;
    color: #63708a;
    box-shadow: none;
}

.auth-password-toggle .password-toggle-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-password-toggle:hover {
    color: #0d1b33;
    background: #eef1f6;
    transform: translateY(-50%);
}

/* Submit button */
.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    margin-top: 8px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: #0d1b33;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 140ms ease;
}

.auth-submit:hover {
    background: #162742;
}

.auth-submit:focus-visible {
    outline: 2px solid #1f6fff;
    outline-offset: 2px;
}

.auth-submit.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Footer row */
.auth-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e8ecf2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-footer p {
    margin: 0;
    color: #63708a;
    font-size: 13px;
}

.auth-admin-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 5px;
    border: 1px solid #d8dfeb;
    background: #fff;
    color: #0d1b33;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 140ms ease, background 140ms ease;
}

.auth-admin-link:hover {
    border-color: #b0bcd0;
    background: #f5f6f8;
    color: #0d1b33;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-panel-brand {
        padding: clamp(24px, 3vw, 36px);
    }

    .auth-panel-form {
        padding: 28px 24px;
        justify-content: flex-start;
    }

    .auth-card {
        width: 100%;
        max-width: 480px;
    }
}

@media (max-width: 640px) {
    .auth-panel-brand {
        padding: 20px;
        gap: 20px;
    }

    .auth-panel-brand h1 {
        font-size: clamp(22px, 7vw, 32px);
    }

    .auth-lead {
        display: none;
    }

    .auth-feature-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .auth-panel-form {
        padding: 20px;
    }

    .auth-card {
        padding: 20px;
        border-radius: 6px;
    }

    .auth-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-admin-link {
        text-align: center;
        justify-content: center;
    }
}

/* ── Dark mode ──────────────────────────────────────────── */
html[data-theme="dark"] .auth-panel-brand {
    background: #090f1a;
}

html[data-theme="dark"] .auth-panel-form {
    background: #101010;
}

html[data-theme="dark"] .auth-card {
    background: #1a1a1a;
    border-color: #2d2d2d;
}

html[data-theme="dark"] .auth-badge {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
}

html[data-theme="dark"] .auth-card-head h2 {
    color: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .auth-card-head p,
html[data-theme="dark"] .auth-footer p {
    color: rgba(255, 255, 255, 0.48);
}

html[data-theme="dark"] .auth-note--error {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.28);
    color: #fca5a5;
}

html[data-theme="dark"] .auth-note--info {
    background: rgba(31, 111, 255, 0.1);
    border-color: rgba(31, 111, 255, 0.22);
    color: #93c5fd;
}

html[data-theme="dark"] .auth-footer {
    border-top-color: #2d2d2d;
}

html[data-theme="dark"] .auth-submit {
    background: #1a2d4a;
}

html[data-theme="dark"] .auth-submit:hover {
    background: #243d62;
}

html[data-theme="dark"] .auth-admin-link {
    border-color: #333333;
    background: #1c1c1c;
    color: rgba(255, 255, 255, 0.76);
}

html[data-theme="dark"] .auth-admin-link:hover {
    border-color: #444444;
    background: #222222;
    color: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .auth-password-toggle {
    color: rgba(255, 255, 255, 0.44);
}

html[data-theme="dark"] .auth-password-toggle:hover {
    color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.07);
}
