/* Login page: a clear glass form using the burgundy, white and grey logo palette. */

.lg-body {
    --lg-ink: #302b2d;
    --lg-text: #4d4548;
    --lg-muted: #746c6f;
    --lg-faint: #9a9295;
    --lg-line: rgba(119, 19, 38, .18);
    --lg-field: rgba(255, 255, 255, .86);
    --lg-accent: #771326;
    --lg-accent-dark: #5b0d1c;
    --lg-accent-soft: #f5e8eb;
    --lg-accent-rgb: 119, 19, 38;
    --lg-map-accent: #771326;
    --lg-map-accent-rgb: 119, 19, 38;
    --lg-navy: #4b4849;
    --lg-map: #e7e7e5;
    --lg-spring: cubic-bezier(.34, 1.56, .64, 1);
    --lg-ease: cubic-bezier(.2, .8, .2, 1);
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--lg-ink);
    font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--lg-map);
}

/* ======================================================================
   Background map
   ====================================================================== */
.lg-scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.lg-map { display: block; width: 100%; height: 100%; }
/* Soft light and a faint brand tint keep the grey map quiet behind the form. */
.lg-scene::before,
.lg-scene::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.lg-scene::before {
    background:
        radial-gradient(circle at 14% 18%, rgba(119, 19, 38, .045), transparent 30%),
        radial-gradient(circle at 86% 78%, rgba(166, 182, 179, .18), transparent 32%);
}
.lg-scene::after {
    background: radial-gradient(ellipse 35% 58% at 50% 50%, rgba(255, 255, 255, .32) 0%, rgba(255, 255, 255, .12) 62%, rgba(255, 255, 255, 0) 100%);
}

