:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #f4f7f8;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --side: #0b1220;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
}
.shell { display: flex; min-height: 100vh; }
.side {
  width: 248px;
  background: var(--side);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 0.9rem;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; gap: 0.7rem; align-items: center; padding: 0.2rem 0.4rem 1rem; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--teal); color: #fff; font-size: 1.1rem;
}
.brand-sub { color: #94a3b8; font-size: 0.78rem; }
.side-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.side-nav a {
  color: #cbd5e1; text-decoration: none; border-radius: 10px;
  padding: 0.55rem 0.7rem; display: flex; gap: 0.5rem; align-items: center;
}
.side-nav a.active, .side-nav a:hover { background: #1e293b; color: #fff; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 0.45rem; padding-top: 1rem; }
.who { display: flex; flex-direction: column; padding: 0 0.2rem 0.3rem; }
.who span { color: #94a3b8; font-size: 0.78rem; }
.main { flex: 1; padding: 1.4rem 1.5rem 2rem; min-width: 0; }
.page-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.45rem; margin: 0 0 0.2rem; }
.page-head p { margin: 0; color: var(--muted); }
.card-panel {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.05rem;
}
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.7rem; }
.metric {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem 0.8rem;
}
.metric span { display: block; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; }
.metric strong { font-size: 1.35rem; }
.tenant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.8rem; }
.tenant-card h2 { font-size: 1.05rem; margin: 0; }
.pill {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 0.12rem 0.55rem; font-size: 0.75rem; font-weight: 600;
}
.pill.live { background: #dcfce7; color: #166534; }
.pill.paused { background: #fef9c3; color: #854d0e; }
.pill.stopped { background: #fee2e2; color: #991b1b; }
.pill.done { background: #dbeafe; color: #1e40af; }
.pill.draft { background: #e2e8f0; color: #334155; }
.pill.scheduled { background: #ccfbf1; color: #0f766e; }
.chart-box { position: relative; height: 260px; }
.pill.ok { background: #ccfbf1; color: #115e59; }
.pill.warn { background: #ffedd5; color: #9a3412; }
.chip {
  border: 1px solid #cbd5e1; background: #fff; color: #334155; border-radius: 999px;
  padding: 0.2rem 0.7rem; font-size: 0.8rem; text-decoration: none; cursor: pointer;
}
.chip.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.table thead th { font-size: 0.72rem; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.table td { font-size: 0.86rem; vertical-align: middle; }
.btn-teal { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); color: #fff; }
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at top, #134e4a, #0b1220 55%);
}
.login-card { width: 100%; max-width: 420px; border: 0; border-radius: 16px; }
@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { display: block; }
  .side { width: 100%; height: auto; position: relative; }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
