/* =====================================================================
   FleetTrack — transport operations command centre
   Dark navy chrome, light working surfaces, status-colour discipline.
   ===================================================================== */

:root {
    --ft-navy:        #0f1b2d;
    --ft-navy-2:      #16263c;
    --ft-navy-3:      #1d3350;
    --ft-navy-line:   rgba(255, 255, 255, 0.08);
    --ft-ink:         #1a2433;
    --ft-ink-soft:    #5b6b7f;
    --ft-surface:     #f5f7fa;
    --ft-card:        #ffffff;
    --ft-line:        #e3e8ef;

    --ft-green:       #12855f;
    --ft-green-soft:  #e4f5ee;
    --ft-amber:       #b8730b;
    --ft-amber-soft:  #fdf1dc;
    --ft-red:         #c02a35;
    --ft-red-soft:    #fbe7e9;
    --ft-grey:        #7c8896;
    --ft-grey-soft:   #eef1f5;
    --ft-blue:        #1b64c8;
    --ft-blue-soft:   #e5eefb;

    --ft-radius:      10px;
    --ft-shadow:      0 1px 2px rgba(16, 30, 48, .06), 0 8px 24px -12px rgba(16, 30, 48, .18);
    --ft-shadow-lg:   0 2px 6px rgba(16, 30, 48, .08), 0 24px 48px -20px rgba(16, 30, 48, .28);
    --ft-sidebar-w:   248px;
    --ft-topbar-h:    64px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ft-ink);
    background: var(--ft-surface);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--ft-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- */
/* Sidebar                                                           */
/* ---------------------------------------------------------------- */

.ft-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--ft-sidebar-w);
    background: var(--ft-navy);
    color: #c9d4e2;
    display: flex;
    flex-direction: column;
    z-index: 40;
    transition: transform .22s ease;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--ft-navy-3) transparent;
}

