/* MCS Operations. One stylesheet, phone first. --accent is set per business (Staff → Branding). */
:root {
  --bg: #f4f6f9; --surface: #fff; --text: #1b2230; --muted: #5d6675; --line: #e3e7ee;
  --accent: #1f5fbf; --warn: #9a5b00; --ok: #1f7a3d; --err: #b42318;
  --radius: 14px; --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  --tint: color-mix(in srgb, var(--accent) 8%, #fff);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
h1 { font-size: 1.6rem; line-height: 1.25; letter-spacing: -0.01em; margin: 0.2em 0 0.6em; }
h2 { font-size: 1.15rem; margin: 0 0 0.6em; }
h3 { font-size: 1rem; margin: 1.2em 0 0.5em; }
a { color: var(--accent); }
.lead { font-size: 1.05rem; color: var(--muted); margin-top: -0.3em; }

/* Header and navigation */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 1.05rem; color: var(--text); text-decoration: none; display: flex; align-items: center; }
.brand-logo { height: 36px; width: auto; display: block; }
nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
nav > a { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 500; }
nav > a:hover { background: var(--tint); }
nav > a.current { background: var(--accent); color: #fff; }
.nav-account { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--line); }
.nav-account a, .link { color: var(--accent); text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.who { color: var(--muted); font-size: 14px; }
.menu-toggle { display: none; }
.inline { display: inline; }

main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 48px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card, .detail-grid + .card { margin-top: 16px; }
.narrow { max-width: 460px; margin: 24px auto; }

/* Forms and buttons */
input[type=text], input[type=password], input[type=email], input[type=search], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 12px; font: inherit; font-size: 16px; border: 1px solid #cfd5df; border-radius: 10px; background: var(--surface); color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); border-color: var(--accent); }
button, a.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: #fff; border: 0;
  border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; min-height: 44px; }
button:hover, a.button:hover { filter: brightness(1.08); }
button:disabled { opacity: .6; cursor: progress; }
button.secondary, a.button.secondary { background: var(--surface); color: var(--accent); border: 1px solid var(--accent); }
button.link { color: var(--accent); background: none; padding: 0; min-height: 0; font-weight: 400; }
a.button.big { padding: 14px 22px; font-size: 1.1rem; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 16px; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field.wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 15px; }
.field input[type=checkbox] { width: 22px; height: 22px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--err); }
.field-error, .errorlist { color: var(--err); font-size: 14px; }
.errorlist { padding-left: 18px; }
.search-row { display: flex; gap: 8px; margin: 12px 0; }
.search-row input { flex: 1; }
details summary { cursor: pointer; color: var(--accent); margin: 8px 0; }
input[type=color] { width: 64px; height: 44px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; }

