:root {
  --overview-bg: #eff3f6;
  --overview-card: #fff;
  --overview-border: #e6eaee;
  --overview-text: #2d2c33;
  --overview-muted: #7f838d;
  --overview-green: #32a754;
  --overview-blue: #4285f4;
  --overview-red: #ff6464;
  --overview-yellow: #ffbf4b;
}

body.nimbus-page-overview .app-content,
body.nimbus-page-settings .app-content {
  background: var(--overview-bg);
}

body.nimbus-page-overview #filters,
body.nimbus-page-settings #filters {
  display: none;
}

body.nimbus-page-overview .main,
body.nimbus-page-settings .main {
  display: block;
  overflow: hidden;
}

body.nimbus-page-overview .sidebar,
body.nimbus-page-settings .sidebar {
  width: 100%;
  height: 100%;
  max-width: none;
  flex: none;
  background: var(--overview-bg);
}

body.nimbus-page-overview .sidebar > .stats,
body.nimbus-page-overview .sidebar > .search,
body.nimbus-page-settings .sidebar > .stats,
body.nimbus-page-settings .sidebar > .search,
body.nimbus-page-overview .main > .map-wrap,
body.nimbus-page-settings .main > .map-wrap {
  display: none !important;
}

body.nimbus-page-overview #workList,
body.nimbus-page-settings #workList {
  width: 100%;
  height: 100%;
  overflow: auto;
  background: var(--overview-bg);
}

.overview-page {
  min-width: 1120px;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--overview-bg);
  color: var(--overview-text);
}

.overview-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 60px;
  height: 60px;
  padding: 0 20px;
  border-bottom: 1px solid var(--overview-border);
  background: #fff;
}

.overview-page-header h1 {
  flex: 1;
  margin: 0;
  font-size: 24px;
  font-weight: 400;
}

.overview-clock {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: -2px;
  padding: 2px 2px 1px 20px;
  text-align: right;
  line-height: normal;
}

.overview-clock strong {
  font-size: 14px;
  font-weight: 400;
}

.overview-clock span {
  color: rgba(45,44,51,.7);
  font-size: 12px;
}

.overview-content {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-wrap: wrap;
  align-content: flex-start;
  padding: 10px;
  overflow-y: auto;
}

.overview-card {
  display: grid;
  grid-template-rows: 40px minmax(0,1fr);
  height: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--overview-border);
  border-radius: 4px;
  background: var(--overview-card);
}

.overview-card:hover { box-shadow: 0 2px 10px rgba(45,44,51,.35); }

.overview-card h2 {
  display: flex;
  align-items: center;
  height: 40px;
  margin: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--overview-border);
  font-size: 18px;
  font-weight: 400;
}

