:root {
    --tv-navy-950: #050e1a;
    --tv-navy-900: #071526;
    --tv-navy-800: #0E2A47;
    --tv-navy-700: #153961;
    --tv-navy-600: #1e4b85;
    --tv-gold-500: #F59E0B;
    --tv-gold-400: #FBBF24;
    --tv-cyan-400: #38bdf8;
    --tv-ink: #0f172a;
    --tv-muted: #64748b;
    --tv-border: #e2e8f0;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    color: var(--tv-ink);
    background: #f4f7fb;
    -webkit-font-smoothing: antialiased;
}

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

/* ==========================================================================
   Left Brand Side — Luxury Sapphire & Ambient Flight Grid
   ========================================================================== */
.auth-brand {
    flex: 1 1 52%;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(145deg, var(--tv-navy-950) 0%, var(--tv-navy-800) 50%, var(--tv-navy-700) 100%);
    padding: 44px 52px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Ambient Radial Glows */
.auth-brand::before {
    content: "";
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, transparent 65%);
    top: -180px;
    right: -120px;
    pointer-events: none;
}

.auth-brand::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.16) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    pointer-events: none;
}

/* World Flight Grid Decorative Mesh */
.brand-mesh-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 32px 32px, 64px 64px, 64px 64px;
    opacity: 0.65;
    pointer-events: none;
    z-index: 1;
}

.auth-brand .inner {
    position: relative;
    z-index: 2;
    max-width: 560px;
}

/* Brand Header & Logo */
.auth-brand-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.wordmark {
    text-decoration: none;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 6px 14px;
    border-radius: 12px;
    transition: all 0.25s ease;
}

.wordmark:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
}

.wordmark .brand-logo-img {
    height: 48px;
    width: auto;
    max-width: 240px;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.wordmark-fallback {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.wordmark-fallback span {
    color: var(--tv-gold-400);
}

.brand-portal-pills {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 3px 5px;
    gap: 4px;
}

.brand-portal-pills a, .brand-portal-pills span {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    color: #dbeafe;
    text-decoration: none;
    transition: all 0.2s ease;
}

.brand-portal-pills a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.brand-portal-pills .pill-active {
    background: var(--tv-gold-500);
    color: #071526;
    font-weight: 700;
}

/* Brand Headline */
.brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--tv-gold-400);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.auth-brand h1 {
    font-weight: 800;
    font-size: 2.35rem;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin: 0 0 10px;
    color: #ffffff;
}

.auth-brand h1 span {
    color: var(--tv-cyan-400);
}

.auth-brand p.sub {
    color: #cbd5e1;
    font-size: 1.01rem;
    line-height: 1.5;
    margin: 0 0 24px;
    max-width: 480px;
}

/* Glass Feature Cards */
.feat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 22px;
}

.feat-glass-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 12px 14px;
    backdrop-filter: blur(8px);
    transition: transform 0.2s ease, background 0.2s ease;
}

.feat-glass-card:hover {
    background: rgba(255, 255, 255, 0.10);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.22);
}

.feat-glass-card .f-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(56, 189, 248, 0.25));
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    color: var(--tv-gold-400);
    margin-bottom: 8px;
}

.feat-glass-card .f-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 2px;
}

.feat-glass-card .f-desc {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.3;
}

/* Trust Stats Strip */
.trust-stats-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 9px 14px;
    margin-bottom: 20px;
}

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

.stat-item .num {
    font-size: 1rem;
    font-weight: 800;
    color: var(--tv-gold-400);
    line-height: 1;
}

.stat-item .lbl {
    font-size: 0.68rem;
    color: #94a3b8;
    margin-top: 2px;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.12);
}

/* Quote Card */
.quote-box {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    padding: 14px 18px;
    backdrop-filter: blur(10px);
    max-width: 520px;
}

.quote-box .stars {
    color: var(--tv-gold-400);
    font-size: 0.82rem;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.quote-box p {
    margin: 0 0 8px;
    font-style: italic;
    color: #f1f5f9;
    font-size: 0.88rem;
    line-height: 1.45;
}

.quote-box-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quote-box .who {
    font-weight: 700;
    font-size: 0.84rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quote-box .who .verified-badge {
    color: #38bdf8;
    font-size: 0.78rem;
}

.quote-box .role {
    color: var(--tv-gold-400);
    font-size: 0.75rem;
    font-weight: 600;
}

/* ==========================================================================
   Right Form Side — Elegant Modern Login Card
   ========================================================================== */
.auth-form-side {
    flex: 1 1 48%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 28px;
    background: #f8fafc;
    overflow-y: auto;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 20px;
    padding: 36px 32px;
    border: 1px solid rgba(14, 42, 71, 0.08);
    box-shadow: 0 20px 40px -15px rgba(14, 42, 71, 0.12), 0 0 0 1px rgba(14, 42, 71, 0.04);
}

.auth-card.wide {
    max-width: 520px;
}

/* Card Top Navigation */
.auth-card-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: nowrap;
}

.auth-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #1e3a8a;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 6px 12px;
    border-radius: 9999px;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.2;
}

