/* ==========================================================
   Auth design system — used by SignIn, ForgotPassword, Register
   pages. Brand orange (#FF7A1A) primary; mirrors the post-login
   mp-* aesthetic so users feel continuity once signed in.
   Natural typography: 400 body / 500 medium / 600 labels & buttons /
   700 only for headings. No extreme weights.
   ========================================================== */

:root {
    --auth-brand: #FF7A1A;
    --auth-brand-dark: #e8661c;
    --auth-brand-soft: #fff5eb;
    --auth-ink: #1a202c;
    --auth-ink-soft: #475569;
    --auth-ink-muted: #8a93a3;
    --auth-line: #dde2eb;             /* slightly more visible against the off-white card */
    --auth-line-soft: #e5e9ee;
    --auth-bg: #e3e8f0;               /* darker, calmer body bg — easier on the eyes */
    --auth-card: #fbfaf7;             /* warm off-white card (paper feel) — not pure white */
    --auth-panel: #f5f4f0;            /* warmer interior panel for radio cards / hover bgs */
    --auth-success: #047857;
    --auth-success-soft: #ecfdf5;
    --auth-danger: #b91c1c;
    --auth-danger-soft: #fef2f2;
    --auth-warn: #b45309;
    --auth-warn-soft: #fffbeb;
    --auth-info: #1e40af;
    --auth-info-soft: #eff6ff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(circle at 12% 18%, rgba(255,122,26,0.10), transparent 42%),
        radial-gradient(circle at 88% 82%, rgba(99,102,241,0.08), transparent 42%),
        var(--auth-bg);
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    color: var(--auth-ink);
    padding: 32px 16px;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    font-size: 14px;
    font-weight: 400;
}

/* === Card === */
.auth-card {
    background: var(--auth-card);
    border: 1px solid var(--auth-line);
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(15,23,42,0.08);
    width: 100%; max-width: 440px;
    padding: 36px 32px 28px;
}
.auth-card.wide   { max-width: 720px; }
.auth-card.x-wide { max-width: 880px; padding-left: 36px; padding-right: 36px; }

/* === Brand mark on the card === */
.auth-brand {
    display: inline-flex; align-items: center; gap: 10px;
    margin-bottom: 24px;
}
.auth-brand-icon {
    width: 32px; height: 32px; border-radius: 9px;
    background: var(--auth-brand-soft); color: var(--auth-brand);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px;
}
.auth-brand-name {
    font-weight: 600; font-size: 14px;
    color: var(--auth-ink); letter-spacing: -0.1px;
}

/* === Heading + subtitle === */
.auth-title {
    font-size: 22px; font-weight: 700; line-height: 1.25;
    color: var(--auth-ink); margin: 0 0 6px;
    letter-spacing: -0.3px;
}
.auth-sub {
    font-size: 14px; font-weight: 400; line-height: 1.5;
    color: var(--auth-ink-soft); margin: 0 0 24px;
}

/* === Form === */
.auth-field { margin-bottom: 14px; }
.auth-field label {
    font-size: 13px; font-weight: 500;
    color: var(--auth-ink); display: block; margin-bottom: 6px;
}
.auth-field label .req { color: var(--auth-danger); margin-left: 2px; }
.auth-field-help {
    font-size: 12px; font-weight: 400;
    color: var(--auth-ink-muted); margin-top: 5px;
}

.auth-input-wrap { position: relative; }
.auth-input-wrap > i.fa.prefix {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--auth-ink-muted); font-size: 13px; pointer-events: none;
}

.auth-input, .auth-select, .auth-textarea {
    width: 100%; padding: 11px 14px;
    border: 1px solid var(--auth-line); border-radius: 10px;
    font-size: 14px; font-weight: 400; line-height: 1.4;
    background: #fff; color: var(--auth-ink); outline: none;
    /* fields stay pure-white so they pop against the warm card */
    transition: border 0.15s, box-shadow 0.15s;
    font-family: inherit;
}
.auth-input.has-prefix, .auth-select.has-prefix { padding-left: 40px; }
.auth-input.has-suffix { padding-right: 44px; }
.auth-input:focus, .auth-select:focus, .auth-textarea:focus {
    border-color: var(--auth-brand); box-shadow: 0 0 0 3px rgba(255,122,26,0.12);
}
.auth-input::placeholder, .auth-textarea::placeholder { color: #94a3b8; font-weight: 400; }
.auth-input:disabled, .auth-select:disabled {
    background: #f8fafc; color: var(--auth-ink-soft); cursor: not-allowed;
}
.auth-textarea { min-height: 80px; resize: vertical; }

.auth-pwd-toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px;
    border: none; background: transparent; color: var(--auth-ink-soft);
    cursor: pointer; border-radius: 6px; font-size: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    transition: color 0.15s, background 0.15s;
}
.auth-pwd-toggle:hover { color: var(--auth-ink); background: var(--auth-line-soft); }

