/* ================================================================
   SuppTech – Auth Pages Design System
   Covers: Login, Register, ForgotPassword, ResetPassword,
           2FA, confirmation, and status pages.
   ================================================================ */

/* ── Reset for auth scope ────────────────────────────────────────── */
.auth-wrap *, .auth-status-wrap *, .auth-register-wrap * { box-sizing: border-box; }

/* ================================================================
   SPLIT-PANEL AUTH LAYOUT  (Login / ForgotPassword / ResetPassword / 2FA)
   ================================================================ */

.auth-wrap {
    display: flex;
    min-height: 100vh;
}

/* ── Brand Panel ─────────────────────────────────────────────────── */
.auth-brand {
    width: 42%;
    flex-shrink: 0;
    background: linear-gradient(160deg, #0c1626 0%, #1a2540 50%, #2B3856 100%);
    display: flex;
    flex-direction: column;
    padding: 44px 52px;
    position: relative;
    overflow: hidden;
}
.auth-brand::before {
    content: '';
    position: absolute; top: -130px; right: -130px;
    width: 420px; height: 420px; border-radius: 50%;
    background: rgba(53,99,169,.13); pointer-events: none;
}
.auth-brand::after {
    content: '';
    position: absolute; bottom: -90px; left: -90px;
    width: 320px; height: 320px; border-radius: 50%;
    background: rgba(53,99,169,.09); pointer-events: none;
}

.auth-brand-logo { margin-bottom: 48px; position: relative; }
.auth-brand-logo img { height: 40px; filter: brightness(0) invert(1); display: block; }

.auth-brand-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.auth-brand-badge {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(53,99,169,.22);
    border: 1px solid rgba(53,99,169,.45);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .9px;
    text-transform: uppercase; color: #8fc0ff;
    margin-bottom: 22px; width: fit-content;
}

.auth-brand-title {
    font-size: 30px; font-weight: 800; color: #fff;
    line-height: 1.25; margin: 0 0 14px;
    font-family: 'Montserrat-Bold', 'Montserrat', sans-serif;
}

.auth-brand-sub {
    font-size: 14.5px; color: rgba(255,255,255,.6);
    line-height: 1.75; margin: 0 0 36px;
}

.auth-brand-features { list-style: none; padding: 0; margin: 0 0 44px; }
.auth-brand-features li {
    display: flex; align-items: flex-start; gap: 13px;
    margin-bottom: 15px;
    font-size: 13.5px; color: rgba(255,255,255,.72); line-height: 1.5;
}
.auth-brand-features li .feat-icon {
    width: 28px; height: 28px; border-radius: 7px;
    background: rgba(53,99,169,.3);
    display: flex; align-items: center; justify-content: center;
    color: #8fc0ff; font-size: 12px;
    flex-shrink: 0; margin-top: 1px;
}

.auth-brand-foot {
    font-size: 11px; color: rgba(255,255,255,.28);
    border-top: 1px solid rgba(255,255,255,.07);
    padding-top: 20px; position: relative;
}

/* ── Form Panel ──────────────────────────────────────────────────── */
.auth-form {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    background: #f0f2f5;
    padding: 48px 28px;
    min-height: 100vh;
}

.auth-form-inner { width: 100%; max-width: 440px; }

.auth-form-hdr { margin-bottom: 28px; }
.auth-form-title { font-size: 26px; font-weight: 800; color: #1e2941; margin: 0 0 6px; }
.auth-form-sub   { font-size: 14px; color: #6c757d; margin: 0; }

.auth-box {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 28px rgba(0,0,0,.09);
    padding: 36px 34px;
}

/* ── Form fields ─────────────────────────────────────────────────── */
.auth-field { margin-bottom: 20px; }

.auth-label {
    display: block;
    font-size: 11.5px; font-weight: 700;
    letter-spacing: .35px; text-transform: uppercase;
    color: #4a5568; margin-bottom: 7px;
}

.auth-input-wrap { position: relative; display: flex; align-items: center; }

.auth-icon {
    position: absolute; left: 13px; top: 50%;
    transform: translateY(-50%);
    color: #9ca3af; font-size: 13px; pointer-events: none;
}

.auth-eye {
    position: absolute; right: 13px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none; padding: 0;
    color: #9ca3af; font-size: 13px; cursor: pointer;
    line-height: 1; transition: color .15s;
}
.auth-eye:hover { color: #3563a9; }

.auth-input {
    width: 100%; height: 46px;
    padding: 0 14px 0 40px;
    border: 1.5px solid #dde1ea; border-radius: 8px;
    font-size: 14px; color: #1e2941; background: #f8f9fb;
    transition: border-color .18s, box-shadow .18s, background .18s;
    outline: none; font-family: 'Lato', sans-serif;
}
.auth-input:focus {
    border-color: #3563a9; background: #fff;
    box-shadow: 0 0 0 3px rgba(53,99,169,.12);
}
.auth-input::placeholder { color: #adb5bd; }
.auth-input[readonly] { background: #f0f2f5; color: #6c757d; cursor: default; }
.auth-input.no-icon  { padding-left: 14px; }
.auth-input.has-eye  { padding-right: 42px; }

.auth-val-msg {
    display: block;
    font-size: 11.5px; color: #dc2626; font-weight: 500;
    margin-top: 5px; min-height: 0;
}

/* Validation summary box */
.auth-val-box {
    background: #fef2f2; border: 1px solid #fecaca;
    border-radius: 8px; padding: 10px 14px;
    margin-bottom: 18px; font-size: 13px; color: #dc2626;
    display: flex; align-items: flex-start; gap: 8px;
}
.auth-val-box i { flex-shrink: 0; margin-top: 1px; }
.auth-val-box ul { margin: 0; padding-left: 16px; }

/* Dismissible variant — wraps .auth-val-box with room for a close button,
   opted into per-page so it doesn't affect the plain .auth-val-box used
   on Login / 2FA / recovery-code pages. */
.auth-val-wrap { position: relative; margin-bottom: 18px; }
.auth-val-wrap .auth-val-box { padding-right: 34px; margin-bottom: 0; }
.auth-val-close {
    position: absolute; top: 8px; right: 10px;
    background: none; border: none; color: #dc2626;
    opacity: .6; cursor: pointer; padding: 2px 6px; font-size: 13px;
    transition: opacity .15s;
}
.auth-val-close:hover { opacity: 1; }

/* ── Checkbox row ────────────────────────────────────────────────── */
.auth-check-row {
    display: flex; align-items: center;
    justify-content: space-between;
    margin-bottom: 22px; flex-wrap: wrap; gap: 8px;
}

.auth-check-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: #4a5568;
    cursor: pointer; user-select: none;
}
.auth-check-label input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: #3563a9; cursor: pointer;
}

.auth-link {
    font-size: 13px; color: #3563a9; font-weight: 600;
    text-decoration: none;
}
.auth-link:hover { text-decoration: underline; color: #2a529a; }

/* ── Submit button ───────────────────────────────────────────────── */
.auth-btn {
    width: 100%; height: 48px;
    background: #3563a9; color: #fff;
    border: none; border-radius: 8px;
    font-size: 15px; font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background .18s, transform .1s;
    letter-spacing: .15px; margin-bottom: 18px;
    font-family: 'Lato', sans-serif;
}
.auth-btn:hover   { background: #2a529a; }
.auth-btn:active  { transform: scale(.99); }
.auth-btn:disabled { opacity: .68; cursor: not-allowed; }

/* ── Footer text ─────────────────────────────────────────────────── */
.auth-foot-note {
    text-align: center;
    font-size: 13.5px; color: #6c757d; margin: 0;
}
.auth-foot-note a { color: #3563a9; font-weight: 600; text-decoration: none; }
.auth-foot-note a:hover { text-decoration: underline; }

/* ── Divider ─────────────────────────────────────────────────────── */
.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 0 0 18px; color: #adb5bd; font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: #e9ecef;
}

/* ── 2FA code input ──────────────────────────────────────────────── */
.auth-code-field { position: relative; }
.auth-code-input {
    width: 100%; height: 58px;
    padding: 0 16px;
    border: 1.5px solid #dde1ea; border-radius: 8px;
    font-size: 24px; font-weight: 700; letter-spacing: 8px;
    color: #1e2941; background: #f8f9fb; text-align: center;
    outline: none; font-family: monospace;
    transition: border-color .18s, box-shadow .18s;
}
.auth-code-input:focus {
    border-color: #3563a9; background: #fff;
    box-shadow: 0 0 0 3px rgba(53,99,169,.12);
}

/* ── Info note ───────────────────────────────────────────────────── */
.auth-info-note {
    display: flex; align-items: flex-start; gap: 10px;
    background: #eff6ff; border: 1px solid #bfdbfe;
    border-radius: 8px; padding: 12px 14px;
    font-size: 13px; color: #1d4ed8; margin-bottom: 20px;
    line-height: 1.5;
}
.auth-info-note i { flex-shrink: 0; margin-top: 1px; font-size: 14px; }

/* ── Dev-mode note (shown when email sending isn't configured) ───── */
.auth-dev-note {
    display: flex; align-items: flex-start; gap: 10px; text-align: left;
    background: #fffbeb; border: 1px solid #fde68a;
    border-radius: 10px; padding: 14px 16px; margin: 0 0 24px;
    font-size: 13px; color: #92400e; line-height: 1.6;
}
.auth-dev-note > i { flex-shrink: 0; margin-top: 2px; font-size: 14px; }
.auth-dev-note-body { flex: 1; min-width: 0; }
.auth-dev-note-url-row {
    display: flex; align-items: center; gap: 8px; margin-top: 10px;
}
.auth-dev-note-url {
    flex: 1; min-width: 0;
    display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    background: #fff; border: 1px solid #fde68a; border-radius: 6px;
    padding: 8px 10px; font-size: 12px; font-family: 'Courier New', monospace;
    color: #78350f;
}
.auth-dev-copy-btn {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 6px;
    border: 1px solid #fde68a; background: #fff; color: #92400e;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 13px; transition: background .15s;
}
.auth-dev-copy-btn:hover { background: #fef3c7; }
.auth-dev-copy-btn.copied { background: #dcfce7; border-color: #86efac; color: #16a34a; }


/* ================================================================
   STATUS / CONFIRMATION PAGES
   ================================================================ */

.auth-status-wrap {
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: #f0f2f5; padding: 40px 24px;
}

.auth-status-logo { margin-bottom: 28px; }
.auth-status-logo img { height: 34px; opacity: .7; }

.auth-status-card {
    background: #fff; border-radius: 16px;
    box-shadow: 0 4px 28px rgba(0,0,0,.09);
    padding: 52px 48px; max-width: 520px; width: 100%;
    text-align: center;
}

.auth-status-icon {
    width: 80px; height: 80px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 34px; margin: 0 auto 24px;
}
.asi-success { background: #dcfce7; color: #16a34a; }
.asi-info    { background: #dbeafe; color: #2563eb; }
.asi-warning { background: #fef3c7; color: #d97706; }
.asi-danger  { background: #fee2e2; color: #dc2626; }

.auth-status-title {
    font-size: 24px; font-weight: 800; color: #1e2941; margin: 0 0 12px;
}
.auth-status-body {
    font-size: 14.5px; color: #6c757d;
    line-height: 1.8; margin: 0 0 32px;
}

.auth-status-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.auth-status-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 26px; border-radius: 8px;
    font-size: 14px; font-weight: 700;
    text-decoration: none; cursor: pointer; border: none;
    transition: background .18s, opacity .18s;
    font-family: 'Lato', sans-serif;
}
.auth-status-btn:hover { text-decoration: none; opacity: .9; }
.asb-primary { background: #3563a9; color: #fff; }
.asb-primary:hover { background: #2a529a; color: #fff; opacity: 1; }
.asb-outline { background: #fff; color: #2B3856; border: 1.5px solid #dde1ea; }
.asb-outline:hover { background: #f0f2f5; color: #1e2941; opacity: 1; }


/* ================================================================
   REGISTER PAGE (topbar + wide card)
   ================================================================ */

.auth-reg-wrap { min-height: 100vh; background: #f0f2f5; }

.auth-reg-topbar {
    background: #1e2941; padding: 14px 40px;
    display: flex; align-items: center; justify-content: space-between;
}
.auth-reg-topbar img { height: 36px; filter: brightness(0) invert(1); }
.auth-reg-topbar-links { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,.6); }
.auth-reg-topbar-links a { color: rgba(255,255,255,.6); text-decoration: none; }
.auth-reg-topbar-links a:hover { color: #fff; }
.auth-reg-topbar-links .hl { color: #8fc0ff; font-weight: 600; }

.auth-reg-body { max-width: 1020px; margin: 0 auto; padding: 40px 24px 64px; }

.auth-reg-page-hdr { text-align: center; margin-bottom: 36px; }
.auth-reg-page-hdr h1 { font-size: 28px; font-weight: 800; color: #1e2941; margin: 0 0 8px; }
.auth-reg-page-hdr p  { font-size: 14px; color: #6c757d; margin: 0; }

.auth-reg-card {
    background: #fff; border-radius: 14px;
    box-shadow: 0 4px 28px rgba(0,0,0,.09); overflow: hidden;
}

.auth-reg-section { padding: 28px 32px; border-bottom: 1px solid #f0f2f5; }
.auth-reg-section:last-child { border-bottom: none; }

.auth-reg-sec-title {
    display: flex; align-items: center; gap: 9px;
    background: #2B3856; color: #fff;
    font-size: 12.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .6px;
    padding: 10px 16px; border-radius: 8px;
    margin-bottom: 22px; width: fit-content;
}
.auth-reg-sec-title i { color: #8fc0ff; font-size: 13px; }

.auth-reg-field { margin-bottom: 18px; }
.auth-reg-label {
    display: block;
    font-size: 11.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .3px;
    color: #4a5568; margin-bottom: 6px;
}
.auth-reg-label .req { color: #dc2626; margin-left: 2px; font-size: 13px; }

.auth-reg-input,
.auth-reg-select {
    width: 100%; height: 44px;
    padding: 0 13px;
    border: 1.5px solid #dde1ea; border-radius: 8px;
    font-size: 14px; color: #1e2941; background: #f8f9fb;
    outline: none; transition: border-color .18s, box-shadow .18s;
    font-family: 'Lato', sans-serif;
}
.auth-reg-input:focus, .auth-reg-select:focus {
    border-color: #3563a9; background: #fff;
    box-shadow: 0 0 0 3px rgba(53,99,169,.12);
}
.auth-reg-input::placeholder { color: #adb5bd; }
.auth-reg-select {
    -webkit-appearance: none; appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236c757d'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    padding-right: 36px;
}

.auth-reg-val { display: block; font-size: 11.5px; color: #dc2626; font-weight: 500; margin-top: 4px; }

.auth-reg-logo-drop {
    border: 2px dashed #dde1ea; border-radius: 10px;
    padding: 20px 16px; text-align: center; background: #f8f9fb;
    transition: border-color .18s; cursor: pointer;
}
.auth-reg-logo-drop:hover { border-color: #3563a9; }
.auth-reg-logo-drop input { font-size: 13px; }
.auth-reg-logo-drop p { font-size: 12px; color: #9ca3af; margin: 8px 0 0; }

.auth-reg-footer {
    background: #f8f9fb; border-top: 1px solid #edf0f5;
    padding: 24px 32px;
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.auth-reg-disclaimer { font-size: 13px; color: #6c757d; flex: 1; line-height: 1.5; min-width: 200px; }
.auth-reg-submit {
    height: 46px; padding: 0 34px;
    background: #3563a9; color: #fff; border: none; border-radius: 8px;
    font-size: 14.5px; font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    transition: background .18s; white-space: nowrap; flex-shrink: 0;
    font-family: 'Lato', sans-serif;
}
.auth-reg-submit:hover    { background: #2a529a; }
.auth-reg-submit:disabled { opacity: .68; cursor: not-allowed; }

/* phone field (intlTelInput overrides) */
.auth-reg-section .iti { display: block !important; width: 100% !important; }
.auth-reg-section .iti input { width: 100% !important; }


/* ================================================================
   DARK MODE
   ================================================================ */

[data-theme="dark"] .auth-brand { background: linear-gradient(160deg, #040810 0%, #080d18 50%, #0d1220 100%); }

[data-theme="dark"] .auth-form,
[data-theme="dark"] .auth-status-wrap,
[data-theme="dark"] .auth-reg-wrap { background: var(--st-page-bg, #0f1117); }

[data-theme="dark"] .auth-box,
[data-theme="dark"] .auth-status-card,
[data-theme="dark"] .auth-reg-card { background: var(--st-surface, #141926); box-shadow: 0 4px 24px rgba(0,0,0,.4); }

[data-theme="dark"] .auth-form-title,
[data-theme="dark"] .auth-status-title,
[data-theme="dark"] .auth-reg-page-hdr h1 { color: var(--st-text-hi, #e2e8f0); }

[data-theme="dark"] .auth-form-sub,
[data-theme="dark"] .auth-status-body,
[data-theme="dark"] .auth-reg-page-hdr p { color: var(--st-text-muted, #94a3b8); }

[data-theme="dark"] .auth-label,
[data-theme="dark"] .auth-reg-label { color: var(--st-text-muted, #94a3b8); }

[data-theme="dark"] .auth-input,
[data-theme="dark"] .auth-reg-input,
[data-theme="dark"] .auth-reg-select,
[data-theme="dark"] .auth-code-input {
    background: var(--st-input-bg, #0d1220);
    border-color: var(--st-input-border, #1c2438);
    color: var(--st-text-hi, #e2e8f0);
}
[data-theme="dark"] .auth-input:focus,
[data-theme="dark"] .auth-reg-input:focus,
[data-theme="dark"] .auth-reg-select:focus,
[data-theme="dark"] .auth-code-input:focus { background: var(--st-surface, #141926); border-color: #3563a9; }
[data-theme="dark"] .auth-input[readonly] { background: var(--st-surface-alt, #0d1220); }

[data-theme="dark"] .auth-check-label { color: var(--st-text-muted, #94a3b8); }
[data-theme="dark"] .auth-foot-note   { color: var(--st-text-muted, #94a3b8); }

[data-theme="dark"] .auth-info-note { background: #0d1a2e; border-color: #1c3a6a; color: #8fc0ff; }

[data-theme="dark"] .auth-dev-note { background: #2b1d0e; border-color: #4a3616; color: #fbbf24; }
[data-theme="dark"] .auth-dev-note-url { background: #1a1206; border-color: #4a3616; color: #fcd34d; }
[data-theme="dark"] .auth-dev-copy-btn { background: #1a1206; border-color: #4a3616; color: #fbbf24; }
[data-theme="dark"] .auth-dev-copy-btn:hover { background: #2b1d0e; }

[data-theme="dark"] .auth-reg-topbar { background: #040810; }
[data-theme="dark"] .auth-reg-section { border-bottom-color: var(--st-border, #1c2438); }
[data-theme="dark"] .auth-reg-footer  { background: var(--st-surface-alt, #0d1220); border-top-color: var(--st-border, #1c2438); }
[data-theme="dark"] .auth-reg-disclaimer { color: var(--st-text-muted, #94a3b8); }
[data-theme="dark"] .auth-reg-logo-drop { background: var(--st-input-bg, #0d1220); border-color: var(--st-border, #1c2438); }
[data-theme="dark"] .auth-reg-logo-drop p { color: var(--st-text-faint, #64748b); }

[data-theme="dark"] .auth-divider { color: var(--st-text-faint, #64748b); }
[data-theme="dark"] .auth-divider::before,
[data-theme="dark"] .auth-divider::after { background: var(--st-border, #1c2438); }

[data-theme="dark"] .asb-outline { background: var(--st-surface, #141926); border-color: var(--st-border, #1c2438); color: var(--st-text-hi, #e2e8f0); }
[data-theme="dark"] .asb-outline:hover { background: var(--st-row-hover, #1a2035); }

[data-theme="dark"] .auth-status-logo img { filter: brightness(0) invert(1); opacity: .4; }


/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 960px) {
    .auth-brand { display: none; }
    .auth-form  { background: #f0f2f5; }
    .auth-wrap  { display: block; }
}
@media (max-width: 600px) {
    .auth-box         { padding: 28px 22px; }
    .auth-status-card { padding: 36px 22px; }
    .auth-form-inner  { max-width: 100%; }
    .auth-form        { padding: 32px 16px; }

    .auth-reg-body    { padding: 24px 14px 48px; }
    .auth-reg-section { padding: 22px 18px; }
    .auth-reg-footer  { padding: 20px 18px; flex-direction: column; align-items: stretch; }
    .auth-reg-submit  { width: 100%; justify-content: center; }
    .auth-reg-topbar  { padding: 12px 18px; }
}
