@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=DM+Mono:wght@400;500&display=swap');

:root {
    --bg: #0a0a0f;
    --surface: #12121a;
    --card: #1a1a26;
    --border: #2a2a3a;
    --accent: #ff6b35;
    --accent2: #ff3d71;
    --text: #f0f0f5;
    --muted: #7a7a9a;
    --success: #10b981;
    --danger: #ef4444;
    --radius: 16px;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── PAGE SHELL ─────────────────────────────────────── */
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    overflow-x: hidden;
}

/* ── SPLIT WRAPPER ──────────────────────────────────── */
.auth-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ══════════════════════════════════════════════════════
   LEFT PANEL – Visual / Branding
══════════════════════════════════════════════════════ */
.auth-visual {
    flex: 0 0 48%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 48px;
}

/* Background image layer */
.auth-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        url('https://images.unsplash.com/photo-1601784551446-20c9e07cdbdb?w=900&q=80')
        center / cover no-repeat;
    filter: brightness(0.45) saturate(1.2);
    transition: transform 8s ease;
    z-index: 0;
}

.auth-visual:hover::before {
    transform: scale(1.04);
}

/* Gradient overlay */
.auth-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg,
            rgba(255,107,53,.18) 0%,
            transparent 45%),
        linear-gradient(0deg,
            rgba(10,10,15,.95) 0%,
            rgba(10,10,15,.35) 55%,
            transparent 100%);
    z-index: 1;
}

/* Decorative grid lines */
.auth-visual .grid-lines {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-image:
        linear-gradient(rgba(255,107,53,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,107,53,.06) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.visual-content {
    position: relative;
    z-index: 3;
}

.visual-logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.4rem;
    letter-spacing: 3px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 12px;
    text-decoration: none;
}

.visual-logo span {
    -webkit-text-fill-color: var(--text);
}

.visual-tagline {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 14px;
    max-width: 320px;
}

.visual-tagline em {
    font-style: normal;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.visual-desc {
    color: rgba(240,240,245,.6);
    font-size: .88rem;
    line-height: 1.65;
    max-width: 280px;
    margin-bottom: 32px;
}

/* Stats row */
.visual-stats {
    display: flex;
    gap: 24px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.7rem;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: .7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-top: 3px;
}

/* Floating badge */
.floating-badge {
    position: absolute;
    top: 36px;
    right: 36px;
    z-index: 4;
    background: rgba(255,107,53,.12);
    border: 1px solid rgba(255,107,53,.3);
    backdrop-filter: blur(12px);
    padding: 10px 18px;
    border-radius: 50px;
    font-size: .73rem;
    font-weight: 600;
    color: var(--accent);
    font-family: 'DM Mono', monospace;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.floating-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--success);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

/* ══════════════════════════════════════════════════════
   RIGHT PANEL – Form
══════════════════════════════════════════════════════ */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    background: var(--surface);
    position: relative;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Subtle background texture */
.auth-form-panel::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(255,107,53,.05) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 20% 90%, rgba(255,61,113,.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.auth-form-inner {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
    padding: 8px 0;
}

/* ── BACK LINK ───────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: .82rem;
    margin-bottom: 28px;
    transition: color .2s, gap .2s;
    font-weight: 500;
}

.back-link:hover {
    color: var(--text);
    gap: 12px;
}

/* ── ROLE BADGE ──────────────────────────────────────── */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,107,53,.1);
    border: 1px solid rgba(255,107,53,.25);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: .72rem;
    font-weight: 600;
    color: var(--accent);
    font-family: 'DM Mono', monospace;
    letter-spacing: 1px;
    margin-bottom: 18px;
}

/* ── HEADINGS ────────────────────────────────────────── */
.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.2;
}

.auth-sub {
    color: var(--muted);
    font-size: .86rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* ── ALERT ───────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: .84rem;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}

.alert-error {
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.25);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16,185,129,.1);
    border: 1px solid rgba(16,185,129,.25);
    color: #6ee7b7;
}

/* ── FORM FIELDS ─────────────────────────────────────── */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: .85rem;
    pointer-events: none;
    transition: color .2s;
}

.input-icon:focus-within i {
    color: var(--accent);
}

.form-control {
    width: 100%;
    padding: 13px 18px 13px 46px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: .92rem;
    font-family: 'DM Sans', sans-serif;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255,107,53,.12);
}

.form-control::placeholder {
    color: rgba(122,122,154,.5);
}

select.form-control {
    cursor: pointer;
    padding-left: 46px;
}

/* ── FORGOT LINK ─────────────────────────────────────── */
.forgot-link {
    text-align: right;
    margin-top: -8px;
    margin-bottom: 18px;
}

.forgot-link a {
    color: var(--muted);
    font-size: .79rem;
    text-decoration: none;
    transition: color .2s;
}

.forgot-link a:hover {
    color: var(--accent);
}

/* ── SUBMIT BUTTON ───────────────────────────────────── */
.btn-auth {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: .96rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, filter .2s;
    margin-top: 4px;
    position: relative;
    overflow: hidden;
}

.btn-auth::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.15), transparent);
    opacity: 0;
    transition: opacity .2s;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(255,107,53,.38);
    filter: brightness(1.05);
}

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

.btn-auth:active {
    transform: translateY(0);
}

/* ── DIVIDER ─────────────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--muted);
    font-size: .76rem;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── FOOTER LINKS ────────────────────────────────────── */
.auth-link {
    text-align: center;
    color: var(--muted);
    font-size: .84rem;
}

.auth-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* ── OTP INPUTS ──────────────────────────────────────── */
.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 22px 0;
}

.otp-inputs input {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: 'DM Mono', monospace;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.otp-inputs input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255,107,53,.12);
}

/* ── PASSWORD STRENGTH ───────────────────────────────── */
.strength-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
    margin-top: 8px;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width .3s, background .3s;
    width: 0%;
}

.strength-text {
    font-size: .72rem;
    color: var(--muted);
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
══════════════════════════════════════════════════════ */

/* Tablet: hide visual panel, center form */
@media (max-width: 900px) {
    .auth-visual {
        display: none;
    }

    .auth-form-panel {
        background: var(--bg);
        padding: 32px 24px;
        min-height: 100vh;
        align-items: flex-start;
    }

    .auth-form-inner {
        max-width: 440px;
        margin: 0 auto;
        padding: 20px 0 40px;
    }
}

/* Mobile: tighten spacing, full-width inputs */
@media (max-width: 480px) {
    .auth-form-panel {
        padding: 24px 18px;
    }

    .auth-form-inner {
        padding: 16px 0 32px;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .form-control {
        font-size: .9rem;
        padding: 12px 16px 12px 42px;
    }

    .btn-auth {
        padding: 13px;
        font-size: .92rem;
    }

    .otp-inputs input {
        width: 44px;
        height: 52px;
        font-size: 1.3rem;
    }

    .visual-stats {
        gap: 16px;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .auth-form-panel {
        padding: 20px 14px;
    }

    .role-badge {
        font-size: .67rem;
    }
}