/* ══════════════════════════════════════════════════════════════
   Auth Pages — Login · Register · Forgot · Reset · Verify
   ══════════════════════════════════════════════════════════════ */

.auth-body {
    font-family: 'Inter', sans-serif;
    background: #080d1a;
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
}

/* ── Two-column split ───────────────────────────────────────── */
.auth-split {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ══════════════════════════════════════════════════════════════
   LEFT BRAND PANEL
   ══════════════════════════════════════════════════════════════ */
.brand-panel {
    width: 460px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 44px 48px;
    background: #0c1120;
    border-right: 1px solid #1e2d4a;
}

/* Decorative gradient orbs */
.brand-panel::before {
    content: '';
    position: absolute;
    top: -120px;
    left: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #4f46e540 0%, transparent 70%);
    pointer-events: none;
}

.brand-panel::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -60px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, #7c3aed28 0%, transparent 70%);
    pointer-events: none;
}

.brand-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px #6366f133, 0 8px 24px #4f46e550;
    letter-spacing: -1px;
}

.brand-logo-text {
    font-size: 17px;
    font-weight: 800;
    color: #c7d2fe;
    white-space: nowrap;
    letter-spacing: -.02em;
}

/* Center content */
.brand-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #4f46e515;
    border: 1px solid #4f46e530;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    color: #818cf8;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 20px;
    width: fit-content;
}

.brand-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6366f1;
    box-shadow: 0 0 6px #6366f1;
}

.brand-tagline h2 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.25;
    color: #f1f5f9;
    letter-spacing: -.02em;
    margin-bottom: 14px;
}

.brand-tagline h2 span {
    background: linear-gradient(135deg, #818cf8, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-tagline p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.8;
    margin-bottom: 32px;
}

/* Feature list */
.brand-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #94a3b8;
}

.brand-feature-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #1e2d4a;
    border: 1px solid #2d3f5a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

/* Role pills */
.role-pills {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 28px;
}

.role-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff06;
    border: 1px solid #ffffff0d;
    border-radius: 10px;
    padding: 11px 14px;
    transition: background .15s, border-color .15s;
}

.role-pill:hover {
    background: #ffffff0c;
    border-color: #ffffff18;
}

.rp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rp-name {
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
}

.rp-desc {
    font-size: 10px;
    color: #64748b;
    margin-top: 2px;
}

/* Register steps */
.auth-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 24px;
}

.auth-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    position: relative;
}

.auth-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 13px;
    top: 42px;
    bottom: 0;
    width: 1px;
    background: #1e2d4a;
}

.auth-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 12px #4f46e540;
}

.auth-step-title {
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
}

.auth-step-text {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.5;
}

/* Footer */
.brand-footer {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: #334155;
    padding-top: 24px;
    border-top: 1px solid #1e2d4a;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-footer-links {
    display: flex;
    gap: 16px;
}

.brand-footer-links a {
    color: #334155;
    text-decoration: none;
    font-size: 12px;
    transition: color .15s;
}

.brand-footer-links a:hover {
    color: #64748b;
}

/* ══════════════════════════════════════════════════════════════
   RIGHT FORM PANEL
   ══════════════════════════════════════════════════════════════ */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    overflow-y: auto;
    background: #080d1a;
    position: relative;
}

/* Subtle background grid */
.auth-form-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(#1e2d4a18 1px, transparent 1px),
        linear-gradient(90deg, #1e2d4a18 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.auth-form-box {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

/* Form header */
.auth-form-header {
    margin-bottom: 32px;
}

.auth-form-greeting {
    font-size: 11px;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 10px;
}

.auth-form-box h1 {
    font-size: 30px;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -.02em;
    margin-bottom: 6px;
    line-height: 1.2;
}

.auth-sub {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
}

/* Form card */
.auth-form-card {
    background: #0e1629;
    border: 1px solid #1e2d4a;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 24px 48px #00000040;
}

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

.auth-field:last-child {
    margin-bottom: 0;
}

.auth-field label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 8px;
    letter-spacing: .02em;
}

.auth-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.input-wrap {
    position: relative;
}

.input-wrap svg.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: #475569;
    pointer-events: none;
    transition: color .2s;
}

.input-wrap:focus-within svg.input-icon {
    color: #6366f1;
}

.input-wrap input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: #080d1a;
    border: 1.5px solid #1e2d4a;
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 14px;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.input-wrap input::placeholder {
    color: #334155;
}

.input-wrap input:hover {
    border-color: #2d3f5a;
}

.input-wrap input:focus {
    outline: none;
    border-color: #6366f1;
    background: #0c1323;
    box-shadow: 0 0 0 3px #6366f118, 0 0 0 1px #6366f140;
}

.input-wrap input.is-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px #ef444415;
}

/* Password toggle */
.pwd-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #475569;
    padding: 4px;
    line-height: 0;
    transition: color .15s;
}

.pwd-toggle:hover {
    color: #94a3b8;
}

/* ── Auth button ────────────────────────────────────────────── */
.btn-auth {
    width: 100%;
    padding: 13px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: .01em;
    box-shadow: 0 4px 20px #4f46e540, 0 0 0 1px #6366f133;
    transition: all .2s;
    position: relative;
    overflow: hidden;
}

.btn-auth::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #818cf8, #6366f1);
    opacity: 0;
    transition: opacity .2s;
}

