:root {
  color-scheme: light;
  --ink: #15202b;
  --muted: #5b6b7c;
  --line: #d7dee7;
  --bg: #eef3f8;
  --card: #fff;
  --ok: #0f7a45;
  --warn: #9a6700;
  --bad: #b42318;
  --info: #175cd3;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  font: 15px/1.45 "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #e4edf6, var(--bg) 36%);
}
h1, h2 { margin: 0 0 .35rem; font-family: Georgia, "Iowan Old Style", serif; }
h1 { font-size: clamp(1.6rem, 3vw, 2rem); }
h2 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
.muted, .eyebrow { color: var(--muted); }
.eyebrow { margin: 0 0 .2rem; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
label { display: block; font-size: .9rem; margin: 0 0 .75rem; }
input, select, button {
  font: inherit;
  border-radius: 8px;
}
button { min-height: 44px; }
input, select {
  width: 100%;
  margin-top: .3rem;
  padding: .7rem .8rem;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 16px;
}
button {
  border: 0;
  padding: .7rem 1rem;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}
button.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.login-card { width: min(420px, 100%); }
.login-card button { width: 100%; }
.mobile-bar { display: none; }
.nav-backdrop { display: none; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem;
}
#app {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 1rem;
  background: var(--ink);
  color: #fff;
}
.brand .eyebrow { color: #9fb0c3; }
.nav { display: flex; flex-direction: column; gap: .35rem; flex: 1; }
button.tab {
  width: 100%;
  text-align: left;
  background: transparent;
  color: #c5d0dc;
  border: 1px solid transparent;
  padding: .7rem .8rem;
}
button.tab.is-active {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}
.who {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  align-items: stretch;
  padding-top: .75rem;
  border-top: 1px solid #2c3a48;
}
.who span { color: #c5d0dc; font-size: .9rem; }
.who .secondary {
  background: transparent;
  color: #fff;
  border-color: #4a5b6c;
}
main { max-width: none; margin: 0; padding: 1.5rem 1.5rem 4rem; }
.toolbar, .filters {
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 1rem;
}
.filters label { margin: 0; min-width: 180px; }
.filters { flex-wrap: wrap; }
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
  gap: 1rem;
  align-items: start;
}
.table-wrap {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  min-width: 640px;
  background: #fff;
  border-collapse: collapse;
}
th, td {
  text-align: left;
  padding: .75rem .85rem;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
  vertical-align: top;
}
th { background: #f8fafc; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
tbody tr[data-id] { cursor: pointer; }
tbody tr.is-selected { background: #eef4ff; }
.pill {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
}
.ok { background: #e5f6ec; color: var(--ok); }
.stale, .warn { background: #fff4d6; color: var(--warn); }
.bad { background: #fde8e6; color: var(--bad); }
.info { background: #e7f0ff; color: var(--info); }
.status { min-height: 1.3em; color: var(--muted); margin: 0 0 .75rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
.detail h3 { margin: 0 0 .6rem; font-size: 1rem; }
.kv { display: grid; grid-template-columns: 8.5rem 1fr; gap: .35rem .6rem; margin: 0 0 1rem; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.empty { color: var(--muted); padding: 1rem; }
@media (max-width: 900px) {
  #app {
    display: block;
    min-height: 100dvh;
  }
  .mobile-bar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 20;
    gap: .75rem;
    align-items: center;
    padding: .7rem .9rem;
    background: var(--ink);
    color: #fff;
  }
  .menu-toggle {
    background: #2c3a48;
    color: #fff;
    padding: .55rem .8rem;
  }
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(15, 23, 32, .45);
  }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -100%;
    z-index: 40;
    width: min(280px, 86vw);
    overflow: auto;
    transition: left .2s ease;
  }
  body.nav-open .sidebar { left: 0; }
  body.nav-open { overflow: hidden; }
  main { padding: 1rem .9rem 3rem; }
  .toolbar, .filters {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar button, .filters button { width: 100%; }
  .filters label { min-width: 0; width: 100%; }
  .layout { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  th, td { padding: .7rem .7rem; font-size: .88rem; }
}
