/* AGALID reference redesign — presentation only. */
:root {
  --ag-blue: #2f68f2;
  --ag-blue-dark: #2458db;
  --ag-ink: #14203a;
  --ag-muted: #8c99b0;
  --ag-line: #dfe6f1;
  --ag-canvas: #f4f7fd;
  --ag-card: #ffffff;
  --ag-radius: 26px;
  --ag-shadow: 0 14px 38px rgba(37, 71, 123, .08);
}

html[data-horizon="v1"] {
  --hz-topbar: 92px;
  --hz-fleetbar: 130px;
  --hz-attention: 25%;
  --hz-dock: 84px;
  --hz-blue: var(--ag-blue);
  --hz-blue-strong: var(--ag-blue-dark);
  --hz-canvas: var(--ag-canvas);
  --hz-line: var(--ag-line);
  --hz-ink: var(--ag-ink);
  --hz-muted: var(--ag-muted);
}

html[data-horizon="v1"] #shell {
  background: var(--ag-canvas);
}

html[data-horizon="v1"] .rail {
  height: var(--hz-topbar) !important;
  padding: 0 5vw !important;
  gap: 24px !important;
  background: rgba(244, 247, 253, .98) !important;
  border: 0 !important;
  box-shadow: none !important;
}

html[data-horizon="v1"] .rail .brand {
  min-width: 176px !important;
  width: 176px;
  padding: 0 !important;
  gap: 18px !important;
}

html[data-horizon="v1"] .rail .brand .lg {
  display: grid !important;
  width: 50px !important;
  height: 50px !important;
  color: #fff !important;
  background: var(--ag-blue) !important;
  border: 0 !important;
  border-radius: 15px !important;
  box-shadow: 0 9px 22px rgba(47, 104, 242, .18) !important;
  font-size: 22px !important;
  font-weight: 500 !important;
}

html[data-horizon="v1"] .rail .brand .bt {
  display: block !important;
  margin: 0 !important;
  color: var(--ag-ink) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: .35em !important;
}
html[data-horizon="v1"] .rail .brand .bt small { display: none !important; }

html[data-horizon="v1"] .geosearch {
  position: fixed !important;
  z-index: 90 !important;
  top: 20px !important;
  left: calc(5vw + 206px) !important;
  right: auto !important;
  width: min(38vw, 590px) !important;
  transform: none !important;
}

html[dir="rtl"][data-horizon="v1"] .geosearch {
  right: calc(5vw + 206px) !important;
  left: auto !important;
}

html[data-horizon="v1"] .geosearch .box {
  height: 54px !important;
  padding: 0 20px !important;
  background: #fff !important;
  border: 1px solid var(--ag-line) !important;
  border-radius: 18px !important;
  box-shadow: 0 6px 20px rgba(45, 73, 118, .035) !important;
}

html[data-horizon="v1"] .geosearch input {
  color: var(--ag-ink) !important;
  font-size: 15px !important;
}

