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

:root {
    --login-bg-left: linear-gradient(150deg, #182851 0%, #1d3a63 45%, #16a7a6 100%);
    --login-accent: #f08a24;
    --login-accent-hover: #ffa350;
    /* Form-side brand colour: the house teal, so the button and links belong to the same
       palette as the panel on the left instead of the old house green. */
    --login-brand: #16a7a6;
    --login-brand-hover: #0f8b8a;
    --login-brand-rgb: 22, 167, 166;
    --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%;
}


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

/* ── Left Panel: Info & Marketing Details ───────────────────────────────────
   TWO layouts share this sheet, so read carefully before editing:

   1. DEFAULT (`.info-side`) - dark navy panel with a brand header, headline and feature list.
      Used by the STUDENT app (Pwa/index.html login + register views). Its markup depends on
      .brand-header / .info-content / .eyebrow / .info-features / .feature-item, so those rules
      must stay.
   2. `.info-side.art-only` - light panel showing the hero artwork and nothing else. Used by the
      OPERATOR login (Admin/Transport/OperatorLogin.aspx), where the artwork already carries the
      wordmark, tagline and feature chips, so repeating them in HTML was duplication.
      NOTE: that artwork is the FlexiRide hero and is deliberately kept - see the operator login.

   These were briefly ONE layout and it broke the student login screen - the redesign deleted the
   rules the student markup still used. Hence the opt-in class. */
.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;
}

/* ---- variant 2: artwork only, light ground ---- */
.info-side.art-only {
    flex: 1.15;
    /* Sampled from the artwork's own sky so the image blends in at any aspect ratio. */
    background: linear-gradient(160deg, #eef4f8 0%, #f7f1e8 55%, #fdf6ec 100%);
    color: #1f3050;
    padding: 32px 32px 20px;
    justify-content: center;
    align-items: center;
    gap: 18px;
}

/* object-fit: contain, NOT cover: the artwork carries the wordmark, the tagline and the four
   feature chips, and cover would crop whichever edge the viewport is tightest on - usually the
   chips. Better to letterbox into the sampled background than to lose the message. */
.info-side .hero-art {
    display: block;
    width: 100%;
    max-width: 760px;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(24, 48, 80, .16);
}

/* ---- variant 1 furniture: needed by the student app ---- */
.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;
}
.info-content {
    position: relative;
    z-index: 2;
    max-width: 540px;
    margin: auto 0;
}
.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-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) }



/* Everything that used to live on this panel - a grid pattern, a radial glow, the eyebrow badge,
   the headline, the four feature rows and the white-on-navy brand header - was removed on
   2026-07-29. All of it duplicated what the artwork itself says, and none of it reads on a light
   ground. The panel is the image plus a copyright line. */

/* Info Footer label. White on the dark default panel; overridden for the light art-only variant. */
.info-footer-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    position: relative;
    z-index: 2;
    margin-top: 40px;
}
.info-side.art-only .info-footer-text {
    color: rgba(31, 48, 80, .45);
    margin-top: 0;
    text-align: center;
}
/* ── 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: var(--login-brand) !important;
    box-shadow: 0 0 0 3px rgba(var(--login-brand-rgb), 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: var(--login-brand) !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: var(--login-brand-hover) !important;
    box-shadow: 0 4px 12px rgba(var(--login-brand-rgb), 0.28) !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: var(--login-brand);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.login-actions a:hover {
    color: var(--login-brand-hover);
    text-decoration: underline;
}

/* ── Remember my username ─────────────────────────────────────────────────────
   Sits between the password field and the button. The ASP CheckBox renders as
   <span><input type=checkbox><label></label></span>, so style by descendant. */
.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 2px;
}

.remember-lbl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.remember-lbl input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--login-brand);
    cursor: pointer;
    flex: 0 0 auto;
}

.remember-lbl span {
    line-height: 1.2;
}

.remember-lbl:hover {
    color: #0f172a;
}

/* Links inside the auth card sit on white — force the brand green (the global .link is
   light-on-dark for the in-app topbar and would be invisible here). */
.login-note .link,
.login-note a {
    color: #16a34a !important;
    background: none !important;
    font-weight: 700;
    text-decoration: none;
}
.login-note .link:hover,
.login-note a:hover {
    color: #15803d !important;
    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;
    }
}

/* ── Boma (hostels) sign-in ─────────────────────────────────────────────────
   Boma uses the SAME art-only panel as FlexiRide, just a different picture, so almost
   nothing is needed here. What remains is the brand colour for the form side.

   The panel-styling rules that used to live here (brand-header, eyebrow, feature-item
   colours) were deleted when Boma got real artwork -- the image carries all of that now. */

/* Override the VARIABLE, not the background. The shared rule is
       .btn-primary, .btn--full, .login-box .btn-info { background: var(--login-brand) !important }
   so no amount of specificity beats it - but it resolves --login-brand per element, so setting
   the variable on the body repaints the button, focus rings and links without a second
   !important. Adding one here would have started an arms race across a stylesheet the student
   PWA also uses. */
.brand-boma {
    --login-brand: #f5c142;
    --login-brand-hover: #ffcf5c;
    --login-brand-rgb: 245, 193, 66;
}
/* Amber needs dark text; the shared rule paints white, so this one does need to match its weight. */
.brand-boma .btn-primary { color: #1e2749 !important; font-weight: 700; }
