:root {
  --card-radius: 14px;
  --muted: #475569;
  --surface: #f2f6fb;
  --ink: #0f172a;
  --line: rgba(15, 23, 42, 0.08);
  --critical: #ef4444;
  --critical-strong: #b91c1c;
  --critical-soft: rgba(239, 68, 68, 0.12);
  --warn: #f97316;
  --warn-soft: rgba(249, 115, 22, 0.14);
  --ok: #334155;
  --ok-soft: rgba(148, 163, 184, 0.18);
  --neutral: #1d4ed8;
  --panel-bg: #fff;
}

body {
  background: radial-gradient(circle at 12% 4%, #ffffff 0, #f2f6fb 40%, #edf3fb 100%);
  color: var(--ink);
}

.card {
  border: 0;
  border-radius: var(--card-radius);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.section-critical .card-header {
  box-shadow: inset 0 -2px 0 var(--critical-soft);
}

.section-neutral .card-header {
  box-shadow: inset 0 -2px 0 rgba(29, 78, 216, 0.18);
}

.ops-banner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.ops-banner-item {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.45rem 0.65rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  font-size: 0.86rem;
}

.ops-subtitle {
  flex-basis: 100%;
  margin-top: 0.12rem;
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.25;
  font-weight: 500;
}

.time-pill {
  width: 200px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  white-space: nowrap;
}

.time-pill-label {
  flex: 0 0 auto;
}

.time-pill-value {
  flex: 1 1 auto;
  margin-left: auto;
  text-align: right;
}

#asOfVilniusIcon,
#asOfCostaRicaIcon {
  margin-left: 0.2rem;
}

.ops-banner-split {
  align-items: center;
}

.ops-split-metrics {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.12rem;
}

.ops-split-item {
  padding: 0.08rem 0.12rem;
}

.ops-split-item + .ops-split-item {
  border-left: 1px solid rgba(15, 23, 42, 0.18);
  padding-left: 0.62rem;
}

.ops-split-label {
  display: block;
  color: #64748b;
  font-size: 0.68rem;
  line-height: 1.2;
}

.ops-split-value {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
}

.maintenance-breach {
  color: var(--critical-strong);
}

.maintenance-breach-icon {
  margin-left: 0.3rem;
  color: var(--critical);
  font-size: 0.72rem;
  vertical-align: middle;
}

.critical-announcement {
  border: 1px solid rgba(185, 28, 28, 0.34);
  border-radius: 12px;
  background: linear-gradient(120deg, #8b1f1f 0%, #b42323 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(127, 29, 29, 0.24);
  padding: 0.9rem 1.1rem;
  display: grid;
  grid-template-columns: auto 1px 1fr;
  align-items: center;
  gap: 0.85rem;
  animation: announcement-glow 5.4s ease-in-out infinite;
}

.critical-announcement-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.critical-announcement-divider {
  width: 1px;
  height: 2.1rem;
  background: rgba(255, 255, 255, 0.56);
}

.critical-announcement-text {
  text-align: left;
  font-size: 1.06rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.32;
}

.freeze-announcement {
  border: 1px solid rgba(37, 99, 235, 0.34);
  border-radius: 12px;
  background: linear-gradient(120deg, #1e3a8a 0%, #1d4ed8 100%);
  color: #e0ecff;
  box-shadow: 0 10px 28px rgba(29, 78, 216, 0.2);
  padding: 0.9rem 1.1rem;
  display: grid;
  grid-template-columns: auto 1px 1fr;
  align-items: center;
  gap: 0.85rem;
}

.freeze-announcement-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.freeze-announcement-divider {
  width: 1px;
  height: 2.1rem;
  background: rgba(224, 236, 255, 0.56);
}

.freeze-announcement-text {
  text-align: left;
  font-size: 1.06rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.32;
}

@keyframes announcement-glow {
  0%, 100% {
    filter: brightness(0.9) saturate(1);
    box-shadow: 0 10px 28px rgba(127, 29, 29, 0.24);
  }
  50% {
    filter: brightness(1.16) saturate(1.08);
    box-shadow: 0 13px 34px rgba(127, 29, 29, 0.4);
  }
}

.breach-focus {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.6rem;
  align-items: start;
}

.breach-secondary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: start;
}

.breach-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.breach-focus-compact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0;
}

.breach-focus-compact .breach-chip {
  font-size: 0.77rem;
  padding: 0.16rem 0.5rem;
}

.breach-focus-compact .breach-chips {
  width: 100%;
  padding: 0.5rem 0.65rem 0.55rem;
}

.breach-head {
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.65rem 0.45rem;
  border-bottom: 1px solid var(--line);
}

.maintenance-panel .breach-head {
  box-shadow: inset 0 -2px 0 var(--critical-soft);
}

.potential-panel .breach-head {
  box-shadow: inset 0 -2px 0 var(--critical-soft);
}

.potential-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.maintenance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.maintenance-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: -0.02rem;
}

.maintenance-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.14rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  font-weight: 600;
}