/* Multi-column grid */
.auth-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 600px) {
    .auth-grid.cols-2 { grid-template-columns: 1fr 1fr; }
    .auth-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
    .auth-grid .col-full { grid-column: 1 / -1; }
}

/* Row: remember + forgot, etc. */
.auth-row {
    display: flex; align-items: center; justify-content: space-between;
    margin: 4px 0 18px; flex-wrap: wrap; gap: 10px;
}
.auth-checkbox {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 400; color: var(--auth-ink);
    cursor: pointer; user-select: none;
}
.auth-checkbox input { width: 16px; height: 16px; accent-color: var(--auth-brand); cursor: pointer; }

.auth-link {
    font-size: 13px; font-weight: 500;
    color: var(--auth-brand); text-decoration: none;
}
.auth-link:hover { color: var(--auth-brand-dark); text-decoration: underline; }
.auth-link.muted { color: var(--auth-ink-soft); font-weight: 400; }
.auth-link.muted:hover { color: var(--auth-ink); }

/* === Buttons === */
.auth-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 10px;
    font-size: 14px; font-weight: 600; line-height: 1;
    border: 1px solid transparent;
    cursor: pointer; text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    font-family: inherit;
    white-space: nowrap;
}
.auth-btn.primary {
    background: var(--auth-brand); color: #fff; border-color: var(--auth-brand);
    box-shadow: 0 1px 2px rgba(255,122,26,0.20);
}
.auth-btn.primary:hover {
    background: var(--auth-brand-dark); border-color: var(--auth-brand-dark);
    box-shadow: 0 4px 12px rgba(255,122,26,0.28); transform: translateY(-1px);
}
.auth-btn.secondary {
    background: #fff; color: var(--auth-ink); border-color: var(--auth-line);
}
.auth-btn.secondary:hover { background: var(--auth-panel); border-color: #d6dde6; }
.auth-btn.success {
    background: var(--auth-success); color: #fff; border-color: var(--auth-success);
}
.auth-btn.success:hover { background: #036046; border-color: #036046; box-shadow: 0 4px 12px rgba(4,120,87,0.20); }
.auth-btn.ghost {
    background: transparent; color: var(--auth-ink-soft); border-color: transparent;
}
.auth-btn.ghost:hover { background: var(--auth-panel); color: var(--auth-ink); }
.auth-btn.block { width: 100%; }
.auth-btn.lg { padding: 13px 22px; font-size: 14.5px; }

/* === Alerts === */
.auth-alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px; border-radius: 10px;
    font-size: 13px; line-height: 1.5;
    border: 1px solid transparent;
    margin-bottom: 18px;
}
.auth-alert i { margin-top: 2px; flex-shrink: 0; font-size: 14px; }
.auth-alert .auth-alert-body { flex: 1; min-width: 0; }
.auth-alert.danger  { background: var(--auth-danger-soft);  color: var(--auth-danger);  border-color: #fecaca; }
.auth-alert.success { background: var(--auth-success-soft); color: var(--auth-success); border-color: #bbf7d0; }
.auth-alert.warn    { background: var(--auth-warn-soft);    color: var(--auth-warn);    border-color: #fed7aa; }
.auth-alert.info    { background: var(--auth-info-soft);    color: var(--auth-info);    border-color: #bfdbfe; }

/* === Divider === */
.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 22px 0 16px;
    color: var(--auth-ink-muted); font-size: 12px; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.4px;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--auth-line);
}
.auth-divider.plain { text-transform: none; letter-spacing: 0; font-weight: 400; }

/* === Footer text below the card === */
.auth-footer {
    text-align: center; margin-top: 18px; padding-top: 0;
    font-size: 13px; color: var(--auth-ink-soft);
}
.auth-footer a {
    color: var(--auth-brand); font-weight: 500; text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

/* Section heading inside long forms */
.auth-section {
    font-size: 11.5px; font-weight: 600;
    color: var(--auth-ink-muted); text-transform: uppercase; letter-spacing: 0.6px;
    margin: 22px 0 10px;
}
.auth-section:first-of-type { margin-top: 6px; }

/* === Choose role tiles === */
.auth-roles {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
@media (max-width: 599px) { .auth-roles { grid-template-columns: 1fr; } }
.auth-role {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 24px 18px;
    background: #fff; border: 1px solid var(--auth-line); border-radius: 14px;
    text-decoration: none; color: var(--auth-ink);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    text-align: center;
}
.auth-role:hover {
    border-color: var(--auth-brand);
    box-shadow: 0 8px 24px rgba(255,122,26,0.10);
    transform: translateY(-2px);
}
.auth-role-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: var(--auth-brand-soft); color: var(--auth-brand);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.auth-role-icon.green { background: #ecfdf5; color: #059669; }
.auth-role-icon.blue  { background: #eff6ff; color: #2563eb; }
.auth-role-title { font-size: 15px; font-weight: 600; color: var(--auth-ink); margin: 4px 0 0; }
.auth-role-desc {
    font-size: 12.5px; font-weight: 400; line-height: 1.5;
    color: var(--auth-ink-soft); margin: 2px 0 6px;
}
.auth-role-qr {
    padding: 6px;
    background: #fff; border: 1px solid var(--auth-line); border-radius: 8px;
    margin-top: 4px;
}
.auth-role-qr-label { font-size: 11px; color: var(--auth-ink-muted); margin-top: 6px; }

/* === Radio cards (customer type) === */
.auth-radio-group {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
@media (max-width: 499px) { .auth-radio-group { grid-template-columns: 1fr; } }
.auth-radio-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 10px;
    background: #fff; border: 1px solid var(--auth-line);
    cursor: pointer; transition: all 0.15s;
}
.auth-radio-card:hover { border-color: var(--auth-brand); }
.auth-radio-card input { accent-color: var(--auth-brand); flex-shrink: 0; width: 16px; height: 16px; cursor: pointer; }
.auth-radio-card-text strong { font-size: 13.5px; font-weight: 600; color: var(--auth-ink); display: block; line-height: 1.3; }
.auth-radio-card-text small { font-size: 11.5px; font-weight: 400; color: var(--auth-ink-muted); display: block; margin-top: 2px; }
.auth-radio-card.selected { border-color: var(--auth-brand); background: var(--auth-brand-soft); }
.auth-radio-card.selected .auth-radio-card-text strong { color: var(--auth-brand-dark); }

/* === Confirmation hero === */
.auth-hero {
    text-align: center; padding-bottom: 4px;
}
.auth-hero-icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--auth-success-soft); color: var(--auth-success);
    display: inline-flex; align-items: center; justify-content: center; font-size: 30px;
    margin: 0 auto 18px;
    box-shadow: 0 6px 20px rgba(4,120,87,0.12);
}
.auth-hero .auth-title { text-align: center; }
.auth-hero .auth-sub { text-align: center; }
.auth-hero-list {
    list-style: none; padding: 0; margin: 18px 0 0;
    text-align: left; border-top: 1px solid var(--auth-line-soft);
}
.auth-hero-list li {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid var(--auth-line-soft);
    font-size: 13px;
}
.auth-hero-list li span:first-child { color: var(--auth-ink-soft); }
.auth-hero-list li span:last-child { color: var(--auth-ink); font-weight: 500; }

/* Credential / temp password box */
.auth-cred {
    background: var(--auth-warn-soft);
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 18px 0 8px;
    text-align: left;
}
.auth-cred-label {
    font-size: 11px; color: var(--auth-warn); font-weight: 600;
    letter-spacing: 0.4px; text-transform: uppercase;
}
.auth-cred-value {
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
    font-size: 18px; font-weight: 600; color: var(--auth-ink);
    margin: 6px 0 4px; word-break: break-all;
    background: #fff; padding: 8px 10px; border-radius: 6px;
    border: 1px solid #fed7aa;
}
.auth-cred-note { font-size: 11.5px; font-weight: 400; color: var(--auth-warn); margin: 4px 0 0; }

/* ==========================================================
   Split-panel sign-in layout (used by SignIn.cshtml only).
   Left: dark hero with brand glow + feature highlights.
   Right: clean form card. Collapses to single column < 960px.
   ========================================================== */
body.auth-split-body {
    background: var(--auth-bg);
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    min-height: 100vh;
}
.auth-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    width: 100%;
}
/* Slim hero variant: narrower brand panel, wider form panel.
   Used by the long registration forms so the fields stay roomy. */
.auth-split.slim {
    grid-template-columns: 360px 1fr;
}
@media (max-width: 1199.98px) {
    .auth-split.slim { grid-template-columns: 320px 1fr; }
}
.auth-split.slim .auth-hero-panel { padding: 32px 30px 24px; }
.auth-split.slim .auth-hero-title { font-size: 30px; }
.auth-split.slim .auth-hero-sub { font-size: 14px; margin-bottom: 0; }
.auth-split.slim .auth-hero-footer { gap: 12px; font-size: 11.5px; }
.auth-split.slim .auth-hero-footer a:nth-child(2),
.auth-split.slim .auth-hero-footer a:nth-child(3) { display: none; }
.auth-split.slim .auth-hero-footer-spacer { display: none; }
.auth-hero-panel {
    position: relative;
    overflow: hidden;
    color: #ecebe7;
    padding: 36px 48px 28px;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 18% 20%, rgba(255,122,26,0.12), transparent 50%),
        radial-gradient(circle at 78% 78%, rgba(255,122,26,0.06), transparent 55%),
        linear-gradient(135deg, #3a2e22 0%, #2b2218 55%, #1f1810 100%);
}
.auth-hero-panel::before {
    /* subtle dot pattern */
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
    opacity: 0.5;
}
.auth-hero-brand {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    color: #fff;
}
.auth-hero-brand-icon {
    width: 36px; height: 36px; border-radius: 8px;
    background: var(--auth-brand);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 16px;
    box-shadow: 0 4px 14px rgba(255,122,26,0.35);
}
.auth-hero-brand-name { font-size: 16px; font-weight: 700; letter-spacing: 0.2px; }
.auth-hero-brand-sub {
    font-size: 11px; font-weight: 600; color: #c2bcae;
    letter-spacing: 1.2px; text-transform: uppercase;
    margin-top: 2px;
}

.auth-hero-content {
    position: relative;
    flex: 1;
    display: flex; flex-direction: column; justify-content: center;
    max-width: 520px;
}
.auth-hero-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 999px;
    background: rgba(255,122,26,0.08);
    border: 1px solid rgba(255,122,26,0.22);
    color: #ffc89e;
    font-size: 12px; font-weight: 600;
    align-self: flex-start;
    margin-bottom: 22px;
}
.auth-hero-chip .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--auth-brand);
    box-shadow: 0 0 8px rgba(255,122,26,0.55);
}
.auth-hero-title {
    font-size: 44px; font-weight: 700; line-height: 1.1;
    color: #fff;
    margin: 0 0 16px;
    letter-spacing: -0.5px;
}
.auth-hero-title .accent { color: var(--auth-brand); display: block; }
.auth-hero-sub {
    font-size: 15px; font-weight: 400; line-height: 1.6;
    color: #cdc7bb;
    margin: 0 0 32px;
    max-width: 460px;
}

.auth-hero-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 8px;
}
.auth-hero-feature {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 16px 14px;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.auth-hero-feature:hover {
    background: rgba(255,122,26,0.06);
    border-color: rgba(255,122,26,0.18);
    transform: translateY(-2px);
}
.auth-hero-feature-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: rgba(255,122,26,0.10);
    color: #ffa66b;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px;
    margin-bottom: 10px;
}
.auth-hero-feature-title {
    font-size: 13px; font-weight: 700; color: #f5f2eb;
    margin-bottom: 2px;
}
.auth-hero-feature-sub {
    font-size: 11.5px; font-weight: 400; color: #b3ad9f;
    line-height: 1.4;
}

