/* Mac OS 9 "Platinum" — models-dashboard
 * Desktop-only. No frameworks. <30KB.
 */

:root {
  --plat-bg: #c0c0c0;
  --plat-bg-gradient: linear-gradient(180deg, #d4d4d4 0%, #b8b8b8 100%);
  --plat-win: #dddddd;
  --plat-light: #ffffff;
  --plat-mid: #808080;
  --plat-dark: #404040;
  --plat-black: #000000;
  --plat-blue: #3a6dbb;
  --plat-accent: #2e58a6;
  --plat-stripe-a: #b8b8b8;
  --plat-stripe-b: #d4d4d4;
  --plat-text: #1a1a1a;
  --plat-link: #1c47a8;
  --font-ui: 'Charcoal', 'Geneva', 'Lucida Grande', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--plat-bg-gradient);
  background-attachment: fixed;
  color: var(--plat-text);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.45;
  min-height: 100vh;
}

/* ===== Menubar (top) ===== */
.menubar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 22px;
  background: linear-gradient(180deg, #f4f4f4 0%, #c8c8c8 100%);
  border-bottom: 1px solid var(--plat-dark);
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-weight: 700;
  font-size: 12px;
  color: #111;
  user-select: none;
}
.menubar .apple { margin-right: 14px; font-size: 14px; }
.menubar .menu-item { padding: 0 8px; cursor: default; }
.menubar .right { margin-left: auto; font-weight: 400; color: #333; }

/* ===== Window chrome ===== */
.window {
  background: var(--plat-win);
  border: 1px solid #fff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  box-shadow:
    inset -1px -1px 0 #808080,
    inset 1px 1px 0 #fff,
    2px 2px 6px rgba(0,0,0,0.25);
  margin: 12px auto;
  max-width: 920px;
}

.window-titlebar {
  height: 19px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  background:
    repeating-linear-gradient(
      0deg,
      var(--plat-stripe-a) 0 1px,
      var(--plat-stripe-b) 1px 2px
    );
  border-bottom: 1px solid var(--plat-dark);
  user-select: none;
  cursor: default;
}
.window-titlebar.active {
  background:
    repeating-linear-gradient(
      0deg,
      #a8a8a8 0 1px,
      #d8d8d8 1px 2px
    );
}
.window-titlebar .title {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: #111;
  background: var(--plat-win);
  padding: 0 8px;
  border: 1px solid var(--plat-dark);
  border-radius: 2px;
  display: inline-block;
  max-width: fit-content;
  margin: 0 auto;
}
.window-titlebar .close-box,
.window-titlebar .zoom-box {
  width: 12px;
  height: 12px;
  background: var(--plat-win);
  border: 1px solid var(--plat-dark);
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
}
.window-titlebar .close-box { margin-right: 6px; }
.window-titlebar .zoom-box { margin-left: 6px; }

.window-body { padding: 14px; }

/* ===== Layout: app shell ===== */
.app {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
}

.sidebar {
  background: var(--plat-win);
  border: 1px solid var(--plat-dark);
  box-shadow: inset 1px 1px 0 #fff;
  padding: 8px;
  min-height: 360px;
}
.sidebar h3 {
  margin: 4px 0 8px 0;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--plat-dark);
  border-bottom: 1px dashed var(--plat-mid);
  padding-bottom: 4px;
}
.service-list { list-style: none; margin: 0; padding: 0; }
.service-list li {
  padding: 5px 8px;
  margin: 2px 0;
  cursor: pointer;
  font-size: 12px;
  border-radius: 2px;
  border: 1px solid transparent;
}
.service-list li:hover {
  background: #e8e8e8;
  border-color: var(--plat-mid);
}
.service-list li.active {
  background: var(--plat-blue);
  color: #fff;
  border: 1px solid var(--plat-accent);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.3);
}
.service-list li .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--plat-mid);
  vertical-align: middle;
}
.service-list li .dot.on  { background: #2faa56; }
.service-list li .dot.off { background: #c44; }

.main {
  min-width: 0;
}

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.card {
  background: #fff;
  border: 1px solid var(--plat-dark);
  box-shadow: inset 1px 1px 0 #fff, 1px 1px 0 #808080;
  padding: 10px 12px;
}
.card .label {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--plat-dark);
  margin-bottom: 4px;
}
.card .value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--plat-text);
}
.card .sub {
  font-size: 11px;
  color: var(--plat-mid);
  margin-top: 2px;
}

