/* The ops dashboard (OEP-77): plain, dense, to the point. */
:root {
  --ground: #F6F7F9; --card: #FFFFFF; --line: #E3E6EA; --line-soft: #EEF0F3; --input: #D5D9DF;
  --text: #15181D; --text-2: #3A414B; --muted: #5B6470; --faint: #8A9099;
  --accent: #2457D6; --accent-dark: #1A3FA0;
  --ok: #1F7A3D; --ok-bg: #E7F4EC; --warn: #8A5100; --warn-bg: #FFF4E0;
  --fail: #B42318; --fail-bg: #FDECEA; --fail-line: #F3C7C2; --fail-soft: #FFF8F7;
  --info: #2457D6; --info-bg: #EEF2FC; --muted-bg: #F0F1F3;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--text); font: 14px/1.45 Inter, system-ui, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); font-size: 13px; }

.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { font-weight: 600; font-size: 15px; color: var(--text); }
.brand:hover { color: var(--text); text-decoration: none; }
.nav { display: flex; gap: 20px; }
.nav a { color: var(--muted); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.find { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.find input { width: 280px; max-width: 60vw; height: 36px; padding: 0 12px; border: 1px solid var(--input); border-radius: 8px; font: inherit; font-size: 14px; }
.find .miss { color: var(--fail); }
.signout button { height: 36px; padding: 0 12px; border: 1px solid var(--input); background: var(--card); color: var(--text-2); border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer; }
.signout button:hover { border-color: var(--text-2); color: var(--text); }

.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.signin-card { width: 100%; max-width: 380px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.signin-card h1 { margin: 0; font-size: 20px; font-weight: 600; }
.signin-card p { margin: 0; color: var(--muted); }
.signin-google { display: inline-flex; justify-content: center; align-items: center; height: 40px; border-radius: 8px; background: var(--text); color: #FFFFFF; font-weight: 500; }
.signin-google:hover { color: #FFFFFF; text-decoration: none; background: var(--text-2); }
.signin-note { color: var(--fail) !important; }

main { display: flex; flex-direction: column; gap: 24px; padding-top: 24px; padding-bottom: 48px; }
.crumbs { font-size: 13px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.card-head { padding: 16px 20px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.card-head .note { font-size: 13px; color: var(--muted); }
.empty { padding: 20px; color: var(--muted); }
.error { padding: 20px; color: var(--fail); }

.health { padding: 14px 20px; display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.check { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.check.fail { color: var(--fail); font-weight: 500; }
.check.fail .dot { background: var(--fail); }
.check.off { color: var(--muted); }
.check.off .dot { background: var(--input); }
.version { margin-left: auto; color: var(--muted); font-size: 13px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tile { padding: 16px 20px; }
.tile .label { font-size: 12px; color: var(--muted); }
.tile .value { font-size: 28px; font-weight: 600; margin-top: 4px; }
.tile .value.fail { color: var(--fail); }
.tile .of { font-size: 16px; color: var(--muted); font-weight: 500; }

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th { font-weight: 500; color: var(--muted); font-size: 12px; text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td.dim { color: var(--muted); }
td.err { font-family: var(--mono); font-size: 12px; color: var(--text-2); white-space: normal; min-width: 260px; max-width: 480px; overflow-wrap: anywhere; }

.chip { display: inline-block; font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.fail { background: var(--fail-bg); color: var(--fail); }
.chip.info { background: var(--info-bg); color: var(--info); }
.chip.muted, .chip.wait { background: var(--muted-bg); color: var(--text-2); }

.who { padding: 20px; }
.who-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.who h1 { margin: 0; font-size: 22px; font-weight: 600; }
.facts { margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px 24px; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.filters button { height: 32px; padding: 0 12px; border: 1px solid var(--input); background: var(--card); color: var(--text); border-radius: 999px; font: inherit; font-size: 13px; cursor: pointer; }
.filters button[aria-pressed="true"] { border-color: var(--text); background: var(--text); color: #FFFFFF; }

.timeline { list-style: none; margin: 0; padding: 8px 20px 20px; }
.ev { display: grid; grid-template-columns: 84px 20px minmax(0, 1fr); gap: 12px; padding-top: 16px; }
.ev-time { font-size: 13px; color: var(--muted); padding-top: 1px; }
.ev-day { font-weight: 600; color: var(--text); }
.ev-rail { display: flex; flex-direction: column; align-items: center; }
.ev-rail .node { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); margin-top: 4px; flex: none; }
.ev-rail .line { flex: 1; width: 2px; background: var(--line); margin-top: 4px; }
.ev.fail .node { background: var(--fail); }
.ev.warn .node { background: #C77700; }
.ev.skip .node { background: none; border: 2px solid #C4C9D0; }
.ev.skip .ev-title { color: var(--muted); }
.ev-body { padding-bottom: 8px; min-width: 0; }
.ev-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.ev-title { font-weight: 500; }
.ev-type { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ev-summary { color: var(--text-2); margin-top: 4px; overflow-wrap: anywhere; }
.step { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; font-size: 13px; }
.step .svc { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.failbox { margin-top: 8px; border: 1px solid var(--fail-line); background: var(--fail-soft); border-radius: 8px; padding: 12px 14px; }
.failbox .msg { font-family: var(--mono); font-size: 13px; color: var(--fail); white-space: pre-wrap; overflow-wrap: anywhere; }
.failbox .when { margin-top: 6px; font-size: 13px; color: var(--text-2); }

.files { padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.files h2 { margin: 0; font-size: 16px; font-weight: 600; }
.files .note-plain { color: var(--muted); }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .find { margin-left: 0; width: 100%; }
  .find input { flex: 1; width: auto; max-width: none; }
  .version { margin-left: 0; }
  .ev { grid-template-columns: 64px 16px minmax(0, 1fr); gap: 8px; }
}
