/**
 * Dashboard ops layout — white cards, mockup composition.
 * Light theme is primary; dark keeps readable surfaces (no navy “attention” slab).
 */

.dash-page--ops {
  gap: 16px;
  padding: 4px 2px 28px;
}

.dash-ops-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 10px 14px 12px;
  border-radius: 1.25rem;
}

.dash-ops-crumb {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 6px;
}

.dash-ops-hero h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.15;
}

.dash-ops-hero-sub {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
}

.dash-ops-hero-text {
  flex: 1 1 240px;
  min-width: 0;
}

.dash-ops-hero-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 560px;
  min-width: 0;
}

.dash-ops-hero-actions .dash-topbar-search {
  position: relative;
  flex: 1 1 200px;
  max-width: 280px;
  min-width: 160px;
  margin: 0;
  height: 36px;
}

.dash-ops-hero-actions .dash-search-icon {
  left: 12px;
  font-size: 14px;
}

.dash-ops-hero-actions .dash-search-input {
  height: 36px;
  background: #fff;
  border: 1px solid #d8e0ea;
  color: #0f172a;
  padding: 0 12px 0 34px;
  border-radius: 999px;
  font-size: 13px;
  box-sizing: border-box;
}

.dash-ops-hero-actions .dash-toolbar {
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
  height: 36px;
  background: transparent;
  border: none;
  flex: 0 0 auto;
}

.dash-ops-hero-actions .dash-week-picker {
  height: 36px;
  gap: 4px;
}

.dash-ops-hero-actions .dash-date-range {
  display: inline-flex;
  align-items: center;
  height: 36px;
  background: #fff;
  border: 1px solid #d8e0ea;
  color: #334155;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  box-sizing: border-box;
  white-space: nowrap;
}

.dash-ops-hero-actions .dash-week-nav {
  width: 36px;
  height: 36px;
  background: #fff;
  border: 1px solid #d8e0ea;
  color: #475569;
  border-radius: 999px;
  box-sizing: border-box;
}

.dash-ops-hero .gce-night-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #d8e0ea;
  background: #fff;
  color: #334155;
  letter-spacing: 0.04em;
  font-size: 11px;
  font-weight: 800;
}

.dash-ops-hero .gce-night-btn:hover {
  background: #f8fafc;
  border-color: #93c5fd;
  color: #1e3a8a;
}

.dash-ops-hero .gce-night-btn.is-night {
  background: #1e3a8a;
  border-color: #93c5fd;
  color: #dbeafe;
  box-shadow: none;
}

.dash-ops-live {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px 0 8px;
  border: 1px solid #d8e0ea;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  flex: 0 0 auto;
  box-sizing: border-box;
  margin: 0;
}

.dash-ops-live input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.dash-ops-live-track {
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  flex: 0 0 auto;
}

.dash-ops-live-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

.dash-ops-live input:checked + .dash-ops-live-track {
  background: #166534;
}

.dash-ops-live input:checked + .dash-ops-live-track::after {
  left: 14px;
}

.dash-ops-live-label {
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  letter-spacing: 0.02em;
}

.dash-ops-hero-actions .dash-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  flex: 0 0 36px;
}

.dash-ops-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #d8e0ea;
  background: #1e3a8a;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  padding: 0;
}

.dash-ops-new-task {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: #1e3a8a;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.dash-ops-new-task:hover {
  background: #172554;
}

.dash-page--ops .dash-kpi-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dash-page--ops .dash-kpi-card,
.dash-page--ops .dash-ops-card {
  background: #ffffff !important;
  border: 1px solid #e8ecf3 !important;
  border-radius: 1.25rem !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  color: #0f172a;
}

.dash-page--ops .dash-kpi-label {
  color: #64748b;
}

.dash-page--ops .dash-kpi-value {
  color: #0f172a;
}

.dash-page--ops .dash-kpi-delta.pos {
  color: #166534;
}

.dash-page--ops .dash-kpi-delta.neg {
  color: #991b1b;
}

.dash-page--ops .dash-kpi-delta.muted-delta {
  color: #64748b;
}

.dash-ops-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  gap: 16px;
  align-items: start;
  min-height: 0;
}

.dash-ops-main-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 0;
}

