/* plasiv_ops dashboard — single stylesheet.
   Plain CSS, no framework. Optimized for "see fleet status in 1 second". */

:root {
  --bg: #fafafa;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --border: #d2d2d7;
  --card: #ffffff;
  --ok:    #22a06b;
  --warn:  #d6a300;
  --fail:  #c8403b;
  --stale: #8a8a8a;
  --none:  #e5e5ea;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
               "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
}

header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 32px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
header .logo {
  font-weight: 700;
  font-size: 18px;
  color: var(--fg);
  text-decoration: none;
}
header nav a {
  margin-right: 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
header nav a:hover { color: var(--fg); }
header .updated {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 24px;
  border-top: 1px solid var(--border);
  margin-top: 64px;
}

h1 { font-size: 24px; margin: 0 0 24px; }
h2 { font-size: 18px; margin: 32px 0 12px; }

.muted { color: var(--muted); font-size: 13px; }

.breadcrumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span { color: var(--fg); }

/* ── Fleet table ─────────────────────────────────────────── */

table.fleet {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

table.fleet th, table.fleet td {
  padding: 10px 14px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
table.fleet tr:last-child td { border-bottom: none; }
table.fleet th {
  background: #f5f5f7;
  font-weight: 600;
  color: var(--muted);
  text-transform: capitalize;
  font-size: 12px;
}

table.fleet td.host a {
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
}
table.fleet td.host a:hover { text-decoration: underline; }

table.fleet td.cell {
  text-align: center;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
table.fleet td.cell a {
  color: inherit;
  text-decoration: none;
  display: block;
}

/* status colors */
.status-ok    { background: rgba(34, 160, 107, 0.12); color: var(--ok); }
.status-warn  { background: rgba(214, 163, 0,  0.15); color: var(--warn); }
.status-fail  { background: rgba(200, 64, 59,  0.15); color: var(--fail); }
.status-stale { background: rgba(138, 138, 138, 0.12); color: var(--stale); }
.status-none, .status-unknown { background: var(--none); color: var(--muted); }

.chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.legend {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Modules table on host page ──────────────────────────── */

table.modules, table.history {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
table.modules th, table.modules td,
table.history th, table.history td {
  padding: 10px 14px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
table.modules tr:last-child td, table.history tr:last-child td { border-bottom: none; }
table.modules th, table.history th {
  background: #f5f5f7;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}

td.mod-name { font-weight: 500; }
td.age { color: var(--muted); }
td.tags code {
  margin-right: 6px;
  font-size: 11px;
  background: #f0f0f3;
  padding: 1px 6px;
  border-radius: 4px;
}

/* ── Empty state ─────────────────────────────────────────── */

.empty {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 48px;
  text-align: center;
  color: var(--muted);
}
.empty p { margin: 4px 0; }

canvas#timeline {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  max-width: 100%;
}