/* ===== Panels & tables ===== */
.panel {
  background: #fff;
  border: 1px solid var(--plat-dark);
  box-shadow: inset 1px 1px 0 #fff;
  margin-bottom: 14px;
}
.panel-title {
  background:
    repeating-linear-gradient(
      0deg,
      #cfcfcf 0 1px,
      #e6e6e6 1px 2px
    );
  border-bottom: 1px solid var(--plat-dark);
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  letter-spacing: 0.3px;
}
.panel-body { padding: 10px 12px; }

table.plat {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-family: var(--font-mono);
}
table.plat th,
table.plat td {
  padding: 4px 8px;
  border-bottom: 1px dotted var(--plat-mid);
  text-align: left;
}
table.plat th {
  background: #e8e8e8;
  font-family: var(--font-ui);
  font-weight: 700;
  border-bottom: 1px solid var(--plat-dark);
}
table.plat tbody tr:hover { background: #f4f4f4; }
table.plat td.err { color: #b22; font-weight: 700; }
table.plat td.ok  { color: #060; }

/* ===== Buttons / inputs ===== */
.btn {
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 3px 12px;
  background: linear-gradient(180deg, #f0f0f0, #c8c8c8);
  border: 1px solid var(--plat-dark);
  border-radius: 2px;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #888;
  cursor: pointer;
  color: #111;
}
.btn:hover { background: linear-gradient(180deg, #fff, #d8d8d8); }
.btn:active {
  background: linear-gradient(180deg, #b8b8b8, #d8d8d8);
  box-shadow: inset 1px 1px 0 #888, inset -1px -1px 0 #fff;
}

select.plat, input.plat {
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 2px 6px;
  background: #fff;
  border: 1px solid var(--plat-dark);
  box-shadow: inset 1px 1px 0 #d0d0d0;
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.toolbar label { font-size: 11px; color: var(--plat-dark); }

/* ===== Heatmap ===== */
.heatmap {
  display: grid;
  grid-template-columns: 32px repeat(24, 1fr);
  gap: 2px;
  font-size: 10px;
  font-family: var(--font-mono);
}
.heatmap .hcell {
  background: #eee;
  text-align: center;
  padding: 2px 0;
  color: var(--plat-dark);
  border: 1px solid transparent;
}
.heatmap .hcell.h { background: #e8eef6; }
.heatmap .hcell.lab { background: transparent; color: var(--plat-dark); }
.heatmap .hcell.v0 { background: #f0f0f0; }
.heatmap .hcell.v1 { background: #d5e4f5; }
.heatmap .hcell.v2 { background: #a8c7ec; }
.heatmap .hcell.v3 { background: #6f9ddb; }
.heatmap .hcell.v4 { background: #3a6dbb; color: #fff; }
.heatmap .hcell.v5 { background: #1f3f8a; color: #fff; }

/* ===== Footer ===== */
.footer {
  text-align: center;
  font-size: 11px;
  color: var(--plat-dark);
  padding: 10px 0 20px;
}
.footer a { color: var(--plat-link); }

/* ===== Subtle status pill ===== */
.pill {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  background: #e8e8e8;
  border: 1px solid var(--plat-mid);
  font-family: var(--font-mono);
}
.pill.ok  { background: #d8efdf; border-color: #5a9b73; color: #135b32; }
.pill.err { background: #f2d4d4; border-color: #b06868; color: #7a1a1a; }
