:root {
  --tm-ink: #102236;
  --tm-muted: #64748b;
  --tm-border: #e3eaf2;
  --tm-surface: #ffffff;
  --tm-soft: #f5f8fc;
  --tm-brand: #dc2626;
  --tm-brand-dark: #991b1b;
  --tm-blue: #2563eb;
  --tm-shadow: 0 14px 38px rgba(15, 35, 58, .08);
  --tm-radius: 18px;
}

#tm-enhancement-root[hidden] { display: none !important; }

#tm-enhancement-root {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f3f6fa;
  -webkit-overflow-scrolling: touch;
}

.tm-transition-shell {
  display: grid;
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(360px, calc(100vw - 32px));
  gap: 7px;
  padding: 26px;
  border: 1px solid #e3eaf2;
  border-radius: 18px;
  background: #fff;
  color: #102236;
  font-family: "DM Sans", "Poppins", sans-serif;
  text-align: center;
  transform: translate(-50%,-50%);
  box-shadow: 0 18px 48px rgba(15,35,58,.11);
}

.tm-transition-shell i {
  width: 27px;
  height: 27px;
  margin: 0 auto 4px;
  border: 3px solid #fecaca;
  border-top-color: #dc2626;
  border-radius: 50%;
  animation: tmSpin .7s linear infinite;
}

.tm-transition-shell strong { color: #dc2626; font-size: 1rem; }
.tm-transition-shell span { color: #64748b; font-size: .76rem; font-weight: 600; }

html.tm-product-scroll {
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

html.tm-product-scroll body.tm-product-v2 #root,
html.tm-product-scroll body.tm-product-v2 .layout-wrapper,
html.tm-product-scroll body.tm-product-v2 .layout-main-container,
html.tm-product-scroll body.tm-product-v2 .layout-main {
  min-height: 100%;
  height: auto !important;
  max-height: none;
  overflow: visible;
}

html.tm-product-scroll body.tm-product-v2 {
  min-height: 100svh;
  overflow-x: hidden;
}

html.tm-product-scroll:has(body.body-overflow-hidden),
html.tm-product-scroll.tm-drawer-open {
  overflow-y: hidden;
}

html.tm-product-scroll body.tm-product-v2 .layout-wrapper,
html.tm-product-scroll body.tm-product-v2 .layout-main-container {
  min-height: 100svh;
}

body.tm-product-v2 {
  background: #f3f6fa;
  color: var(--tm-ink);
}

.tm-product-v2 .layout-main {
  background:
    radial-gradient(circle at 5% 0, rgba(220, 38, 38, .05), transparent 25rem),
    #f3f6fa;
}

.tm-dashboard,
.tm-workspace {
  box-sizing: border-box;
  width: min(100%, 1720px);
  margin: 0 auto;
  padding: 28px 28px 40px;
  font-family: "DM Sans", "Poppins", sans-serif;
  color: var(--tm-ink);
}

.tm-dashboard *,
.tm-workspace *,
.tm-drawer * { box-sizing: border-box; }

.tm-hero,
.tm-workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding: 6px 2px;
}

.tm-hero h1,
.tm-workspace-head h1 {
  margin: 5px 0 4px;
  color: #0f2135;
  font-size: clamp(1.75rem, 2.8vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.1;
}

.tm-hero p,
.tm-workspace-head p {
  max-width: 760px;
  margin: 0;
  color: var(--tm-muted);
  font-size: .98rem;
}

.tm-eyebrow {
  color: var(--tm-brand);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .14em;
}

.tm-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}

.tm-live-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, .13);
  animation: tmPulse 1.8s infinite;
}

@keyframes tmPulse { 50% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } }

.tm-kpi-grid {
  display: grid;
  gap: 13px;
  margin-bottom: 18px;
}

.tm-kpi-grid--8 { grid-template-columns: repeat(8, minmax(128px, 1fr)); }
.tm-kpi-grid--6 { grid-template-columns: repeat(6, minmax(150px, 1fr)); }

