:root {
  --bg: #f4efe6;
  --panel: #fff9f1;
  --ink: #1f1b18;
  --muted: #6f665d;
  --line: #d8c7b0;
  --brand: #c35c2e;
  --brand-dark: #8a3410;
  --shadow: 0 24px 60px rgba(71, 41, 21, 0.14);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, rgba(195, 92, 46, 0.18), transparent 26%), linear-gradient(180deg, #f7f1e8 0%, #efe5d6 100%);
}
.shell { width: min(1200px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 56px; }
.system-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: #fff5d8;
  border: 1px solid rgba(138, 52, 16, 0.16);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.system-banner__copy {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.system-banner.is-healthy {
  background: #e7f6ea;
}
.system-banner.is-offline {
  background: #f8dfd9;
}
.hero { display: grid; gap: 24px; grid-template-columns: 2fr 1fr; margin-bottom: 24px; }
.hero__copy, .hero__card, .panel, .card {
  background: var(--panel);
  border: 1px solid rgba(138, 52, 16, 0.14);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.hero__copy { padding: 32px; }
.hero__card { padding: 24px; display: grid; gap: 16px; }
.eyebrow, .section-kicker { margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.18em; font-size: 12px; color: var(--brand-dark); }
h1, h2, h3 { margin: 0; }
h1, h2 { font-family: 'Instrument Serif', serif; font-weight: 400; }
.hero__text { color: var(--muted); max-width: 60ch; font-size: 16px; }
.layout { display: grid; gap: 24px; }
.panel { padding: 24px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { padding: 20px; }
.field-group { display: grid; gap: 14px; }
label { display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
input, select, textarea, button { font: inherit; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; background: #fffdf9; color: var(--ink);
}
textarea { resize: vertical; }
button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.split, .actions-row, .summary-strip { display: flex; gap: 12px; flex-wrap: wrap; }
.split > * { flex: 1 1 180px; }
.btn { border: 0; border-radius: 999px; padding: 12px 18px; cursor: pointer; }
.btn--primary { background: var(--brand); color: white; }
.btn--ghost { background: #f3e3d1; color: var(--brand-dark); }
.status-pill, .summary-chip {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 8px 14px; background: #f2e6d7; color: var(--brand-dark);
}
.status-pill--warm { background: #f9ebc9; }
.metric { display: grid; gap: 4px; }
.metric span { color: var(--muted); font-size: 13px; }
.metric strong { font-size: 22px; }
.progress-panel {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(195, 92, 46, 0.08), rgba(255, 249, 241, 0.9));
  border: 1px solid rgba(138, 52, 16, 0.12);
}
.progress-panel__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--brand-dark);
}
.progress-panel__head span {
  color: var(--muted);
  font-size: 14px;
}
.progress-bar {
  height: 16px;
  border-radius: 999px;
  background: rgba(138, 52, 16, 0.12);
  overflow: hidden;
}
.progress-bar__fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c35c2e 0%, #ee9158 100%);
  transition: width 0.25s ease;
}
.log {
  margin: 0; background: #201913; color: #f8efe4; border-radius: 20px; padding: 16px; overflow: auto; min-height: 96px;
}
.table-shell { overflow: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: rgba(195, 92, 46, 0.06); }
@media (max-width: 860px) {
  .system-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .hero { grid-template-columns: 1fr; }
  .shell { width: min(100% - 20px, 1200px); padding-top: 20px; }
}