.status-icon {
  font-size: 0.76rem;
}

.status-running {
  color: #64748b;
}

.status-retired {
  color: var(--critical);
}

.maintenance-panel .breach-chip.maintenance-chip {
  border-color: rgba(220, 38, 38, 0.34);
  background: rgba(220, 38, 38, 0.08);
}

.maintenance-panel .breach-chip.maintenance-running .status-icon {
  color: #64748b;
}

.maintenance-panel .breach-chip.maintenance-retired .status-icon {
  color: var(--critical);
}

.potential-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: #64748b;
}

.potential-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.14rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  font-weight: 600;
}

.status-many,
.status-session-fail {
  color: var(--critical);
}

.potential-panel .breach-chip.potential-chip {
  border-color: rgba(220, 38, 38, 0.34);
  background: rgba(220, 38, 38, 0.08);
}

.breach-chip.potential {
  border-color: rgba(220, 38, 38, 0.34);
  background: rgba(220, 38, 38, 0.08);
}

.potential-panel .breach-chip.potential-chip .status-icon {
  color: var(--critical);
}

.breach-overflow-note {
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  color: #64748b;
  padding: 0.12rem 0.32rem;
}


.breach-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.breach-chip.red {
  border-color: rgba(220, 38, 38, 0.34);
  background: rgba(220, 38, 38, 0.08);
}

.breach-chip.amber {
  border-color: rgba(217, 119, 6, 0.34);
  background: rgba(217, 119, 6, 0.08);
}

.dashboard-red .low-priority-card {
  display: none;
}

.dashboard-green #alertState {
  color: #166534;
  font-weight: 700;
}

.dashboard-amber #alertState {
  color: #b45309;
  font-weight: 700;
}

.dashboard-red #alertState {
  color: #b91c1c;
  font-weight: 700;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--critical); }

.kpi-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  background: var(--panel-bg);
  font-size: 0.85rem;
}

.mini-muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.chart-wrap {
  position: relative;
  width: 100%;
  height: 320px;
}

.chart-wrap.tall {
  height: 360px;
}

.chart-wrap.short {
  height: 260px;
}

.chart-wrap.medium {
  height: 290px;
}

.chart-summary {
  margin: 0.55rem 0 0;
  color: #334155;
  font-size: 0.84rem;
  border-left: 3px solid rgba(51, 65, 85, 0.2);
  padding-left: 0.55rem;
}

.queue-action-badge {
  border-radius: 999px;
  padding: 0.2rem 0.62rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}

.queue-action-required {
  color: var(--critical-strong);
  background: var(--critical-soft);
  border-color: rgba(239, 68, 68, 0.36);
}

.queue-action-watch {
  color: #9a3412;
  background: var(--warn-soft);
  border-color: rgba(249, 115, 22, 0.35);
}

.queue-action-stable {
  color: var(--ok);
  background: var(--ok-soft);
  border-color: rgba(148, 163, 184, 0.42);
}

.queue-action-reason {
  margin: 0.52rem 0 0.2rem;
  font-size: 0.79rem;
  color: #475569;
}

.alerts-risk-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.alerts-risk-item {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0.35rem 0.5rem;
  background: var(--panel-bg);
}

.alerts-risk-label {
  display: block;
  font-size: 0.68rem;
  color: #64748b;
}

.alerts-risk-item strong {
  font-size: 1rem;
  line-height: 1.2;
}

.risk-breached {
  border-color: rgba(239, 68, 68, 0.36);
  background: rgba(239, 68, 68, 0.08);
}

.risk-atrisk {
  border-color: rgba(249, 115, 22, 0.36);
  background: rgba(249, 115, 22, 0.10);
}

.risk-ontrack {
  border-color: rgba(148, 163, 184, 0.42);
  background: rgba(148, 163, 184, 0.10);
}

.alerts-next-action {
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.08), rgba(249, 115, 22, 0.06));
  padding: 0.45rem 0.62rem;
  font-size: 0.8rem;
  color: #334155;
}

