:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1e222b;
  --border: #2a2f3a;
  --text: #e6e8ee;
  --muted: #9aa3b2;
  --accent: #5aa9e6;
  --good: #46c06a;
  --bad: #e2575b;
  --diff: #3a2f12;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { font-weight: 700; font-size: 1.2rem; color: var(--text); }
.brand span { color: var(--accent); }
.topbar nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.lang-switch {
  margin-left: 0.5rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--muted);
}
.lang-switch:hover { color: var(--text); border-color: var(--muted); text-decoration: none; }
.inline { display: inline; margin: 0; }
.label-edit { display: inline-flex; gap: 0.35rem; align-items: center; }
.label-edit input[type=text] { width: auto; min-width: 12rem; padding: 0.25rem 0.4rem; }
.linkbtn {
  background: none; border: none; color: var(--accent); cursor: pointer;
  font: inherit; padding: 0;
}
.linkbtn:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }

h1 { font-size: 1.6rem; margin: 0 0 0.25rem; }
h2 { font-size: 1.2rem; margin: 1.75rem 0 0.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; }
.muted { color: var(--muted); }

table.grid { width: 100%; border-collapse: collapse; margin: 0.75rem 0; }
table.grid th, table.grid td {
  text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.grid th { color: var(--muted); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
table.grid tr:hover td { background: var(--panel-2); }

code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }

.badge { display: inline-block; padding: 0.05rem 0.45rem; border-radius: 999px; font-size: 0.78rem; border: 1px solid var(--border); }
.badge.yes { color: #d4f7df; background: rgba(70,192,106,0.16); border-color: rgba(70,192,106,0.4); }
.badge.no  { color: #ffd9da; background: rgba(226,87,91,0.14); border-color: rgba(226,87,91,0.4); }
.badge.pending  { color: #ffe7b0; background: rgba(214,168,46,0.16); border-color: rgba(214,168,46,0.45); }
.badge.approved { color: #d4f7df; background: rgba(70,192,106,0.16); border-color: rgba(70,192,106,0.4); }
.badge.rejected { color: #ffd9da; background: rgba(226,87,91,0.14); border-color: rgba(226,87,91,0.4); }

.yes-text { color: var(--good); }
.no-text { color: var(--bad); }

tr.differs td { background: var(--diff) !important; }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem; margin: 1rem 0; }

form.card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem; max-width: 460px; }
form.filters { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem; }
.field { margin-bottom: 0.8rem; display: flex; flex-direction: column; gap: 0.25rem; }
.field label { font-size: 0.85rem; color: var(--muted); }
.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row .field { flex: 1 1 180px; }

input[type=text], input[type=email], input[type=password], select, textarea {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 0.45rem 0.55rem; font: inherit; width: 100%;
}
textarea { min-height: 200px; font-family: ui-monospace, Consolas, monospace; }

button, .btn {
  background: var(--accent); color: #06121d; border: none; border-radius: 6px;
  padding: 0.5rem 0.9rem; font: inherit; font-weight: 600; cursor: pointer;
}
button.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
button.danger { background: rgba(226,87,91,0.14); color: #ffd9da; border: 1px solid rgba(226,87,91,0.4); }
/* Property values can be long JSON arrays of enum names; let them wrap inside
   their cell instead of blowing out the table width. */
.propval { overflow-wrap: anywhere; }
button:hover { filter: brightness(1.07); }

.error { background: rgba(226,87,91,0.12); border: 1px solid rgba(226,87,91,0.4); color: #ffd9da; padding: 0.6rem 0.8rem; border-radius: 6px; margin-bottom: 1rem; }
.notice { background: rgba(90,169,230,0.12); border: 1px solid rgba(90,169,230,0.4); color: #cfe7fb; padding: 0.6rem 0.8rem; border-radius: 6px; margin-bottom: 1rem; }

.toolbar { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin: 0.75rem 0; }
.spacer { flex: 1; }
.small { font-size: 0.85rem; }
.baseline-group { display: inline-flex; gap: 0.5rem; align-items: center; padding-left: 0.75rem; border-left: 1px solid var(--border); }
.pagination { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin: 0.75rem 0; }
/* Cross-page GPU selection (compare-select.js). When JS enhances the form the
   legacy per-page submit is hidden and the selection bar takes over. */
form[data-compare-select].js-active .js-fallback { display: none; }
.compare-bar { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin: 0.75rem 0; }
.compare-bar[hidden] { display: none !important; }
details > summary { cursor: pointer; color: var(--muted); margin: 0.4rem 0; }
