:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --ink: #111111;
  --muted: #616161;
  --line: #e6e6e6;
  --accent: #0040ff;
  --accent-dark: #001963;
  --critical: #ff6900;
  --watch: #9b51e0;
  --ok: #00a86b;
  --mesh-green: #00d084;
  --mesh-yellow: #fcb900;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 14% -10%, rgba(0, 64, 255, 0.16), transparent 32rem),
    linear-gradient(180deg, #ffffff 0, var(--bg) 280px);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 32px;
  background: #050505;
  border-bottom: 1px solid #1f1f1f;
  color: #fff;
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 160px;
}

.brand-logo {
  width: 132px;
  height: auto;
  display: block;
}

.header-title {
  flex: 1;
  min-width: 240px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #90abff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 16px;
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px 32px 48px;
}

.actions,
.toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
button,
.button {
  height: 38px;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

input,
select {
  min-width: 190px;
  padding: 0 10px;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button.secondary,
.button.secondary {
  background: #fff;
  color: var(--accent);
  border-color: #fff;
}

.status-strip {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  margin-bottom: 18px;
  border: 1px solid #cfd9ff;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  box-shadow: 0 8px 26px rgba(0, 64, 255, 0.08);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.kpi {
  padding: 18px;
  border-top: 3px solid var(--accent);
}

.kpi span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.kpi strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.toolbar {
  align-items: end;
  padding: 14px 0 20px;
}

.admin-panel {
  margin-bottom: 18px;
}

.ops-panel {
  margin-bottom: 18px;
}

.ops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
}

.ops-readiness {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 16px 0;
}

.ops-readiness div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}

.ops-readiness span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ops-readiness strong {
  font-size: 18px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.admin-metric {
  height: auto;
  min-height: 74px;
  display: grid;
  justify-items: start;
  gap: 6px;
  padding: 14px;
  background: #f8fbfc;
  border-color: var(--line);
  color: var(--ink);
  text-align: left;
}

.admin-metric.is-active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: #f4f7ff;
}

.admin-metric span {
  color: var(--muted);
  font-size: 12px;
}

.admin-metric strong {
  font-size: 26px;
}

.admin-table-wrap {
  max-height: 360px;
}

.audit-panel {
  margin-bottom: 18px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 18px;
  margin-bottom: 18px;
}

.layout:last-child {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.panel-title {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-title h2 {
  min-width: 0;
  line-height: 1.25;
}

.panel-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.heatmap-wrap {
  overflow: auto;
  padding: 16px;
}

.heatmap {
  display: grid;
  gap: 6px;
  min-width: 760px;
}

.heatmap-row {
  display: grid;
  grid-template-columns: 130px repeat(var(--weeks), minmax(38px, 1fr));
  gap: 6px;
  align-items: center;
}

.heatmap-label,
.heatmap-week {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.cell {
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.risk-critical {
  background: var(--critical);
}

.risk-watch {
  background: var(--watch);
}

.risk-ok {
  background: var(--ok);
}

.team-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.team-item {
  display: grid;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.team-item:last-child {
  border-bottom: 0;
}

.team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eef0;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #2c60ff);
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0 6px 6px 0;
  padding: 0 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.chip-ok {
  background: var(--ok);
}

.chip-critical {
  background: var(--critical);
}

.chip-watch {
  background: var(--watch);
}

.chip-neutral {
  background: #111111;
}

.date-range {
  display: block;
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.table-wrap {
  max-height: 430px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  background: #f8fbfc;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

td small {
  display: block;
  color: var(--muted);
}

code {
  white-space: normal;
  color: #333;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.empty {
  color: var(--muted);
  padding: 18px;
}

@media (max-width: 920px) {
  .topbar,
  main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .topbar,
  .layout {
    display: block;
  }

  .brand-lockup {
    margin-bottom: 14px;
  }

  .actions {
    margin-top: 16px;
  }

  .kpi-grid,
  .admin-metrics,
  .ops-readiness,
  .layout:last-child {
    grid-template-columns: 1fr;
  }

  .panel {
    margin-bottom: 18px;
  }

  .panel-title {
    align-items: flex-start;
    flex-direction: column;
  }
}