.lg-land { fill: var(--lg-map); }
/* Low-contrast grey buildings keep the map legible without competing with the form. */
.lg-block { fill: #d4d5d4; }
.lg-block-roof { fill: #e4e5e4; }
.lg-depot { fill: #d2c5c8; }
.lg-depot-roof { fill: #e4d8da; }
.lg-park { fill: #d9dcda; }
.lg-water { fill: #d4dcdd; }
.lg-trees circle { fill: #bec6c3; }

.lg-park-details path { fill: none; stroke: rgba(255, 255, 255, .78); stroke-width: 8; stroke-linecap: round; }
.lg-park-details circle { fill: #93aa9a; stroke: rgba(255, 255, 255, .72); stroke-width: 2; }
.lg-water-details path { fill: none; stroke: #a9c2c7; stroke-width: 4; stroke-linecap: round; opacity: .74; }
.lg-depot-details path { fill: none; stroke: rgba(119, 19, 38, .18); stroke-width: 3; stroke-dasharray: 10 8; }
.lg-depot-details rect { fill: rgba(255, 255, 255, .2); stroke: rgba(119, 19, 38, .2); stroke-width: 2; }

.lg-kerb path, .lg-street path, .lg-dash path { fill: none; }
.lg-kerb path { stroke: #f5f4f3; stroke-width: 88; }
.lg-street path { stroke: #c8c9c8; stroke-width: 80; }
.lg-dash path { stroke: #969a9b; stroke-width: 2; stroke-dasharray: 16 18; opacity: .52; }
.lg-lane { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 8 12; }
.lg-lane--fleet { stroke: rgba(119, 19, 38, .16); }
.lg-lane--delivery { stroke: rgba(206, 154, 0, .3); animation: lg-route-flow 24s linear infinite; }
.lg-crosswalks path { fill: none; stroke: rgba(255, 255, 255, .82); stroke-width: 5; stroke-linecap: round; }

.lg-geofence { fill: rgba(var(--lg-map-accent-rgb), .05); stroke: var(--lg-map-accent); stroke-width: 2; stroke-dasharray: 8 8; animation: lg-dash 20s linear infinite; }

.lg-route-glow { fill: none; stroke: rgba(var(--lg-map-accent-rgb), .12); stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; }
.lg-route { fill: none; stroke: var(--lg-map-accent); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: lg-draw 2.4s var(--lg-ease) .3s forwards; }

.lg-start { fill: var(--lg-navy); stroke: #fff; stroke-width: 4; }
.lg-pin__body { fill: var(--lg-map-accent); stroke: #fff; stroke-width: 3; }
.lg-pin__dot { fill: #fff; }
.lg-pin__pulse { fill: rgba(var(--lg-map-accent-rgb), .28); transform-box: fill-box; transform-origin: center; animation: lg-pulse 2.2s ease-out infinite; }

/* ---------- 3D-style vehicles (shapes live in <defs>; colours come from --body / --trailer) ---------- */
.lg-v__shadow { fill: rgba(48, 43, 45, .22); filter: url(#lgBlur); }
.lg-v__body { fill: var(--body, #771326); }
.lg-v__trailer { fill: var(--trailer, #f4f3f2); }
.lg-v__glass { fill: url(#lgGlass); }
.lg-v__roof { fill: rgba(255, 255, 255, .22); }
.lg-v__unit { fill: rgba(255, 255, 255, .6); }
.lg-v__ribs { fill: none; stroke: rgba(48, 43, 45, .12); stroke-width: 1; }
.lg-v__hitch { fill: #686365; }
.lg-v__light { fill: #fff4bf; }
.lg-v__tail { fill: #f87171; }
.lg-v__taxi-sign { fill: #fff; stroke: #0d6f40; stroke-width: 1; }
.lg-v__taxi-mark { fill: none; stroke: #15965a; stroke-width: 1.4; stroke-linecap: round; }
.lg-v__wheel { fill: #24282a; }
.lg-v__bike-frame { fill: none; stroke: #555b5e; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-v__delivery-box { fill: var(--box, #f5b400); stroke: #6d5410; stroke-width: 1.2; }
.lg-v__delivery-mark { fill: none; stroke: var(--mark, #3f3210); stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; }
.lg-v__bike-seat { fill: #25292b; }
.lg-v__helmet { fill: var(--helmet, #f5f5f4); stroke: rgba(48, 43, 45, .28); stroke-width: 1; }
.lg-v__tracking-ring { fill: none; stroke: rgba(var(--lg-accent-rgb), .42); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: lg-track-signal 2s ease-out infinite; }

/* Live fleet telemetry: the outer group follows a path without rotating the card. */
.lg-telemetry-motion { pointer-events: none; }
.lg-telemetry { --telemetry-accent: var(--lg-accent); --telemetry-soft: #f6e9ec; filter: drop-shadow(0 10px 13px rgba(49, 43, 45, .18)); }
.lg-telemetry__panel { fill: rgba(255, 255, 255, .97); stroke: rgba(73, 65, 68, .14); stroke-width: 1; }
.lg-telemetry__header { fill: var(--telemetry-soft); }
.lg-telemetry__metric { fill: #f5f4f4; stroke: rgba(73, 65, 68, .08); stroke-width: 1; }
.lg-telemetry__pointer { fill: none; stroke: var(--telemetry-accent); stroke-width: 1.5; stroke-linecap: round; opacity: .6; }
.lg-telemetry text {
    direction: ltr;
    unicode-bidi: plaintext;
    fill: #4d4548;
    font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
    text-anchor: start;
}
.lg-telemetry__title { font-size: 11px; font-weight: 700; }
.lg-telemetry__value { fill: #3f393b !important; font-size: 9.5px; font-weight: 700; }
.lg-telemetry__value--center { text-anchor: middle; }
.lg-telemetry__status { fill: var(--telemetry-accent); }
.lg-telemetry--taxi { --telemetry-accent: #15965a; --telemetry-soft: #e7f5ed; }
.lg-telemetry--taxi .lg-telemetry__panel { stroke: rgba(21, 150, 90, .26); }
.lg-telemetry--delivery { --telemetry-accent: #c69100; --telemetry-soft: #fff4c9; }
.lg-telemetry--delivery .lg-telemetry__panel { stroke: rgba(198, 145, 0, .3); }

/* ======================================================================
   Centre column: language, card, features
   ====================================================================== */
.lg-lang-wrap { position: fixed; top: 22px; inset-inline-end: 26px; z-index: 2; margin: 0; }
.lg-lang {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    color: var(--lg-text);
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.4;
    background: rgba(255, 255, 255, .76);
    border: 1px solid rgba(119, 19, 38, .12);
    border-radius: 999px;
    box-shadow: 0 10px 28px -18px rgba(64, 49, 53, .38);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    backdrop-filter: blur(16px) saturate(1.15);
    cursor: pointer;
    transition: color 200ms ease, border-color 200ms ease;
}
.lg-lang i { color: var(--lg-accent); transition: transform 500ms var(--lg-ease); }
.lg-lang:hover, .lg-lang:focus-visible { color: var(--lg-accent-dark); background: rgba(255, 255, 255, .94); border-color: rgba(var(--lg-accent-rgb), .32); outline: none; }
.lg-lang:hover i { transform: rotate(180deg); }

.lg-center {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 100vh;
    padding: 76px 16px 24px;
}

.lg-card {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 448px;
    padding: 30px 32px 28px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(248, 245, 246, .72));
    border: 1px solid rgba(255, 255, 255, .88);
    border-radius: 22px;
    box-shadow: 0 28px 72px -30px rgba(61, 45, 50, .4), 0 1px 2px rgba(66, 54, 57, .08), inset 0 1px 0 #fff;
    -webkit-backdrop-filter: blur(22px) saturate(1.08);
    backdrop-filter: blur(22px) saturate(1.08);
    animation: lg-rise 700ms var(--lg-ease) both;
}
.lg-card::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline: 22%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #a6b6b3, var(--lg-accent), #a6b6b3, transparent);
    border-radius: 0 0 999px 999px;
    opacity: .9;
}
.lg-card__brand { display: flex; justify-content: center; margin-bottom: 18px; }
.lg-logo { width: auto; max-width: 218px; height: 42px; object-fit: contain; }
.lg-card__head { margin-bottom: 22px; text-align: center; }
.lg-card__head h1 { margin: 0 0 6px; color: var(--lg-ink); font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; }
.lg-card__head p { margin: 0; color: var(--lg-muted); font-size: .92rem; }

.lg-features { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; max-width: 560px; margin: 0; padding: 0; list-style: none; }
.lg-features li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 6px;
    padding-inline-start: 6px;
    padding-inline-end: 14px;
    color: var(--lg-text);
    font-size: .8rem;
    font-weight: 600;
    background: rgba(255, 255, 255, .7);
    border: 1px solid rgba(93, 85, 88, .12);
    border-radius: 999px;
    box-shadow: 0 8px 22px -16px rgba(61, 45, 50, .28);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    animation: lg-rise 600ms var(--lg-ease) both;
    transition: transform 300ms var(--lg-spring);
}
.lg-features li:nth-child(1) { animation-delay: 250ms; }
.lg-features li:nth-child(2) { animation-delay: 320ms; }
.lg-features li:nth-child(3) { animation-delay: 390ms; }
.lg-features li:nth-child(4) { animation-delay: 460ms; }
.lg-features li:hover { transform: translateY(-2px); }
.lg-features span { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; color: var(--lg-accent); font-size: .72rem; background: var(--lg-accent-soft); border-radius: 50%; }

.lg-foot { margin: 2px 0 0; color: #686164; font-size: .76rem; text-align: center; }

/* ======================================================================
   Form controls
   ====================================================================== */
/* ---------- Alerts ---------- */
.lg-alert { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 18px; padding: 12px 14px; font-size: .86rem; border-radius: 12px; }
.lg-alert ul { margin: 0; padding: 0; list-style: none; }
.lg-alert--error { color: #b42318; background: #fef3f2; border: 1px solid #fecdca; }
.lg-alert--success { color: #067647; background: #ecfdf3; border: 1px solid #abefc6; }
.lg-alert.validation-summary-valid { display: none; }

/* ---------- Fields ---------- */
.lg-field { display: block; margin: 0 0 16px; font-weight: normal; }
.lg-field__label { display: block; margin-bottom: 6px; color: var(--lg-text); font-size: .82rem; font-weight: 600; }
.lg-field__box { position: relative; display: flex; align-items: center; min-width: 0; }

.lg-input {
    box-sizing: border-box;
    width: 100%;
    height: 50px;
    padding: 0 14px;
    padding-inline-start: 44px;
    color: var(--lg-ink);
    font-family: inherit;
    font-size: .95rem;
    font-weight: 500;
    background: var(--lg-field);
    border: 1.5px solid var(--lg-line);
    border-radius: 12px;
    outline: none;
    transition: border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}
.lg-input::placeholder { color: var(--lg-faint); font-weight: 400; }
.lg-input:hover { background: rgba(255, 255, 255, .96); border-color: rgba(var(--lg-accent-rgb), .3); }
.lg-input:focus { background: rgba(255, 255, 255, .94); border-color: var(--lg-accent); box-shadow: 0 0 0 4px rgba(var(--lg-accent-rgb), .13); }
.lg-input[data-lg-password] { padding-inline-end: 48px; }
.lg-input.input-validation-error { background: #fffbfa; border-color: #f04438; }
.lg-input.input-validation-error:focus { box-shadow: 0 0 0 4px rgba(240, 68, 56, .12); }

.lg-field__icon {
    position: absolute;
    inset-inline-start: 16px;
    color: var(--lg-faint);
    font-size: .9rem;
    pointer-events: none;
    transition: color 200ms ease, transform 350ms var(--lg-spring);
}
.lg-field__box:focus-within .lg-field__icon { color: var(--lg-accent); transform: scale(1.15); }

.lg-field__action {
    position: absolute;
    inset-inline-end: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: var(--lg-faint);
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: color 200ms ease, background-color 200ms ease;
}
.lg-field__action:hover, .lg-field__action:focus-visible { color: var(--lg-accent); background: var(--lg-accent-soft); outline: none; }

.lg-field__error { display: block; margin-top: 6px; color: #d92d20; font-size: .78rem; }
.lg-field__error:empty, .lg-field__error.field-validation-valid { display: none; }
/* This project's jquery.validate.unobtrusive.js hides messages app-wide (container.hide()); on the login page they are shown. */
.lg-field__error.field-validation-error { display: block !important; animation: lg-in 250ms var(--lg-ease); }

.lg-caps { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 3px 8px; color: #b54708; font-size: .76rem; font-weight: 600; background: #fffaeb; border-radius: 6px; }
.lg-caps[hidden] { display: none; }

/* ---------- Captcha (canvas + refresh button come from plugins/vue/Vue-captcha.js) ---------- */
.lg-captcha { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; }
.lg-captcha__code { display: flex; align-items: center; height: 50px; padding: 2px; background: var(--lg-field); border: 1.5px dashed rgba(var(--lg-accent-rgb), .26); border-radius: 12px; }
.lg-captcha__code div:has(> canvas) { display: flex; align-items: center; gap: 2px; }
.lg-captcha__code canvas { display: block; width: 132px; height: 42px; border-radius: 9px; }
.lg-captcha__code .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: var(--lg-muted);
    background: transparent;
    border: 0;
    border-radius: 9px;
    box-shadow: none;
}
.lg-captcha__code .btn i { transition: transform 500ms var(--lg-ease); }
.lg-captcha__code .btn:hover, .lg-captcha__code .btn:focus { color: var(--lg-accent); background: var(--lg-accent-soft); }
.lg-captcha__code .btn:hover i { transform: rotate(180deg); }
.lg-captcha .lg-input { padding-inline-start: 40px; letter-spacing: .2em; }
.lg-captcha .lg-input::placeholder { letter-spacing: normal; }
.lg-captcha .lg-field__icon { inset-inline-start: 14px; }

/* ---------- Remember me / forgot password ---------- */
.lg-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 22px; }

.lg-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; margin: 0; color: #475467; font-size: .86rem; font-weight: 500; cursor: pointer; user-select: none; }
.lg-switch input { position: absolute; opacity: 0; pointer-events: none; }
.lg-switch__track { position: relative; flex: 0 0 auto; width: 38px; height: 22px; background: #d0d5dd; border-radius: 999px; transition: background-color 250ms ease; }
.lg-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    inset-inline-start: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .25);
    transition: inset-inline-start 300ms var(--lg-spring);
}
.lg-switch input:checked + .lg-switch__track { background: var(--lg-accent); }
.lg-switch input:checked + .lg-switch__track::after { inset-inline-start: 19px; }
.lg-switch input:focus-visible + .lg-switch__track { box-shadow: 0 0 0 4px rgba(var(--lg-accent-rgb), .18); }

.lg-link { color: var(--lg-accent); font-size: .86rem; font-weight: 600; }
.lg-link:hover { color: var(--lg-accent-dark); text-decoration: underline; }

/* ---------- Submit ---------- */
.lg-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    overflow: hidden;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(120deg, #5b0d1c 0%, #771326 52%, #8f1b31 100%);
    background-size: 180% 100%;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 10px 22px -12px rgba(var(--lg-accent-rgb), .8);
    cursor: pointer;
    transition: background-position 500ms var(--lg-ease), transform 300ms var(--lg-spring), box-shadow 300ms ease;
}
/* light sweep across the button on hover */
.lg-submit::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 700ms var(--lg-ease);
}
.lg-submit:hover, .lg-submit:focus-visible { background-position: 100% 0; box-shadow: 0 16px 30px -12px rgba(var(--lg-accent-rgb), .85); transform: translateY(-2px); outline: none; }
.lg-submit:hover::after { transform: translateX(120%); }
.lg-submit:active { transform: translateY(0) scale(.99); }
.lg-submit:focus-visible { box-shadow: 0 0 0 4px rgba(var(--lg-accent-rgb), .25); }
.lg-submit__arrow { transition: transform 300ms var(--lg-spring); }
.lg-submit:hover .lg-submit__arrow { transform: translateX(4px); }
[dir="rtl"] .lg-submit:hover .lg-submit__arrow { transform: translateX(-4px); }

.lg-submit__busy { display: none; align-items: center; gap: 10px; }
.lg-submit.is-loading { pointer-events: none; }
.lg-submit.is-loading .lg-submit__text, .lg-submit.is-loading .lg-submit__arrow { display: none; }
.lg-submit.is-loading .lg-submit__busy { display: inline-flex; }
.lg-spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: lg-spin 700ms linear infinite; }

/* ======================================================================
   Animations
   ====================================================================== */
@keyframes lg-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes lg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes lg-draw { to { stroke-dashoffset: 0; } }
@keyframes lg-dash { to { stroke-dashoffset: -320; } }
@keyframes lg-route-flow { to { stroke-dashoffset: -240; } }
@keyframes lg-pulse { 0% { opacity: .9; transform: scale(.5); } 100% { opacity: 0; transform: scale(2.2); } }
@keyframes lg-track-signal { 0% { opacity: .8; transform: scale(.5); } 100% { opacity: 0; transform: scale(1.8); } }
@keyframes lg-spin { to { transform: rotate(360deg); } }

/* ======================================================================
   Responsive
   ====================================================================== */
@media (max-width: 575.98px) {
    .lg-lang-wrap { top: 14px; inset-inline-end: 14px; }
    .lg-center { justify-content: flex-start; padding: 64px 12px 20px; }
    .lg-card { padding: 26px 20px 22px; border-radius: 20px; background: linear-gradient(145deg, rgba(255, 255, 255, .9), rgba(248, 245, 246, .8)); }
    .lg-scene::after { background: rgba(255, 255, 255, .12); }
    .lg-telemetry-motion { display: none; }
}

@media (max-width: 420px) {
    .lg-logo { max-width: 180px; height: 36px; }
    .lg-card__head h1 { font-size: 1.4rem; }
    .lg-captcha { grid-template-columns: 1fr; }
    .lg-captcha__code { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .lg-card, .lg-features li, .lg-geofence, .lg-pin__pulse, .lg-v__tracking-ring, .lg-lane--delivery { animation: none; }
    .lg-route { animation: none; stroke-dashoffset: 0; }
    .lg-v, .lg-telemetry-motion { display: none; }
    .lg-submit, .lg-submit::after, .lg-submit__arrow, .lg-field__icon, .lg-switch__track::after, .lg-lang i, .lg-features li { transition: none; }
}