.overview-runs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 0;
  padding: 10px 0;
}
.overview-metric-cell { height: 100%; padding: 0 10px; border-right: 1px solid var(--overview-border); }
.overview-metric-cell:last-child { border-right: 0; }
.overview-metric {
  display: grid;
  grid-template-columns: max-content minmax(0,1fr);
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.overview-metric:hover { background: rgba(66,133,244,.05); }
.overview-metric-icon {
  position: relative;
  width: 36px;
  height: 36px;
  margin: 10px;
  border-radius: 50%;
  background: rgba(50,167,84,.25);
  color: #32a754;
  --metric-icon: url('/icons/runs/all.svg');
}
.overview-metric-icon::after { position: absolute; inset: 10px; content: ""; background: currentColor; mask: var(--metric-icon) center / contain no-repeat; }
.overview-metric-icon.is-active { background: rgba(66,133,244,.25); color: #4285f4; --metric-icon: url('/icons/runs/bus-blue.svg'); }
.overview-metric-icon.is-overlap { background: rgba(255,95,95,.25); color: #ff5f5f; --metric-icon: url('/icons/runs/overlap-active.svg'); }
.overview-metric-icon.is-no-unit { background: rgba(255,95,95,.25); color: #ff5f5f; --metric-icon: url('/icons/runs/no-unit-muted.svg'); }
.overview-metric-copy { display: flex; flex-direction: column; min-width: 0; padding: 10px; }
.overview-metric-copy strong { font-size: 20px; font-weight: 400; line-height: normal; }
.overview-metric-copy span { color: rgba(45,44,51,.7); font-size: 14px; white-space: nowrap; }

.overview-tracking-grid { display: grid; grid-template-columns: 1fr repeat(4,3fr); grid-template-rows: minmax(0,1fr); min-height: 0; padding: 10px 0; }
.overview-tracking-cell { container-type: size; min-width: 0; min-height: 0; height: 100%; padding: 0 10px; border-right: 1px solid var(--overview-border); }
.overview-tracking-cell:last-child { border-right: 0; }
.overview-tracking-total,
.overview-tracking-metric { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.overview-tracking-total { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-width: 60px; padding: 10px; }
.overview-tracking-total:hover { background: rgba(66,133,244,.05); }
.overview-tracking-total strong { font-size: 20px; font-weight: 400; }
.overview-tracking-total span { color: rgba(45,44,51,.7); font-size: 14px; }
.overview-tracking-metric { --overview-ring-size: min(134px,round(down,100cqh,1px),max(60px,calc(100cqw - 160px))); width: round(down,100%,1px); height: round(down,100%,1px); display: grid; grid-template-columns: calc(var(--overview-ring-size) + 10px) minmax(0,1fr); align-items: center; text-align: left; }
.overview-tracking-metric.is-empty { opacity: .6; }
.overview-tracking-metric.is-late { --overview-ring-color: #ff5f5f; }
.overview-tracking-metric.is-early { --overview-ring-color: #ffb511; }
.overview-tracking-metric.is-noshow { --overview-ring-color: #db7f67; }
.overview-tracking-metric.is-nounit { --overview-ring-color: #46c9c0; }
.overview-ring { position: relative; display: grid; place-items: center; width: calc(var(--overview-ring-size) + 10px); height: var(--overview-ring-size); }
.overview-ring::before { --overview-stroke: 15px; inset: 0 5px; background: conic-gradient(var(--overview-ring-color) var(--overview-ring-progress),#eff3f6 0); }
.overview-tracking-legend { display: block; padding: 10px; }
.overview-tracking-legend-row { display: flex; align-items: center; padding: 5px; font-size: 14px; color: rgba(45,44,51,.7); }
.overview-tracking-legend-row > span:last-child { padding-left: 10px; }
.overview-tracking-legend-row.is-chart-active { background: rgba(66,133,244,.05); }
.overview-dot { display: inline-block; width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; }
.overview-dot.is-late { background: #ff5f5f; }
.overview-dot.is-early { background: #ffb511; }
.overview-dot.is-noshow { background: #db7f67; }
.overview-dot.is-nounit { background: #46c9c0; }

.overview-widget { flex-basis: 100%; height: 23%; min-height: 164px; padding: 10px; }
.overview-widget-stops { flex-basis: 40%; height: 54%; min-height: 310px; }
.overview-widget-routes { flex-basis: 60%; height: 54%; min-height: 310px; }
.overview-widget.is-single { flex-basis: 100%; }

.overview-donut-body {
  min-height: 0;
  padding: 20px;
}
.overview-donut-layout {
  container-type: size;
  --overview-donut-size: min(calc(round(nearest,100cqw,1px) * .4),100cqh);
  display: grid;
  grid-template-columns: max-content minmax(0,1fr);
  align-items: center;
  width: 100%;
  height: round(nearest,100%,1px);
}
.overview-donut {
  position: relative;
  width: calc(var(--overview-donut-size) + 10px);
  height: var(--overview-donut-size);
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.overview-donut::before { --overview-stroke: 31px; inset: 2px 7px; background: var(--overview-donut-paint); }
.overview-ring::before,
.overview-donut::before {
  position: absolute;
  border-radius: 50%;
  content: "";
  transform: scaleX(-1);
  mask-image:
    radial-gradient(farthest-side,transparent calc(100% - var(--overview-stroke) - 3px),#000 calc(100% - var(--overview-stroke) - 3px) calc(100% - 3px),transparent calc(100% - 3px)),
    var(--overview-active-sector,linear-gradient(transparent,transparent)),
    radial-gradient(farthest-side,transparent calc(100% - var(--overview-stroke) - 6px),#000 calc(100% - var(--overview-stroke) - 6px));
  mask-composite: add,intersect;
}
.overview-chart-number { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.overview-chart-number text { fill: #2d2c33; font-size: 20px; }
.overview-chart-number.is-small text { font-size: 16px; }

.overview-legend { display: flex; flex-direction: column; width: calc(round(nearest,100cqw,1px) - var(--overview-donut-size) - 10px); min-width: 0; padding: 10px; }
.overview-legend-row { display: flex; align-items: center; width: 100%; padding: 5px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.overview-legend-row.is-chart-active { background: rgba(66,133,244,.05); }
.overview-legend-row strong { margin-left: auto; font-size: 14px; font-weight: 400; }
.overview-legend-label { padding-left: 10px; color: rgba(45,44,51,.7); font-size: 14px; white-space: nowrap; }
.overview-empty-legend { color: #999da8; }

.overview-chart-tooltip { position: fixed; z-index: 30; pointer-events: none; }
.overview-chart-tooltip-content { display: grid; grid-template-columns: max-content auto; align-items: center; padding: 5px 10px; background: #fff; border-radius: 5px; filter: drop-shadow(0 0 5px rgba(45,44,51,.35)); }
.overview-chart-tooltip-icon { width: 16px; height: 16px; margin-left: -2px; margin-right: 5px; background: currentColor; mask: var(--overview-tooltip-icon) center / contain no-repeat; }
.overview-chart-tooltip-value { font-size: 12px; font-weight: 400; line-height: normal; color: #2d2c33; }
.overview-chart-tooltip-triangle { position: relative; top: -1px; left: calc(50% - 8px); width: 16px; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 8px solid #fff; filter: drop-shadow(0 5px 5px rgba(45,44,51,.35)); }

.overview-route-body { display: grid; grid-template-columns: 66% minmax(0,1fr); min-height: 0; }
.overview-route-body .overview-donut-body { min-width: 0; }
.overview-route-extra { height: 100%; padding: 20px 0; }
.overview-route-extra-inner { display: flex; flex-direction: column; justify-content: center; gap: 20px; height: 100%; padding: 0 20px; border-left: 1px solid var(--overview-border); }
.overview-route-extra button { display: flex; flex-direction: column; align-items: stretch; font: inherit; text-align: left; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.overview-route-extra button:hover span { text-decoration: underline; }
.overview-route-extra strong { font-size: 20px; font-weight: 400; }
.overview-route-extra span { color: rgba(45,44,51,.7); font-size: 14px; }

@media (max-width: 1280px) {
  .overview-page { min-width: 980px; }
  .overview-content { padding: 8px; }
  .overview-widget { padding: 8px; }
}
