:root {
  --bg: #f4f5f4; --surface: #fff; --text: #1d211e; --muted: #5f6b62; --line: #dde2de;
  --brand: #1b5e20; --ok: #2e7d32; --danger: #c62828; --warn: #ef6c00; --info: #1565c0;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141815; --surface: #1d221e; --text: #e6ebe7; --muted: #9aa69d; --line: #2f3731;
          --brand: #2e7d32; --ok: #66bb6a; --danger: #ef5350; --warn: #ffa726; --info: #64b5f6; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
header { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding: 10px 16px; background: var(--brand); color: #fff; }
header strong { letter-spacing: .08em; }
header nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
header a { color: #fff; text-decoration: none; opacity: .9; }
header a:hover { opacity: 1; text-decoration: underline; }
header .logout { margin-left: auto; display: flex; gap: 8px; align-items: center; }
main { padding: 16px; max-width: 1500px; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.card.narrow { max-width: 380px; margin: 40px auto; }
.card.notice { border-color: var(--warn); }
h1 { font-size: 20px; margin: 0 0 12px; } h2 { font-size: 16px; margin: 0 0 10px; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.mono, pre, code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
pre { background: var(--bg); padding: 10px; border-radius: 6px; overflow-x: auto; }
pre.key { font-size: 15px; user-select: all; }
input, button { font: inherit; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); }
input.small { width: 80px; }
button { cursor: pointer; }
button.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
button.danger { color: var(--danger); border-color: var(--danger); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack label { display: flex; flex-direction: column; gap: 4px; }
.actions form { display: flex; gap: 4px; margin-bottom: 4px; }
.actions input { width: 110px; }
.status { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; border: 1px solid currentColor; }
.status.pending { color: var(--warn); } .status.approved { color: var(--info); }
.status.delivered { color: var(--ok); } .status.failed, .status.rejected { color: var(--danger); }
.flag { color: var(--danger); font-weight: 600; font-size: 12px; }
.error { color: var(--danger); font-weight: 600; }
.hint { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); text-align: center; }
.tiles { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.tile { flex: 1 1 140px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: flex; justify-content: space-between; align-items: center; color: var(--text); text-decoration: none; }
.tile b { font-size: 22px; }
.filters a { margin-right: 10px; } .filters a.active { font-weight: 700; }
dl.grid { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
dt { color: var(--muted); } dd { margin: 0; word-break: break-all; }
a { color: var(--info); }