.tm-kpi {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 112px;
  align-items: flex-start;
  gap: 12px;
  overflow: hidden;
  padding: 18px 15px;
  border: 1px solid var(--tm-border);
  border-radius: 16px;
  background: var(--tm-surface);
  box-shadow: 0 5px 20px rgba(15, 35, 58, .045);
  color: inherit;
  text-align: left;
}
.tm-kpi--action { width: 100%; font: inherit; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.tm-kpi--action:hover,.tm-kpi--action:focus-visible { border-color: color-mix(in srgb, var(--tone) 35%, #e3eaf2); box-shadow: 0 12px 27px rgba(15,35,58,.1); transform: translateY(-2px); outline: 0; }
.tm-kpi--action em { position: absolute; right: 11px; bottom: 8px; z-index: 1; color: var(--tone); font-size: .6rem; font-style: normal; font-weight: 800; opacity: 0; transition: opacity .16s ease; }
.tm-kpi--action:hover em,.tm-kpi--action:focus-visible em { opacity: 1; }

.tm-kpi::after {
  position: absolute;
  right: -20px;
  bottom: -28px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--tone);
  content: "";
  opacity: .055;
}

.tm-kpi-icon {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--tone) 11%, white);
  color: var(--tone);
  font-size: 1.05rem;
  font-weight: 900;
}