.ft-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 18px 18px 16px;
    border-bottom: 1px solid var(--ft-navy-line);
    flex: 0 0 auto;
}
.ft-brand__mark {
    width: 36px; height: 36px;
    border-radius: 9px;
    background: linear-gradient(140deg, #2f7ef0, #17b0a0);
    display: grid; place-items: center;
    font-weight: 700; font-size: 15px; color: #fff;
    flex: 0 0 auto;
}
.ft-brand__name { font-weight: 650; color: #fff; font-size: 15px; letter-spacing: .2px; }
.ft-brand__sub  { font-size: 11px; color: #7f93ab; margin-top: 1px; }

.ft-nav { padding: 10px 10px 24px; flex: 1 1 auto; }
.ft-nav__group {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #5f738b;
    padding: 14px 10px 6px;
    font-weight: 600;
}
.ft-nav__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8.5px 11px;
    border-radius: 8px;
    color: #b8c6d8;
    font-size: 13.2px;
    text-decoration: none;
    margin-bottom: 1px;
    position: relative;
}
.ft-nav__link:hover { background: var(--ft-navy-2); color: #fff; text-decoration: none; }
.ft-nav__link.is-active {
    background: linear-gradient(90deg, rgba(47,126,240,.24), rgba(47,126,240,.06));
    color: #fff;
    font-weight: 550;
}
.ft-nav__link.is-active::before {
    content: "";
    position: absolute; left: -10px; top: 8px; bottom: 8px;
    width: 3px; border-radius: 0 3px 3px 0;
    background: #3f8ef5;
}
.ft-nav__icon { width: 17px; height: 17px; flex: 0 0 auto; opacity: .85; }
.ft-nav__badge {
    margin-left: auto;
    background: var(--ft-red);
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
    border-radius: 999px;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
}

/* ---------------------------------------------------------------- */
/* Top bar                                                           */
/* ---------------------------------------------------------------- */

.ft-topbar {
    position: fixed;
    top: 0; right: 0;
    left: var(--ft-sidebar-w);
    height: var(--ft-topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--ft-line);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 22px;
    z-index: 30;
}
.ft-topbar__title { font-weight: 600; font-size: 15.5px; }
.ft-topbar__crumb { font-size: 12px; color: var(--ft-ink-soft); margin-top: 1px; }
.ft-search {
    position: relative;
    flex: 0 1 320px;
    margin-left: 12px;
}
.ft-search input {
    width: 100%;
    border: 1px solid var(--ft-line);
    background: var(--ft-surface);
    border-radius: 8px;
    padding: 8px 12px 8px 33px;
    font-size: 13px;
    color: var(--ft-ink);
    outline: none;
}
.ft-search input:focus { border-color: #9db9e6; background: #fff; box-shadow: 0 0 0 3px rgba(47,126,240,.12); }
.ft-search svg { position: absolute; left: 10px; top: 9px; width: 15px; height: 15px; color: var(--ft-grey); }
.ft-topbar__spacer { flex: 1 1 auto; }
.ft-topbar__clock {
    font-variant-numeric: tabular-nums;
    font-size: 12.5px;
    color: var(--ft-ink-soft);
    white-space: nowrap;
}
.ft-iconbtn {
    width: 36px; height: 36px;
    border-radius: 8px;
    border: 1px solid var(--ft-line);
    background: #fff;
    display: grid; place-items: center;
    cursor: pointer;
    position: relative;
    color: var(--ft-ink-soft);
}
.ft-iconbtn:hover { background: var(--ft-surface); color: var(--ft-ink); }
.ft-iconbtn__dot {
    position: absolute; top: 6px; right: 6px;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--ft-red); border: 1.5px solid #fff;
}
.ft-user {
    display: flex; align-items: center; gap: 9px;
    padding-left: 14px;
    border-left: 1px solid var(--ft-line);
}
.ft-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--ft-navy-3); color: #fff;
    display: grid; place-items: center;
    font-size: 12px; font-weight: 600;
}
.ft-user__name { font-size: 13px; font-weight: 550; line-height: 1.2; }
.ft-user__role { font-size: 11px; color: var(--ft-ink-soft); }

/* ---------------------------------------------------------------- */
/* Main                                                              */
/* ---------------------------------------------------------------- */

.ft-main {
    margin-left: var(--ft-sidebar-w);
    padding: calc(var(--ft-topbar-h) + 20px) 22px 40px;
    min-height: 100vh;
}

.ft-page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.ft-page-head h1 { font-size: 20px; margin: 0 0 3px; font-weight: 650; letter-spacing: -.2px; }
.ft-page-head p { margin: 0; color: var(--ft-ink-soft); font-size: 13px; }
.ft-page-head__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* KPI grid */
.ft-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
/* KPI card layout: text column on the left, icon badge beside the label.
   The badge is a real grid cell, not an absolutely positioned overlay, so it
   can never cover the value — money values like "375260.00" need full width.
   The value and meta rows span both columns for that reason. */
.ft-kpi {
    background: var(--ft-card);
    border: 1px solid var(--ft-line);
    border-radius: var(--ft-radius);
    padding: 10px 14px 10px;
    box-shadow: var(--ft-shadow);
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "label icon" "value value" "meta meta";
    column-gap: 10px;
    align-content: start;
}
.ft-kpi::after {
    content: "";
    position: absolute; inset: 0 auto 0 0;
    width: 3px;
    background: var(--ft-kpi-accent, var(--ft-grey));
}
.ft-kpi__label {
    grid-area: label;
    align-self: center;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .055em;
    color: var(--ft-ink-soft);
    font-weight: 600;
    display: flex; align-items: center; gap: 6px;
}
/* Tint comes from --ft-kpi-tint so each card pairs its accent with the
   matching *-soft colour the rest of the UI already uses. */
.ft-kpi__icon {
    grid-area: icon;
    justify-self: end;
    align-self: center;
    width: 45px; height: 45px;
    border-radius: 11px;
    display: grid; place-items: center;
    background: var(--ft-kpi-tint, var(--ft-grey-soft));
    color: var(--ft-kpi-accent, var(--ft-grey));
}
.ft-kpi__icon svg { width: 26px; height: 26px; display: block; }
/* Cards with no icon keep their original layout: the icon column is removed
   entirely rather than left as an empty 45px gap. Driven by the `--icon`
   modifier class so it does not depend on :has() support. */
.ft-kpi:not(.ft-kpi--icon) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "label" "value" "meta";
    padding: 13px 15px 12px;
}
.ft-kpi__value {
    grid-area: value;
    font-size: 27px;
    font-weight: 660;
    letter-spacing: -.6px;
    line-height: 1.15;
    margin-top: 3px;
    font-variant-numeric: tabular-nums;
}
.ft-kpi__meta { grid-area: meta; font-size: 11.5px; color: var(--ft-ink-soft); margin-top: 2px; }
.ft-kpi__trend { font-weight: 600; }
.ft-kpi__trend.up { color: var(--ft-green); }
.ft-kpi__trend.down { color: var(--ft-red); }