.auth-card-topbar .top-link {
    font-size: 0.82rem;
    color: var(--tv-muted);
    text-align: right;
    white-space: nowrap;
    line-height: 1.3;
}

.auth-card-topbar .top-link a {
    color: var(--tv-navy-800);
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
}

.auth-card-topbar .top-link a:hover {
    color: var(--tv-navy-600);
    text-decoration: underline;
}

/* Header Text */
.auth-card-header {
    margin-bottom: 24px;
}

.auth-card h2 {
    font-weight: 800;
    color: var(--tv-ink);
    letter-spacing: -0.4px;
    font-size: 1.65rem;
    margin: 0 0 6px;
    line-height: 1.25;
}

.auth-card .lead-sm {
    color: var(--tv-muted);
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.45;
}

/* Input Styles */
.form-group-tv {
    margin-bottom: 18px;
}

.form-label-tv {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #334155;
    margin-bottom: 7px;
}

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

.input-tv-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 3;
    transition: color 0.15s ease;
}

.form-control-tv {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    font-size: 0.94rem;
    padding: 0 14px 0 42px;
    color: #0f172a;
    transition: all 0.2s ease;
}

.form-control-tv:focus {
    outline: none;
    border-color: var(--tv-navy-800);
    box-shadow: 0 0 0 4px rgba(14, 42, 71, 0.12);
}

.input-tv-wrap:focus-within .input-tv-icon {
    color: var(--tv-navy-800);
}

.input-tv-wrap .toggle-pwd {
    position: absolute;
    right: 14px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 0.9rem;
    user-select: none;
    padding: 6px;
    transition: color 0.15s ease;
}

.input-tv-wrap .toggle-pwd:hover {
    color: var(--tv-navy-800);
}

/* Submit Button */
.btn-tv-submit {
    width: 100%;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--tv-navy-900) 0%, var(--tv-navy-800) 50%, var(--tv-navy-600) 100%);
    border: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.98rem;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(14, 42, 71, 0.35);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-tv-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px -6px rgba(14, 42, 71, 0.45);
    background: linear-gradient(135deg, var(--tv-navy-950) 0%, var(--tv-navy-800) 60%, var(--tv-navy-700) 100%);
}

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

.btn-tv-submit .btn-arrow {
    transition: transform 0.2s ease;
}

.btn-tv-submit:hover .btn-arrow {
    transform: translateX(4px);
}

/* Secondary Actions */
.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.forgot-link {
    font-size: 0.84rem;
    color: var(--tv-navy-800);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.forgot-link:hover {
    color: var(--tv-navy-600);
    text-decoration: underline;
}

.remember-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.86rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--tv-navy-800);
    cursor: pointer;
}

/* Divider */
.tv-divider {
    text-align: center;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 22px 0 16px;
    position: relative;
}

.tv-divider::before, .tv-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: #e2e8f0;
}

.tv-divider::before { left: 0; }
.tv-divider::after { right: 0; }

/* Partner Quick Options */
.portal-quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 16px;
}

.portal-quick-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: var(--tv-ink);
    transition: all 0.2s ease;
}

.portal-quick-card:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--tv-navy-800);
    transform: translateY(-1px);
}

.portal-quick-card .pq-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tv-navy-800);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.portal-quick-card:hover .pq-icon {
    background: var(--tv-navy-800);
    color: #ffffff;
    border-color: var(--tv-navy-800);
}

.portal-quick-card .pq-text {
    line-height: 1.2;
}

.portal-quick-card .pq-title {
    font-size: 0.82rem;
    font-weight: 700;
    display: block;
}

.portal-quick-card .pq-sub {
    font-size: 0.7rem;
    color: #64748b;
    display: block;
}

/* Staff Access Footer Link */
.staff-access-footer {
    text-align: center;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
}

.staff-access-footer a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s ease;
}

.staff-access-footer a:hover {
    color: var(--tv-navy-800);
}

/* Flash Messages */
.auth-flash {
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 13.5px;
    line-height: 1.5;
}

.auth-flash--ok   { background: #e9f9ef; border: 1px solid #b7e7c9; color: #14713d; }
.auth-flash--bad  { background: #fdecec; border: 1px solid #f5c2c2; color: #a4262c; }
.auth-flash--warn { background: #fff8e1; border: 1px solid #f2dda4; color: #8a6100; }

/* Responsive */
.auth-mobile-header {
    display: none;
    text-align: center;
    margin-bottom: 24px;
}

.auth-mobile-header img {
    height: 40px;
    width: auto;
}

@media (max-width: 991px) {
    .auth-wrap {
        flex-direction: column;
    }
    .auth-brand {
        display: none;
    }
    .auth-form-side {
        flex: 1 1 100%;
        padding: 32px 18px;
    }
    .auth-card {
        padding: 32px 22px;
        box-shadow: 0 10px 25px -8px rgba(14, 42, 71, 0.10);
    }
    .auth-mobile-header {
        display: block;
    }
}

@media (max-width: 480px) {
    .portal-quick-grid {
        grid-template-columns: 1fr;
    }
    .feat-grid {
        grid-template-columns: 1fr;
    }
}
