/* WorkflowRemix Hub — the admin panel. The app's look: warm-dark planes, the orange
   accent with dark ink on it, purple edges, Instrument Sans where the system has it. */
:root {
  --bg-deep: #120f0d; --bg: #17130f; --surface: #1e1915; --surface2: #26201b; --surface3: #2f2822;
  --text: #f3ece4; --text2: #c9bfb3; --text3: #9a8f84; --text4: #6f665d;
  --accent: #ff8a3d; --accent-hi: #ff9d5c; --on-accent: #1a0f06;
  --border: #3a3046; --border-hi: #54456a;
  --red: #ff6b6b; --red-bg: #2a1414; --green: #5fd38d; --amber: #f5b84a;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 10px; --r-lg: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg-deep); color: var(--text); font: 14px/1.5 var(--sans); }
body { min-height: 100vh; overflow-x: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
code, pre, .mono { font-family: var(--mono); }

.boot { padding: 40px; color: var(--text3); }

/* ── Buttons and fields ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: var(--r);
  border: 1px solid var(--border); background: var(--surface2); cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--border-hi); background: var(--surface3); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 650; }
.btn-primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-bg); border-color: var(--red); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.input {
  width: 100%; padding: 9px 12px; border-radius: var(--r); border: 1px solid var(--border);
  background: var(--bg-deep); outline: none;
}
.input:focus { border-color: var(--accent); }

/* ── Sign-in ── */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-card {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border-hi);
  border-radius: 18px; padding: 26px 22px 22px; box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.login-card h1 { font-size: 22px; margin: 14px 0 4px; }
.login-card p { color: var(--text2); margin: 0 0 18px; }
.login-card form { display: grid; gap: 10px; }
.err { color: var(--red); font-size: 13px; min-height: 1.2em; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--on-accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-mark svg { width: 18px; height: 18px; }
.brand small { color: var(--text3); font-weight: 500; }

/* ── Shell ── */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--bg); border-right: 1px solid var(--border); padding: 18px 12px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--r); color: var(--text2); }
.nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.nav a.on { background: var(--surface2); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.nav .soon { color: var(--text4); padding: 8px 10px; font-size: 13px; }
.side-foot { margin-top: auto; display: grid; gap: 8px; }
.main { padding: 22px 28px 60px; min-width: 0; max-width: 1180px; }

.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text3); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 2px 0 0; font-size: 24px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar .input { width: 280px; max-width: 100%; }

/* ── Report list ── */
.list { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.row {
  display: grid; grid-template-columns: 128px 150px 90px 90px 1fr 70px; gap: 12px; align-items: center;
  padding: 10px 14px; border-top: 1px solid var(--border); color: var(--text); cursor: pointer;
}
.row:first-child { border-top: 0; }
.row:hover { background: var(--surface2); text-decoration: none; }
.row.head { cursor: default; background: var(--bg); color: var(--text3); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.row.head:hover { background: var(--bg); }
.row .id { font-family: var(--mono); color: var(--accent); }
.row .sum { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text2); }
.row .num { text-align: right; color: var(--text3); font-family: var(--mono); font-size: 12px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); font-size: 11.5px; color: var(--text2); }
.tag.job { border-color: var(--amber); color: var(--amber); }
.tag.desktop { border-color: var(--accent); color: var(--accent); }
.empty { padding: 40px 16px; text-align: center; color: var(--text3); }
.more { display: flex; justify-content: center; margin-top: 14px; }
.dim { color: var(--text3); }

/* ── Report detail ── */
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--text2); margin-bottom: 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; min-width: 0; }
.card h2 { font-size: 13px; margin: 0 0 10px; color: var(--text2); font-weight: 650; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 4px 12px; font-size: 13px; }
.kv dt { color: var(--text3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.note { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg-deep); border-radius: var(--r); padding: 10px 12px; margin: 0; }
.errline { color: var(--red); overflow-wrap: anywhere; }
.recent { list-style: none; margin: 0; padding: 0; font-size: 13px; display: grid; gap: 4px; }
.recent li { display: grid; grid-template-columns: 70px 1fr; gap: 8px; }

.log { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 12px; overflow: hidden; }
.log-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.log-head h2 { font-size: 13.5px; margin: 0; margin-right: auto; }
.log-head .input { width: 200px; padding: 5px 10px; font-size: 12.5px; }
.log-head label { display: inline-flex; gap: 5px; align-items: center; color: var(--text2); font-size: 12.5px; cursor: pointer; }
.log pre {
  margin: 0; padding: 10px 14px; max-height: 480px; overflow: auto; font-size: 12px; line-height: 1.5;
  color: var(--text2); white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg-deep);
}
.log pre .l-err { color: var(--red); }
.log pre .l-warn { color: var(--amber); }
.log pre .l-hit { background: rgba(255,138,61,.18); color: var(--text); }
.log.closed pre { display: none; }
.log.closed .log-head { border-bottom: 0; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 20px; font-weight: 600; font-size: 13px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--border); }
  .nav { display: flex; gap: 4px; }
  .nav .soon { display: none; }
  .side-foot { margin: 0 0 0 auto; display: flex; }
  .side-foot .dim { display: none; }
  .main { padding: 16px 16px 50px; }
  .row { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .row.head { display: none; }
  .row .c-ver, .row .c-size { display: none; }
  .row .sum { grid-column: 1 / -1; }
  .kv { grid-template-columns: 100px 1fr; }
}
.eyebrow.gap { display: block; margin-top: 10px; }

/* A report's Versions: theirs beside tested, problems in red. */
.card.wide { margin-bottom: 14px; }
.gap { margin-top: 10px; }
.tablewrap { overflow-x: auto; }
table.ver { width: 100%; border-collapse: collapse; font-size: 13px; }
table.ver th { text-align: left; color: var(--text3); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--border); }
table.ver td { padding: 5px 8px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
table.ver tr.bad td:first-child { color: var(--red); }
.st { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); font-size: 11.5px; color: var(--text2); white-space: nowrap; }
.st-same { border-color: var(--green); color: var(--green); }
.st-newer, .st-present { color: var(--text2); }
.st-older, .st-different, .st-missing, .st-disabled { border-color: var(--red); color: var(--red); }
