/* ============================================================
   Teslaelites — Auth Pages CSS
   Theme: Dark + Red/Gold  |  Split-screen layout
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

:root {
    --bg:       #060d1a;
    --bg2:      #0b1829;
    --panel:    #07111f;
    --red:      #dc2626;
    --red-h:    #b91c1c;
    --red-alt:  #ef4444;
    --gold:     #f59e0b;
    --text:     #eef2ff;
    --text2:    #8ba3c4;
    --text3:    #506480;
    --border:   rgba(255,255,255,0.08);
    --border-r: rgba(220,38,38,0.38);
    --input-bg: rgba(255,255,255,0.05);
    --r:        12px;
    --r-sm:     8px;
    --font:     -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Arial, sans-serif;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; }
p { margin: 0; }

/* ============================================================
   MAIN SPLIT WRAPPER
   ============================================================ */
.auth-wrap {
    display: flex;
    min-height: 100vh;
}

/* ---- LEFT BRAND PANEL ---- */
.auth-left {
    width: 42%;
    flex-shrink: 0;
    background: linear-gradient(160deg, #0a0404 0%, #1c0404 55%, #2a0505 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}

/* decorative red glow blobs */
.auth-left::before {
    content: '';
    position: absolute;
    top: 20%; left: 50%;
    transform: translate(-50%, -50%);
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(220,38,38,0.18) 0%, transparent 70%);
    pointer-events: none;
}
.auth-left::after {
    content: '';
    position: absolute;
    bottom: 10%; right: -80px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(245,158,11,0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* subtle grid overlay */
.auth-left-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
}

.auth-left-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 380px;
}

.auth-logo {
    width: 160px;
    height: auto;
    display: block;
    margin-bottom: 44px;
}

.auth-left-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(220,38,38,0.1);
    border: 1px solid rgba(220,38,38,0.25);
    color: var(--red-alt);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 22px;
}
.auth-left-tag::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--red-alt);
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

.auth-left h2 {
    font-size: clamp(1.6rem, 2.8vw, 2.2rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}
.auth-left h2 span {
    background: linear-gradient(135deg, #f87171, var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-left-sub {
    font-size: 0.9rem;
    color: var(--text2);
    line-height: 1.72;
    margin-bottom: 40px;
}

.auth-trust {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}
.auth-trust-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 12px 16px;
    text-align: left;
}
.auth-trust-icon {
    width: 36px; height: 36px;
    background: rgba(220,38,38,0.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red-alt);
    font-size: 0.95rem;
    flex-shrink: 0;
}
.auth-trust-item p { font-size: 0.82rem; color: var(--text2); }
.auth-trust-item p strong { color: var(--text); font-weight: 600; display: block; margin-bottom: 1px; }

/* ---- RIGHT FORM PANEL ---- */
.auth-right {
    flex: 1;
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    overflow-y: auto;
}

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

.auth-card-head {
    margin-bottom: 32px;
}
.auth-card-head h1 {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}
.auth-card-head p {
    font-size: 0.9rem;
    color: var(--text2);
}

/* ---- FORM ELEMENTS ---- */
.auth-form { display: flex; flex-direction: column; gap: 0; }

.auth-field {
    margin-bottom: 18px;
}
.auth-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text3);
    margin-bottom: 8px;
}
.auth-field input,
.auth-field select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.92rem;
    padding: 13px 16px;
    outline: none;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
    -webkit-appearance: none;
}
.auth-field input:focus,
.auth-field select:focus {
    border-color: var(--border-r);
    background: rgba(220,38,38,0.04);
    box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}
.auth-field select option { background: #0b1829; color: var(--text); }
::placeholder { color: var(--text3); }

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

.auth-error {
    font-size: 0.78rem;
    color: var(--red-alt);
    margin-top: 4px;
}

/* ---- AUTH BUTTON ---- */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: var(--red);
    color: #fff;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: var(--r);
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 20px rgba(220,38,38,0.35);
    margin-top: 8px;
}
.auth-btn:hover { background: var(--red-h); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(220,38,38,0.45); }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---- DIVIDER ---- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text3);
    font-size: 0.78rem;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---- LINKS ---- */
.auth-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    margin-top: -6px;
}
.auth-link {
    font-size: 0.82rem;
    color: var(--red-alt);
    transition: color 0.2s;
}
.auth-link:hover { color: #fff; }

.auth-footer-text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text3);
    margin-top: 24px;
}
.auth-footer-text a { color: var(--red-alt); font-weight: 600; transition: color 0.2s; }
.auth-footer-text a:hover { color: #fff; }

/* ---- ALERTS ---- */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--r-sm);
    font-size: 0.85rem;
    margin-bottom: 20px;
}
.auth-alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25); color: #86efac; }
.auth-alert-danger  { background: rgba(220,38,38,0.1); border: 1px solid rgba(220,38,38,0.25); color: #fca5a5; }

/* ---- VERIFY OTP ---- */
.auth-otp-wrap { text-align: center; margin-bottom: 28px; }
.auth-otp-icon {
    width: 72px; height: 72px;
    background: rgba(220,38,38,0.1);
    border: 1px solid rgba(220,38,38,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--red-alt);
    margin: 0 auto 20px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .auth-left { display: none; }
    .auth-right { padding: 32px 24px; }
}

@media (max-width: 480px) {
    .auth-card { max-width: 100%; }
    .auth-field-row { grid-template-columns: 1fr; gap: 0; }
}

/* ---- TOP NAV (mobile fallback) ---- */
.auth-top-bar {
    display: none;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    align-items: center;
    justify-content: space-between;
}
.auth-top-bar img { height: 30px; }
.auth-top-bar a { font-size: 0.85rem; color: var(--red-alt); font-weight: 600; }
@media (max-width: 900px) { .auth-top-bar { display: flex; } }