.auth-hero-footer {
    position: relative;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 18px;
    font-size: 12px;
    color: #aea89a;
}
.auth-hero-footer a { color: #cdc7bb; text-decoration: none; }
.auth-hero-footer a:hover { color: #ffa66b; }
.auth-hero-footer-spacer { flex: 1; }
.auth-hero-footer-tech {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 12px; border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.07);
    font-size: 11.5px; font-weight: 500;
    color: #cdc7bb;
}
.auth-hero-footer-tech strong {
    color: #f5f2eb;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.auth-hero-footer-tech:hover {
    background: rgba(255,122,26,0.08);
    border-color: rgba(255,122,26,0.18);
    color: #ffc89e;
}
.auth-hero-footer-tech:hover strong { color: #ffa66b; }

/* === Right: form panel === */
.auth-form-panel {
    background: var(--auth-bg);
    display: flex; align-items: center; justify-content: center;
    padding: 36px 24px;
    position: relative;
}
.auth-form-card {
    background: var(--auth-card);
    border: 1px solid var(--auth-line);
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(15,23,42,0.08);
    width: 100%; max-width: 440px;
    padding: 36px 32px 28px;
}
.auth-form-card.wide { max-width: 560px; }
.auth-form-card.x-wide { max-width: 760px; padding: 32px 36px 26px; }
.auth-form-card .auth-title { font-size: 26px; margin-bottom: 4px; }
.auth-form-card .auth-sub { margin-bottom: 22px; }

.auth-form-secure {
    margin-top: 22px;
    text-align: center;
    font-size: 12px;
    color: var(--auth-ink-muted);
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.auth-form-secure i { color: var(--auth-success); }

/* === Mobile (< 960px): collapse to single column, hero on top === */
@media (max-width: 959.98px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-hero-panel { padding: 28px 24px 24px; min-height: auto; }
    .auth-hero-content { padding: 24px 0; max-width: 100%; }
    .auth-hero-title { font-size: 30px; }
    .auth-hero-sub { font-size: 14px; margin-bottom: 22px; }
    .auth-hero-features { grid-template-columns: 1fr; }
    .auth-hero-footer { font-size: 11px; gap: 12px; }
    .auth-form-panel { padding: 24px 16px 36px; }
}
@media (max-width: 559.98px) {
    .auth-form-card { padding: 28px 22px 22px; }
}
