:root {
  --bg: #0f0d0e; --panel: #181415; --panel2: #211b1c; --line: #2f2627; --text: #ece6e6;
  --muted: #9a8c8d; --accent: #b3122e; --accent2: #d8304b; --ok: #2ecc71; --warn: #f1c40f; --bad: #e74c3c;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; }
.hidden { display: none !important; }
.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.muted { color: var(--muted); }
h1 { font-size: 22px; margin: 0 0 16px; } h2 { font-size: 16px; margin: 0 0 12px; } h3 { font-size: 14px; margin: 12px 0 8px; }
#app { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
aside { background: var(--panel); border-right: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; height: 100vh; }
.brand { font-weight: 700; font-size: 18px; }
nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: auto; }
nav a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 6px; }
nav a:hover { background: var(--panel2); color: var(--text); }
nav a.active { background: var(--accent); color: #fff; }
.me { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
main { padding: 24px; max-width: 1200px; width: 100%; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.card.narrow { max-width: 380px; text-align: center; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.grid2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.stat { background: var(--panel2); border-radius: 8px; padding: 14px; }
.stat b { display: block; font-size: 26px; }
label { display: block; margin: 10px 0 4px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
label.inline { display: flex; gap: 8px; align-items: center; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); }
input, select, textarea { width: 100%; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font: inherit; }
input[type=checkbox] { width: auto; }
textarea { min-height: 90px; resize: vertical; }
select[multiple] { min-height: 160px; }
.btn { display: inline-block; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 8px 14px; cursor: pointer; text-decoration: none; font: inherit; }
.btn:hover { border-color: var(--accent2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent2); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 4px 8px; font-size: 12px; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; background: var(--panel2); }
.pill.approved { background: #14381f; color: var(--ok); } .pill.failed { background: #3a1513; color: var(--bad); }
.pill.pending_signoff { background: #3a3110; color: var(--warn); } .pill.in_progress { background: #13283a; color: #5dade2; }
.item { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.checklist { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 6px; background: var(--panel2); }
.checklist label { margin: 0; padding: 4px 6px; border-radius: 4px; }
.checklist label:hover { background: var(--panel); }
.avatar { width: 22px; height: 22px; border-radius: 50%; vertical-align: middle; }
#toast { position: fixed; bottom: 16px; right: 16px; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; }
#toast.show { opacity: 1; } #toast.err { background: var(--bad); }
@media (max-width: 800px) {
  #app { grid-template-columns: 1fr; }
  aside { position: static; height: auto; }
  nav { flex-direction: row; flex-wrap: wrap; }
  .grid2 { grid-template-columns: 1fr; }
  main { padding: 16px; }
  table { display: block; overflow-x: auto; }
}
