@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary-blue: #00bfff;
    --primary-hover: #0099e6;
    --navy-dark: #06101e;
    --navy-card: #0d213a;
    --gold-accent: #00bfff;
    --gold-hover: #0099e6;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --input-bg: #f8fafc;
    --input-focus-border: #00bfff;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

body, html {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    background-color: #ffffff;
}

/* ── Split Layout Grid ── */
.split-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* ═══════════════════════════════════════════════════════════
   LEFT HERO PANEL (Dark Navy + Graphic Overlay)
   ═══════════════════════════════════════════════════════════ */
.hero-panel {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, rgba(6, 16, 30, 0.95) 0%, rgba(13, 33, 58, 0.92) 100%),
                url('https://images.unsplash.com/photo-1540959733332-eab4deabeeaf?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 64px;
    overflow: hidden;
}

/* Background Airplane Wing Overlay Effect */
.hero-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(29, 78, 216, 0.25) 0%, transparent 60%),
                radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.12) 0%, transparent 50%);
    pointer-events: none;
}

/* Hero Top Branding */
.hero-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.hero-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--gold-accent), #fbbf24);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-dark);
    font-size: 20px;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.hero-brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ffffff;
    text-transform: uppercase;
}

/* Hero Middle Content */
.hero-content {
    max-width: 540px;
    margin: auto 0;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    font-size: 13px;
    font-weight: 600;
    color: var(--gold-accent);
    margin-bottom: 28px;
}

.hero-title {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
    color: #ffffff;
}

.hero-title .highlight {
    color: var(--gold-accent);
}

.hero-description {
    font-size: 15px;
    line-height: 1.6;
    color: #cbd5e1;
    font-weight: 400;
}

/* Hero Bottom Stats Footer */
.hero-stats {
    display: flex;
    gap: 40px;
    z-index: 2;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════
   RIGHT FORM PANEL (Clean White Form Container)
   ═══════════════════════════════════════════════════════════ */
.auth-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    background-color: #ffffff;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
}

.auth-header {
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-header p {
    font-size: 13.5px;
    color: var(--text-muted);
}

.auth-header p a {
    color: var(--primary-blue);
    font-weight: 700;
    text-decoration: none;
}

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

/* ── Form Inputs ── */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.field-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

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

.input-container i.field-icon {
    position: absolute;
    left: 14px;
    font-size: 18px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-control {
    width: 100%;
    height: 48px;
    padding: 10px 14px 10px 44px;
    font-size: 14px;
    color: var(--text-dark);
    background-color: var(--input-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
}

.input-control:focus {
    background-color: #ffffff;
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 4px rgba(0, 191, 255, 0.15);
}

.input-container:focus-within i.field-icon {
    color: var(--primary-blue);
}

/* Password Toggle Button */
.toggle-password-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.2s ease;
}

.toggle-password-btn:hover {
    color: var(--text-dark);
}

/* ── Remember Me & Forgot Password Row ── */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #475569;
    font-weight: 500;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-blue);
    cursor: pointer;
    border-radius: 4px;
}

.forgot-password-link a {
    color: var(--primary-blue);
    font-weight: 700;
    text-decoration: none;
}

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

/* ── Action Buttons ── */
.btn-primary-action {
    width: 100%;
    height: 50px;
    background: var(--primary-blue);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 191, 255, 0.4);
    transition: all 0.2s ease;
}

.btn-primary-action:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.5);
    transform: translateY(-1px);
}

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

.btn-secondary-action {
    width: 100%;
    height: 48px;
    background: #ffffff;
    color: var(--primary-blue);
    font-size: 14px;
    font-weight: 700;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-secondary-action:hover {
    border-color: var(--primary-blue);
    background: #f8fafc;
}

/* ── 2FA/OTP Phase Styles ── */
.otp-header-card {
    text-align: center;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.otp-shield-badge {
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-size: 24px;
}

.otp-header-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.otp-header-card p {
    font-size: 12.5px;
    color: var(--text-muted);
}

.otp-code-input {
    font-size: 24px !important;
    font-weight: 800 !important;
    letter-spacing: 8px !important;
    text-align: center !important;
    font-family: 'Plus Jakarta Sans', monospace !important;
}

.otp-timer-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: -6px;
    margin-bottom: 20px;
}

.otp-timer-info {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.otp-timer-info strong {
    color: var(--primary-blue);
    font-weight: 700;
}

.otp-progress-bar {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.otp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), #2563eb);
    border-radius: 4px;
    transition: width 1s linear;
}

.back-to-signin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
}

.back-to-signin-link:hover {
    color: var(--primary-blue);
}

/* ── Error & Warning Messages ── */
.error-label {
    display: block;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--danger);
    text-align: center;
}

.msg-success {
    color: #16a34a !important;
}

.msg-warning {
    color: #d97706 !important;
}

.field-error-text {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
    display: none;
}

.caps-lock-warning {
    font-size: 12px;
    color: #d97706;
    margin-top: 4px;
    display: none;
    align-items: center;
    gap: 4px;
}

/* Validation shake animation */
.shake-group .input-control {
    border-color: var(--danger);
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* ── Loading Overlay Spinner ── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.loading-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.spinner-circle {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Responsive Breakpoints ── */
@media (max-width: 1024px) {
    .hero-panel {
        padding: 40px;
    }
    .hero-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .split-container {
        flex-direction: column;
    }
    .hero-panel {
        display: none;
    }
    .auth-panel {
        padding: 32px 20px;
        min-height: 100vh;
    }
}