.tm-kpi > div:not(.tm-kpi-icon) { min-width: 0; }
.tm-kpi span { display: block; color: var(--tm-muted); font-size: .72rem; font-weight: 700; line-height: 1.15; }
.tm-kpi strong { display: block; overflow: hidden; margin: 6px 0 3px; color: var(--tm-ink); font-size: clamp(1.28rem, 1.6vw, 1.75rem); line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.tm-kpi small { display: block; color: #94a3b8; font-size: .67rem; line-height: 1.2; }

.tm-dashboard-grid,
.tm-analytics-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.tm-panel {
  grid-column: span 4;
  min-width: 0;
  padding: 21px;
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius);
  background: var(--tm-surface);
  box-shadow: var(--tm-shadow);
}

.tm-analytics-grid .tm-panel { grid-column: span 6; }
.tm-panel--wide { grid-column: span 8; }
.tm-analytics-grid .tm-panel--wide { grid-column: 1 / -1; }

.tm-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.tm-panel-head h2,
.tm-detail-section h2 {
  margin: 3px 0 0;
  color: #12263a;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -.025em;
}

.tm-panel-head button,
.tm-primary-small {
  border: 0;
  background: transparent;
  color: var(--tm-blue);
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
}

.tm-donut-wrap { display: flex; align-items: center; justify-content: center; gap: 26px; min-height: 190px; }
.tm-donut {
  position: relative;
  display: grid;
  flex: 0 0 152px;
  width: 152px;
  height: 152px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(
    #22c55e 0 calc(var(--moving, 25) * 1%),
    #2563eb calc(var(--moving, 25) * 1%) calc(var(--parked, 50) * 1%),
    #f59e0b calc(var(--parked, 50) * 1%) calc(var(--idle, 65) * 1%),
    #cbd5e1 calc(var(--idle, 65) * 1%) 100%
  );
  border: 0;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}
.tm-donut::before { position: absolute; width: 102px; height: 102px; border-radius: 50%; background: #fff; content: ""; }
.tm-donut strong,.tm-donut span { position: relative; z-index: 1; }
.tm-donut strong { font-size: 2rem; line-height: 1; }
.tm-donut span { position: absolute; top: 91px; color: var(--tm-muted); font-size: .7rem; font-weight: 700; }
.tm-legend { display: grid; gap: 10px; min-width: 110px; }
.tm-legend div { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 8px; color: var(--tm-muted); font-size: .75rem; }
.tm-legend i { width: 8px; height: 8px; border-radius: 50%; }
.tm-legend b { color: var(--tm-ink); }
.tm-status-layout { display: flex; min-height: 190px; align-items: center; justify-content: center; gap: 27px; }
.tm-status-legend { display: grid; gap: 11px; min-width: 112px; }
.tm-status-legend span,.tm-status-legend button { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 8px; color: var(--tm-muted); font-size: .74rem; }
.tm-status-legend button { width: 100%; padding: 5px 6px; border: 0; border-radius: 7px; background: transparent; font-family: inherit; text-align: left; cursor: pointer; }
.tm-status-legend button:hover,.tm-status-legend button.active { background: #f1f5f9; }
.tm-status-legend i { width: 8px; height: 8px; border-radius: 50%; }
.tm-status-legend i.moving { background: #22c55e; }
.tm-status-legend i.parked { background: #2563eb; }
.tm-status-legend i.idle { background: #f59e0b; }
.tm-status-legend i.offline { background: #cbd5e1; }
.tm-status-legend b { color: var(--tm-ink); }
.tm-panel-metric,.tm-count-danger { padding: 6px 9px; border-radius: 8px; background: #eff6ff; color: #1d4ed8; font-size: .7rem; font-weight: 900; white-space: nowrap; }
.tm-count-danger { background: #fef2f2; color: #dc2626; }
.tm-text-button { border: 0; background: transparent; color: #2563eb; font-size: .7rem; font-weight: 800; cursor: pointer; }
.tm-compact-list { display: grid; gap: 4px; }
.tm-compact-list button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 5px; border: 0; border-bottom: 1px solid #edf2f7; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.tm-compact-list button:last-child { border-bottom: 0; }
.tm-compact-list b,.tm-compact-list small { display: block; }
.tm-compact-list b { color: var(--tm-ink); font-size: .74rem; }
.tm-compact-list small { margin-top: 2px; color: var(--tm-muted); font-size: .63rem; }
.tm-compact-list em { color: #dc2626; font-size: .65rem; font-style: normal; font-weight: 800; }
.tm-empty--good { color: #15803d; }

.tm-chart-svg { display: block; width: 100%; height: 180px; overflow: visible; }
.tm-chart-labels { display: flex; justify-content: space-between; gap: 4px; margin: -3px 12px 0; color: #94a3b8; font-size: .64rem; }

.tm-bars { display: grid; gap: 13px; }
.tm-bar-row { display: grid; grid-template-columns: minmax(70px, 1.2fr) 2fr 58px; align-items: center; gap: 10px; font-size: .72rem; }
.tm-bar-row > span { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.tm-bar-row > div { height: 8px; overflow: hidden; border-radius: 99px; background: #edf2f7; }
.tm-bar-row i { display: block; height: 100%; border-radius: 99px; }
.tm-bar-row strong { color: var(--tm-muted); font-size: .69rem; text-align: right; }
.tm-bar-row--action { width: 100%; padding: 4px 0; border: 0; border-radius: 7px; background: transparent; color: inherit; font-family: inherit; text-align: left; cursor: pointer; }
.tm-bar-row--action:hover { background: #f8fafc; }

.tm-overview-map-row { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(270px, 1fr); gap: 18px; margin-bottom: 18px; }
.tm-overview-map-row--dedicated { grid-template-columns: 1fr; }
.tm-fleet-map-panel,.tm-attention-panel { min-width: 0; overflow: hidden; border: 1px solid var(--tm-border); border-radius: 20px; background: #fff; box-shadow: var(--tm-shadow); }
.tm-fleet-map-panel { padding: 16px; }
.tm-attention-panel { padding: 20px; }
.tm-map-toolbar { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.tm-map-toolbar h2 { margin: 3px 0 0; color: var(--tm-ink); font-size: 1.05rem; letter-spacing: -.025em; }
.tm-map-actions { display: flex; align-items: center; gap: 7px; }
.tm-map-search { position: relative; }
.tm-map-search > span { position: absolute; top: 8px; left: 11px; z-index: 1; color: #94a3b8; font-size: 1rem; }
.tm-map-search input { width: 190px; height: 36px; padding: 0 10px 0 32px; border: 1px solid #d8e2ec; border-radius: 10px; background: #fff; outline: 0; }
.tm-map-search input:focus { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.tm-map-actions > button { height: 36px; padding: 0 11px; border: 1px solid #d8e2ec; border-radius: 10px; background: #fff; color: #334155; font-size: .7rem; font-weight: 800; cursor: pointer; }
.tm-map-actions > button:hover { border-color: #fca5a5; color: var(--tm-brand); }
.tm-map-chipbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.tm-map-chipbar > div { display: flex; gap: 5px; padding: 4px; border-radius: 11px; background: #f1f5f9; }
.tm-map-chipbar button { min-width: 58px; height: 31px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #64748b; font-size: .68rem; font-weight: 800; cursor: pointer; }
.tm-map-chipbar button.active { background: #fff; color: var(--tm-brand); box-shadow: 0 2px 8px rgba(15,23,42,.09); }
.tm-map-view-toggle { display: none !important; }
.tm-map-stage { position: relative; height: clamp(400px, 51vh, 610px); overflow: hidden; border-radius: 14px; background: #e9eef4; }
.tm-dashboard--dedicated .tm-map-stage { height: calc(100vh - 235px); height: calc(100dvh - 235px); min-height: 520px; }
.tm-live-map-canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }
.tm-map-message { position: absolute; top: 50%; left: 50%; z-index: 2; padding: 10px 13px; border-radius: 10px; background: rgba(255,255,255,.94); color: #64748b; font-size: .72rem; font-weight: 700; transform: translate(-50%,-50%); box-shadow: 0 8px 24px rgba(15,35,58,.11); }
.tm-map-list { display: none; height: 100%; overflow: auto; padding: 7px; background: #f5f8fb; }
.tm-map-list-card { display: grid; width: 100%; grid-template-columns: 10px minmax(0,1fr) auto; align-items: center; gap: 10px; margin-bottom: 6px; padding: 12px; border: 1px solid var(--tm-border); border-radius: 11px; background: #fff; color: inherit; font-family: inherit; text-align: left; cursor: pointer; }
.tm-map-list-card b,.tm-map-list-card small { display: block; }
.tm-map-list-card b { font-size: .75rem; }
.tm-map-list-card small { margin-top: 3px; color: var(--tm-muted); font-size: .64rem; }
.tm-map-list-card > span:last-child { text-align: right; }
.tm-map-list-card > span:last-child strong { display: block; font-size: .68rem; }
.tm-map-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #64748b; }
.tm-map-dot--moving { background: #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.12); }
.tm-map-dot--parked { background: #2563eb; box-shadow: 0 0 0 4px rgba(37,99,235,.1); }
.tm-map-dot--idle { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,.12); }
.tm-map-dot--offline { background: #64748b; }
.tm-map-popup { min-width: 250px; padding: 5px 3px 2px; font-family: "DM Sans",sans-serif; }
.tm-map-popup > div:first-child { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 8px; }
.tm-map-popup strong { color: var(--tm-ink); font-size: .86rem; }
.tm-map-popup em { color: var(--tm-muted); font-size: .64rem; font-style: normal; font-weight: 800; text-transform: capitalize; }
.tm-map-popup dl { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin: 12px 0; }
.tm-map-popup dl div { padding: 7px; border-radius: 8px; background: #f4f7fa; }
.tm-map-popup dt { color: #94a3b8; font-size: .57rem; font-weight: 800; text-transform: uppercase; }
.tm-map-popup dd { margin: 3px 0 0; color: var(--tm-ink); font-size: .68rem; font-weight: 800; }
.tm-map-popup p { margin: 0 0 11px; color: var(--tm-muted); font-size: .67rem; line-height: 1.35; }
.tm-map-popup nav { display: flex; gap: 5px; }
.tm-map-popup nav button { flex: 1; min-height: 31px; padding: 0 7px; border: 1px solid #dce4ec; border-radius: 8px; background: #fff; color: #334155; font-size: .61rem; font-weight: 800; cursor: pointer; }
.tm-map-popup nav button:first-child { border-color: var(--tm-brand); background: var(--tm-brand); color: #fff; }
.tm-attention-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin: 0 0 17px; }
.tm-attention-summary button { position: relative; display: grid; place-items: center; padding: 12px 4px 10px; border: 1px solid var(--tm-border); border-radius: 11px; background: #f8fafc; color: inherit; cursor: pointer; }
.tm-attention-summary i { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; }
.tm-attention-summary i.moving { background: #16a34a; }
.tm-attention-summary i.parked { background: #2563eb; }
.tm-attention-summary i.offline { background: #64748b; }
.tm-attention-summary strong { font-size: 1.35rem; }
.tm-attention-summary span { margin-top: 3px; color: var(--tm-muted); font-size: .62rem; font-weight: 800; }
.tm-attention-link { width: 100%; min-height: 40px; margin-top: 14px; border: 0; border-radius: 10px; background: #fef2f2; color: var(--tm-brand); font-size: .7rem; font-weight: 900; cursor: pointer; }

.tm-activity-list,
.tm-journey-list { display: grid; gap: 9px; }
.tm-activity-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f7;
}
.tm-activity-row:last-child { border-bottom: 0; }
.tm-activity-icon,.tm-vehicle-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; background: #f1f5f9; color: #334155; font-size: .7rem; font-weight: 900; }
.tm-activity-row b,.tm-activity-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-activity-row b { color: var(--tm-ink); font-size: .78rem; }
.tm-activity-row small { margin-top: 3px; color: var(--tm-muted); font-size: .67rem; }
.tm-activity-row > small { text-align: right; }

.tm-status { display: inline-flex; align-items: center; gap: 6px; color: #475569; font-size: .68rem; font-weight: 800; text-transform: capitalize; }
.tm-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tm-status--moving { color: #15803d; }
.tm-status--parked { color: #2563eb; }
.tm-status--idle { color: #d97706; }
.tm-status--offline { color: #64748b; }

.tm-map-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0 12px;
  padding: 20px 22px;
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius);
  background: #fff;
  box-shadow: var(--tm-shadow);
}
.tm-map-heading h2 { margin: 3px 0 0; font-size: 1.15rem; }
.tm-map-tools { display: flex; align-items: center; gap: 10px; }
.tm-search { position: relative; }
.tm-search input { width: 240px; height: 40px; padding: 0 13px 0 36px; border: 1px solid #d9e2ec; border-radius: 11px; outline: 0; }
.tm-search::before { position: absolute; top: 10px; left: 13px; color: #94a3b8; content: "⌕"; font-size: 1.1rem; }
.tm-search input:focus { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.tm-status-filters { display: flex; gap: 5px; padding: 4px; border-radius: 11px; background: #f1f5f9; }
.tm-status-filters button,.tm-range-buttons button { min-height: 32px; border: 0; border-radius: 8px; background: transparent; color: #64748b; font-size: .72rem; font-weight: 800; cursor: pointer; }
.tm-status-filters button.active,.tm-range-buttons button.active { background: #fff; color: var(--tm-brand); box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.tm-map-filters { display: flex; align-items: center; gap: 5px; padding: 4px; border-radius: 11px; background: #f1f5f9; }
.tm-map-filters input { width: 190px; height: 32px; padding: 0 10px; border: 1px solid #d9e2ec; border-radius: 8px; background: #fff; outline: 0; }
.tm-map-filters input:focus { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.tm-map-filters button { min-height: 32px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: #64748b; font-size: .68rem; font-weight: 800; cursor: pointer; }
.tm-map-filters button.active { background: #fff; color: var(--tm-brand); box-shadow: 0 2px 8px rgba(15,23,42,.08); }

.tm-live-vehicle-list { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; margin-bottom: 14px; }
.tm-live-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.tm-vehicle-card,.tm-live-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--tm-border);
  border-radius: 13px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.tm-vehicle-card:hover,.tm-live-card:hover { border-color: #fca5a5; box-shadow: 0 7px 20px rgba(15,35,58,.08); transform: translateY(-1px); }
.tm-vehicle-card b,.tm-vehicle-card small,.tm-live-card b,.tm-live-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-vehicle-card b,.tm-live-card b { font-size: .76rem; }
.tm-vehicle-card small,.tm-live-card small { margin-top: 3px; color: var(--tm-muted); font-size: .64rem; }
.tm-vehicle-card > strong,.tm-live-card > strong { grid-column: 3; color: var(--tm-ink); font-size: .68rem; }

.tm-filterbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--tm-border);
  border-radius: 15px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 9px 28px rgba(15,35,58,.07);
  backdrop-filter: blur(12px);
}
.tm-range-buttons { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: #f1f5f9; }
.tm-range-buttons button { padding: 0 13px; }
.tm-filterbar label { display: grid; gap: 4px; min-width: 175px; color: var(--tm-muted); font-size: .65rem; font-weight: 800; }
.tm-filterbar select,.tm-filterbar input[type="date"] { height: 38px; padding: 0 11px; border: 1px solid #d9e2ec; border-radius: 9px; background: #fff; color: var(--tm-ink); outline: 0; }
.tm-filterbar select { padding-right: 32px; }

.tm-mobile-table { max-width: 100%; overflow: auto; border: 1px solid #e8edf3; border-radius: 12px; }
.tm-mobile-table table { width: 100%; border-collapse: collapse; font-size: .75rem; }
.tm-mobile-table th { padding: 11px 12px; background: #f6f8fb; color: #64748b; font-size: .65rem; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.tm-mobile-table td { padding: 12px; border-top: 1px solid #edf2f7; color: #475569; }
.tm-mobile-table tr:hover td { background: #fafcff; }

.tm-report-layout { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 18px; }
.tm-report-library { display: grid; align-content: start; gap: 8px; }
.tm-report-card {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) 18px;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--tm-border);
  border-radius: 13px;
  background: #fff;
  color: var(--tm-ink);
  text-align: left;
  cursor: pointer;
}
.tm-report-card > span { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 11px; background: #fef2f2; color: var(--tm-brand); font-weight: 900; }
.tm-report-card b,.tm-report-card small { display: block; }
.tm-report-card b { font-size: .8rem; }
.tm-report-card small { margin-top: 3px; color: var(--tm-muted); font-size: .65rem; line-height: 1.25; }
.tm-report-card > i { color: #94a3b8; font-style: normal; }
.tm-report-card:hover,.tm-report-card.active { border-color: #fca5a5; box-shadow: 0 8px 20px rgba(220,38,38,.08); }
.tm-report-card.active { background: linear-gradient(135deg,#fff,#fff7f7); }

.tm-report-runner { min-height: 570px; padding: 22px; border: 1px solid var(--tm-border); border-radius: var(--tm-radius); background: #fff; box-shadow: var(--tm-shadow); }
.tm-report-placeholder { display: grid; min-height: 500px; place-items: center; align-content: center; color: var(--tm-muted); text-align: center; }
.tm-report-placeholder > span { display: grid; width: 64px; height: 64px; place-items: center; border-radius: 18px; background: #fef2f2; color: var(--tm-brand); font-size: 1.8rem; }
.tm-report-placeholder h2 { margin: 14px 0 3px; color: var(--tm-ink); }
.tm-report-placeholder p { margin: 0; }
.tm-runner-head,.tm-preview-toolbar,.tm-runner-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tm-runner-head h2 { margin: 3px 0 0; }
.tm-primary { min-height: 42px; padding: 0 19px; border: 0; border-radius: 10px; background: linear-gradient(135deg,#e53935,#b91c1c); color: #fff; font-weight: 800; cursor: pointer; box-shadow: 0 8px 18px rgba(220,38,38,.2); }
.tm-runner-meta { justify-content: flex-start; margin: 15px 0; padding: 10px; border-radius: 10px; background: #f8fafc; }
.tm-runner-meta span { color: #64748b; font-size: .7rem; font-weight: 700; }
.tm-preview-toolbar { margin-bottom: 10px; }
.tm-preview-toolbar button { margin-left: 6px; padding: 8px 11px; border: 1px solid #d8e1ea; border-radius: 8px; background: #fff; color: #334155; font-size: .7rem; font-weight: 800; cursor: pointer; }

.tm-empty { padding: 28px 12px; color: #94a3b8; font-size: .78rem; text-align: center; }
.tm-product-loading { display: flex; align-items: center; gap: 11px; margin: 18px 28px; padding: 15px 18px; border: 1px solid #dbeafe; border-radius: 13px; background: #eff6ff; color: #1e40af; font-size: .8rem; font-weight: 800; }
.tm-product-loading i { width: 17px; height: 17px; border: 2px solid #93c5fd; border-top-color: #2563eb; border-radius: 50%; animation: tmSpin .8s linear infinite; }
.tm-product-loading--inline { margin: 20px 0; }
@keyframes tmSpin { to { transform: rotate(360deg); } }
.tm-native-hidden { display: none !important; }

.tm-drawer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  justify-content: flex-end;
  background: rgba(8,20,33,.48);
  backdrop-filter: blur(3px);
}
.tm-drawer > aside { width: min(610px, 94vw); height: 100%; overflow: auto; padding: 25px; background: #f4f7fa; box-shadow: -22px 0 60px rgba(0,0,0,.18); animation: tmSlide .22s ease-out; }
@keyframes tmSlide { from { transform: translateX(35px); opacity: .7; } }
.tm-drawer header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.tm-drawer header h1 { margin: 3px 0 8px; font-size: 1.8rem; letter-spacing: -.04em; }
.tm-drawer [data-close] { width: 38px; height: 38px; border: 0; border-radius: 10px; background: #fff; color: #64748b; font-size: 1.6rem; cursor: pointer; }
.tm-current-map { position: relative; display: grid; min-height: 210px; place-items: center; overflow: hidden; margin-bottom: 14px; border: 1px solid #dce5ee; border-radius: 16px; background: #e6eef5; }
.tm-map-grid { position: absolute; inset: 0; opacity: .55; background-image: linear-gradient(#c9d8e5 1px,transparent 1px),linear-gradient(90deg,#c9d8e5 1px,transparent 1px); background-size: 24px 24px; transform: rotate(-8deg) scale(1.2); }
.tm-current-map a,.tm-current-map > span { position: relative; z-index: 1; max-width: 80%; padding: 11px 14px; border-radius: 12px; background: rgba(255,255,255,.94); color: var(--tm-ink); font-size: .75rem; font-weight: 700; text-align: center; text-decoration: none; box-shadow: 0 8px 24px rgba(15,35,58,.12); }
.tm-current-map a i { display: block; width: 18px; height: 18px; margin: 0 auto 5px; border: 5px solid var(--tm-brand); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.tm-detail-kpis { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.tm-detail-kpis .tm-kpi { min-height: 105px; }
.tm-detail-section { margin-top: 14px; padding: 19px; border: 1px solid var(--tm-border); border-radius: 15px; background: #fff; }
.tm-detail-section dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 14px 0 0; }
.tm-detail-section dl div { min-width: 0; padding: 10px; border-radius: 10px; background: #f8fafc; }
.tm-detail-section dt { color: #94a3b8; font-size: .65rem; font-weight: 800; }
.tm-detail-section dd { overflow: hidden; margin: 4px 0 0; color: var(--tm-ink); font-size: .74rem; font-weight: 800; text-overflow: ellipsis; }
.tm-journey-list > div { padding: 10px 0; border-bottom: 1px solid #edf2f7; }
.tm-journey-list > div:last-child { border-bottom: 0; }
.tm-journey-list span { display: flex; align-items: center; gap: 8px; font-size: .75rem; }
.tm-journey-list span i { color: var(--tm-brand); font-style: normal; }
.tm-journey-list small { display: block; margin-top: 5px; color: var(--tm-muted); font-size: .66rem; }
.tm-drawer footer { position: sticky; bottom: -25px; display: flex; gap: 8px; margin: 15px -25px -25px; padding: 14px 25px; border-top: 1px solid var(--tm-border); background: rgba(255,255,255,.96); }
.tm-drawer footer button { flex: 1; min-height: 42px; border: 1px solid #d8e1ea; border-radius: 10px; background: #fff; color: #334155; font-weight: 800; cursor: pointer; }
.tm-drawer footer button:last-child { border-color: var(--tm-brand); background: var(--tm-brand); color: #fff; }

@media (max-width: 1350px) {
  .tm-kpi-grid--8 { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
  .tm-kpi-grid--6 { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .tm-live-vehicle-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .tm-live-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .tm-dashboard,.tm-workspace { padding: 20px 18px 34px; }
  .tm-panel,.tm-panel--wide,.tm-analytics-grid .tm-panel { grid-column: span 12; }
  .tm-live-vehicle-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tm-report-layout { grid-template-columns: 1fr; }
  .tm-report-library { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tm-report-runner { min-height: 430px; }
  .tm-report-placeholder { min-height: 360px; }
  .tm-overview-map-row { grid-template-columns: 1fr; }
  .tm-attention-panel { display: grid; grid-template-columns: minmax(200px,.75fr) minmax(260px,1.25fr); gap: 14px; }
  .tm-attention-panel .tm-panel-head,.tm-attention-panel .tm-attention-link { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .tm-hero,.tm-workspace-head,.tm-map-heading { align-items: flex-start; flex-direction: column; }
  .tm-live-badge { align-self: flex-start; }
  .tm-kpi-grid--8,.tm-kpi-grid--6 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tm-kpi { min-height: 101px; padding: 14px 12px; }
  .tm-map-tools { width: 100%; align-items: stretch; flex-direction: column; }
  .tm-map-filters { width: 100%; flex-wrap: wrap; }
  .tm-map-filters input { width: 100%; flex-basis: 100%; }
  .tm-search input { width: 100%; }
  .tm-filterbar { position: static; align-items: stretch; flex-direction: column; }
  .tm-range-buttons { display: grid; grid-template-columns: repeat(5,1fr); }
  .tm-filterbar label { width: 100%; }
  .tm-live-vehicle-list { grid-template-columns: 1fr; }
  .tm-report-library { grid-template-columns: 1fr; }
  .tm-donut-wrap { justify-content: flex-start; }
  .tm-status-layout { justify-content: flex-start; }
  .tm-attention-panel { display: block; }
  .tm-map-toolbar { align-items: flex-start; flex-direction: column; }
  .tm-map-actions { width: 100%; }
  .tm-map-search { flex: 1; }
  .tm-map-search input { width: 100%; }
  .tm-map-stage { height: 48vh; min-height: 360px; max-height: 520px; }
  .tm-dashboard--dedicated .tm-map-stage { height: calc(100vh - 300px); height: calc(100dvh - 300px); min-height: 430px; }
  .tm-map-view-toggle { display: flex !important; }
  .tm-map-stage.show-list .tm-live-map-canvas { visibility: hidden; }
  .tm-map-stage.show-list .tm-map-list { display: block; }
}

@media (max-width: 520px) {
  .tm-dashboard,.tm-workspace { padding: 15px 11px 28px; }
  .tm-hero,.tm-workspace-head { margin-bottom: 15px; }
  .tm-hero h1,.tm-workspace-head h1 { font-size: 1.65rem; }
  .tm-kpi-grid { gap: 8px; }
  .tm-kpi { min-height: 96px; gap: 8px; padding: 13px 10px; border-radius: 13px; }
  .tm-kpi-icon { flex-basis: 31px; width: 31px; height: 31px; border-radius: 9px; }
  .tm-kpi strong { font-size: 1.23rem; }
  .tm-kpi span { font-size: .66rem; }
  .tm-panel { padding: 16px 13px; border-radius: 14px; }
  .tm-donut-wrap { flex-direction: column; }
  .tm-status-layout { flex-direction: column; }
  .tm-status-filters { display: grid; grid-template-columns: repeat(4,1fr); width: 100%; }
  .tm-range-buttons button { padding: 0 4px; font-size: .65rem; }
  .tm-filterbar { padding: 9px; }
  .tm-mobile-table { overflow: visible; border: 0; }
  .tm-mobile-table thead { display: none; }
  .tm-mobile-table table,.tm-mobile-table tbody,.tm-mobile-table tr,.tm-mobile-table td { display: block; width: 100%; }
  .tm-mobile-table tr { margin-bottom: 9px; padding: 9px 11px; border: 1px solid var(--tm-border); border-radius: 11px; background: #fff; }
  .tm-mobile-table td { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border: 0; text-align: right; }
  .tm-mobile-table td::before { color: #94a3b8; content: attr(data-label); font-size: .64rem; font-weight: 800; text-align: left; text-transform: uppercase; }
  .tm-report-runner { min-height: 360px; padding: 15px 12px; }
  .tm-runner-head,.tm-preview-toolbar { align-items: stretch; flex-direction: column; }
  .tm-preview-toolbar > div { display: grid; grid-template-columns: 1fr 1fr; }
  .tm-preview-toolbar button { margin: 0; }
  .tm-drawer > aside { width: 100%; padding: 18px 12px; }
  .tm-drawer header h1 { font-size: 1.5rem; }
  .tm-detail-section dl { grid-template-columns: 1fr; }
  .tm-drawer footer { bottom: -18px; margin: 15px -12px -18px; padding: 12px; }
  .tm-fleet-map-panel { padding: 10px; border-radius: 15px; }
  .tm-attention-panel { padding: 15px 13px; border-radius: 15px; }
  .tm-map-actions > button span { display: none; }
  .tm-map-actions > button { width: 38px; padding: 0; }
  .tm-map-chipbar { align-items: stretch; flex-direction: column; }
  .tm-map-chipbar > div { display: grid; grid-template-columns: repeat(4,1fr); }
  .tm-map-chipbar button { min-width: 0; padding: 0 3px; }
  .tm-map-chipbar .tm-map-view-toggle { display: grid !important; grid-template-columns: repeat(2,1fr); }
  .tm-map-stage { height: 47vh; min-height: 330px; }
  .tm-dashboard--dedicated .tm-map-stage { height: calc(100vh - 340px); height: calc(100dvh - 340px); min-height: 390px; }
  .tm-map-popup { min-width: 210px; }
  .tm-map-popup nav { display: grid; grid-template-columns: 1fr 1fr; }
  .tm-map-popup nav button:first-child { grid-column: 1 / -1; }
  .tm-drawer { align-items: flex-end; }
  .tm-drawer > aside { width: 100%; height: min(82vh,720px); border-radius: 20px 20px 0 0; animation: tmSheet .22s ease-out; }
  @keyframes tmSheet { from { transform: translateY(40px); opacity: .75; } }
}

@media print {
  body > *:not(.layout-wrapper) { display: none !important; }
  .layout-sidebar,.layout-topbar,.tm-report-library,.tm-filterbar,.tm-runner-head button,.tm-preview-toolbar button { display: none !important; }
  .tm-native-hidden { display: none !important; }
  .tm-report-layout { display: block; }
  .tm-report-runner { border: 0; box-shadow: none; }
}