/* Messages and hints */
.hint { color: var(--muted); font-size: 14px; }
.message { padding: 12px 14px; border-radius: 10px; background: var(--tint); }
.message.success { background: #eaf6ee; color: var(--ok); }
.message.warning { background: #fff5e6; color: var(--warn); }
.message.error { background: #fdecea; color: var(--err); }
.action-box { margin: 12px 0; padding: 12px 14px; border-left: 4px solid var(--accent); background: var(--tint); border-radius: 8px; }
.action-box.done { border-color: var(--ok); background: #eaf6ee; }
.warn-box { margin: 12px 0; padding: 12px 14px; border-left: 4px solid var(--warn); background: #fff5e6; border-radius: 8px; }

/* Dashboard */
.greeting { margin-bottom: 12px; }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.action { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); color: var(--text); text-decoration: none; font-weight: 600; }
.action.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.action-icon { font-size: 1.6rem; line-height: 1; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.tile .value { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile .label { color: var(--muted); }
a.link-tile { text-decoration: none; color: var(--text); }
a.link-tile:hover { border-color: var(--accent); }

/* Tables and lists */
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #fafbfc; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
tr.high td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.heading-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text); background: var(--surface); }
.filters a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.queue { margin-top: 24px; }
.count { display: inline-block; min-width: 28px; padding: 2px 8px; border-radius: 12px; background: var(--line); font-size: 14px; text-align: center; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 6px; background: #fdecea; color: var(--err); font-size: 12px; font-weight: 600; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--tint); color: var(--accent); font-size: 13px; font-weight: 600; }
.status.big { font-size: 15px; padding: 4px 12px; }
.due { color: var(--err); font-weight: 600; }
.steps li { margin-bottom: 6px; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 16px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.case-line { padding: 10px 0; border-bottom: 1px solid var(--line); }
.case-line:last-child { border-bottom: 0; }
.case-line p { margin: 4px 0 0; }
.case-line.done { opacity: .6; }
.copy-box { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.copy-head { display: flex; justify-content: space-between; align-items: center; }
.timeline { list-style: none; padding: 0; margin: 12px 0 0; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.checklist { list-style: none; padding: 0; margin: 8px 0; }
.checklist li { padding: 4px 0; }
.checklist .done::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.checklist .todo::before { content: "○ "; color: var(--err); font-weight: 700; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.help-grid .card + .card { margin-top: 0; }

/* Photos */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 10px 0; }
.photo { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.doc-tile { display: flex; flex-direction: column; justify-content: center; align-items: center; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-weight: 700; text-align: center; }

/* Roles */
table.roles td:not(:first-child), table.roles th:not(:first-child) { text-align: center; }
.perm-group { border: 1px solid var(--line); border-radius: 10px; margin: 16px 0; padding: 8px 14px; }
.perm-group legend { font-weight: 600; padding: 0 6px; }
.perm { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.perm input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.perm.disabled { opacity: 0.6; }

/* Scanning */
.scan-input { font-size: 1.5rem !important; padding: 14px !important; letter-spacing: 0.04em; border: 2px solid var(--accent) !important; }
.scan .button-row { margin-top: 12px; }
.camera-box { width: 100%; margin-top: 12px; border-radius: 12px; overflow: hidden; background: #000; }
.camera-box video { width: 100% !important; height: auto !important; display: block; }
.pick-list { list-style: none; padding: 0; margin: 0; }
.pick-list li a { display: block; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.pick-list .hint { display: block; }

/* Branding page */
.logo-preview { padding: 12px; border: 1px dashed var(--line); border-radius: 10px; margin-bottom: 16px; display: inline-block; }
.logo-preview img { max-height: 80px; display: block; }

/* Login and first-time set-up */
.auth-page { min-height: 100vh; background: radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--accent) 18%, #fff), var(--bg) 70%); }
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 32px 16px 40px; padding-top: max(32px, env(safe-area-inset-top)); }
.auth-brand { display: flex; justify-content: center; margin-bottom: 20px; }
.auth-logo { max-height: 72px; max-width: 70%; }
.auth-name { font-size: 1.4rem; font-weight: 800; }
.auth-card { background: var(--surface); border-radius: 20px; padding: 28px 22px; box-shadow: 0 10px 40px rgba(16, 24, 40, .12); }
.auth-card h1 { font-size: 1.5rem; margin-top: 0; }
.auth-lead { color: var(--muted); margin-top: -4px; }
.auth-form { margin-top: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.auth-field label { font-weight: 600; }
.auth-field input { font-size: 17px; padding: 14px; }
.auth-help ul { margin: 6px 0 0; padding-left: 18px; }
.auth-button { width: 100%; padding: 14px; font-size: 1.05rem; margin-top: 6px; }
.auth-next { text-align: center; margin: 16px 0 0; }
.auth-foot { text-align: center; color: var(--muted); font-size: 14px; margin-top: 20px; padding: 0 8px; }
.auth-steps { display: flex; gap: 6px; margin: 0 0 18px; font-size: 12px; font-weight: 600; }
.auth-steps span { flex: 1; text-align: center; padding: 8px 4px 0; border-top: 4px solid var(--line); color: var(--muted); }
.auth-steps .done { border-color: color-mix(in srgb, var(--accent) 45%, #fff); }
.auth-steps .current { border-color: var(--accent); color: var(--text); }
.auth-list { padding-left: 20px; }
.auth-list li { margin-bottom: 14px; }
.app-links { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; font-size: 14px; }
.setup-link { width: 100%; margin: 10px 0 4px; }
.code-input { font-size: 1.6rem !important; letter-spacing: 0.3em; text-align: center; }
.secret-key { display: block; font-size: 1.05rem; padding: 10px; margin: 8px 0; background: var(--bg); border-radius: 8px; word-break: break-all; user-select: all; }
.qr { display: flex; justify-content: center; margin: 12px 0; }
.qr svg { width: 220px; height: 220px; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 70px; }
.show-password { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 6px 10px; font-size: 14px;
  background: var(--tint); color: var(--accent); }
.only-phone { display: none; }

@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; background: var(--tint); color: var(--accent); min-height: 40px; padding: 8px 14px; }
  .js nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 0 4px; }
  .js nav.open { display: flex; }
  nav > a { padding: 12px 14px; border-radius: 10px; font-size: 1.05rem; }
  .nav-account { margin: 8px 0 0; padding: 12px 14px 0; border-left: 0; border-top: 1px solid var(--line); }
  main { padding: 16px 12px 40px; }
  .card { padding: 16px; }
  h1 { font-size: 1.4rem; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { margin-top: 6px; }
  button:not(.link):not(.show-password):not(.menu-toggle):not(.thumb-remove), a.button { width: 100%; }
  .search-row button { width: auto; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .action.primary { grid-column: 1 / -1; flex-direction: row; align-items: center; font-size: 1.15rem; padding: 18px; }
  .only-phone { display: block; }
  .only-desktop { display: none; }
  #inspect { scroll-margin-top: 70px; }
}

/* Photo picker: a proper button instead of the browser's plain one */
input[type=file] { width: 100%; font: inherit; color: var(--muted); padding: 6px 0; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; color: #fff; background: var(--accent); border: 0; border-radius: 10px;
  padding: 12px 18px; margin-right: 12px; cursor: pointer; min-height: 44px; }

.invite-link { word-break: break-all; font-family: ui-monospace, monospace; font-size: 14px; margin: 6px 0 0; }
.narrow-wide { max-width: 640px; margin: 24px auto; }

/* Demo installations only */
.demo-banner {
  background: #fff4cc;
  color: #5c4400;
  border-bottom: 1px solid #e8d48a;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  text-align: center;
}

/* Big tappable choices (inspection condition, what happens to it) */
.tiles-select { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tiles-select label { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px; border: 1px solid #cfd5df;
  border-radius: 12px; background: var(--surface); font-weight: 500; cursor: pointer; }
.tiles-select input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
.tiles-select label:has(input:checked) { border-color: var(--accent); background: var(--tint); box-shadow: inset 0 0 0 1px var(--accent); }
.field-tiles { grid-column: 1 / -1; }

/* Step-by-step hints */
.how-to { margin: 0 0 14px; padding-left: 1.3em; color: var(--muted); }
.how-to li { margin: 2px 0; }
button.big { width: 100%; min-height: 56px; font-size: 1.05rem; }

/* Photo picker: take or choose several photos, see them, remove any */
.picker-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.picker-buttons button { flex: 1 1 160px; min-height: 52px; }
.picker-count { color: var(--muted); font-size: 14px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 8px 0; }
.picker-grid:empty { display: none; }
.picker-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--line); }
.picker-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picker-thumb button.thumb-remove { position: absolute; top: 4px; right: 4px; min-height: 0; width: 30px; height: 30px; padding: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .65); color: #fff; font-size: 18px; line-height: 1; }
.js input[data-photo-picker].enhanced { display: none; }

.more-fields { margin: 16px 0; }
.more-fields > summary { font-weight: 600; cursor: pointer; padding: 8px 0; }
.pick-list form { margin: 0; }
.pick-list button.pick { display: block; width: 100%; text-align: left; background: none; color: var(--text); border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; padding: 12px 4px; font-weight: 400; min-height: 0; }
.pick-list button.pick:hover { background: var(--tint); filter: none; }
.ok { color: var(--ok); font-weight: 600; }
.search-row { display: flex; gap: 8px; margin: 0 0 16px; }
.search-row input { flex: 1; }
.note-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.note-row input { flex: 1 1 220px; }
.pick-list > li { padding: 10px 4px; border-bottom: 1px solid var(--line); }
.pick-list > li:has(> a), .pick-list > li:has(> form > button.pick) { padding: 0; border-bottom: 0; }
.pick-list > li > .hint { display: block; }
.photo-form { margin-top: 14px; }
.file-button { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 16px; border: 1px dashed var(--accent);
  border-radius: 10px; color: var(--accent); font-weight: 600; cursor: pointer; text-align: center; }
.js .file-button input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.camera-box { position: relative; }
.camera-box video { width: 100%; display: block; }
.camera-box .scan-guide { position: absolute; left: 5%; right: 5%; top: 30%; bottom: 30%; border: 3px solid rgba(255,255,255,.85); border-radius: 10px;
  box-shadow: 0 0 0 999px rgba(0,0,0,.25); pointer-events: none; }
.camera-status { color: var(--muted); font-size: 14px; margin: 6px 0 0; min-height: 1.4em; }
.search-row button { width: auto !important; flex: none; }
.search-row input { min-width: 0; }
.pick-list .note-row a.button { display: inline-flex; justify-content: center; color: #fff; padding: 10px 16px; border-bottom: 0; }
.icon-preview { vertical-align: middle; border-radius: 10px; border: 1px solid var(--line); margin-left: 6px; }
.message-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.message-item:last-child { border-bottom: 0; }
.message-item p { margin: 4px 0; }

/* Menu (catalogue) and tills */
.menu-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; margin-top: 16px; }
.menu-layout .card + .card { margin-top: 0; }
.cat-list { flex: 1 1 220px; max-width: 320px; padding: 12px; }
.cat-list ul { list-style: none; margin: 0; padding: 0; }
.cat-list a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 10px; color: var(--text); text-decoration: none; }
.cat-list a.current { background: var(--tint); color: var(--accent); font-weight: 600; }
.cat-list .cat-name { flex: 1; }
.small-heading { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 4px 10px 8px; }
.menu-products { flex: 999 1 520px; min-width: 0; }
.swatch { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.chip { display: inline-block; padding: 2px 8px; margin: 1px 0; border-radius: 999px; background: var(--tint); color: var(--accent); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.off { background: #f1f2f5; color: var(--muted); text-decoration: line-through; }
.status.ok { color: var(--ok); font-weight: 600; }
button.danger, a.button.danger { color: var(--err); }
.pairing-code { font-size: clamp(32px, 9vw, 56px); font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; text-align: center; padding: 16px; margin: 8px 0 16px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--tint); }
table.formset input[type=text], table.formset input[type=number] { min-width: 90px; }

/* Order hub ------------------------------------------------------------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dash-section { margin-bottom: 28px; }
.tile.alert { border-color: var(--err); }
.tile.alert .value { color: var(--err); }
.bulk-bar { position: sticky; top: 60px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.bulk-bar select, .bulk-bar input[type=text] { width: auto; min-width: 0; flex: 1 1 160px; }
.check-all { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; white-space: nowrap; }
th.tick, td.tick { width: 36px; text-align: center; }
td.tick input { width: 20px; height: 20px; }
table.orders td { vertical-align: top; }
tr.late td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.search-row input[type=search] { flex: 1 1 200px; min-width: 0; }
.search-row select { flex: 0 1 220px; width: auto; min-width: 0; }
tr.muted td { color: var(--muted); }
.channel-tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--line); color: var(--text); }
.ch-amazon { background: #fff1db; color: #7a4a00; }
.ch-ebay { background: #e6f0ff; color: #0b4aa2; }
.ch-onbuy { background: #e8f7ee; color: #17663a; }
.ch-bq { background: #fff4d6; color: #6b5200; }
.ch-woo { background: #f1e9ff; color: #5b2e9b; }
.status.st-new, .status.st-on_hold { background: #fff5e6; color: var(--warn); }
.status.st-printed { background: #eef6ff; color: #0b4aa2; }
.status.st-dispatched { background: #e8f7ee; color: var(--ok); }
.status.st-cancelled, .status.st-history { background: var(--line); color: var(--muted); }
.status.conn-live { background: #e8f7ee; color: var(--ok); }
.status.conn-sandbox { background: #eef6ff; color: #0b4aa2; }
.status.conn-none, .status.conn-paused { background: var(--line); color: var(--muted); }
form.stack { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.card.empty { text-align: center; padding: 28px 20px; }
main > .card + .card, main > section.card + section.card { margin-top: 16px; }
.table-wrap + .detail-grid { margin-top: 16px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: var(--bg); padding: 1px 5px; border-radius: 5px; }

/* Settings hub */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 24px; }
.settings-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none; }
.settings-card:hover { border-color: var(--accent); }
.settings-status { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--accent); }
.module-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; }
.module-list li { color: var(--muted); }
.module-list li.on { color: var(--text); }
.module-list li.on span[aria-hidden] { color: var(--ok); }

/* Packing slips */
.slip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 14px 0; }
.slip-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.slip-postage { text-align: right; font-weight: 700; }
.slip-address { font-size: 1.05rem; line-height: 1.4; }
@media print {
  .topbar, .no-print, .demo-banner, .message { display: none !important; }
  body { background: #fff; }
  main { padding: 0 !important; max-width: none !important; }
  .slip { border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0; page-break-after: always; break-after: page; }
  .slip:last-child { page-break-after: auto; break-after: auto; }
  table { border: 0; }
}

/* Phones: order rows become cards; dashboard tiles two across */
@media (max-width: 640px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile .value { font-size: 1.5rem; }
  table.orders, table.orders tbody, table.orders tr, table.orders td { display: block; width: 100%; }
  table.orders thead { display: none; }
  table.orders tr { position: relative; padding: 10px 12px 10px 48px; border-bottom: 1px solid var(--line); }
  table.orders td { border: 0; padding: 2px 0; text-align: left; }
  table.orders td.tick { position: absolute; left: 10px; top: 12px; width: auto; }
  table.orders td.num { font-weight: 600; }
  tr.late td:first-child { box-shadow: none; }
  tr.late { box-shadow: inset 3px 0 0 var(--err); }
}

/* Till sales */
.filters label { display: flex; align-items: center; gap: 6px; }
.status.warn { background: #fff4dc; color: #8a5a00; }
