:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #22242a;
  --muted: #5b6473;
  --line: #dde1e7;
  --accent: #c8260f;        /* Truck Team orange-red, darkened so white text on it reads well */
  --brand: #ff351a;         /* the logo's orange-red */
  --brand-dark: #22242a;    /* the logo's charcoal */
  --accent-dark: #a01e0b;
  --ok-bg: #e7f5ec; --ok: #1d6b3a;
  --warn-bg: #fff6e0; --warn: #7a5200;
  --err-bg: #fdeaea; --err: #9b1c1c;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; background: var(--bg); color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; line-height: 1.5;
  -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
code { font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 0.92em; }

/* Layout: a sidebar menu on the left, the page on the right. */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--brand-dark); color: #eef2f8; padding: 0.8rem 0 2rem; position: sticky; top: 0;
  height: 100vh; overflow-y: auto; }
.sidebar a { color: #eef2f8; text-decoration: none; display: flex; align-items: center; gap: 0.55rem; }
.sidebar .brand { display: block; font-weight: 700; font-size: 1.1rem; color: #fff; padding: 0.3rem 1.1rem 1rem;
  border-bottom: 1px solid #383b44; margin-bottom: 0.6rem; }
.sidebar .brand img { display: block; width: 100%; max-width: 210px; height: auto; margin-bottom: 0.35rem;
  border: 3px solid var(--brand); }        /* like the favicon: the charcoal truck square framed in orange */
.sidebar .brand span { display: block; font-weight: 400; color: #b8c2d2; font-size: 0.9rem; }
.sidebar .sec { font-weight: 600; font-size: 1.05rem; padding: 0.55rem 1.1rem; color: #fff; margin-top: 0.15rem; }
.sidebar .sec .icon { flex: none; opacity: 0.9; }
.sidebar .sec:hover, .sidebar .item:hover { background: #2e3037; }
.sidebar .sec.open { color: #ff7a63; }
.sidebar .sec.single.on { background: #3a3d45; box-shadow: inset 4px 0 0 var(--brand); }
.sidebar .item { padding: 0.38rem 1.1rem 0.38rem 2.75rem; font-size: 1rem; color: #e3e8f0; gap: 0.35rem; }
.sidebar .item.on { background: #3a3d45; color: #fff; font-weight: 600; box-shadow: inset 4px 0 0 var(--brand); }
.sidebar .num { display: inline-block; min-width: 1.4rem; color: #b8c2d2; font-weight: 500;
  font-variant-numeric: tabular-nums; }
.sidebar .item .num { min-width: 2.2rem; font-size: 0.9rem; }
.sidebar .on .num, .sidebar .sec.open .num { color: inherit; }
.column { min-width: 0; display: flex; flex-direction: column; }
.pagebar { display: flex; align-items: center; gap: 1rem; padding: 0.5rem 1.2rem; background: var(--panel);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.pagebar .crumb { color: #3d4657; font-size: 1rem; font-weight: 500; min-width: 0; }
.pagebar .crumb .sep { margin: 0 0.3rem; }
.pagebar .search { margin-left: auto; flex: 0 1 26rem; }
.pagebar .search input { width: 100%; padding: 0.4rem 0.7rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.pagebar .who { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }

.testbar { background: #b91c1c; color: #fff; font-weight: 700; text-align: center; padding: 0.45rem 1rem;
  letter-spacing: 0.03em; position: sticky; top: 0; z-index: 10; }
.test-mode .sidebar { background: #7f1d1d; }
.test-mode .sidebar .sec:hover, .test-mode .sidebar .item:hover { background: #962626; }
.test-mode .sidebar .item.on, .test-mode .sidebar .sec.single.on { background: #b13a3a; }
.test-mode .sidebar .brand { border-bottom-color: #9b3232; }
.test-mode .sidebar, .test-mode .pagebar { top: 2.2rem; }
.test-mode .sidebar { height: calc(100vh - 2.2rem); }
.test-mode { background: repeating-linear-gradient(135deg, #f6f7f9 0 40px, #fbeeee 40px 80px); }

main { max-width: 1400px; width: 100%; padding: 1.2rem; }

.section-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.9rem; margin-bottom: 1.5rem; }
.section-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1.1rem; }
.section-card .section-head { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.1rem;
  color: var(--text); text-decoration: none; margin-bottom: 0.5rem; }
.section-card .section-head .icon { color: var(--accent); }
.section-card ul { list-style: none; margin: 0; padding: 0; }
.section-card li a { display: block; padding: 0.22rem 0; text-decoration: none; }
.section-card li a:hover { text-decoration: underline; }
.section-card .num { display: inline-block; min-width: 2.2rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.section-card .section-head .num { min-width: 0; color: var(--muted); font-weight: 500; }
.results { list-style: none; padding: 0; margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.results li { padding: 0.45rem 0.8rem; border-bottom: 1px solid var(--line); display: flex; gap: 0.8rem; flex-wrap: wrap; }
.results li:last-child { border-bottom: 0; }

/* Narrow screens: the menu goes above the page. */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding-bottom: 0.6rem; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .sidebar .item { padding-left: 1rem; }
  .pagebar { flex-wrap: wrap; position: static; }
}
h1 { font-size: 1.65rem; margin: 0.2rem 0 1rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
h2 { font-size: 1.25rem; margin: 1.8rem 0 0.6rem; }
h3 { font-size: 1rem; margin: 0 0 0.6rem; }
.hint { color: #5b6473; font-size: 0.93rem; }
.pn { font-family: ui-monospace, Consolas, Menlo, monospace; letter-spacing: 0.02em; }

.flash, .banner { padding: 0.6rem 0.9rem; border-radius: 6px; margin: 0 0 0.8rem; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error, .banner.error { background: var(--err-bg); color: var(--err); }
.banner.warn { background: var(--warn-bg); color: var(--warn); }

button, .button { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 6px;
  padding: 0.5rem 1rem; font: inherit; cursor: pointer; text-decoration: none; font-size: 0.95rem; }
button:hover, .button:hover { background: var(--accent-dark); }
button.secondary, .button.secondary { background: #e8ecf2; color: var(--text); }
button.secondary:hover, .button.secondary:hover { background: #d9dfe8; }
button.small { padding: 0.25rem 0.65rem; font-size: 0.9rem; }
button.danger { background: #b45309; }
button.danger:hover { background: #92400e; }
.st-draft { background: var(--warn-bg); color: var(--warn); }
.st-issued { background: var(--ok-bg); color: var(--ok); }
.st-converted { background: #e8ecf2; color: var(--muted); }
.st-awaiting { background: var(--warn-bg); color: var(--warn); }
.st-credited, .st-replacement, .st-settled { background: var(--ok-bg); color: var(--ok); }
.st-cancelled, .st-void { background: #e8ecf2; color: var(--muted); }
.scroll-x { overflow-x: auto; }
.lines-table input.wide { width: 100%; min-width: 16rem; }
.lines-table td { vertical-align: middle; }
.dash-cards .big { font-size: 1.35rem; }
.dash-cards .big.rates { font-size: 1rem; }
.dash-cards .card.alert { border-color: var(--err); }
.dash-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
ul.todo { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 1rem 0.6rem 2rem; }
ul.todo li { margin: 0.25rem 0; }
.edit-rows td { padding: 0.25rem 0.4rem; vertical-align: middle; }
.edit-rows input:not([type=checkbox]) { width: 100%; min-width: 6rem; }
.edit-rows tr.add-row td { background: #f8fafc; }
.export-row { margin: 0 0 0.6rem; }
.size-row { display: flex; gap: 0.5rem; align-items: flex-end; flex-wrap: wrap; }
.size-row label { display: flex; flex-direction: column; font-size: 0.85rem; gap: 0.15rem; }
.size-row input { width: 6.5rem; }
.size-row .size-x { padding-bottom: 0.45rem; color: var(--muted); }
.size-row .size-weight { margin-left: 1rem; }
.video-list { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 0.6rem; }
.video-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem;
  width: 340px; display: flex; flex-direction: column; gap: 0.3rem; }
.video-card video { width: 100%; max-height: 220px; background: #000; border-radius: 4px; }

/* Set creator: compact, one panel. */
.set-form { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 1rem;
  max-width: 980px; display: flex; flex-direction: column; gap: 0.6rem; }
.set-head { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: flex-end; }
.set-head label, .set-desc { display: flex; flex-direction: column; font-size: 0.85rem; gap: 0.15rem; }
.set-head .grow { flex: 1 1 22rem; }
.set-desc textarea { width: 100%; }
.set-form .req { color: var(--muted); font-size: 0.75rem; }
.set-form > p { margin: 0; }
.set-size .set-size-title { font-size: 0.85rem; font-weight: 600; }
.set-size p.hint { margin: 0.2rem 0 0; font-size: 0.8rem; }
.set-form .flash ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }
.set-banner { max-width: 980px; display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.set-items td { padding: 0.25rem 0.5rem; vertical-align: middle; }
.set-items td:first-child input { width: 100%; min-width: 16rem; }
.set-form .actions { margin: 0; }
.box-row { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.8rem; margin-top: 0.6rem; }
.box-row label { display: flex; flex-direction: column; font-size: 0.92rem; }
.grid tfoot th { background: #f3f5f8; text-align: right; }
.grid tfoot th:first-child { text-align: left; }
.actions { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
form.inline { display: inline; }

input, select, textarea { font: inherit; padding: 0.4rem 0.5rem; border: 1px solid #c7cdd6; border-radius: 5px;
  background: #fff; color: var(--text); max-width: 100%; }
textarea { width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #ff8a76; outline-offset: 0; border-color: var(--accent); }

.stack { display: flex; flex-direction: column; gap: 0.8rem; }
.stack label { display: flex; flex-direction: column; gap: 0.25rem; font-weight: 600; font-size: 0.96rem; }
.stack label input, .stack label select, .stack label textarea { font-weight: 400; }
.stack label.check { flex-direction: row; align-items: center; gap: 0.4rem; }
.narrow { max-width: 720px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 0.8rem 1rem 1rem;
  display: flex; flex-direction: column; gap: 0.8rem; }
legend { font-weight: 700; padding: 0 0.3rem; }
.row2, .row3 { display: grid; gap: 0.8rem; }
.row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 800px) { .row2, .row3 { grid-template-columns: 1fr; } }

.filters, .inline-row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.6rem; }
.filters input[type=search] { min-width: 280px; }
.inline-row input[name=name] { min-width: 260px; }
.inline-row .count { color: var(--muted); font-size: 0.85rem; min-width: 5rem; }

table.grid { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); }
table.grid.narrow { width: auto; min-width: 400px; }
.grid th, .grid td { padding: 0.5rem 0.65rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.grid th { background: #eef1f5; font-size: 0.92rem; color: #2b3240; position: sticky; top: 0; }
.grid tbody tr:hover { background: #f8fafc; }
.grid .num { text-align: right; font-variant-numeric: tabular-nums; }
.grid .empty { color: var(--muted); text-align: center; padding: 1.2rem; }
.grid tr.muted td { color: var(--muted); }
.grid tr.bad td { background: #fff7f7; }
.nowrap { white-space: nowrap; }
.small { font-size: 0.88rem; }
.low { color: var(--err); font-weight: 700; }
.err { color: var(--err); }
.warn { color: var(--warn); }
.scroll { overflow-x: auto; max-height: 70vh; overflow-y: auto; border: 1px solid var(--line); }
.import-table select { max-width: 11rem; font-size: 0.85rem; padding: 0.2rem; }

.tag { display: inline-block; padding: 0.05rem 0.45rem; border-radius: 999px; background: #e8ecf2; font-size: 0.84rem; }
.t-receive, .t-opening { background: var(--ok-bg); color: var(--ok); }
.t-sale { background: #fde9e5; color: var(--accent-dark); }
.t-adjust { background: var(--warn-bg); color: var(--warn); }
.t-reversal, .t-error, .t-archived { background: var(--err-bg); color: var(--err); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.8rem; margin-bottom: 1rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 1rem; }
.card .big { font-size: 1.7rem; font-weight: 700; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.2rem; }
@media (max-width: 800px) { .cols { grid-template-columns: 1fr; } }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 1rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
ul.plain { list-style: none; padding: 0; }
details { margin: 1rem 0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 1rem; }
.prewrap { white-space: pre-wrap; margin-top: 0.6rem; }

.stockforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin-bottom: 1rem; }
@media (max-width: 900px) { .stockforms { grid-template-columns: 1fr; } }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 1rem;
  display: flex; flex-direction: column; gap: 0.5rem; }
.box label { display: flex; flex-direction: column; font-size: 0.92rem; gap: 0.15rem; }
.tabs { display: flex; gap: 1rem; }
.tabs a.on { font-weight: 700; text-decoration: none; color: var(--text); }
ol.steps li { margin-bottom: 0.3rem; }

@media print {
  .sidebar, .pagebar, .testbar, .actions, form, .banner { display: none !important; }
  .shell { display: block; }
  main > h1:first-of-type::before { display: none; }
  body { background: #fff; }
}

/* Part pictures */
.pic-thumb { display: block; max-width: 180px; max-height: 180px; border: 1px solid var(--line); background: #fff; }
.pic-thumb.small { max-width: 130px; max-height: 130px; }
.pic-warn { color: #9a3b00; font-size: 0.82rem; max-width: 220px; margin: 0.2rem 0; }
.pic-ok { color: #1f6f2b; font-size: 0.85rem; margin: 0.2rem 0; }
table.pictures td { vertical-align: top; }
form.box + form.box { margin-top: 1rem; }
.pic-bg { display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; margin: 0.4rem 0; }
.pic-bg button.on { background: var(--accent); color: #fff; }
.pic-thumb.tiny { max-width: 70px; max-height: 70px; display: inline-block; vertical-align: middle; }
.count { display: block; font-size: 0.86rem; color: var(--muted); }
.count.over { color: var(--err); font-weight: 600; }
.box.texts { margin-bottom: 1rem; }
.texts-edit { align-items: start; }
.pic-warn.wide { max-width: none; }

/* Part search list under part-number boxes */
.part-picker { position: fixed; z-index: 50; width: 500px; max-width: calc(100vw - 8px); max-height: 340px; overflow-y: auto;
  margin: 0; padding: 0.2rem 0; list-style: none; background: var(--panel, #fff); border: 1px solid var(--line);
  border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); font-size: 0.88rem; }
.part-picker .picker-head { padding: 0.35rem 0.7rem 0.15rem; font-size: 0.75rem; text-transform: uppercase; color: var(--muted); }
.part-picker .picker-item { padding: 0.35rem 0.7rem; cursor: pointer; }
.part-picker .picker-item:hover, .part-picker .picker-item.on { background: var(--accent); color: #fff; }
.part-picker .picker-item.on .picker-note, .part-picker .picker-item:hover .picker-note { color: #e8eef8; }
.part-picker .picker-stock { float: right; margin-left: 0.5rem; font-size: 0.8rem; }
.part-picker .picker-stock.none { color: var(--err); }
.part-picker .picker-item.on .picker-stock.none, .part-picker .picker-item:hover .picker-stock.none { color: #ffd6d6; }
.part-picker .picker-note { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------------
   One look for every page, matching the sidebar menu (overrides the above).
   ------------------------------------------------------------------------ */

/* Page title: the section's icon in front (the icon shapes come from templates/_icons.html). */
main > h1:first-of-type { font-weight: 700; letter-spacing: -0.01em; }
main > h1:first-of-type::before { content: ""; flex: none; width: 1.9rem; height: 1.9rem; background: var(--accent);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: contain; mask-size: contain;
  margin-right: -0.4rem; }
.sec-none main > h1:first-of-type::before { display: none; }

/* Filter tabs (All / Quotes / Invoices …): like the menu's buttons. */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 0.25rem; margin: 0 0 0.9rem; }
.tabs a { padding: 0.35rem 0.85rem; border-radius: 7px; text-decoration: none; color: var(--text); font-weight: 500; }
.tabs a:hover { background: #eef1f5; }
.tabs a.on { background: var(--accent); color: #fff; font-weight: 600; }

/* Search / filter rows: one white panel. */
form.filters { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.7rem;
  margin-bottom: 0.9rem; }

/* Tables: rounded panel, clear headings and links. */
table.grid { border-collapse: separate; border-spacing: 0; border-radius: 10px; }
.grid thead th:first-child { border-top-left-radius: 10px; }
.grid thead th:last-child { border-top-right-radius: 10px; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid th { font-weight: 600; text-transform: none; }
.grid a { font-weight: 500; text-decoration: none; }
.grid a:hover { text-decoration: underline; }
.grid tbody tr:hover { background: #f3f7fd; }

/* Status labels: pill with a little more weight. */
.tag { padding: 0.1rem 0.6rem; font-weight: 600; font-size: 0.82rem; }

/* Buttons, inputs, panels: the same corners and weights everywhere. */
button, .button { border-radius: 8px; font-weight: 600; padding: 0.5rem 1.05rem; }
button.small { border-radius: 7px; }
input, select, textarea { border-radius: 7px; }
.card, .box, .box-row, fieldset, dl.facts, details, ul.todo, .set-form, .video-card { border-radius: 10px; }
.card .big { color: var(--text); }
.card .big a { text-decoration: none; }
.flash, .banner { border-radius: 8px; }
h2 { font-weight: 700; }.sec-home main > h1:first-of-type::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12H3l9-9 9 9h-2'/%3E%3Cpath d='M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M10 21v-6h4v6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12H3l9-9 9 9h-2'/%3E%3Cpath d='M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M10 21v-6h4v6'/%3E%3C/svg%3E"); }
.sec-sales main > h1:first-of-type::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16l-3-2-2 2-2-2-2 2-2-2-3 2'/%3E%3Cpath d='M9 7h6'/%3E%3Cpath d='M9 11h6'/%3E%3Cpath d='M9 15h4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16l-3-2-2 2-2-2-2 2-2-2-3 2'/%3E%3Cpath d='M9 7h6'/%3E%3Cpath d='M9 11h6'/%3E%3Cpath d='M9 15h4'/%3E%3C/svg%3E"); }
.sec-purchasing main > h1:first-of-type::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7' cy='17' r='2'/%3E%3Ccircle cx='17' cy='17' r='2'/%3E%3Cpath d='M5 17H3V6a1 1 0 0 1 1-1h9v12'/%3E%3Cpath d='M9 17h6'/%3E%3Cpath d='M19 17h2v-6h-8'/%3E%3Cpath d='M13 6h5l3 5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7' cy='17' r='2'/%3E%3Ccircle cx='17' cy='17' r='2'/%3E%3Cpath d='M5 17H3V6a1 1 0 0 1 1-1h9v12'/%3E%3Cpath d='M9 17h6'/%3E%3Cpath d='M19 17h2v-6h-8'/%3E%3Cpath d='M13 6h5l3 5'/%3E%3C/svg%3E"); }
.sec-stock main > h1:first-of-type::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 4.5v9L12 21l-8-4.5v-9z'/%3E%3Cpath d='M12 12l8-4.5'/%3E%3Cpath d='M12 12v9'/%3E%3Cpath d='M12 12L4 7.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 4.5v9L12 21l-8-4.5v-9z'/%3E%3Cpath d='M12 12l8-4.5'/%3E%3Cpath d='M12 12v9'/%3E%3Cpath d='M12 12L4 7.5'/%3E%3C/svg%3E"); }
.sec-online-channels main > h1:first-of-type::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3.6 9h16.8'/%3E%3Cpath d='M3.6 15h16.8'/%3E%3Cpath d='M11.5 3a17 17 0 0 0 0 18'/%3E%3Cpath d='M12.5 3a17 17 0 0 1 0 18'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3.6 9h16.8'/%3E%3Cpath d='M3.6 15h16.8'/%3E%3Cpath d='M11.5 3a17 17 0 0 0 0 18'/%3E%3Cpath d='M12.5 3a17 17 0 0 1 0 18'/%3E%3C/svg%3E"); }
.sec-imports main > h1:first-of-type::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3v4a1 1 0 0 0 1 1h4'/%3E%3Cpath d='M5 12V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2h-6'/%3E%3Cpath d='M3 18h8'/%3E%3Cpath d='M8 15l3 3-3 3'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3v4a1 1 0 0 0 1 1h4'/%3E%3Cpath d='M5 12V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2h-6'/%3E%3Cpath d='M3 18h8'/%3E%3Cpath d='M8 15l3 3-3 3'/%3E%3C/svg%3E"); }
.sec-settings main > h1:first-of-type::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3'/%3E%3Cpath d='M12 19v3'/%3E%3Cpath d='M4.9 4.9l2.1 2.1'/%3E%3Cpath d='M17 17l2.1 2.1'/%3E%3Cpath d='M2 12h3'/%3E%3Cpath d='M19 12h3'/%3E%3Cpath d='M4.9 19.1L7 17'/%3E%3Cpath d='M17 7l2.1-2.1'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3'/%3E%3Cpath d='M12 19v3'/%3E%3Cpath d='M4.9 4.9l2.1 2.1'/%3E%3Cpath d='M17 17l2.1 2.1'/%3E%3Cpath d='M2 12h3'/%3E%3Cpath d='M19 12h3'/%3E%3Cpath d='M4.9 19.1L7 17'/%3E%3Cpath d='M17 7l2.1-2.1'/%3E%3C/svg%3E"); }

/* Stock count scan screen: one big box the scanner types into. On a handheld-sized screen the menu is
   hidden (the links at the top of the page lead back). */
.scanbox { display: flex; gap: 0.6rem; align-items: flex-end; flex-wrap: wrap; background: var(--panel);
  border: 2px solid var(--accent); border-radius: 12px; padding: 0.8rem; margin-bottom: 0.4rem; }
.scanbox label { display: flex; flex-direction: column; font-weight: 600; gap: 0.2rem; }
.scanbox .code { flex: 1 1 16rem; }
.scanbox .code input { font-size: 1.4rem; padding: 0.55rem 0.7rem; width: 100%; }
.scanbox .qty input { font-size: 1.4rem; padding: 0.55rem 0.5rem; width: 5.5rem; }
.scanbox button { font-size: 1.15rem; padding: 0.7rem 1.4rem; }
@media (max-width: 860px) {
  .scan-screen .sidebar, .scan-screen .pagebar { display: none; }
  .scan-screen main { padding: 0.6rem; }
  .scan-screen .flash { font-size: 1.1rem; font-weight: 600; }
}
.sec-accounting main > h1:first-of-type::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='2'/%3E%3Cpath d='M8 7h8v3H8z'/%3E%3Cpath d='M8 14h.01'/%3E%3Cpath d='M12 14h.01'/%3E%3Cpath d='M16 14h.01'/%3E%3Cpath d='M8 17.5h.01'/%3E%3Cpath d='M12 17.5h.01'/%3E%3Cpath d='M16 17.5h.01'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='2'/%3E%3Cpath d='M8 7h8v3H8z'/%3E%3Cpath d='M8 14h.01'/%3E%3Cpath d='M12 14h.01'/%3E%3Cpath d='M16 14h.01'/%3E%3Cpath d='M8 17.5h.01'/%3E%3Cpath d='M12 17.5h.01'/%3E%3Cpath d='M16 17.5h.01'/%3E%3C/svg%3E"); }
.sec-reports main > h1:first-of-type::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h16'/%3E%3Cpath d='M7 16v-5'/%3E%3Cpath d='M12 16V6'/%3E%3Cpath d='M17 16v-8'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h16'/%3E%3Cpath d='M7 16v-5'/%3E%3Cpath d='M12 16V6'/%3E%3Cpath d='M17 16v-8'/%3E%3C/svg%3E"); }
/* Tick-box groups (report filters): side by side, wrapping. */
fieldset.checks { display: flex; flex-direction: row; flex-wrap: wrap; gap: 0.3rem 1.1rem; border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem 0.8rem; margin: 0 0 0.6rem; }
fieldset.checks legend { font-weight: 600; padding: 0 0.3rem; }
fieldset.checks label.check { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 400; }

/* Access code page for a handheld on the office Wi-Fi (TEST --lan only). */
.handheld-code main { max-width: 28rem; margin: 0 auto; }
.handheld-code form label { display: block; font-size: 1.1rem; margin: 0.8rem 0; }
.handheld-code input[name=code] { display: block; width: 100%; font-size: 1.6rem; letter-spacing: 0.3em; padding: 0.5rem; margin-top: 0.3rem; }
.handheld-code button { font-size: 1.1rem; padding: 0.6rem 1.2rem; }
.handheld-code main > h1:first-of-type::before { display: none; }
.pagebar .who a { color: inherit; }
.pagebar .who button.link { background: none; border: 0; padding: 0 0 0 0.6rem; color: var(--muted); text-decoration: underline;
  cursor: pointer; font: inherit; }
.sign-in main { max-width: 30rem; margin: 2rem auto; padding: 0 16px; }
.sign-in main > h1:first-of-type::before { display: none; }
.sign-in .brandline { margin: 2rem auto 0; max-width: 30rem; padding: 0 16px; }
.sign-in form label { display: block; margin: 0.8rem 0; }
.sign-in form input:not([type=checkbox]) { display: block; width: 100%; font-size: 1.1rem; padding: 0.45rem; margin-top: 0.25rem; box-sizing: border-box; }
.sign-in input.code { font-size: 1.6rem; letter-spacing: 0.3em; }
.sign-in button { font-size: 1.05rem; padding: 0.55rem 1.2rem; margin-top: 0.4rem; }
.sign-in .qr { display: block; width: 220px; height: 220px; background: #fff; margin: 0.5rem 0; }
.sign-in .secret, .codes { font-family: Consolas, monospace; font-size: 1.1rem; letter-spacing: 0.05em; }
.codes { columns: 2; list-style: none; padding: 0; font-size: 1.15rem; }
.device-code { font-family: Consolas, monospace; font-size: 2rem; letter-spacing: 0.25em; }
.rights-table td, .rights-table th { padding: 0.3rem 0.8rem 0.3rem 0; text-align: left; }
.rights-table label { white-space: nowrap; margin-right: 0.6rem; }
@media print { .sign-in .noprint { display: none; } }

/* Royal Mail send form: a field Click & Drop would refuse. */
input.bad, select.bad { border-color: #b91c1c; outline: 2px solid rgba(185, 28, 28, 0.25); }
.size-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.size-row label { flex: 1 1 6rem; }

/* Flyer editor and release check (Sales -> Flyers). */
.flyer-item { display: flex; gap: 0.8rem; align-items: flex-start; }
.flyer-item-pic img { width: 88px; height: 88px; object-fit: contain; background: #fff; border-radius: 6px; }
.check-list { padding-left: 1.2rem; }
.check-list li { margin: 0.25rem 0; }
.check-list.errors li::marker { color: #b91c1c; }
.check-list.warnings li::marker { color: #b45309; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.2rem 1rem; margin: 0.2rem 0 0.6rem; }
.check-grid label { font-weight: normal; }

/* AI marketing advisor. */
.advisor-idea h3 { margin: 0; }
.advisor-table th { text-align: left; vertical-align: top; white-space: nowrap; color: var(--muted); }
.advisor-table td { vertical-align: top; }

/* eBay item specifics: every one eBay has, grouped. */
.aspect-group { margin: 0.4rem 0; }
.aspect-group summary { cursor: pointer; padding: 0.3rem 0; }
.aspect-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.4rem 1rem; }
.aspect-grid label .hint { font-weight: normal; margin-left: 0.3rem; }

/* Listing writer. */
.writer-write label.small { font-weight: normal; margin-right: 0.4rem; }
.writer-part .check-list { margin: 0.3rem 0 0; }
.check-list li.is-error::marker { color: #b91c1c; }
.check-list li.is-warning::marker { color: #b45309; }
.writer-compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
pre.wrap { white-space: pre-wrap; word-break: break-word; }
.mockup-frame { width: 100%; height: 80vh; min-height: 520px; border: 1px solid #d0d3d9; border-radius: 6px; background: #eef0f3; }
@media (max-width: 860px) { .writer-compare { grid-template-columns: 1fr; } }