/* Layout: map + list */
.ft-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 14px;
    align-items: stretch;
}
.ft-card {
    background: var(--ft-card);
    border: 1px solid var(--ft-line);
    border-radius: var(--ft-radius);
    box-shadow: var(--ft-shadow);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.ft-card__head {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--ft-line);
    flex: 0 0 auto;
}
.ft-card__title { font-weight: 600; font-size: 13.5px; }
.ft-card__sub { font-size: 11.5px; color: var(--ft-ink-soft); }
.ft-card__actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.ft-card__body { padding: 14px; }
.ft-card__body--flush { padding: 0; }

/* Map */
.ft-mapwrap { position: relative; flex: 1 1 auto; min-height: 520px; }
/* Every map container needs absolute positioning, not just #fleetMap. Geofences
   (#fenceMap) and history (#historyMap) also live in a .ft-mapwrap, and a child
   left in normal flow collapses to zero height inside a positioned wrapper, so
   Leaflet draws into an invisible box. Deliberately not `.ft-mapwrap > div`:
   the toolbar is a sibling div that must stay in flow. */
#fleetMap, #fenceMap, #historyMap {
    position: absolute; inset: 0; background: #dfe7ee;
}
.ft-mapwrap.is-fullscreen {
    position: fixed; inset: 0; z-index: 200; background: #fff;
}

