:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1c2430;
  --muted: #5b6675;
  --line: #d9dee5;
  --brand: #0b6b4f;
  --ok: #0b6b4f;
  --bad: #b3261e;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
header { display: flex; align-items: center; gap: 1.5rem; padding: 0.75rem 1.25rem; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 1.25rem; color: var(--brand); text-decoration: none; }
nav { display: flex; align-items: center; gap: 1rem; flex: 1; }
nav a { color: var(--text); text-decoration: none; }
nav a:hover { text-decoration: underline; }
.spacer { flex: 1; }
.who { color: var(--muted); font-size: 0.9rem; }
main { max-width: 60rem; margin: 1.5rem auto; padding: 0 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem 1.5rem; }
.card.narrow { max-width: 24rem; margin: 3rem auto; }
h1 { margin-top: 0; font-size: 1.4rem; }
label { display: block; margin-bottom: 0.9rem; font-weight: 600; }
input[type="email"], input[type="password"] { display: block; width: 100%; padding: 0.55rem 0.65rem; margin-top: 0.25rem; font: inherit; border: 1px solid var(--line); border-radius: 6px; }
button { padding: 0.55rem 1rem; font: inherit; font-weight: 600; color: #fff; background: var(--brand); border: 0; border-radius: 6px; cursor: pointer; }
button.link { background: none; color: var(--brand); padding: 0; font-weight: 400; text-decoration: underline; }
form.inline { display: inline; margin: 0; }
.error { color: var(--bad); font-weight: 600; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { width: 9rem; }
td.ok { color: var(--ok); font-weight: 700; width: 6rem; }
td.bad { color: var(--bad); font-weight: 700; width: 6rem; }

/* Stage 2: shops, orders, products */
h2 { font-size: 1.15rem; margin: 0 0 0.5rem; }
h3 { font-size: 1rem; margin: 1rem 0 0.4rem; }
.card + .card { margin-top: 1rem; }
.muted { color: var(--muted); }
small { display: block; font-weight: 400; color: var(--muted); }
code { background: #eef1f4; padding: 0.1rem 0.35rem; border-radius: 4px; word-break: break-all; }
.badge { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; border: 1px solid var(--line); background: #eef1f4; color: var(--text); white-space: nowrap; }
.badge.ok { background: #e3f4ec; border-color: #b7dfca; color: var(--ok); }
.badge.warn { background: #fff4d6; border-color: #ecd58e; color: #7a5a00; }
.badge.bad { background: #fde8e6; border-color: #f0b8b3; color: var(--bad); }
.flash { padding: 0.6rem 0.9rem; border-radius: 6px; font-weight: 600; border: 1px solid var(--line); }
.flash.ok { background: #e3f4ec; border-color: #b7dfca; color: var(--ok); }
.flash.bad { background: #fde8e6; border-color: #f0b8b3; color: var(--bad); }
.card.once { border: 2px solid #ecd58e; background: #fffbea; margin-bottom: 1rem; }
.secret { font-size: 1.05rem; user-select: all; }
.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; margin-bottom: 1rem; }
.filters label { margin: 0; }
select { display: block; padding: 0.5rem; margin-top: 0.25rem; font: inherit; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
input[type="text"], input:not([type]) { display: block; width: 100%; padding: 0.55rem 0.65rem; margin-top: 0.25rem; font: inherit; border: 1px solid var(--line); border-radius: 6px; }
label.check { font-weight: 400; }
.scroll { overflow-x: auto; }
table.list th { width: auto; background: #f0f2f5; white-space: nowrap; }
tr.archived { opacity: 0.55; }
.thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; }
a.button, button[disabled] { display: inline-block; padding: 0.55rem 1rem; font-weight: 600; border-radius: 6px; text-decoration: none; }
a.button { color: #fff; background: var(--brand); }
button[disabled] { opacity: 0.5; cursor: not-allowed; }
.inline-actions { display: inline-block; margin: 0.25rem 0.5rem 0.25rem 0; }
.pager { display: flex; gap: 1rem; }

/* Stage 3: plates, jobs, printers */
.swatch { display: inline-block; width: 0.9em; height: 0.9em; border-radius: 3px; border: 1px solid #0003; vertical-align: -0.1em; }
ul.plain { list-style: none; margin: 0; padding: 0; }
.bad-text { color: var(--bad); font-weight: 600; }
.bar { width: 9rem; height: 0.55rem; margin-top: 0.3rem; background: #e3e7ec; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); }
input[type="file"], input[type="number"] { display: block; margin-top: 0.25rem; font: inherit; }
input[type="number"] { padding: 0.5rem; width: 6rem; border: 1px solid var(--line); border-radius: 6px; }