.btn-auth:hover::before {
    opacity: 1;
}

.btn-auth:hover {
    box-shadow: 0 8px 28px #4f46e560, 0 0 0 1px #818cf855;
    transform: translateY(-1px);
}

.btn-auth:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px #4f46e540;
}

.btn-auth span {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ── Remember row ───────────────────────────────────────────── */
.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 8px;
}

.remember-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember-check input[type=checkbox] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.remember-check span {
    font-size: 13px;
    color: #64748b;
}

.forgot-link {
    font-size: 13px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    transition: color .15s;
}

.forgot-link:hover {
    color: #818cf8;
}

/* ── Divider ────────────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    font-size: 12px;
    color: #1e2d4a;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #1e2d4a;
}

.auth-divider span {
    color: #334155;
    white-space: nowrap;
}

/* ── Footer links ───────────────────────────────────────────── */
.auth-footer-text {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #475569;
}

.auth-footer-text a {
    color: #818cf8;
    font-weight: 600;
    text-decoration: none;
    transition: color .15s;
}

.auth-footer-text a:hover {
    color: #a5b4fc;
}

.auth-link {
    display: block;
    text-align: center;
    font-size: 14px;
    color: #818cf8;
    text-decoration: none;
    font-weight: 600;
    transition: color .15s;
}

.auth-link:hover {
    color: #a5b4fc;
}

.auth-back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #475569;
}

.auth-back-link a {
    color: #818cf8;
    font-weight: 600;
    text-decoration: none;
}

.auth-back-link a:hover {
    color: #a5b4fc;
}

/* ── Alerts ─────────────────────────────────────────────────── */
.auth-alert-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #7f1d1d18;
    border: 1px solid #ef444440;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: #fca5a5;
    margin-bottom: 20px;
    line-height: 1.5;
}

.auth-alert-success {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #064e3b18;
    border: 1px solid #10b98140;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: #6ee7b7;
    margin-bottom: 20px;
}

.auth-error-msg {
    font-size: 12px;
    color: #fca5a5;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Centered layout (forgot / reset / verify) ──────────────── */
.auth-centered {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #080d1a;
    position: relative;
}

.auth-centered::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(#1e2d4a18 1px, transparent 1px),
        linear-gradient(90deg, #1e2d4a18 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #0e1629;
    border: 1px solid #1e2d4a;
    border-radius: 18px;
    padding: 36px;
    box-shadow: 0 24px 48px #00000040;
    position: relative;
    z-index: 1;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.auth-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}

.auth-logo span {
    font-size: 16px;
    font-weight: 800;
    color: #c7d2fe;
    white-space: nowrap;
}

/* ── Verify email ────────────────────────────────────────────── */
.verify-card {
    text-align: center;
    max-width: 460px;
}

.verify-icon {
    width: 72px;
    height: 72px;
    background: #4f46e518;
    border: 1px solid #4f46e530;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 0 0 8px #4f46e508;
}

.verify-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.8;
    margin-bottom: 28px;
}

.verify-logout {
    display: block;
    margin-top: 20px;
    font-size: 13px;
    color: #334155;
}

.verify-logout button {
    background: none;
    border: none;
    color: #475569;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    transition: color .15s;
}

.verify-logout button:hover {
    color: #94a3b8;
}

/* ── Password strength ───────────────────────────────────────── */
.strength-bar {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.strength-seg {
    height: 3px;
    flex: 1;
    border-radius: 2px;
    background: #1e2d4a;
    transition: background .3s;
}

.strength-label {
    font-size: 11px;
    margin-top: 5px;
}

/* ── Wider form box (register) ──────────────────────────────── */
.auth-form-box-wide {
    max-width: 440px;
}

/* ── Welcome / landing page ─────────────────────────────────── */
.welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-auth-outline {
    width: 100%;
    padding: 13px;
    border-radius: 10px;
    background: #ffffff;
    color: #2c40f3;
    border: 1.5px solid #4f46e540;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: .01em;
    text-decoration: none;
    text-align: center;
    display: block;
    transition: border-color .2s, background .2s, color .2s;
}

.btn-auth-outline:hover {
    border-color: #6366f1;
    background: #6366f110;
    color: #a5b4fc;
}

.btn-auth-outline span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ── Card heading / description (centered pages) ───────────── */
.auth-card-title {
    font-size: 22px;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: 6px;
}

.auth-card-desc {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ── Required field star ────────────────────────────────────── */
.req-star {
    color: #f87171;
}

/* ── Role-dot color variants ────────────────────────────────── */
.rp-dot-gold {
    background: #f59e0b;
    box-shadow: 0 0 6px #f59e0b88;
}

.rp-dot-indigo {
    background: #6366f1;
    box-shadow: 0 0 6px #6366f188;
}

.rp-dot-green {
    background: #10b981;
    box-shadow: 0 0 6px #10b98188;
}

/* ── Verify page helpers ─────────────────────────────────────── */
.verify-email-highlight {
    color: #e2e8f0;
    font-weight: 600;
}

.verify-logout form {
    display: inline;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .brand-panel {
        width: 380px;
        padding: 36px 32px;
    }
}

@media (max-width: 768px) {
    .brand-panel {
        display: none;
    }

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

    .auth-field-row {
        grid-template-columns: 1fr;
    }

    .auth-form-card {
        padding: 22px;
    }
}