/* Map overlays */
.ft-map-toolbar {
    position: absolute; top: 12px; left: 12px; z-index: 500;
    display: flex; gap: 6px; flex-wrap: wrap;
    max-width: calc(100% - 24px);
}
.ft-maptool {
    background: #fff;
    border: 1px solid var(--ft-line);
    border-radius: 7px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 550;
    color: var(--ft-ink);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(16,30,48,.12);
    display: inline-flex; align-items: center; gap: 5px;
}
.ft-maptool:hover { background: var(--ft-surface); }
.ft-maptool.is-on { background: var(--ft-navy); color: #fff; border-color: var(--ft-navy); }

.ft-legend {
    position: absolute; bottom: 14px; left: 12px; z-index: 500;
    background: rgba(255,255,255,.96);
    border: 1px solid var(--ft-line);
    border-radius: 8px;
    padding: 9px 12px;
    box-shadow: 0 2px 10px rgba(16,30,48,.14);
    font-size: 11.5px;
    line-height: 1.9;
    backdrop-filter: blur(4px);
}
.ft-legend__row { display: flex; align-items: center; gap: 7px; }
.ft-legend__swatch { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
.ft-legend__swatch--actual    { background: var(--ft-green); }
.ft-legend__swatch--predicted { background: var(--ft-amber); }
.ft-legend__swatch--stale     { background: var(--ft-grey); }
.ft-legend__swatch--offline   { background: var(--ft-red); }

/* Status chips */
.ft-chip {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 600;
    padding: 2.5px 8px;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: .01em;
}
.ft-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ft-chip--actual, .ft-chip--moving  { background: var(--ft-green-soft); color: var(--ft-green); }
.ft-chip--predicted                 { background: var(--ft-amber-soft); color: var(--ft-amber); }
.ft-chip--stale                     { background: var(--ft-grey-soft);  color: #5c6875; }
.ft-chip--offline                   { background: var(--ft-red-soft);   color: var(--ft-red); }
.ft-chip--stationary                { background: var(--ft-blue-soft);  color: var(--ft-blue); }
.ft-chip--stopped, .ft-chip--paused { background: var(--ft-grey-soft);  color: #5c6875; }

/* Vehicle list */
.ft-filters {
    display: flex; gap: 5px; flex-wrap: wrap;
    padding: 10px 12px;
    border-bottom: 1px solid var(--ft-line);
    flex: 0 0 auto;
}
.ft-filter {
    font-size: 11.5px;
    font-weight: 550;
    padding: 4.5px 9px;
    border-radius: 7px;
    border: 1px solid var(--ft-line);
    background: #fff;
    color: var(--ft-ink-soft);
    cursor: pointer;
}
.ft-filter:hover { background: var(--ft-surface); }
.ft-filter.is-on { background: var(--ft-navy); border-color: var(--ft-navy); color: #fff; }

.ft-vlist { overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.ft-vrow {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 13px;
    border-bottom: 1px solid var(--ft-line);
    cursor: pointer;
    transition: background .12s;
}
.ft-vrow:hover { background: #f8fafc; }
.ft-vrow.is-selected { background: var(--ft-blue-soft); box-shadow: inset 3px 0 0 var(--ft-blue); }
.ft-vrow__icon {
    width: 30px; height: 30px; border-radius: 8px;
    display: grid; place-items: center;
    background: var(--ft-grey-soft);
    color: var(--ft-ink-soft);
}
.ft-vrow__icon svg { width: 17px; height: 17px; }
.ft-vrow__reg { font-weight: 600; font-size: 13px; letter-spacing: .01em; }
.ft-vrow__meta { font-size: 11.5px; color: var(--ft-ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-vrow__right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.ft-vrow__speed { font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ft-vrow__speed span { font-size: 10px; color: var(--ft-ink-soft); font-weight: 500; }

.ft-empty {
    padding: 44px 24px;
    text-align: center;
    color: var(--ft-ink-soft);
    font-size: 13px;
}
.ft-empty svg { width: 34px; height: 34px; opacity: .4; margin-bottom: 8px; }

/* Tables */
.ft-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ft-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ft-ink-soft);
    font-weight: 600;
    padding: 9px 12px;
    border-bottom: 1px solid var(--ft-line);
    background: #fbfcfd;
    white-space: nowrap;
}
.ft-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--ft-line);
    vertical-align: middle;
}
.ft-table tbody tr:hover { background: #f9fbfd; }
.ft-table tbody tr:last-child td { border-bottom: 0; }
.ft-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ft-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }

/* Map markers */
.ft-marker {
    background: transparent;
    border: 0;
}
.ft-marker__pin {
    width: 30px; height: 30px;
    border-radius: 50% 50% 50% 4px;
    display: grid; place-items: center;
    transform: rotate(-45deg);
    box-shadow: 0 2px 8px rgba(16,30,48,.35);
    border: 2px solid #fff;
    transition: background .2s;
}
.ft-marker__pin svg { transform: rotate(45deg); width: 15px; height: 15px; color: #fff; }
.ft-marker--actual    .ft-marker__pin { background: var(--ft-green); }
.ft-marker--predicted .ft-marker__pin { background: var(--ft-amber); }
.ft-marker--stale     .ft-marker__pin { background: var(--ft-grey); }
.ft-marker--offline   .ft-marker__pin { background: var(--ft-red); }
.ft-marker--predicted .ft-marker__pin {
    border-style: dashed;
    animation: ft-pulse 2.4s ease-in-out infinite;
}
@keyframes ft-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(184,115,11,.45); }
    50%      { box-shadow: 0 0 0 9px rgba(184,115,11,0); }
}
.ft-marker__badge {
    position: absolute;
    top: -7px; left: 50%;
    transform: translateX(-50%);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 1px 4px;
    border-radius: 3px;
    white-space: nowrap;
    color: #fff;
    text-transform: uppercase;
}
.ft-marker--actual    .ft-marker__badge { background: var(--ft-green); }
.ft-marker--predicted .ft-marker__badge { background: var(--ft-amber); }
.ft-marker--stale     .ft-marker__badge { background: var(--ft-grey); }
.ft-marker--offline   .ft-marker__badge { background: var(--ft-red); }

/* Simulated input. Deliberately loud: a demo marker must never be mistaken
   for a tracked vehicle, so it gets an outline and a hatched badge. */
.ft-marker--demo .ft-marker__pin {
    outline: 2px dashed #6d28d9;
    outline-offset: 2px;
}
.ft-marker--demo .ft-marker__badge {
    background: #6d28d9;
    letter-spacing: .06em;
}
.ft-popup__note--demo {
    background: #f3e8ff;
    color: #4c1d95;
    border-left-color: #6d28d9;
    font-weight: 600;
}

/* Popup */
.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: var(--ft-shadow-lg);
    padding: 0;
    overflow: hidden;
}
.leaflet-popup-content { margin: 0; width: 300px !important; }
.ft-popup { font-size: 12.5px; }
.ft-popup__head {
    padding: 11px 14px 10px;
    background: var(--ft-navy);
    color: #fff;
    display: flex; align-items: center; gap: 9px;
}
.ft-popup__reg { font-weight: 650; font-size: 14px; letter-spacing: .02em; }
.ft-popup__type { font-size: 11px; color: #9fb2c8; }
.ft-popup__body { padding: 11px 14px 12px; }
.ft-popup__row {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 3.5px 0;
    border-bottom: 1px dashed #eef1f5;
}
.ft-popup__row:last-child { border-bottom: 0; }
.ft-popup__k { color: var(--ft-ink-soft); flex: 0 0 auto; }
.ft-popup__v { text-align: right; font-weight: 550; }
.ft-popup__section {
    font-size: 10px; text-transform: uppercase; letter-spacing: .07em;
    color: var(--ft-ink-soft); font-weight: 650;
    margin: 9px 0 2px;
}
.ft-popup__note {
    margin-top: 9px;
    padding: 7px 9px;
    border-radius: 6px;
    font-size: 11.5px;
    background: var(--ft-amber-soft);
    color: #7d4f06;
    border-left: 3px solid var(--ft-amber);
}
.ft-popup__note--stale { background: var(--ft-grey-soft); color: #4e5a66; border-left-color: var(--ft-grey); }
.ft-popup__actions { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 14px 13px; }
.ft-popup__btn {
    font-size: 11.5px; font-weight: 550;
    padding: 4.5px 9px;
    border-radius: 6px;
    border: 1px solid var(--ft-line);
    background: #fff;
    color: var(--ft-ink);
    cursor: pointer;
}
.ft-popup__btn:hover { background: var(--ft-surface); text-decoration: none; }

/* Toasts */
.ft-toasts {
    position: fixed; right: 18px; bottom: 18px; z-index: 300;
    display: flex; flex-direction: column; gap: 8px;
    max-width: 340px;
}
.ft-toast {
    background: var(--ft-navy);
    color: #fff;
    border-radius: 9px;
    padding: 11px 14px;
    font-size: 12.5px;
    box-shadow: var(--ft-shadow-lg);
    animation: ft-toast-in .2s ease;
}
.ft-toast--error { background: var(--ft-red); }
.ft-toast--ok    { background: var(--ft-green); }
@keyframes ft-toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Live indicator */
.ft-live {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11.5px; font-weight: 600; color: var(--ft-green);
}
.ft-live__dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: currentColor;
    animation: ft-blink 1.8s ease-in-out infinite;
}
.ft-live.is-paused { color: var(--ft-grey); }
.ft-live.is-paused .ft-live__dot { animation: none; }
@keyframes ft-blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* Buttons */
.ft-btn {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 550;
    padding: 7px 13px;
    border-radius: 8px;
    border: 1px solid var(--ft-line);
    background: #fff;
    color: var(--ft-ink);
    cursor: pointer;
    text-decoration: none;
}
.ft-btn:hover { background: var(--ft-surface); text-decoration: none; }
.ft-btn--primary { background: var(--ft-navy); border-color: var(--ft-navy); color: #fff; }
.ft-btn--primary:hover { background: var(--ft-navy-3); }
.ft-btn--sm { padding: 5px 10px; font-size: 12px; }
.ft-btn svg { width: 15px; height: 15px; }

/* Progress / meters */
.ft-meter { height: 5px; border-radius: 999px; background: var(--ft-grey-soft); overflow: hidden; }
.ft-meter__fill { height: 100%; border-radius: 999px; background: var(--ft-green); }
.ft-meter__fill--amber { background: var(--ft-amber); }
.ft-meter__fill--red   { background: var(--ft-red); }

/* ---------------------------------------------------------------- */
/* Responsive                                                        */
/* ---------------------------------------------------------------- */

@media (max-width: 1180px) {
    .ft-split { grid-template-columns: minmax(0, 1fr) 330px; }
    .ft-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .ft-sidebar { transform: translateX(-100%); box-shadow: var(--ft-shadow-lg); }
    .ft-sidebar.is-open { transform: translateX(0); }
    .ft-topbar { left: 0; }
    .ft-main { margin-left: 0; padding-left: 14px; padding-right: 14px; }
    .ft-split { grid-template-columns: minmax(0, 1fr); }
    .ft-mapwrap { min-height: 380px; }
    .ft-search { display: none; }
    .ft-topbar__clock { display: none; }
    .ft-user__meta { display: none; }
}

@media (max-width: 560px) {
    .ft-kpis { grid-template-columns: minmax(0, 1fr); }
    .ft-page-head__actions { width: 100%; }
}

/* Mobile sidebar toggle */
.ft-menubtn { display: none; }
@media (max-width: 900px) { .ft-menubtn { display: grid; } }

/* Utility */
.ft-hidden { display: none !important; }
.ft-muted { color: var(--ft-ink-soft); }
.ft-nowrap { white-space: nowrap; }
.ft-tnum { font-variant-numeric: tabular-nums; }