.dash-ops-main-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.dash-ops-main-right > .dash-ops-card {
  flex: 0 0 auto;
}

.dash-ops-main-right .dash-ops-card-head h3 {
  font-size: 14px;
}

.dash-ops-fill-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.dash-ops-fill-row--map {
  grid-template-columns: minmax(0, 1fr);
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.dash-ops-fill-card {
  min-height: 0;
}

.dash-ops-map-card {
  min-width: 0;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dash-ops-map-card .dash-ops-card-head {
  align-items: center;
  flex: 0 0 auto;
}

.dash-ops-card-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.dash-ops-map-search {
  position: relative;
  flex: 0 1 220px;
  min-width: 160px;
}
.dash-ops-map-search input {
  width: 100%;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #d8e0ea;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
.dash-ops-map-search input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}
.dash-ops-map-search-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  min-width: 220px;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #d8e0ea;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}
.dash-ops-map-search-list[hidden] { display: none !important; }
.dash-ops-map-search-empty {
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}
.dash-ops-map-search-hit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}
.dash-ops-map-search-hit b {
  font-size: 12px;
  font-weight: 800;
  color: #1e3a8a;
}
.dash-ops-map-search-hit small {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}
.dash-ops-map-search-hit:hover,
.dash-ops-map-search-hit.is-active {
  background: rgba(255, 252, 247, 0.72);
}

.dash-ops-map-pin.is-search-hit .dash-ops-map-pin-tower {
  transform: scale(1.28);
  filter: drop-shadow(0 0 6px rgba(30, 58, 138, 0.55)) drop-shadow(0 2px 6px rgba(15, 23, 42, 0.35));
}

.dash-ops-map-vendor-select {
  min-width: 118px;
  max-width: 170px;
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid #d8e0ea;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.dash-ops-map-vendor-select:focus {
  outline: none;
  border-color: #fcd34d;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.dash-ops-map-meta {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.dash-ops-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 2px 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

.dash-ops-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dash-ops-map-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  flex: 0 0 12px;
}

.dash-ops-map-legend-tower {
  display: inline-flex;
  position: relative;
  width: 16px;
  height: 18px;
  line-height: 0;
  flex: 0 0 16px;
  align-items: flex-end;
  justify-content: center;
}

.dash-ops-map-legend-tower img {
  display: block;
  width: 16px;
  height: 16px;
}

.dash-ops-map-legend-tower .dash-ops-map-pin-beacon {
  width: 5px;
  height: 5px;
  bottom: 0;
}

.dash-ops-sites-map {
  flex: 0 0 auto;
  height: clamp(420px, 56vh, 720px);
  min-height: 420px;
  max-height: 720px;
  margin-top: 0;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid #d8e0ea;
  background: #dce3ec;
}

.dash-ops-sites-map .leaflet-tile-pane {
  filter: none;
}

.dash-ops-map-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 420px;
  padding: 20px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.dash-ops-map-pin {
  background: transparent !important;
  border: none !important;
}

.leaflet-marker-icon.dash-ops-map-pin {
  width: 32px !important;
  height: 36px !important;
  margin-left: -16px !important;
  margin-top: -34px !important;
}

.dash-ops-map-pin .dash-ops-map-pin-tower {
  position: relative;
  display: block;
  width: 32px;
  height: 36px;
  line-height: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
  transform-origin: 50% 100%;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.dash-ops-map-pin .dash-ops-map-pin-dish {
  display: block;
  width: 32px !important;
  height: 32px !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain;
  pointer-events: none;
}

.dash-ops-map-pin-beacon {
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  background: var(--pin);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85), 0 0 6px var(--pin);
  pointer-events: none;
}

.dash-ops-map-popup {
  min-width: 140px;
  font-size: 12px;
  color: #0f172a;
  line-height: 1.35;
}

.dash-ops-map-popup b {
  display: block;
  font-size: 13px;
  color: #1e3a8a;
}

.dash-ops-map-popup small {
  color: #64748b;
}

.dash-ops-map-popup-status {
  margin-top: 4px;
  color: #475569;
  font-weight: 600;
}

.dash-ops-map-popup button {
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--gce-glass-line, #d8e0ea);
  background: rgba(255, 252, 247, 0.8);
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.dash-ops-link--inline {
  font-size: 12px;
}

.dash-ops-map-measure-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--gce-glass-line, #d8e0ea);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.72);
  color: #1e3a8a;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.dash-ops-map-measure-btn:hover { background: rgba(255, 252, 247, 0.95); }
.dash-ops-map-measure-btn.is-active {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #fff;
}

.dash-ops-map-zoom {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid #d8e0ea;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.dash-ops-map-zoom-btn {
  min-width: 32px;
  height: 32px;
  margin: 0;
  padding: 0 10px;
  border: none;
  border-right: 1px solid #d8e0ea;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.dash-ops-map-zoom-btn:last-child { border-right: none; }
.dash-ops-map-zoom-btn:hover { background: #f1f5f9; }
.dash-ops-map-zoom-btn--fit {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #1e3a8a;
}

/* Zoom only via toolbar buttons — hide any leftover Leaflet control */
.dash-ops-sites-map .leaflet-control-zoom {
  display: none !important;
}
.dash-ops-sites-map.leaflet-container {
  cursor: grab;
}
.dash-ops-sites-map.leaflet-container.is-measuring,
.dash-ops-sites-map.leaflet-container.is-measuring .leaflet-grab {
  cursor: crosshair;
}

.dash-ops-map-measure-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.55);
  border: 1px solid var(--gce-glass-line, #d8e0ea);
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 700;
}
.dash-ops-map-measure-bar[hidden] { display: none !important; }
.dash-ops-map-measure-bar span { flex: 1 1 auto; min-width: 180px; }
.dash-ops-map-measure-bar button {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--gce-glass-line, #d8e0ea);
  background: #fff;
  color: #1e3a8a;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.dash-ops-sites-map.is-measuring,
.dash-ops-sites-map.is-measuring .leaflet-container {
  cursor: crosshair;
}

.dash-ops-map-dist-label {
  background: transparent;
  border: none;
}
.dash-ops-map-dist-label span {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: #1e3a8a;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
}
.dash-ops-map-measure-idx {
  background: transparent;
  border: none;
}
.dash-ops-map-measure-idx span,
.dash-ops-map-measure-handle span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0f172a;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}
.dash-ops-map-measure-handle {
  background: transparent;
  border: none;
  cursor: grab;
}
.dash-ops-map-measure-handle span {
  width: 20px;
  height: 20px;
  background: #1e3a8a;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.35);
}
.dash-ops-map-measure-handle.is-end span {
  width: 24px;
  height: 24px;
  background: #166534;
}
.dash-ops-map-measure-handle:active,
.leaflet-dragging .dash-ops-map-measure-handle {
  cursor: grabbing;
}

.dash-ops-fill-status {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.dash-ops-fill-status--ok {
  color: #166534;
}

.dash-ops-fill-status--warn {
  color: #a16207;
}

.dash-ops-fill-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.dash-ops-fill-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 8px;
  border-radius: 1rem;
  border: 1px solid #eef2f7;
  background: #f8fafc;
  text-align: center;
}

.dash-ops-fill-stat b {
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.dash-ops-fill-stat span {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  line-height: 1.25;
}

.dash-ops-fill-stat.is-warn {
  background: #fef3c7;
  border-color: #fcd34d;
}

.dash-ops-fill-stat.is-warn b {
  color: #a16207;
}

.dash-ops-deadline-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-ops-deadline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 1rem;
  border: 1px solid #eef2f7;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dash-ops-deadline-row:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.dash-ops-deadline-when {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 0 0 auto;
  min-width: 58px;
}

.dash-ops-deadline-when b {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
}

.dash-ops-deadline-when small {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
}

.dash-ops-deadline-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: #334155;
}

@media (max-width: 1180px) {
  .dash-ops-fill-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dash-ops-fill-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body:not([data-gce-mode="light"]) .dash-ops-fill-stat,
body:not([data-gce-mode="light"]) .dash-ops-deadline-row {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(255, 255, 255, 0.08);
}

body:not([data-gce-mode="light"]) .dash-ops-fill-stat b,
body:not([data-gce-mode="light"]) .dash-ops-deadline-when b {
  color: #f8fafc;
}

body:not([data-gce-mode="light"]) .dash-ops-deadline-label {
  color: #cbd5e1;
}

body:not([data-gce-mode="light"]) .dash-ops-fill-status--ok {
  color: #86efac;
}

body:not([data-gce-mode="light"]) .dash-ops-fill-status--warn {
  color: #fcd34d;
}

.dash-ops-card {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.dash-ops-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dash-ops-card-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.dash-ops-card-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-ops-mini-search {
  width: min(180px, 36vw);
  padding: 7px 10px 7px 30px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2494a3b8' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 10px 50% no-repeat;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
}

.dash-ops-filter-btn {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.dash-ops-table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
}

.dash-ops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.dash-ops-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 8px 10px;
  border-bottom: 1px solid #eef2f7;
  white-space: nowrap;
  background: #fff;
}

.dash-ops-table td {
  padding: 11px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.dash-ops-table tr:last-child td {
  border-bottom: none;
}

.dash-ops-table tr.dash-row-click {
  cursor: pointer;
}

.dash-ops-table tr.dash-row-click:hover td {
  background: #f8fafc;
}

.dash-ops-table .dash-site-id {
  font-weight: 800;
  color: #0f172a;
}

.dash-ops-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}

.dash-ops-pill--ok {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.dash-ops-pill--warn {
  background: #fef3c7;
  color: #a16207;
  border: 1px solid #fcd34d;
}

.dash-ops-pill--blue {
  background: #dbeafe;
  color: #1e3a8a;
  border: 1px solid #93c5fd;
}

.dash-ops-pill--bad {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.dash-ops-pct {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}

.dash-ops-pct .dash-progress {
  flex: 1 1 auto;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.dash-ops-pct .dash-prog-purple,
.dash-ops-pct .dash-prog-orange {
  display: block;
  height: 100%;
  background: #1e3a8a;
  border-radius: inherit;
}

.dash-ops-pct b {
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  min-width: 32px;
}

.dash-ops-foot {
  margin-top: 2px;
}

.dash-ops-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  color: #1e3a8a;
  cursor: pointer;
}

.dash-ops-link:hover {
  color: #d66a16;
  text-decoration: underline;
}

/* Attention — always white (never navy slab) */
.dash-ops-attention {
  background: #ffffff !important;
  border: 1px solid #e8ecf3 !important;
}

.dash-ops-attention-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-ops-attn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 12px;
  border-radius: 1rem;
  border: 1px solid #eef2f7;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.dash-ops-attn-row:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.dash-ops-attn-row--ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.dash-ops-attn-ico {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 14px;
  background: #dbeafe;
  color: #1e3a8a;
}

.dash-ops-attn-ico--warn {
  background: #fef3c7;
  color: #a16207;
}

.dash-ops-attn-ico--ok {
  background: #dcfce7;
  color: #166534;
}

.dash-ops-attn-text {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-ops-attn-text b {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.dash-ops-attn-text small {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.dash-ops-attn-cta {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #c2410c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.dash-ops-attn-row:hover .dash-ops-attn-cta {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #fff;
}

.dash-ops-attn-arrow {
  color: #94a3b8;
  font-weight: 900;
}

.dash-ops-attn-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #1e3a8a;
  border: 1px solid #1e3a8a;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.dash-ops-attn-count--ok {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.dash-ops-util-body {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dash-page--ops .dash-util-donut {
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
}

.dash-page--ops .dash-util-legend {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #475569;
}

.dash-page--ops .dash-util-legend > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-page--ops .dash-util-legend b {
  margin-left: auto;
  color: #0f172a;
  font-weight: 800;
}

.dash-ops-bottom {
  display: none;
}

.dash-ops-main-right .dash-ops-week-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.dash-ops-main-right .dash-ops-day {
  border: 1px solid #eef2f7;
  border-radius: 0.85rem;
  padding: 5px 3px;
  min-height: 56px;
  background: #fafbfc;
}

.dash-ops-main-right .dash-ops-task-list {
  min-height: 64px;
  max-height: 140px;
  overflow: auto;
}

.dash-ops-main-right .dash-ops-task-row {
  padding: 8px 10px;
  border-radius: 999px;
}

.dash-ops-week-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.dash-ops-day {
  border: 1px solid #eef2f7;
  border-radius: 0.85rem;
  padding: 6px 4px;
  min-height: 64px;
  background: #fafbfc;
}

.dash-ops-day-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.dash-ops-day-event {
  display: block;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  padding: 3px 5px;
  border-radius: 6px;
  margin-bottom: 4px;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-ops-day-event--purple {
  background: #ede9fe;
  color: #5b21b6;
}

.dash-ops-day-event--blue {
  background: #dbeafe;
  color: #1e3a8a;
}

.dash-ops-day-event--green {
  background: #dcfce7;
  color: #166534;
}

.dash-ops-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.dash-ops-tab {
  border: none;
  background: transparent;
  padding: 6px 10px;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
}

.dash-ops-tab.is-active {
  background: #ede9fe;
  color: #5b21b6;
}

.dash-ops-task-list,
.dash-ops-activity-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 72px;
  max-height: 160px;
  overflow: auto;
}

.dash-ops-task-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border-radius: 1rem;
  border: 1px solid #eef2f7;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dash-ops-task-row:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.dash-ops-task-main {
  flex: 1 1 auto;
  min-width: 0;
}

.dash-ops-task-main b {
  display: block;
  font-size: 13px;
  color: #0f172a;
}

.dash-ops-task-meta {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #a16207;
}

.dash-ops-task-status {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.dash-ops-empty {
  padding: 18px 8px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
}

.dash-ops-act-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.dash-ops-act-row:last-child {
  border-bottom: none;
}

.dash-ops-act-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 5px;
  flex: 0 0 auto;
  background: #a78bfa;
}

.dash-ops-act-dot--green { background: #22c55e; }
.dash-ops-act-dot--blue { background: #1e3a8a; }
.dash-ops-act-dot--amber { background: #f59e0b; }

.dash-ops-act-main b {
  display: block;
  font-size: 13px;
  color: #0f172a;
}

.dash-ops-act-main span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.dash-page--ops .dash-icon-btn {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #475569;
}

@media (max-width: 1280px) {
  .dash-ops-hero-actions .dash-topbar-search {
    max-width: 220px;
    flex-basis: 180px;
  }
}

@media (max-width: 1100px) {
  .dash-ops-hero-text {
    flex: 1 1 100%;
  }
  .dash-ops-hero-actions {
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .dash-ops-hero-actions .dash-topbar-search {
    max-width: none;
    flex: 1 1 240px;
  }
}

@media (max-width: 1180px) {
  .dash-ops-main {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .dash-ops-sites-map,
  .dash-ops-map-empty {
    min-height: 420px;
    height: clamp(420px, 56vh, 720px);
  }
  .dash-page--ops .dash-kpi-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .dash-page--ops .dash-kpi-grid--4 {
    grid-template-columns: 1fr;
  }
  .dash-ops-week-days {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Dark mode: keep cards light-ish / readable — never navy attention slab */
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-hero h2 {
  color: #f8fafc;
}
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-hero-sub,
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-crumb {
  color: #94a3b8;
}
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-hero-actions .dash-search-input,
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-hero-actions .dash-date-range,
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-hero-actions .dash-week-nav,
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-live,
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-hero .gce-night-btn {
  background: #161b26;
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-live-label {
  color: #e2e8f0;
}
body:not([data-gce-mode="light"]) .dash-page--ops .dash-kpi-card,
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-card {
  background: #161b26 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0;
}
body:not([data-gce-mode="light"]) .dash-page--ops .dash-kpi-value,
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-card-head h3,
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-table .dash-site-id,
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-attn-text,
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-task-main b,
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-act-main b {
  color: #f8fafc;
}
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-attn-row,
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-task-row,
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-day {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}
body:not([data-gce-mode="light"]) .dash-page--ops .dash-ops-attention {
  background: #161b26 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Light mode: force white surfaces */
html[data-gce-mode="light"] .dash-page--ops .dash-kpi-card,
html[data-gce-mode="light"] .dash-page--ops .dash-ops-card,
html[data-gce-mode="light"] .dash-page--ops .dash-ops-attention {
  background: #ffffff !important;
  border-color: #e8ecf3 !important;
}
html[data-gce-mode="light"] body.gce-dash-mockup,
html[data-gce-mode="light"] body.gce-dash-mockup main,
html[data-gce-mode="light"] body.gce-dash-mockup #dashboard-main {
  background: transparent !important;
}
