/* Cribbed from the meetings module (which cribbed from overhead), plus what this module adds at the end.
   Every module serves its own /static, so a shared stylesheet would mean N
   copies of one file — the platform nav's styling lives in the shared base
   template for exactly that reason, and module styling stays here. */
:root {
  --bg: #f4f5f7; --card: #fff; --ink: #1c2128; --muted: #6b7280;
  --line: #e2e5ea; --accent: #a97b1f; --accent-ink: #fff;
  --good: #1f9d55; --warn: #b45309; --bad: #b3261e;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar { display: flex; align-items: center; gap: 14px; padding: 10px 20px;
  background: #241f14; color: #fff; }
.brand { font-weight: 800; letter-spacing: 1px; color: #fff; font-size: 18px; }
.tagline { color: #a99a74; font-size: 12px; }
.mainnav { margin-left: auto; display: flex; gap: 16px; }
.mainnav a { color: #ddd0af; }
.signout { display: flex; gap: 10px; align-items: center; margin-left: 16px; }
.signout .whoami { color: #a99a74; font-size: 13px; }
.signout button { background: transparent; border: 1px solid #4a4230; color: #ddd0af;
  padding: 4px 10px; border-radius: 6px; font-size: 13px; cursor: pointer; }

.wrap { max-width: none; margin: 24px auto; padding: 0 20px; }   /* the window, not a column: owner instruction 2026-09-11 */
h1 { margin: 0 0 4px; } h2 { margin-top: 0; } h3 { margin: 0 0 6px; font-size: 14px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; }
.warn { color: var(--warn); font-size: 12px; }
.crumb { margin: 0 0 8px; color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
/* Every figure in this module is money or a date; tabular numerals keep the
   columns aligned so two balances can be compared by eye. */
.num { font-variant-numeric: tabular-nums; }
.viewonly { border-left: 3px solid var(--line); padding-left: 10px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 20px; margin: 16px 0; }
.card.nopad { padding: 0; overflow: hidden; }
.card.nopad > summary { padding: 14px 18px; }
.cardhead { padding: 14px 18px 0; }
.cardhint { margin: -6px 0 8px; font-size: 12px; }
.login-card { max-width: 380px; margin: 60px auto; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.grid label, form label, .card label { display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; color: var(--muted); }
label.check, label.inline { flex-direction: row; align-items: center; gap: 6px; }
.card label + label { margin-top: 10px; }
input, select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 14px; color: var(--ink); background: #fff; }

button, .btn { display: inline-block; background: var(--accent); color: var(--accent-ink);
  border: none; padding: 9px 16px; border-radius: 6px; font-size: 14px; cursor: pointer; }
.btn:hover { text-decoration: none; opacity: .92; }
.btn.ghost, .btn.ghost:hover, button.ghost { background: transparent; color: var(--muted);
  border: 1px solid var(--line); }
button.sm, .btn.sm { padding: 4px 10px; font-size: 12px; }
button.danger, .btn.danger { background: var(--bad); color: #fff; border-color: var(--bad); }
button.ghost.danger { background: transparent; color: var(--bad); border: 1px solid var(--line); }
form.inline { display: inline; }

.stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 18px; min-width: 130px; display: flex; flex-direction: column; }
.stat .num { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .lbl { color: var(--muted); font-size: 13px; }

.tbl { width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl th { background: #fafbfc; font-size: 12px; text-transform: uppercase;
  letter-spacing: .5px; color: var(--muted); }
.tbl th.right, .tbl td.right { text-align: right; }
.tbl.compact th, .tbl.compact td { padding: 6px 10px; font-size: 13px; }
.tbl.flush { border: none; border-radius: 0; }
.tbl tr:last-child td { border-bottom: none; }
/* Projected months are the same table as the actual ones, shaded rather than
   separated: the whole value of the view is reading across the boundary. */
.tbl tr.projected td { background: #faf7f0; color: var(--muted); }
.tbl tr.editing td { background: #fbfaf7; }
td.drift { color: var(--warn); font-weight: 600; }

.titlebar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.pricebox { text-align: right; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 14px; display: flex; flex-direction: column; }
.pricebox .num { font-size: 22px; font-weight: 700; color: var(--accent); }
.pricebox.big .num { font-size: 28px; }
.pricebox .lbl { color: var(--muted); font-size: 12px; }

.badge { display: inline-block; font-size: 10px; text-transform: uppercase;
  letter-spacing: .5px; color: var(--accent); border: 1px solid var(--accent);
  border-radius: 999px; padding: 0 6px; vertical-align: 1px; }
.statusflag { display: inline-block; font-size: 11px; text-transform: uppercase;
  letter-spacing: .5px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 1px 8px; margin-left: 6px; }

/* the four entry forms, side by side until they no longer fit */
.entrygrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px; align-items: start; }
.entrygrid form { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.entrygrid button { margin-top: 10px; width: 100%; }
.computedhint { font-size: 13px; margin: 0 0 8px; color: var(--muted); }
.recheck { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.eventedit { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.eventedit input { max-width: 150px; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; background: #eef2ff;
  border: 1px solid #d9dffb; }
.flash-warn { background: #fff5e6; border-color: #f0d5a8; color: #92600c; }
.flash-error { background: #fbecec; border-color: #f0bcbc; color: #8f1d16; }
.flash-info { background: #eef2ff; border-color: #d9dffb; color: #33417a; }

details.card.danger { border-color: #f0bcbc; }
details.card.danger summary { color: var(--bad); }
details summary { cursor: pointer; font-weight: 600; }

@media (max-width: 720px) {
  .titlebar { flex-direction: column; }
  .grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- printing */
/* `hidden` must win over the display rules above (a button is inline-block). */
[hidden] { display: none !important; }
.wrap.wide { max-width: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.runnergrid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) {
  .grid2, .split, .runnergrid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
}
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 14px; padding: 10px 14px 14px; }
legend { font-weight: 700; padding: 0 6px; }
legend small { font-weight: 400; color: var(--muted); }
textarea { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; width: 100%; }
.fieldlabel { display: block; font-size: 13px; color: var(--muted); margin: 6px 0 4px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 6px; }
.choices label.check { color: var(--ink); font-size: 14px; }
.drop { display: block; border: 2px dashed var(--line); border-radius: 8px; padding: 18px; text-align: center;
  cursor: pointer; color: var(--muted); }
.drop.over { border-color: var(--accent); background: #fbf6ea; }
.drop input[type=file] { display: block; margin: 0 auto 8px; }
progress { width: 100%; height: 12px; margin-top: 8px; }
.submit-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.submit-row button { font-size: 16px; padding: 11px 22px; }
button:disabled { opacity: .5; cursor: not-allowed; }

.chip { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px;
  background: #eef0f3; color: var(--ink); white-space: nowrap; }
.chip.waiting { background: #eef0f3; }
.chip.ready { background: #e3f4ea; color: #145c33; }
.chip.printing { background: #fdf0d5; color: #7a4a05; }
.chip.done { background: #e8eaee; color: var(--muted); }
.chip.failed { background: #fbe4e2; color: #8a1f17; }
.chip.cancelled { background: #e8eaee; color: var(--muted); }
.chip.working { background: #e0ecfb; color: #1d4f91; }
.chip.stalled { background: #fbe4e2; color: #8a1f17; }
.chip.priority { background: #fdf0d5; color: #7a4a05; }
.chip.due { background: #fdf0d5; color: #7a4a05; }

ol.mini { list-style: none; margin: 0; padding: 0; }
ol.mini li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
ol.mini li:last-child { border-bottom: none; }
ol.mini li.mine { background: #fbf6ea; }
ol.mini li.empty { display: block; color: var(--muted); }
ol.mini .n { font-weight: 700; min-width: 2em; text-align: right; }
ol.mini .grow, .grow { flex: 1; min-width: 0; }
ol.mini .f { display: block; overflow-wrap: anywhere; }
ol.mini .sub { font-size: 12px; color: var(--muted); }
.live { font-size: 11px; color: var(--good); font-weight: 400; margin-left: 6px; }
.live.stale { color: var(--bad); }

article.job { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
article.job.printing { border-color: #e0b04a; box-shadow: 0 0 0 2px #fdf0d5; }
article.job.failed { border-color: #e7b3ae; }
article.job .side { display: flex; flex-direction: column; gap: 4px; align-items: center; min-width: 2.5em; }
article.job .side .no { font-weight: 800; font-size: 20px; }
article.job .body { flex: 1; min-width: 0; }
article.job .head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
article.job .name { font-weight: 700; overflow-wrap: anywhere; }
article.job .who { font-size: 12px; color: var(--muted); }
article.job .media { font-size: 17px; font-weight: 600; margin: 4px 0; }
article.job .media small { font-weight: 400; color: var(--muted); }
.err { color: var(--bad); margin: 4px 0; }
.notes { white-space: pre-wrap; background: #f7f7f4; padding: 6px 8px; border-radius: 6px; margin: 4px 0; }
dl.settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 14px; margin: 8px 0; }
dl.settings div { min-width: 0; }
dl.settings dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
dl.settings dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin-top: 8px; }
.actions form.inline { display: inline-flex; gap: 6px; align-items: flex-end; flex-wrap: wrap; }
.actions .startform label { flex-direction: column; }
details.inline-details { display: inline-block; }
details.inline-details > summary { list-style: none; }
details.inline-details[open] { display: block; width: 100%; background: #f7f7f4; padding: 8px; border-radius: 6px; }
.mediachange { background: #fdf0d5; border: 1px solid #e0b04a; border-radius: 8px; padding: 8px 12px; margin-top: 14px; }
.lockbar { font-weight: 600; }
h2.gap { margin-top: 24px; }
details.finished > summary { cursor: pointer; font-weight: 700; margin-top: 24px; }

.lists details.list > summary { cursor: pointer; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.lists details.medialist { margin-top: 14px; }
.lists details.medialist form { margin-top: 10px; }
.lists details.medialist textarea { resize: vertical; }
.lists details.medialist button { margin-top: 8px; }
ul.ticks { list-style: none; margin: 8px 0 0; padding: 0; }
ul.ticks li { margin: 4px 0; }
button.tick { display: flex; gap: 10px; width: 100%; text-align: left; background: #fff; color: var(--ink);
  border: 1px solid var(--line); padding: 8px 10px; }
button.tick .box { display: inline-flex; width: 20px; height: 20px; border: 2px solid var(--line); border-radius: 4px;
  align-items: center; justify-content: center; color: transparent; flex: none; }
button.tick.done .box { background: var(--good); border-color: var(--good); color: #fff; }
button.tick.due .box { border-color: var(--warn); }
button.tick .label { display: block; font-weight: 600; }
button.tick .sub { display: block; font-size: 12px; color: var(--muted); }
button.tick .sub.late { color: var(--bad); }

/* The question box (Rip Color with no spot colour) and the print counts. */
dialog.ask { border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px;
  max-width: 460px; width: calc(100% - 32px); color: var(--ink); background: var(--card);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
dialog.ask::backdrop { background: rgba(20, 24, 30, .45); }
dialog.ask h2 { margin: 0 0 10px; }
dialog.ask .submit-row { margin-top: 14px; }
.chip.prints { background: #eef1f5; color: var(--ink); }
form.moreprints { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
form.moreprints label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
form.moreprints input { width: 72px; }

/* The runner's own panel PIN. */
.lists details.pincard form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.lists details.pincard input { max-width: 180px; }
.lists details.pincard form.pinremove { margin-top: 10px; }