.alert-count-chip {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fafc;
  padding: 0.1rem 0.42rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.tickets-lane {
  display: grid;
  gap: 0.42rem;
}

.ticket-lane-row {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-bg);
  padding: 0.42rem 0.56rem;
  display: grid;
  grid-template-columns: 4px 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.ticket-lane-marker {
  width: 4px;
  height: 100%;
  border-radius: 4px;
  background: #94a3b8;
}

.ticket-lane-row.breached .ticket-lane-marker { background: #ef4444; }
.ticket-lane-row.at-risk .ticket-lane-marker { background: #f97316; }
.ticket-lane-row.on-track .ticket-lane-marker { background: #94a3b8; }

.ticket-lane-title {
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.25;
}

.ticket-lane-meta {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.25;
}

.ticket-lane-right {
  text-align: right;
  min-width: 90px;
}

.ticket-lane-status {
  display: inline-block;
  border-radius: 999px;
  padding: 0.08rem 0.4rem;
  font-size: 0.67rem;
  font-weight: 700;
}

.ticket-lane-status.breached {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.12);
}

.ticket-lane-status.at-risk {
  color: #9a3412;
  background: rgba(249, 115, 22, 0.14);
}

.ticket-lane-status.on-track {
  color: #334155;
  background: rgba(148, 163, 184, 0.18);
}

.list-tight li {
  padding: 0.35rem 0.25rem;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.list-tight li:last-child {
  border-bottom: 0;
}

.list-compact li {
  padding: 0.22rem 0.2rem;
  font-size: 0.83rem;
}

.list-compact .badge {
  font-size: 0.66rem;
  padding: 0.2rem 0.34rem;
}

.list-compact .kpi-pill {
  padding: 0.14rem 0.42rem;
  font-size: 0.74rem;
}

.status-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.status-badge.red {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.14);
}

.status-badge.amber {
  color: #92400e;
  background: rgba(245, 158, 11, 0.16);
}

#errorCount {
  font-weight: 700;
}

#slope svg {
  width: 100%;
  height: 360px;
  display: block;
}

#heatmapChart svg {
  width: 100%;
  height: 290px;
  display: block;
}

.axis-label {
  fill: #64748b;
  font-size: 11px;
}

.hm-cell {
  stroke: rgba(15, 23, 42, 0.08);
}

.slope-label {
  font-size: 12px;
  fill: #334155;
  font-weight: 500;
}

.slope-rank {
  font-size: 12px;
  fill: #475569;
  font-weight: 600;
}

.slope-rank-dim {
  fill: #94a3b8;
  font-weight: 500;
}

.slope-grid-active {
  stroke: rgba(15, 23, 42, 0.10);
}

.slope-grid-inactive {
  stroke: rgba(15, 23, 42, 0.05);
}

.slope-line-stable {
  stroke: #94a3b8;
  stroke-width: 1.6;
  opacity: 0.75;
  stroke-dasharray: 4 3;
}

.slope-line-improve {
  stroke: #64748b;
  stroke-width: 3;
  opacity: 0.9;
}

.slope-line-worsen {
  stroke: #ef4444;
  stroke-width: 3;
  opacity: 0.95;
}

.slope-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}

.slope-kpi {
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  font-size: 0.73rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
}

.slope-kpi.improve {
  border-color: rgba(100, 116, 139, 0.35);
  color: #334155;
  background: #f8fafc;
}

.slope-kpi.worsen {
  border-color: rgba(239, 68, 68, 0.3);
  color: #991b1b;
}

.slope-kpi.stable {
  color: #475569;
}

.slope-kpi.new,
.slope-kpi.resolved {
  color: #334155;
}

.slope-legend-note {
  color: #64748b;
  font-size: 0.75rem;
  margin-bottom: 0.35rem;
}

.slope-mode-btn {
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
}

.slope-dot {
  fill: #0f172a;
}

.legend-dot-black {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #111;
  display: inline-block;
  margin-right: 0.4rem;
}

.legend-dot-white {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #111;
  display: inline-block;
  margin-right: 0.4rem;
}

.progress.slim {
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
}

.progress.slim .progress-bar {
  border-radius: 999px;
}

.countdown {
  font-variant-numeric: tabular-nums;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}

.countdown .unit {
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: 0.25rem;
  margin-right: 0.75rem;
}

.table > :not(caption) > * > * {
  padding: 0.6rem 0.75rem;
}

.donut-box {
  position: relative;
}

.donut-panel {
  display: grid;
  grid-template-columns: minmax(210px, 290px) 1fr;
  gap: 0.9rem;
  align-items: center;
}

.donut-stage {
  display: grid;
  justify-items: center;
  gap: 0.32rem;
}

.donut-chart-wrap {
  height: 250px;
}

.donut-center-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.75);
  text-transform: lowercase;
  letter-spacing: 0.6px;
}

.donut-ring-note {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 600;
}

.donut-stats {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.72rem;
  background: rgba(255, 255, 255, 0.78);
}

.donut-stats-title {
  font-size: 0.83rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.donut-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.donut-stat-item {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  padding: 0.34rem 0.45rem;
  background: #fff;
}

.donut-stat-label {
  display: block;
  color: #64748b;
  font-size: 0.71rem;
  line-height: 1.2;
  margin-bottom: 0.1rem;
}

.donut-stat-item strong {
  font-size: 0.93rem;
}

@media (max-width: 991.98px) {
  .ops-banner {
    grid-template-columns: 1fr 1fr;
  }

  .chart-wrap.medium,
  #heatmapChart svg {
    height: 260px;
  }

  .breach-focus {
    grid-template-columns: 1fr;
  }

  .breach-secondary-grid {
    grid-template-columns: 1fr;
  }

  .donut-panel {
    grid-template-columns: 1fr;
  }

  .donut-chart-wrap {
    height: 232px;
  }
}

@media (max-width: 575.98px) {
  .ops-banner {
    grid-template-columns: 1fr;
  }
}
