/* ==========================================================================
   TransportWorks Shared Split Login Stylesheet
   ========================================================================== */

:root {
    --login-bg-left: linear-gradient(135deg, #0a1628 0%, #172a45 100%);
    --login-accent: #f97316;
    --login-accent-hover: #fb923c;
    --login-text-light: #ffffff;
    --login-text-muted: #94a3b8;
    --login-border: #e2e8f0;
}

body.login-body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
}

/* Flex Split Layout */
.split-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ── Brand Header (inside left dark panel on desktop) ─────────────────────── */
.brand-header {
    position: absolute;
    top: 36px;
    left: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

.brand-header img {
    height: 40px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    background-color: #ffffff;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.brand-header span {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--login-text-light);
    text-transform: uppercase;
}

/* Mobile-only brand header — hidden on desktop */
.mobile-brand-header {
    display: none;
}

/* ── Left Panel: Info & Marketing Details ─────────────────────────────────── */
.info-side {
    flex: 1.1;
    background: var(--login-bg-left);
    position: relative;
    color: var(--login-text-light);
    padding: 120px 48px 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* Subtle Grid Background Pattern */
.info-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 1;
}

/* Radial Glow */
.info-side::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.07) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
    pointer-events: none;
    z-index: 1;
}

/* Main Content Area in Left Panel */
.info-content {
    position: relative;
    z-index: 2;
    max-width: 540px;
    margin: auto 0;
}

/* Eyebrow badge tag */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--login-accent);
    margin-bottom: 24px;
}

.info-content h1 {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -1px;
    margin: 0 0 16px 0;
    color: var(--login-text-light);
}

.info-content h1 span {
    color: var(--login-accent);
}

.info-content p {
    font-size: 15px;
    color: var(--login-text-muted);
    line-height: 1.6;
    margin: 0 0 36px 0;
}

/* Info feature bullets list */
.info-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feature-item i {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--login-accent);
    flex-shrink: 0;
}

.feature-item span {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

/* Info Footer label */
.info-footer-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    position: relative;
    z-index: 2;
    margin-top: 40px;
}

/* ── Right Panel: Login Card Area ─────────────────────────────────────────── */
.login-side {
    flex: 0.9;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 48px;
}

.login-box {
    width: 100%;
    max-width: 380px;
}

.login-box h2 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
}

.login-box p.subtitle {
    font-size: 14px;
    color: #475569;
    margin: 0 0 32px 0;
}

/* ── Form Styles & Inputs ─────────────────────────────────────────────────── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.tw-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.tw-label {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Standardise inputs across the pages */
.tw-input,
.login-box .form-control {
    width: 100% !important;
    padding: 12px 14px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    color: #0f172a !important;
    background-color: #f8fafc !important;
    border: 1px solid var(--login-border) !important;
    border-radius: 8px !important;
    transition: all 0.15s ease !important;
    outline: none !important;
    height: auto !important;
    box-sizing: border-box !important;
}

.tw-input:focus,
.login-box .form-control:focus {
    background-color: #ffffff !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
}

/* Password Toggle Icon */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper .toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    font-style: normal;
    user-select: none;
}

/* Primary Sign In Button */
.btn-primary,
.btn--full,
.login-box .btn-info {
    width: 100% !important;
    padding: 12px 20px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    background-color: #4f46e5 !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.15s ease !important;
    text-decoration: none !important;
}

.btn-primary:hover,
.btn--full:hover,
.login-box .btn-info:hover {
    background-color: #4338ca !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2) !important;
}

.btn-primary:active,
.btn--full:active {
    transform: scale(0.98);
}

/* Links & Help text */
.login-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-top: 10px;
}

.login-actions a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.login-actions a:hover {
    color: #4338ca;
    text-decoration: underline;
}

/* Note block under form */
.login-note {
    font-size: 12px;
    color: #64748b;
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid var(--login-border);
    padding-top: 16px;
    line-height: 1.5;
}

/* ── Modals ───────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-container {
    background-color: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--login-border);
    overflow: hidden;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--login-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8fafc;
}

.modal-header h5 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.modal-close-btn {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
    color: #64748b;
}

.modal-close-btn:hover {
    color: #ef4444;
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--login-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: #f8fafc;
}

/* ── Mobile Responsive Layout ─────────────────────────────────────────────── */
@media (max-width: 900px) {

    body.login-body {
        background: var(--login-bg-left) !important;
        min-height: 100vh;
    }

    .split-layout {
        flex-direction: column;
        align-items: stretch;
        background: var(--login-bg-left) !important;
        min-height: 100vh;
        padding: 0;
    }

    /* Grid texture on entire background */
    .split-layout::before {
        content: '';
        position: fixed;
        inset: 0;
        background-image:
            linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
        background-size: 24px 24px;
        pointer-events: none;
        z-index: 0;
    }

    /* Hide the desktop dark panel entirely on mobile */
    .info-side {
        display: none !important;
    }

    /* Mobile brand header shown at top */
    .mobile-brand-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 32px 24px 20px;
        position: relative;
        z-index: 2;
    }

    .mobile-brand-header img {
        height: 36px;
        width: auto;
        object-fit: contain;
        border-radius: 7px;
        background-color: #ffffff;
        padding: 4px;
    }

    .mobile-brand-header i {
        font-size: 22px;
        color: var(--login-accent);
    }

    .mobile-brand-header span {
        font-size: 15px;
        font-weight: 800;
        letter-spacing: 0.5px;
        color: #ffffff;
        text-transform: uppercase;
    }

    /* Right panel becomes full width */
    .login-side {
        flex: 1 !important;
        background: transparent !important;
        padding: 0 16px 40px !important;
        justify-content: flex-start !important;
        align-items: center;
        width: 100%;
        position: relative;
        z-index: 2;
    }

    /* Float the login card */
    .login-box {
        width: 100%;
        max-width: 420px;
        background: #ffffff;
        border-radius: 20px;
        padding: 28px 24px;
        box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
    }

    .login-box h2 {
        font-size: 24px;
    }

    .login-box p.subtitle {
        margin-bottom: 24px;
    }

    /* Mobile footer copyright below card */
    .mobile-footer {
        display: block;
        text-align: center;
        font-size: 11px;
        color: rgba(255, 255, 255, 0.3);
        padding: 20px 16px;
        position: relative;
        z-index: 2;
    }
}

/* Hide mobile-only elements on desktop */
@media (min-width: 901px) {
    .mobile-brand-header,
    .mobile-footer {
        display: none !important;
    }
}
