:root {
  --ink: #10243a;
  --muted: #5b7186;
  --line: #dce5ed;
  --surface: #ffffff;
  --page: #f4f7fa;
  --accent: #1f6f8b;
  --ok: #1f7a4d;
  --warn: #9a6206;
  --bad: #a3282c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 14px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 20px;
  height: 56px;
  background: #16324b;
  color: #eaf2f8;
}

.brand-mark { font-weight: 650; letter-spacing: 0.2px; }

.app-nav { display: flex; gap: 4px; flex: 1; }

.app-nav a {
  color: #c6d8e6;
  text-decoration: none;
  padding: 6px 11px;
  border-radius: 5px;
  font-size: 13px;
}
.app-nav a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.app-nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.18); color: #fff; }

.identity { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #bcd0df; }
.identity select {
  font: inherit;
  padding: 4px 7px;
  border-radius: 5px;
  border: 1px solid #35566f;
  background: #1e3d59;
  color: #eaf2f8;
}

.view { flex: 1; padding: 22px 24px 36px; max-width: 1120px; width: 100%; margin: 0 auto; }

h1 { font-size: 19px; margin: 0 0 3px; }
.page-lede { color: var(--muted); margin: 0 0 18px; font-size: 13px; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; min-height: 32px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; margin-bottom: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 13px 15px; }
.card .value { font-size: 24px; font-weight: 600; }
.card .label { color: var(--muted); font-size: 12px; }

table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 9px 13px; border-bottom: 1px solid var(--line); font-size: 13px; }
th { background: #eef3f8; font-weight: 600; font-size: 12px; color: #3d556b; }
tbody tr:last-child td { border-bottom: none; }

.status-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.status-pill[data-status="in-transit"] { background: #dff0e6; color: var(--ok); }
.status-pill[data-status="delivered"] { background: #e6ecf2; color: #46617a; }
.status-pill[data-status="delayed"] { background: #fbe6dd; color: var(--bad); }
.status-pill[data-status="scheduled"] { background: #e9eefc; color: #37489a; }
.status-pill[data-status="active"] { background: #dff0e6; color: var(--ok); }
.status-pill[data-status="maintenance"] { background: #fdf0d8; color: var(--warn); }
.status-pill[data-status="idle"] { background: #e6ecf2; color: #46617a; }
.status-pill[data-status="critical"] { background: #fbe6dd; color: var(--bad); }
.status-pill[data-status="warning"] { background: #fdf0d8; color: var(--warn); }
.status-pill[data-status="info"] { background: #e6ecf2; color: #46617a; }

.button {
  font: inherit;
  padding: 6px 13px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button:disabled { opacity: 0.5; cursor: not-allowed; }

.workflow-status { color: var(--muted); font-size: 12.5px; }

.report-slot { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px; min-height: 220px; }
.report-frame { width: 100%; height: 260px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.report-note, .report-loading, .report-error { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
.report-error { color: var(--bad); }
.empty-slot { color: var(--muted); font-size: 13px; }

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  background: var(--surface);
}
.runtime-state { font-variant-numeric: tabular-nums; }

.telemetry { width: 100%; font-size: 12.5px; }
.telemetry td { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