html[data-horizon="v1"] .geosearch input::placeholder { color: #9aa8bd; }
html[data-horizon="v1"] .geosearch .box::after { display: none !important; }

html[data-horizon="v1"] .hz-top-utilities { gap: 10px; }
html[data-horizon="v1"] .hz-live-chip {
  height: 46px;
  padding: 0 18px;
  color: #4d76dc;
  background: #eaf0ff;
  border: 0;
  border-radius: 18px;
  font-size: 13px;
}

html[data-horizon="v1"] .rail .langbtn {
  display: none !important;
}

html[data-horizon="v1"] .rail .langbtn span {
  display: grid;
  min-width: 45px;
  place-items: center;
  border-radius: 15px;
  font-size: 14px;
}

html[data-horizon="v1"] .rail .langbtn span.on {
  color: #fff;
  background: var(--ag-blue);
  box-shadow: none;
}

html[data-horizon="v1"] .rail .me .av {
  width: 48px;
  height: 48px;
  color: var(--ag-blue);
  background: #eaf0ff;
  border: 0;
  font-size: 14px;
}

html[data-horizon="v1"] .rail .me > div:not(.av) { display: none; }
html[data-horizon="v1"] .rail .logout {
  width: 44px;
  height: 44px;
  background: #fff;
  border-color: var(--ag-line);
  border-radius: 14px;
}

html[data-horizon="v1"] .stage {
  position: fixed !important;
  inset: var(--hz-topbar) 2vw 2.5vh !important;
  width: auto !important;
  height: auto !important;
  z-index: 80;
  overflow: hidden;
  background: var(--ag-canvas) !important;
  border: 1px solid var(--ag-line);
  border-radius: 34px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

html[data-horizon="v1"] .hz-fleet-band {
  top: 22px !important;
  right: calc(var(--hz-attention) + 36px) !important;
  left: 32px !important;
  height: 96px !important;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) !important;
  gap: 18px;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

html[dir="rtl"][data-horizon="v1"] .hz-fleet-band {
  right: 32px !important;
  left: calc(var(--hz-attention) + 42px) !important;
}

html[data-horizon="v1"] .hz-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr 1fr;
  justify-content: start;
  gap: 0 14px;
  min-width: 0;
  padding: 17px 22px;
  background: var(--ag-card);
  border: 1px solid var(--ag-line);
  border-radius: 24px;
  box-shadow: 0 6px 22px rgba(43, 71, 118, .035);
  cursor: default;
}

html[data-horizon="v1"] .hz-stat::before {
  content: "";
  align-self: center;
  grid-row: 1 / 3;
  width: 11px;
  height: 11px;
  margin: 0 8px 0 7px;
  background: var(--ag-blue);
  border-radius: 50%;
  box-shadow: 0 0 0 9px #edf4ff;
}

html[data-horizon="v1"] .hz-stat[data-kind="moving"]::before { background: #19bd76; box-shadow: 0 0 0 9px #e4f8ef; }
html[data-horizon="v1"] .hz-stat[data-kind="parked"]::before { background: var(--ag-blue); box-shadow: 0 0 0 9px #e8f0ff; }
html[data-horizon="v1"] .hz-stat[data-kind="offline"]::before { background: #aab5c7; box-shadow: 0 0 0 9px #eff2f7; }

html[data-horizon="v1"] .hz-stat::after {
  display: block !important;
  content: "" !important;
  position: absolute !important;
  right: auto !important;
  bottom: 12px !important;
  left: 22px !important;
  top: auto !important;
  width: 22px !important;
  height: 2px !important;
  background: var(--ag-blue) !important;
  border: 0 !important;
  border-radius: 3px !important;
}

html[data-horizon="v1"] .hz-stat[data-kind="moving"]::after { background: #19bd76 !important; }
html[data-horizon="v1"] .hz-stat[data-kind="offline"]::after { background: #aab5c7 !important; }

html[data-horizon="v1"] .hz-stat-dot { display: none; }
html[data-horizon="v1"] .hz-stat-value {
  grid-column: 2;
  align-self: end;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.04em;
}

html[data-horizon="v1"] .hz-stat-label {
  grid-column: 2;
  align-self: start;
  margin-top: 6px;
  color: var(--ag-muted);
  font-size: 14px;
  font-weight: 600;
}

html[data-horizon="v1"] .hz-stat[data-kind="moving"] {
  color: var(--ag-ink);
  background: #fff;
  border-color: var(--ag-line);
  box-shadow: 0 6px 22px rgba(43, 71, 118, .035);
}

html[data-horizon="v1"] .hz-stat[data-kind="moving"] .hz-stat-value,
html[data-horizon="v1"] .hz-stat[data-kind="moving"] .hz-stat-label { color: inherit; }
html[data-horizon="v1"] .hz-stat[data-kind="offline"] .hz-stat-value { color: #a9b3c4; }

html[data-horizon="v1"] #map {
  top: 140px !important;
  right: calc(var(--hz-attention) + 36px) !important;
  bottom: 94px !important;
  left: 32px !important;
  overflow: hidden;
  border: 1px solid var(--ag-line);
  border-radius: 28px;
  box-shadow: var(--ag-shadow);
}

html[dir="rtl"][data-horizon="v1"] #map {
  right: 32px !important;
  left: calc(var(--hz-attention) + 42px) !important;
}

/* Reclaim the reserved KPI area whenever that band is not present. */
body.ag-no-fleet-band html[data-horizon="v1"] #map,
html[data-horizon="v1"] body.ag-no-fleet-band #map {
  top: 22px !important;
  left: 22px !important;
  right: calc(var(--hz-attention) + 26px) !important;
  bottom: 94px !important;
}
html[dir="rtl"][data-horizon="v1"] body.ag-no-fleet-band #map {
  right: 22px !important;
  left: calc(var(--hz-attention) + 26px) !important;
}

html[data-horizon="v1"] .hz-attention {
  top: 22px !important;
  right: 32px !important;
  bottom: 94px !important;
  width: calc(var(--hz-attention) - 44px) !important;
  overflow: visible;
  background: #fff;
  border: 1px solid var(--ag-line) !important;
  border-radius: 28px;
  box-shadow: var(--ag-shadow);
}

html[data-horizon="v1"] .hz-attention::before { display: none; }

html[dir="rtl"][data-horizon="v1"] .hz-attention {
  right: auto !important;
  left: 32px !important;
}

html[data-horizon="v1"] .hz-attention-head {
  position: relative;
  min-height: 68px;
  padding: 0 20px;
}

html[data-horizon="v1"] .hz-attention-head h2 {
  width: 100%;
  padding-right: 54px;
  overflow: hidden;
  font-size: 16px;
  letter-spacing: -.02em;
  text-transform: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-horizon="v1"] .hz-attention-head h2::after {
  content: "Voir  →";
  position: absolute;
  right: 20px;
  color: var(--ag-blue);
  font-size: 11px;
  font-weight: 700;
}

html[data-horizon="v1"] .hz-attention-count {
  display: none;
}

html[data-horizon="v1"] .hz-attention-chart {
  grid-template-columns: 96px minmax(0, 1fr);
  padding: 18px 22px;
  background: #fff;
}

html[data-horizon="v1"] .hz-attention-donut { width: 96px; height: 96px; box-shadow: none; }
html[data-horizon="v1"] .hz-attention-donut-core { inset: 21px; }
html[data-horizon="v1"] .hz-attention-item { padding: 14px 22px; }
html[data-horizon="v1"] .hz-attention-copy strong { font-size: 14px; }
html[data-horizon="v1"] .hz-attention-copy em { font-size: 12px; }
html[data-horizon="v1"] .hz-attention-foot { padding: 14px 26px 22px; }
html[data-horizon="v1"] .hz-attention-foot button {
  height: 54px;
  color: #fff;
  background: var(--ag-blue);
  border-radius: 18px;
  font-size: 14px;
}

/* Alert overview aligned with the contextual mini-app visual language. */
html[data-horizon="v1"] .hz-attention { overflow: hidden !important; border-radius: 30px !important; background: rgba(255,255,255,.985) !important; }
html[data-horizon="v1"] .hz-attention-head { min-height: 72px; display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid #edf1f6; }
html[data-horizon="v1"] .hz-attention-head h2 { display: flex; align-items: center; gap: 10px; padding-right: 62px; font-size: 15px; font-weight: 760; }
html[data-horizon="v1"] .hz-attention-head h2::before { content: ''; width: 32px; height: 32px; flex: 0 0 32px; background: #eef4ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%232878f0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.268 21a2 2 0 0 0 3.464 0'/%3E%3Cpath d='M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326'/%3E%3C/svg%3E") center/15px no-repeat; border-radius: 11px; }
html[data-horizon="v1"] .hz-attention-head h2::after { right: 20px; padding: 7px 0 7px 8px; font-size: 10px; font-weight: 750; }
html[data-horizon="v1"] .hz-attention-head h2::after { content: none; }
html[data-horizon="v1"] .hz-attention-list { padding: 14px 14px 18px; background: #fff; scrollbar-width: thin; scrollbar-color: #d7dfeb transparent; }
html[data-horizon="v1"] .hz-attention-chart { grid-template-columns: 88px minmax(0,1fr); gap: 16px; margin: 0 0 12px; padding: 14px; background: #f7f9fd; border: 1px solid #edf1f6; border-radius: 18px; }
html[data-horizon="v1"] .hz-attention-donut { width: 88px; height: 88px; border: 0; box-shadow: 0 0 0 5px rgba(255,255,255,.72); }
html[data-horizon="v1"] .hz-attention-donut-core { inset: 19px; background: #fff; }
html[data-horizon="v1"] .hz-attention-donut-core strong { font-size: 21px; color: var(--ag-ink); }
html[data-horizon="v1"] .hz-attention-donut-core span { font-size: 7px; color: var(--ag-muted); }
html[data-horizon="v1"] .hz-attention-legend { gap: 5px; }
html[data-horizon="v1"] .hz-attention-legend-row { min-height: 14px; grid-template-columns: 7px minmax(0,1fr) 22px 27px; gap: 6px; }
html[data-horizon="v1"] .hz-attention-legend-dot { width: 7px; height: 7px; box-shadow: none; }
html[data-horizon="v1"] .hz-attention-legend-label { font-size: 8.5px; font-weight: 620; color: #53647b; }
html[data-horizon="v1"] .hz-attention-legend-row strong,
html[data-horizon="v1"] .hz-attention-legend-row em { font-size: 8px; }
html[data-horizon="v1"] .hz-attention-item { min-height: 66px; margin: 7px 0 0; padding: 11px 12px; grid-template-columns: 20px 8px minmax(0,1fr) 15px; gap: 9px; background: #fff !important; border: 1px solid #edf1f6 !important; border-radius: 15px; transition: transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
html[data-horizon="v1"] .hz-attention-item:hover { transform: translateY(-1px); border-color: #dce6f3 !important; box-shadow: 0 7px 18px rgba(38,64,102,.07); }
html[data-horizon="v1"] .hz-attention-rank { color: #94a1b3; font-size: 9px; font-weight: 760; text-align: center; }
html[data-horizon="v1"] .hz-attention-severity { width: 8px; height: 8px; box-shadow: none; }
html[data-horizon="v1"] .hz-attention-copy strong { font-size: 11px; font-weight: 760; color: var(--ag-ink); }
html[data-horizon="v1"] .hz-attention-copy em { margin-top: 3px; font-size: 9px; line-height: 1.35; }
html[data-horizon="v1"] .hz-attention-copy time { margin-top: 4px; font-size: 8px; color: #a0acbc; }
html[data-horizon="v1"] .hz-attention-item > svg { width: 14px; height: 14px; color: #a9b4c3; }
html[data-horizon="v1"] .hz-attention-foot { flex: 0 0 auto; padding: 12px 14px 14px; background: #fff; border-top: 1px solid #edf1f6; }
html[data-horizon="v1"] .hz-attention-foot button { height: 44px; color: #fff; background: var(--ag-blue); border: 0; border-radius: 15px; box-shadow: none; font-size: 10.5px; font-weight: 750; transition: background .16s ease,transform .16s ease,box-shadow .16s ease; }
html[data-horizon="v1"] .hz-attention-foot button:hover { background: #1769e8; box-shadow: 0 7px 18px rgba(40,120,240,.18); transform: translateY(-1px); }
html[data-horizon="v1"] .hz-attention-foot button:active { transform: scale(.985); }

/* Unified contextual preview opened from every dock action. */
.ag-context-panel {
  position: absolute;
  z-index: 31;
  top: 22px;
  right: 32px;
  bottom: 94px;
  width: calc(var(--hz-attention) - 44px);
  display: none;
  flex-direction: column;
  overflow: hidden;
  color: var(--ag-ink);
  background: #fff;
  border: 1px solid var(--ag-line);
  border-radius: 30px;
  box-shadow: var(--ag-shadow);
}

.ag-context-panel.is-open { display: flex; }
.ag-context-head {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border-bottom: 1px solid #edf1f6;
}
.ag-context-icon {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ag-blue);
  background: #eef4ff;
  border-radius: 12px;
}
.ag-context-icon svg { width: 17px; height: 17px; }
.ag-context-title { min-width: 0; font-size: 15px; font-weight: 760; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-context-all {
  margin-left: auto;
  padding: 8px 0 8px 10px;
  color: var(--ag-blue);
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}
.ag-context-close {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  margin-left: 2px;
  color: #607089;
  background: #f4f7fb;
  border: 1px solid #e4eaf2;
  border-radius: 50%;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.ag-context-close:hover { color: var(--ag-ink); background: #eaf0f8; transform: scale(1.04); }
.ag-context-close svg { width: 15px; height: 15px; }
html[dir="rtl"] .ag-context-close { margin-right: 2px; margin-left: 0; }
html[data-horizon="v1"] .hz-attention[hidden] { display: none !important; }
.ag-context-head > div { min-width: 0; display: grid; gap: 3px; }
.ag-context-head > div small { color: var(--ag-muted); font-size: 9px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
.ag-context-body { flex: 1; min-height: 0; overflow: auto; padding: 16px 18px 22px; scrollbar-width: thin; scrollbar-color: #d7dfeb transparent; }
.ag-context-kicker { margin: 0 0 14px; color: var(--ag-muted); font-size: 11px; line-height: 1.55; }
.ag-context-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.ag-context-metric { min-width: 0; padding: 13px; background: #f7f9fd; border: 1px solid #edf1f6; border-radius: 16px; position: relative; overflow: hidden; }
.ag-context-metric::after { content: ''; position: absolute; inset: auto 13px 0; height: 2px; border-radius: 2px; background: #2878f0; opacity: .72; }
.ag-context-metric.good::after { background: #18b978; }
.ag-context-metric.bad::after { background: #f05f52; }
.ag-context-metric.muted::after { background: #a9b5c8; }
.ag-context-metric strong { display: block; color: var(--ag-ink); font-size: 20px; line-height: 1; }
.ag-context-metric span { display: block; margin-top: 7px; overflow: hidden; color: var(--ag-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ag-context-section { margin-top: 18px; }
.ag-context-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ag-context-section-head strong { color: var(--ag-ink); font-size: 11px; font-weight: 760; text-transform: uppercase; letter-spacing: .055em; }
.ag-context-section-head span { color: var(--ag-muted); font-size: 9px; }
.ag-context-list { display: grid; border-top: 1px solid #edf1f6; }
.ag-context-row { width: 100%; display: grid; grid-template-columns: 8px minmax(0,1fr) auto auto; align-items: center; gap: 9px; min-height: 54px; padding: 9px 2px; color: inherit; background: transparent; border: 0; border-bottom: 1px solid #edf1f6; font: inherit; text-align: start; cursor: pointer; }
.ag-context-row:hover { background: #f8faff; }
.ag-context-row:last-child { border-bottom: 0; }
.ag-context-dot { width: 8px; height: 8px; background: var(--ag-blue); border-radius: 50%; }
.ag-context-row strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ag-context-row span { display: block; margin-top: 4px; overflow: hidden; color: var(--ag-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ag-context-row em { color: #aab4c4; font-size: 16px; font-style: normal; }
.ag-context-row mark { max-width: 72px; padding: 4px 7px; overflow: hidden; color: #61718a; background: #f1f4f8; border-radius: 8px; font-size: 8.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ag-context-progress { margin: 10px 0 13px; }
.ag-context-progress > div { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; font-size: 10px; }
.ag-context-progress span { color: var(--ag-muted); }
.ag-context-progress strong { color: var(--ag-ink); font-size: 10px; }
.ag-context-progress small { color: var(--ag-muted); font-size: 8px; font-weight: 600; }
.ag-context-progress > i { display: block; height: 6px; overflow: hidden; background: #edf1f6; border-radius: 6px; }
.ag-context-progress > i > b { display: block; height: 100%; border-radius: inherit; }
.ag-context-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.ag-context-actions button { height: 38px; display: flex; align-items: center; justify-content: center; gap: 7px; color: #35618f; background: #f4f7fb; border: 1px solid #e7edf5; border-radius: 13px; font-size: 10px; font-weight: 720; cursor: pointer; }
.ag-context-actions button:hover { color: #fff; background: var(--ag-blue); border-color: var(--ag-blue); }
.ag-context-actions svg { width: 14px; height: 14px; }
.ag-vehicle-tools { position: sticky; top: -16px; z-index: 3; margin: 14px -2px 0; padding: 12px 2px 10px; background: rgba(255,255,255,.97); backdrop-filter: blur(12px); }
.ag-vehicle-tools label { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 11px; color: #8795aa; background: #f6f8fc; border: 1px solid #e7edf5; border-radius: 13px; }
.ag-vehicle-tools label svg { width: 15px; height: 15px; flex: 0 0 auto; }
.ag-vehicle-tools input { width: 100%; min-width: 0; color: var(--ag-ink); background: transparent; border: 0; outline: 0; font: inherit; font-size: 10.5px; }
.ag-vehicle-tools input::placeholder { color: #9eabba; }
.ag-vehicle-filters { display: flex; gap: 5px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.ag-vehicle-filters::-webkit-scrollbar { display: none; }
.ag-vehicle-filters button { height: 29px; display: inline-flex; align-items: center; gap: 5px; padding: 0 9px; color: #66768c; background: #fff; border: 1px solid #e5ebf3; border-radius: 10px; font-size: 8.5px; font-weight: 720; white-space: nowrap; cursor: pointer; }
.ag-vehicle-filters button b { min-width: 16px; padding: 2px 4px; color: #7e8ca0; background: #f0f3f8; border-radius: 6px; font-size: 8px; }
.ag-vehicle-filters button.on { color: #fff; background: var(--ag-blue); border-color: var(--ag-blue); }
.ag-vehicle-filters button.on b { color: #fff; background: rgba(255,255,255,.2); }
.ag-vehicle-list { max-height: 350px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d8e0eb transparent; }
.ag-vehicle-list [hidden] { display: none !important; }
.ag-vehicle-none { display: none; padding: 24px 8px; color: var(--ag-muted); font-size: 10px; line-height: 1.5; text-align: center; }
.ag-vehicle-none.show { display: block; }
.ag-report-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.ag-report-controls label { min-width: 0; display: grid; gap: 5px; }
.ag-report-controls label.wide { grid-column: 1 / -1; }
.ag-report-controls label > span { color: var(--ag-muted); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .055em; }
.ag-report-controls select { width: 100%; height: 38px; padding: 0 30px 0 10px; color: #31455f; background: #f6f8fc; border: 1px solid #e5ebf3; border-radius: 12px; outline: none; font: inherit; font-size: 9.5px; font-weight: 650; }
.ag-report-controls select:focus { border-color: #bcd3f5; box-shadow: 0 0 0 3px rgba(40,120,240,.1); }
.ag-report-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 11px 0 16px; }
.ag-report-toolbar button { height: 39px; display: flex; align-items: center; justify-content: center; gap: 7px; color: #fff; background: var(--ag-blue); border: 0; border-radius: 13px; font-size: 9.5px; font-weight: 740; cursor: pointer; }
.ag-report-toolbar button:last-child { color: #35618f; background: #eef4fc; border: 1px solid #dfe9f6; }
.ag-report-toolbar button:disabled { color: #9aa7b8; background: #eef1f5; border-color: #e6ebf1; cursor: default; }
.ag-report-toolbar svg { width: 14px; height: 14px; }
#agReportResult > .ag-context-grid { margin-top: 2px; }
.ag-report-workspace #agReportResult > .ag-context-loading {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 13px;
  margin-top: 4px;
  padding: 18px;
  overflow: hidden;
  color: #5f6f84;
  background: #f7f9fd;
  border: 1px solid #e6edf5;
  border-radius: 16px;
  position: relative;
}
.ag-report-workspace #agReportResult > .ag-context-loading i { display: none; }
.ag-report-workspace #agReportResult > .ag-context-loading::before {
  content: '';
  width: 100%;
  height: 6px;
  order: 2;
  overflow: hidden;
  background: #e2e8f1;
  border-radius: 999px;
}
.ag-report-workspace #agReportResult > .ag-context-loading::after {
  content: '';
  position: absolute;
  right: calc(100% - 18px);
  bottom: 40px;
  width: calc(58% - 20px);
  height: 6px;
  background: linear-gradient(90deg,#16ad70,#20c985);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(24,185,120,.18);
  animation: ag-report-progress 1.15s cubic-bezier(.45,0,.25,1) infinite;
}
.ag-report-workspace #agReportResult > .ag-context-loading span {
  order: 1;
  font-size: 9.5px;
  font-weight: 690;
}
@keyframes ag-report-progress {
  0% { transform: translateX(0); }
  55% { transform: translateX(155%); }
  100% { transform: translateX(275%); }
}
@media (prefers-reduced-motion: reduce) {
  .ag-report-workspace #agReportResult > .ag-context-loading::after { animation-duration: 2.4s; }
}
.ag-detail-back {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  display: inline-grid;
  flex: 0 0 36px;
  align-self: center;
  margin: 0;
  padding: 0;
  place-items: center;
  color: #607189;
  background: #f3f6fa;
  border: 1px solid #e4eaf2;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(30,52,84,.04);
  line-height: 0;
  cursor: pointer;
  transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.ag-detail-back:hover {
  color: var(--ag-blue);
  background: #eaf2ff;
  border-color: #d4e3fb;
  box-shadow: 0 4px 12px rgba(40,120,240,.12);
  transform: translateX(-1px);
}
.ag-detail-back:active { transform: scale(.94); }
.ag-detail-back:focus-visible { outline: 3px solid rgba(40,120,240,.18); outline-offset: 2px; }
.ag-detail-back svg { width: 17px; height: 17px; display: block; stroke-width: 1.8; }
html[dir="rtl"] .ag-detail-back:hover { transform: translateX(1px); }
.ag-detail-hero { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; color: #fff; background: linear-gradient(135deg,#246deb,#3d82f4); border-radius: 20px; overflow: hidden; position: relative; }
.ag-detail-hero::after { content: ''; position: absolute; width: 130px; height: 130px; top: -52px; right: -35px; border: 24px solid rgba(255,255,255,.09); border-radius: 50%; }
.ag-detail-hero > div { display: grid; gap: 7px; position: relative; z-index: 1; }
.ag-detail-state { display: flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 720; }
.ag-detail-state i { width: 7px; height: 7px; border: 2px solid rgba(255,255,255,.6); border-radius: 50%; }
.ag-detail-hero > div > strong { font-size: 32px; line-height: 1; letter-spacing: -.03em; }
.ag-detail-hero > div > strong small { font-size: 10px; font-weight: 650; opacity: .8; }
.ag-detail-hero > div > span:last-child { font-size: 8.5px; opacity: .72; }
.ag-detail-car { width: 48px; height: 48px; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); border-radius: 16px; position: relative; z-index: 1; }
.ag-detail-car svg { width: 23px; height: 23px; }
.ag-detail-tech-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.ag-detail-tech { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 10px; background: #f7f9fd; border: 1px solid #edf1f6; border-radius: 14px; }
.ag-detail-tech-icon { width: 29px; height: 29px; display: grid; flex: 0 0 auto; place-items: center; color: #2878f0; background: #e9f1ff; border-radius: 10px; }
.ag-detail-tech-icon.green { color: #139766; background: #e5f8f0; }
.ag-detail-tech-icon.muted { color: #7d8ca1; background: #edf1f6; }
.ag-detail-tech-icon svg { width: 14px; height: 14px; }
.ag-detail-tech > div { min-width: 0; display: grid; gap: 3px; }
.ag-detail-tech small { overflow: hidden; color: var(--ag-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.ag-detail-tech strong { overflow: hidden; color: var(--ag-ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ag-detail-tech strong em { color: var(--ag-muted); font-size: 8px; font-style: normal; }
.ag-detail-location { display: flex; align-items: flex-start; gap: 10px; padding: 12px; background: #f7f9fd; border: 1px solid #edf1f6; border-radius: 14px; }
.ag-detail-location > svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--ag-blue); }
.ag-detail-location > div { min-width: 0; display: grid; gap: 4px; }
.ag-detail-location strong { color: var(--ag-ink); font-size: 10px; }
.ag-detail-location span { color: var(--ag-muted); font-size: 8.5px; }
.ag-detail-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 18px; }
.ag-detail-actions button { height: 42px; display: flex; align-items: center; justify-content: center; gap: 7px; color: #385675; background: #f5f8fc; border: 1px solid #e5ebf3; border-radius: 14px; font-size: 9.5px; font-weight: 720; cursor: pointer; }
.ag-detail-actions button:hover { color: #fff; background: var(--ag-blue); border-color: var(--ag-blue); }
.ag-detail-actions svg { width: 14px; height: 14px; }
.ag-trip-route { display: grid; grid-template-columns: 28px auto minmax(22px,1fr) auto 28px; align-items: center; gap: 8px; padding: 14px 11px; background: #f7f9fd; border: 1px solid #edf1f6; border-radius: 15px; }
.ag-trip-route > span { width: 28px; height: 28px; display: grid; place-items: center; color: #fff; background: #18b978; border-radius: 10px; }
.ag-trip-route > span:last-child { background: #2878f0; }
.ag-trip-route > span svg { width: 13px; height: 13px; }
.ag-trip-route > div { min-width: 0; display: grid; gap: 3px; }
.ag-trip-route > div small { color: var(--ag-muted); font-size: 7.5px; text-transform: uppercase; letter-spacing: .05em; }
.ag-trip-route > div strong { color: var(--ag-ink); font-size: 10px; white-space: nowrap; }
.ag-trip-route > i { height: 2px; background: repeating-linear-gradient(90deg,#9db7dc 0 5px,transparent 5px 9px); }
.ag-trip-player { margin-top: 16px; padding: 13px; background: #f7f9fd; border: 1px solid #e7edf5; border-radius: 16px; }
.ag-trip-player > button { width: 100%; height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; background: var(--ag-blue); border: 0; border-radius: 13px; font-size: 10px; font-weight: 750; cursor: pointer; }
.ag-trip-player > button:disabled { color: #96a3b4; background: #e8edf4; cursor: default; }
.ag-trip-player > button svg { width: 15px; height: 15px; }
.ag-trip-player > div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 9px; margin-top: 11px; }
.ag-trip-player > div > i { height: 6px; overflow: hidden; background: #e2e8f1; border-radius: 6px; }
.ag-trip-player > div > i > b { display: block; width: 0; height: 100%; background: #18b978; border-radius: inherit; transition: width .08s linear; }
.ag-trip-player > div > span { min-width: 28px; color: #61718a; font-size: 9px; font-weight: 720; text-align: end; }
.ag-trip-player > small { display: block; margin-top: 7px; color: var(--ag-muted); font-size: 8px; text-align: center; }
.ag-trip-play-marker { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: #2878f0; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 5px 16px rgba(30,65,120,.35); }
.ag-trip-play-marker svg { width: 16px; height: 16px; }
.ag-trip-endpoint { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 5px 18px rgba(31,55,91,.32); position: relative; }
.ag-trip-endpoint-start { background: #18b978; }
.ag-trip-endpoint-end { background: #2878f0; }
.ag-trip-endpoint svg { width: 14px; height: 14px; }
.ag-trip-endpoint span { position: absolute; top: 39px; left: 50%; padding: 4px 7px; color: #26384f; background: rgba(255,255,255,.96); border: 1px solid #e4eaf2; border-radius: 7px; box-shadow: 0 3px 9px rgba(30,50,80,.13); font: 700 8px/1 Inter,sans-serif; white-space: nowrap; transform: translateX(-50%); }

/* Full history workspace opened through "Voir tous". */
html[data-horizon="v1"] #detail.ag-full-history,
html[data-horizon="v1"] .detail.hz-vehicle-cockpit.ag-full-history {
  top: 22px !important;
  bottom: 92px !important;
  left: 32px !important;
  right: 32px !important;
  inset-inline-start: 32px !important;
  inset-inline-end: 32px !important;
  width: auto !important;
  max-width: none !important;
  max-height: none !important;
  z-index: 70 !important;
  border-radius: 30px !important;
  box-shadow: 0 28px 70px rgba(30,55,95,.2) !important;
}
html[data-horizon="v1"] #detail.ag-full-history .d-body {
  height: 100% !important;
  max-height: none !important;
  overflow: auto !important;
}
@media (max-width: 900px) {
  html[data-horizon="v1"] #detail.ag-full-history {
    top: 14px !important;
    right: 14px !important;
    bottom: 82px !important;
    left: 14px !important;
    border-radius: 22px !important;
  }
}

/* Circular fleet trigger; hidden while a contextual workspace is open. */
html[data-horizon="v1"] #objBtn,
html[dir="rtl"][data-horizon="v1"] #objBtn {
  border-radius: 50% !important;
  transition: opacity .18s ease, transform .18s ease, background .16s ease, color .16s ease !important;
}
html[data-horizon="v1"] #objBtn.hidden,
html[dir="rtl"][data-horizon="v1"] #objBtn.hidden {
  visibility: hidden !important;
  opacity: 0 !important;
  transform: scale(.82) !important;
  pointer-events: none !important;
}

/* Separated map controls: tools left, compact vehicle action right. */
html[data-horizon="v1"] .mapctrl,
html[dir="rtl"][data-horizon="v1"] .mapctrl {
  top: 156px !important;
  right: auto !important;
  left: 48px !important;
  gap: 2px !important;
  padding: 5px !important;
  background: rgba(255,255,255,.94) !important;
  border: 1px solid rgba(222,229,239,.92) !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(20,40,70,.12) !important;
}
html[data-horizon="v1"] #objBtn,
html[dir="rtl"][data-horizon="v1"] #objBtn {
  top: 156px !important;
  right: 48px !important;
  left: auto !important;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  color: #52647d !important;
  background: rgba(255,255,255,.94) !important;
  border: 1px solid rgba(222,229,239,.92) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(20,40,70,.12) !important;
  backdrop-filter: blur(12px);
}
html[data-horizon="v1"] #objBtn .obj-btn-label,
html[data-horizon="v1"] #objBtn .obj-btn-arrow { display: none !important; }
html[data-horizon="v1"] #objBtn svg { width: 19px; height: 19px; }
html[data-horizon="v1"] #objBtn:hover { color: var(--ag-blue) !important; background: #edf3ff !important; }
html[data-horizon="v1"] body.ag-no-fleet-band .mapctrl,
html[dir="rtl"][data-horizon="v1"] body.ag-no-fleet-band .mapctrl {
  top: 26px !important;
  right: auto !important;
  left: 26px !important;
}
html[data-horizon="v1"] body.ag-no-fleet-band #objBtn,
html[dir="rtl"][data-horizon="v1"] body.ag-no-fleet-band #objBtn {
  top: 26px !important;
  right: 26px !important;
  left: auto !important;
}

@media (max-width: 900px) {
  html[data-horizon="v1"] .mapctrl,
  html[dir="rtl"][data-horizon="v1"] .mapctrl,
  html[data-horizon="v1"] body.ag-no-fleet-band .mapctrl,
  html[dir="rtl"][data-horizon="v1"] body.ag-no-fleet-band .mapctrl { top: 24px !important; right: auto !important; left: 24px !important; }
  html[data-horizon="v1"] #objBtn,
  html[dir="rtl"][data-horizon="v1"] #objBtn,
  html[data-horizon="v1"] body.ag-no-fleet-band #objBtn,
  html[dir="rtl"][data-horizon="v1"] body.ag-no-fleet-band #objBtn { top: 24px !important; right: 24px !important; left: auto !important; }
}
.ag-context-empty { min-height: 120px; display: grid; place-content: center; justify-items: center; gap: 9px; padding: 28px 12px; color: var(--ag-muted); font-size: 11px; line-height: 1.6; text-align: center; }
.ag-context-empty svg { width: 22px; height: 22px; opacity: .55; }
.ag-context-loading { min-height: 180px; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--ag-muted); font-size: 10px; }
.ag-context-loading i { width: 24px; height: 24px; border: 2px solid #e4ebf5; border-top-color: var(--ag-blue); border-radius: 50%; animation: ag-context-spin .7s linear infinite; }
@keyframes ag-context-spin { to { transform: rotate(360deg); } }

/* Expanded original history workspace, opened only through “Voir tous”. */
html[data-horizon="v1"] #detail.ag-full-history,
html[data-horizon="v1"] .detail.hz-vehicle-cockpit.ag-full-history {
  top: 22px !important;
  bottom: 92px !important;
  left: 32px !important;
  right: auto !important;
  width: min(760px, calc(100% - 64px)) !important;
  max-height: none !important;
  border-radius: 28px !important;
  box-shadow: 0 24px 60px rgba(33,55,91,.18) !important;
  z-index: 65 !important;
}
html[data-horizon="v1"] #detail.ag-full-history .d-body { height: 100% !important; overflow: auto !important; }
html[dir="rtl"][data-horizon="v1"] #detail.ag-full-history { right: 32px !important; left: auto !important; }

@media (max-width: 900px) {
  html[data-horizon="v1"] #detail.ag-full-history { top: 14px !important; right: 14px !important; bottom: 82px !important; left: 14px !important; width: auto !important; border-radius: 22px !important; }
}

html[dir="rtl"] .ag-context-panel { right: auto; left: 32px; }
html[dir="rtl"] .ag-context-all { margin-right: auto; margin-left: 0; padding-right: 10px; padding-left: 0; }

html[data-horizon="v1"] .mapctrl {
  top: 156px !important;
  right: calc(var(--hz-attention) + 52px) !important;
  border-radius: 17px !important;
}

html[dir="rtl"][data-horizon="v1"] .mapctrl {
  right: auto !important;
  left: calc(var(--hz-attention) + 58px) !important;
}

html[data-horizon="v1"] #objBtn { top: 156px !important; left: 48px !important; }
html[dir="rtl"][data-horizon="v1"] #objBtn { right: 48px !important; left: auto !important; }

html[data-horizon="v1"] #nav.hz-nav,
html[dir="rtl"][data-horizon="v1"] #nav.hz-nav {
  bottom: calc(2.5vh + 12px) !important;
  width: fit-content !important;
  height: 66px !important;
  padding: 8px !important;
  gap: 10px !important;
  color: var(--ag-muted) !important;
  background: rgba(255,255,255,.98) !important;
  border: 1px solid var(--ag-line) !important;
  border-radius: 34px !important;
  box-shadow: 0 16px 36px rgba(45, 71, 112, .11) !important;
  backdrop-filter: blur(18px) !important;
}

html[data-horizon="v1"] .hz-nav a {
  flex: 0 0 52px !important;
  min-width: 52px !important;
  width: 52px !important;
  height: 50px !important;
  padding: 0 !important;
  justify-content: center !important;
  color: var(--ag-muted) !important;
  border-radius: 25px !important;
  font-size: 13px;
  font-weight: 600;
}

html[data-horizon="v1"] .hz-nav a:hover {
  color: var(--ag-blue) !important;
  background: #f0f4fc !important;
}

html[data-horizon="v1"] .hz-nav a.on {
  color: var(--ag-blue) !important;
  background: #f4f7ff !important;
  box-shadow: none !important;
}

html[data-horizon="v1"] .hz-nav a.on::before { display: none !important; }

html[data-horizon="v1"] #navDash,
html[data-horizon="v1"] #navZones,
html[data-horizon="v1"] #navCust,
html[data-horizon="v1"] #navSms,
html[data-horizon="v1"] #navCoreSettings {
  display: flex !important;
  flex: 0 0 48px !important;
  min-width: 48px !important;
  width: 48px !important;
  padding: 0 !important;
  justify-content: center !important;
}

html[data-horizon="v1"] #navDash span,
html[data-horizon="v1"] #navTracking span,
html[data-horizon="v1"] #navVehicles span,
html[data-horizon="v1"] #navAlerts span,
html[data-horizon="v1"] #navZones span,
html[data-horizon="v1"] #navReports span,
html[data-horizon="v1"] #navCust span,
html[data-horizon="v1"] #navSms span,
html[data-horizon="v1"] #navCoreSettings span { display: none !important; }

html[data-horizon="v1"] #navTracking span { font-size: 0; }

@media (max-width: 1180px) {
  html[data-horizon="v1"] { --hz-attention: 310px; }
  html[data-horizon="v1"] .rail { padding-inline: 24px !important; }
  html[data-horizon="v1"] .rail .brand { min-width: 145px !important; width: 145px; }
  html[data-horizon="v1"] .geosearch { left: 190px !important; width: min(39vw, 470px) !important; }
  html[dir="rtl"][data-horizon="v1"] .geosearch { right: 190px !important; left: auto !important; }
  html[data-horizon="v1"] .hz-stat { padding-inline: 18px; }
  html[data-horizon="v1"] .hz-attention { width: 278px !important; }
}

@media (max-width: 900px) {
  html[data-horizon="v1"] { --hz-topbar: 72px; --hz-fleetbar: 100px; --hz-attention: 0px; }
  html[data-horizon="v1"] .rail { padding-inline: 14px !important; }
  html[data-horizon="v1"] .rail .brand { min-width: 52px !important; width: 52px; }
  html[data-horizon="v1"] .rail .brand .bt { display: none !important; }
  html[data-horizon="v1"] .rail .brand .lg { width: 42px !important; height: 42px !important; }
  html[data-horizon="v1"] .geosearch { top: 12px !important; left: 76px !important; width: calc(100vw - 270px) !important; }
  html[dir="rtl"][data-horizon="v1"] .geosearch { right: 76px !important; left: auto !important; }
  html[data-horizon="v1"] .stage { inset: var(--hz-topbar) 8px 8px !important; border-radius: 24px; }
  html[data-horizon="v1"] .hz-fleet-band { top: 14px !important; right: 14px !important; left: 14px !important; height: 82px !important; gap: 8px; }
  html[data-horizon="v1"] .hz-stat { padding: 13px 14px; border-radius: 18px; }
  html[data-horizon="v1"] .hz-stat-value { font-size: 22px; }
  html[data-horizon="v1"] .hz-stat-label { font-size: 11px; }
  html[data-horizon="v1"] #map { top: 110px !important; right: 14px !important; bottom: 82px !important; left: 14px !important; border-radius: 20px; }
  html[data-horizon="v1"] .hz-attention { top: 110px !important; right: 14px !important; bottom: 82px !important; width: min(380px, calc(100% - 28px)) !important; border-radius: 20px; transform: translateX(110%); }
  html[data-horizon="v1"] .mapctrl { top: 124px !important; right: 28px !important; }
  html[data-horizon="v1"] #objBtn { top: 124px !important; left: 28px !important; }
  html[data-horizon="v1"] #nav.hz-nav,
  html[dir="rtl"][data-horizon="v1"] #nav.hz-nav { bottom: 16px !important; width: calc(100vw - 32px) !important; }
}

@media (max-width: 700px) {
  html[data-horizon="v1"] .rail .langbtn { display: none; }
  html[data-horizon="v1"] .geosearch { width: calc(100vw - 200px) !important; }
  html[data-horizon="v1"] .hz-fleet-band { overflow-x: auto !important; grid-template-columns: repeat(4, minmax(128px, 1fr)) !important; }
  html[data-horizon="v1"] #nav.hz-nav,
  html[dir="rtl"][data-horizon="v1"] #nav.hz-nav {
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 20px 20px 0 0 !important;
    transform: none !important;
  }
  html[data-horizon="v1"] .hz-nav a { min-width: 58px !important; padding-inline: 8px !important; }
}

/* Overlay composition requested for workspaces without the KPI band:
   full map canvas with a floating contextual rail inside it. */
html[data-horizon="v1"] body.ag-no-fleet-band { --ag-overlay-panel: 300px; --ag-overlay-inset: 20px; }
html[data-horizon="v1"] body.ag-no-fleet-band #map {
  top: 10px !important;
  right: 10px !important;
  bottom: 10px !important;
  left: 10px !important;
  border-radius: 28px !important;
}
html[data-horizon="v1"] body.ag-no-fleet-band .hz-attention,
html[data-horizon="v1"] body.ag-no-fleet-band .ag-context-panel {
  top: var(--ag-overlay-inset) !important;
  right: var(--ag-overlay-inset) !important;
  bottom: var(--ag-overlay-inset) !important;
  left: auto !important;
  width: var(--ag-overlay-panel) !important;
  border-radius: 26px !important;
  box-shadow: 0 22px 54px rgba(28,52,88,.17) !important;
}
html[dir="rtl"][data-horizon="v1"] body.ag-no-fleet-band .hz-attention,
html[dir="rtl"][data-horizon="v1"] body.ag-no-fleet-band .ag-context-panel {
  right: auto !important;
  left: var(--ag-overlay-inset) !important;
}
html[data-horizon="v1"] body.ag-no-fleet-band .mapctrl {
  top: 26px !important;
  right: calc(var(--ag-overlay-inset) + var(--ag-overlay-panel) + 16px) !important;
}
html[dir="rtl"][data-horizon="v1"] body.ag-no-fleet-band .mapctrl {
  right: auto !important;
  left: calc(var(--ag-overlay-inset) + var(--ag-overlay-panel) + 16px) !important;
}
html[data-horizon="v1"] body.ag-no-fleet-band #objBtn { top: 26px !important; left: 26px !important; }
html[dir="rtl"][data-horizon="v1"] body.ag-no-fleet-band #objBtn { right: 26px !important; left: auto !important; }

@media (max-width: 900px) {
  html[data-horizon="v1"] body.ag-no-fleet-band { --ag-overlay-panel: min(340px, calc(100% - 40px)); --ag-overlay-inset: 20px; }
  html[data-horizon="v1"] body.ag-no-fleet-band .mapctrl { right: 36px !important; }
  html[dir="rtl"][data-horizon="v1"] body.ag-no-fleet-band .mapctrl { right: auto !important; left: 36px !important; }
}

/* One quiet, icon-only toolbar for every map-level action. */
html[data-horizon="v1"] .ag-map-toolbar {
  position: absolute;
  z-index: 32;
  top: 156px;
  left: 48px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(222,229,239,.92);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(20,40,70,.12);
  backdrop-filter: blur(12px);
}
html[dir="rtl"][data-horizon="v1"] .ag-map-toolbar { right: 48px; left: auto; }
html[data-horizon="v1"] body.ag-no-fleet-band .ag-map-toolbar { top: 26px; left: 26px; }
html[dir="rtl"][data-horizon="v1"] body.ag-no-fleet-band .ag-map-toolbar { right: 26px; left: auto; }
html[data-horizon="v1"] .ag-map-toolbar > #objBtn,
html[data-horizon="v1"] .ag-map-toolbar > .mapctrl {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
}
html[data-horizon="v1"] .ag-map-toolbar > #objBtn {
  width: 38px !important;
  height: 38px !important;
  display: grid !important;
  padding: 0 !important;
  color: #52647d;
  background: transparent !important;
  border: 0 !important;
  border-radius: 11px !important;
  box-shadow: none !important;
}
html[data-horizon="v1"] .ag-map-toolbar .obj-btn-label,
html[data-horizon="v1"] .ag-map-toolbar .obj-btn-arrow { display: none !important; }
html[data-horizon="v1"] .ag-map-toolbar > .mapctrl {
  gap: 2px !important;
  padding: 0 0 0 4px !important;
  background: transparent !important;
  border: 0 !important;
  border-left: 1px solid #e5eaf1 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
html[dir="rtl"][data-horizon="v1"] .ag-map-toolbar > .mapctrl {
  padding: 0 4px 0 0 !important;
  border-right: 1px solid #e5eaf1 !important;
  border-left: 0 !important;
}
html[data-horizon="v1"] .ag-map-toolbar > .mapctrl button { width: 38px; height: 38px; border-radius: 11px; color: #52647d; }
html[data-horizon="v1"] .ag-map-toolbar > .mapctrl button svg,
html[data-horizon="v1"] .ag-map-toolbar > #objBtn svg { width: 18px; height: 18px; }
html[data-horizon="v1"] .ag-map-toolbar button:hover,
html[data-horizon="v1"] .ag-map-toolbar > #objBtn:hover { color: var(--ag-blue); background: #edf3ff !important; }

@media (max-width: 900px) {
  html[data-horizon="v1"] .ag-map-toolbar,
  html[data-horizon="v1"] body.ag-no-fleet-band .ag-map-toolbar { top: 24px; left: 24px; }
  html[dir="rtl"][data-horizon="v1"] .ag-map-toolbar,
  html[dir="rtl"][data-horizon="v1"] body.ag-no-fleet-band .ag-map-toolbar { right: 24px; left: auto; }
}

/* Final physical placement after legacy map-control rules. */
html[data-horizon="v1"] body.ag-no-fleet-band .mapctrl,
html[dir="rtl"][data-horizon="v1"] body.ag-no-fleet-band .mapctrl {
  top: 26px !important;
  right: auto !important;
  left: 26px !important;
}
html[data-horizon="v1"] body.ag-no-fleet-band #objBtn,
html[dir="rtl"][data-horizon="v1"] body.ag-no-fleet-band #objBtn {
  top: 26px !important;
  right: 26px !important;
  left: auto !important;
}
@media (max-width: 900px) {
  html[data-horizon="v1"] body.ag-no-fleet-band .mapctrl,
  html[dir="rtl"][data-horizon="v1"] body.ag-no-fleet-band .mapctrl { top: 24px !important; right: auto !important; left: 24px !important; }
  html[data-horizon="v1"] body.ag-no-fleet-band #objBtn,
  html[dir="rtl"][data-horizon="v1"] body.ag-no-fleet-band #objBtn { top: 24px !important; right: 24px !important; left: auto !important; }
}

html[data-horizon="v1"] #objBtn,
html[dir="rtl"][data-horizon="v1"] #objBtn { border-radius: 50% !important; }

/* Hard size constraints prevent inherited button styles from stretching the trigger. */
html[data-horizon="v1"] #objBtn,
html[dir="rtl"][data-horizon="v1"] #objBtn {
  inline-size: 48px !important;
  block-size: 48px !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  aspect-ratio: 1 / 1 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  place-items: center !important;
  flex: 0 0 48px !important;
  gap: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  color: #2f68f2 !important;
  background: #f2f6ff !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: 0 7px 20px rgba(35,78,155,.11) !important;
  font-size: 0 !important;
}
html[data-horizon="v1"] #objBtn > span,
html[data-horizon="v1"] #objBtn > .obj-btn-arrow { display: none !important; }
html[data-horizon="v1"] #objBtn > svg { width: 20px !important; height: 20px !important; margin: 0 !important; }

/* Stable contextual header alignment. */
html[data-horizon="v1"] .ag-context-head {
  gap: 9px !important;
  padding: 0 14px 0 16px !important;
}
html[data-horizon="v1"] .ag-context-head > div { flex: 1 1 auto; min-width: 0; }
html[data-horizon="v1"] .ag-context-head .ag-context-all { flex: 0 0 auto; margin-left: 0; padding: 7px 2px; }
html[data-horizon="v1"] .ag-context-head .ag-context-close {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-self: center;
  margin: 0 0 0 3px;
}
html[dir="rtl"][data-horizon="v1"] .ag-context-head .ag-context-close { margin: 0 3px 0 0; }

/* Coordinated header utilities and account access center. */
html[data-horizon="v1"] .hz-top-utilities #hzThemeButton,
html[data-horizon="v1"] .rail .me {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  color: #52647d !important;
  background: #fff !important;
  border: 1px solid #dfe6f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 5px 16px rgba(33,55,91,.055) !important;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease !important;
}
html[data-horizon="v1"] .hz-top-utilities #hzThemeButton:hover,
html[data-horizon="v1"] .rail .me:hover { color: var(--ag-blue) !important; background: #f3f7ff !important; border-color: #d5e2fa !important; transform: translateY(-1px); }
html[data-horizon="v1"] .rail .me > div:not(.av) { display: none !important; }
html[data-horizon="v1"] .rail .me .av { width: 100% !important; height: 100% !important; display: grid !important; place-items: center; border: 0 !important; background: transparent !important; }
html[data-horizon="v1"] .rail > .foot { display: none !important; }

.hz-access-center {
  position: fixed;
  z-index: 220;
  top: 76px;
  right: 5vw;
  width: 286px;
  display: none;
  overflow: hidden;
  color: var(--ag-ink);
  background: rgba(255,255,255,.985);
  border: 1px solid var(--ag-line);
  border-radius: 22px;
  box-shadow: 0 22px 60px rgba(25,48,84,.18);
  backdrop-filter: blur(18px);
}
.hz-access-center.is-open { display: block; }
.hz-access-head { min-height: 68px; display: flex; align-items: center; gap: 10px; padding: 0 14px 0 16px; border-bottom: 1px solid #edf1f6; }
.hz-access-head > span { width: 32px; height: 32px; display: grid; flex: 0 0 32px; place-items: center; color: var(--ag-blue); background: #eef4ff; border-radius: 11px; }
.hz-access-head > div { flex: 1; min-width: 0; }
.hz-access-head strong,.hz-access-head small { display: block; }
.hz-access-head strong { font-size: 13px; }
.hz-access-head small { margin-top: 3px; color: var(--ag-muted); font-size: 9px; }
.hz-access-close { width: 30px; height: 30px; display: grid; place-items: center; color: #61718a; background: #f4f7fb; border: 1px solid #e4eaf2; border-radius: 50%; cursor: pointer; }
.hz-access-account { position: relative; display: flex; align-items: center; gap: 11px; margin: 14px; padding: 13px; background: #f7f9fd; border: 1px solid #edf1f6; border-radius: 16px; }
.hz-access-avatar { width: 38px; height: 38px; display: grid; flex: 0 0 38px; place-items: center; color: var(--ag-blue); background: #eaf1ff; border-radius: 50%; font-size: 11px; font-weight: 800; }
.hz-access-account strong,.hz-access-account small { display: block; }
.hz-access-account strong { font-size: 12px; }
.hz-access-account small { margin-top: 3px; color: var(--ag-muted); font-size: 9px; }
.hz-access-state { position: absolute; top: 16px; right: 14px; width: 8px; height: 8px; background: #18b978; border: 2px solid #fff; border-radius: 50%; }
.hz-access-language { padding: 0 14px 14px; }
.hz-access-language > span { display: block; margin-bottom: 8px; color: var(--ag-muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.hz-access-center .langbtn { display: grid !important; grid-template-columns: repeat(3,1fr); gap: 4px; padding: 4px; background: #f3f6fa; border-radius: 12px; }
.hz-access-center .langbtn span { padding: 7px; text-align: center; color: #7b899d; border-radius: 9px; font-size: 10px; font-weight: 750; cursor: pointer; }
.hz-access-center .langbtn span.on { color: #fff; background: var(--ag-blue); }
.hz-access-foot { padding: 12px 14px 14px; border-top: 1px solid #edf1f6; }
.hz-access-center .logout { width: 100% !important; height: 42px !important; display: flex !important; align-items: center; justify-content: center; gap: 8px; color: #c74a56 !important; background: #fff5f6 !important; border: 1px solid #ffe0e3 !important; border-radius: 13px !important; box-shadow: none !important; font-size: 10.5px; font-weight: 750; cursor: pointer; }
.hz-access-center .logout:hover { color: #b83442 !important; background: #ffedef !important; }
html[dir="rtl"] .hz-access-center { right: auto; left: 5vw; }
/* Account access trigger: final override after every shared rail rule. */
html[data-horizon="v1"] .rail .me.ac-access-trigger,
html[dir="rtl"][data-horizon="v1"] .rail .me.ac-access-trigger {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  background: #f2f6ff !important;
}

html[data-horizon="v1"] .rail .me.ac-access-trigger::after {
  display: none !important;
}

html[data-horizon="v1"] .rail .me.ac-access-trigger .av {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
}

html[data-horizon="v1"] .rail .me.ac-access-trigger > div:not(.av) {
  display: none !important;
}

body.ac-open #objBtn {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Respect the retired dashboard route for operational accounts. */
html[data-horizon="v1"]:not([data-ag-role="superadmin"]) #navDash { display: none !important; }
