/* App variables mapped onto the MegaFix brand tokens (see brand.css).
   Everything downstream inherits the rebrand palette from these six. */
:root {
  --navy: var(--mf-navy);
  --orange: var(--mf-action);
  --bg: var(--mf-bg-subtle);
  --line: var(--mf-border);
  --text: var(--mf-text-body);
  --muted: var(--mf-text-muted);
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--text); background: var(--bg);
  font: 14px/1.5 var(--mf-font-sans);
  -webkit-font-smoothing: antialiased;
}
main { padding: 16px; margin: 0 auto; }

/* Display type — Monument Extended for page titles / hero moments only.
   Loud extended display over the quiet Aktiv body is the core brand move. */
.login-wrap h1, .picker-wrap h1, .admin-wrap h1, .acct-wrap h1,
.subs-wrap h1, .cart-main h1, .qo-input h1 {
  font-family: var(--mf-font-display);
  font-weight: 700; text-transform: uppercase;
  letter-spacing: var(--mf-tracking-tight); line-height: var(--mf-leading-tight);
  color: var(--mf-text-strong);
}

/* Snappy mechanical motion + always-visible orange focus ring */
a, button, input, select, textarea, summary { transition:
  background var(--mf-duration) var(--mf-ease),
  border-color var(--mf-duration) var(--mf-ease),
  color var(--mf-duration) var(--mf-ease); }
input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible, a:focus-visible {
  outline: none; box-shadow: var(--mf-shadow-focus);
  border-radius: var(--mf-radius-sm);
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.topbar {
  background: #fff; color: var(--text); display: flex; align-items: center;
  gap: 14px; padding: 0 24px; height: var(--mf-header-h);
  border-bottom: 1px solid var(--mf-border); box-shadow: var(--mf-shadow-sm);
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-img { height: 34px; display: block; }
.login-logo { width: 200px; margin-bottom: 18px; display: block; }
.topbar nav { display: flex; gap: 22px; margin-left: 28px; flex: 1; }
.topbar nav a {
  color: var(--navy); text-decoration: none; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: var(--mf-tracking-wide);
  display: flex; align-items: center; height: var(--mf-header-h); border-bottom: 3px solid transparent;
}
.topbar nav a:hover { color: var(--orange); }
.topbar nav a.active { color: var(--orange); border-bottom-color: var(--orange); }
.topbar nav a.soon { color: #aab2bf; cursor: default; }
.userbox { font-size: 12px; color: var(--muted); }
.cart-link { color: var(--navy); text-decoration: none; font-size: 14px; font-weight: 700; }
.badge {
  background: var(--orange); color: #fff; border-radius: 10px; padding: 1px 8px;
  font-size: 12px; margin-left: 2px;
}
.inline { display: inline; }
.btn-plain { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; }

.banner { background: var(--orange); color: #fff; padding: 7px 18px; font-size: 13px; font-weight: 600; }
.staff-band {
  background: #2c2c2a; color: #f1efe8; padding: 7px 18px; font-size: 12.5px;
  letter-spacing: 0.3px; display: flex; gap: 10px; align-items: center; margin: -16px -16px 14px;
}
.staff-band strong { color: #fff; }
.cust-picker { position: relative; flex: 0 1 420px; }
.cust-picker input {
  width: 100%; padding: 7px 12px; font-size: 13px; border: none; border-radius: 4px;
  background: #444441; color: #fff;
}
.cust-picker input::placeholder { color: #b4b2a9; }
.cust-picker input:focus { outline: 2px solid var(--orange); background: #fff; color: var(--text); }
.cust-dd {
  display: none; position: absolute; top: 34px; left: 0; right: 0; z-index: 50;
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18); max-height: 340px; overflow-y: auto;
}
.cust-dd-label { padding: 7px 12px; font-size: 11px; text-transform: uppercase; color: var(--muted); }
.cust-row-form { margin: 0; }
.cust-row {
  display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left;
  background: none; border: none; border-top: 1px solid #f0f1f4; padding: 8px 12px;
  font-size: 13px; cursor: pointer; color: var(--text);
}
.cust-row:hover { background: #eef3fa; }
.cust-row .cust-name { flex: 1; }
.cust-warn { color: #a32d2d; font-size: 11px; }
.acting-chip {
  background: var(--orange); color: #fff; padding: 3px 10px; border-radius: 10px;
  font-size: 12px; font-weight: 600;
}
.staff-link { color: var(--navy); font-weight: 600; font-size: 13px; border-bottom: 2px solid #2c2c2a; }
.picker-wrap { max-width: 720px; margin: 30px auto; }
.picker-wrap h1 { font-size: 20px; color: var(--navy); }
.picker-wrap h2 { font-size: 13px; color: var(--muted); text-transform: uppercase; margin: 24px 0 8px; }
.picker-wrap input[type=search] {
  width: 100%; padding: 12px 14px; font-size: 15px; border: 1px solid var(--line);
  border-radius: 6px; margin-bottom: 12px;
}
.code-hit { color: #0c447c; background: #e6f1fb; font-size: 11px; padding: 1px 6px; border-radius: 8px; white-space: nowrap; }
.qoh { font-weight: 700; }
.qoh-zero { color: #a32d2d; }
.sup-cell { white-space: nowrap; font-size: 12px; display: flex; gap: 8px; align-items: center; }
.sup-cell.htmx-request { opacity: 0.4; }
.sup-line strong { color: var(--navy); }
.sup-status { color: #a32d2d; font-size: 11px; }
.btn-live {
  background: none; border: 1px solid var(--line); border-radius: 3px; cursor: pointer;
  font-size: 12px; padding: 0 5px; color: var(--navy);
}
.btn-live:hover { background: var(--navy); color: #fff; }
.supply { padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.supply-stock { background: #e9f5e4; color: #2c5e1a; }
.supply-supplier { background: #e6f1fb; color: #0c447c; }
.supply-partial { background: #fdf3e0; color: #8a5a07; }
.supply-none { background: #fdebea; color: #8c2318; }
.check-note { margin: 0; padding: 7px 14px; font-size: 12.5px; background: #f4f7fb; border-bottom: 1px solid var(--line); color: var(--navy); }
.staff-cart > summary { background: #2c2c2a; }
.staff-cart > summary:hover { background: #444441; }
.admin-link { font-weight: 600; font-size: 13px; color: var(--orange); }
.cutoff { font-size: 12px; }

.admin-nav { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 2px solid var(--navy); }
.admin-nav a {
  padding: 7px 14px; color: var(--navy); text-decoration: none; font-size: 13px;
  font-weight: 600; border-radius: 5px 5px 0 0;
}
.admin-nav a.sel { background: var(--navy); color: #fff; }
.admin-wrap h1 { font-size: 20px; color: var(--navy); margin: 0 0 12px; }
.admin-create {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #fff;
  border: 1px solid var(--line); border-radius: 6px; padding: 12px; margin-bottom: 14px;
}
.admin-create input[type=email], .admin-create input[type=text] {
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; width: 210px;
}
.admin-create .check { font-size: 13px; color: var(--muted); }
.admin-create .btn-primary { margin: 0; padding: 8px 14px; }
.reset-form input { width: 130px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 4px; font-size: 12px; }
.row-disabled td { opacity: 0.55; }
.settings-form label { display: block; font-size: 13px; color: var(--navy); font-weight: 600; margin: 14px 0 0; }
.settings-form input { width: 100%; padding: 8px; margin: 4px 0 2px; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; font-weight: 400; }
.settings-form .muted { font-weight: 400; }
.settings-form .btn-primary { margin-top: 16px; }

.flash { padding: 9px 18px; font-size: 13px; }
.flash-error { background: #fdebea; color: #8c2318; }
.flash-success { background: #e9f5e4; color: #2c5e1a; }
.footer { color: var(--muted); font-size: 12px; text-align: center; padding: 18px; }

.login-wrap { max-width: 360px; margin: 60px auto; background: #fff; border: 1px solid var(--line); border-radius: var(--mf-radius-lg); padding: 28px; box-shadow: var(--mf-shadow-md); }
.login-wrap h1 { margin: 0 0 4px; font-size: 20px; color: var(--navy); }
.login-form label { display: block; font-size: 13px; margin: 14px 0 0; color: var(--muted); }
.login-form input { width: 100%; padding: 8px; margin-top: 4px; border: 1px solid var(--line); border-radius: 4px; font-size: 14px; }
.btn-primary {
  background: var(--mf-action); color: var(--mf-text-on-orange);
  border: 2px solid transparent; border-radius: var(--mf-radius-md);
  padding: 9px 18px; font-size: 14px; font-weight: 700; letter-spacing: 0.01em;
  cursor: pointer; margin-top: 18px;
}
.btn-primary:hover { background: var(--mf-action-hover); }
.btn-primary:active { background: var(--mf-action-active); transform: translateY(1px); }
.btn-secondary {
  background: #fff; color: var(--navy); border: 2px solid var(--navy); border-radius: var(--mf-radius-md);
  padding: 7px 14px; font-size: 14px; font-weight: 700; letter-spacing: 0.01em; cursor: pointer;
}
.btn-secondary:hover { background: var(--navy); color: #fff; }
.btn-secondary:active { background: var(--mf-navy-800); transform: translateY(1px); }
.btn-secondary:disabled { opacity: 0.45; cursor: not-allowed; }
.muted { color: var(--muted); font-size: 13px; }
a.btn-primary, a.btn-secondary { text-decoration: none; display: inline-block; line-height: 1.2; }
.btn-login { padding: 6px 16px; margin: 0; }

.cart-panel { background: #fff; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 14px; }
.cart-panel > summary {
  background: var(--navy); color: #fff; padding: 8px 14px; font-size: 13px;
  border-radius: 5px 5px 0 0; letter-spacing: 0.4px;
}
.cart-panel:not([open]) > summary { border-radius: 5px; }
.cart-panel > summary:hover { color: #fff; background: #24437d; }
.cart-panel[open] > summary { margin-bottom: 0; }
.cart-panel-bar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.cart-panel-bar input, .cart-panel-bar select {
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; font-size: 13px;
}
.po-input { width: 190px; }
.note-input { width: 280px; }
.grow { flex: 1; }
.cart-panel-bar .btn-primary { margin: 0; padding: 7px 14px; }
.cart-table { border: none; }
.cart-empty { margin: 0; padding: 12px 14px; }
.cart-caveat { margin: 0; padding: 8px 14px; font-size: 12px; }
.price { white-space: nowrap; }
.per { color: var(--muted); font-size: 11px; }
.total-row td { font-weight: 700; background: #f4f7fb; border-top: 2px solid var(--navy); }
.breaks-table td { padding: 2px 10px 2px 0; font-size: 13px; }
.star {
  background: none; border: none; cursor: pointer; font-size: 22px;
  color: #b9c0cb; padding: 0 2px; line-height: 1;
}
.star:hover { color: var(--orange); }
.star.on { color: var(--orange); }
.acct-wrap h1 { font-size: 20px; color: var(--navy); margin: 0 0 4px; }
.acct-section-head { display: flex; gap: 12px; align-items: baseline; margin: 22px 0 8px; }
.acct-section-head h2 { font-size: 15px; color: var(--navy); margin: 0; text-transform: uppercase; letter-spacing: 0.4px; }
.htmx-indicator { opacity: 0; transition: opacity 200ms; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

.subs-wrap { max-width: 1100px; }
.subs-wrap h1 { font-size: 20px; color: var(--navy); margin: 0 0 12px; }
.sub-row { cursor: pointer; }

.catalogue-layout { display: flex; gap: 14px; align-items: flex-start; }
.sidebar { width: 200px; flex-shrink: 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 10px; }
summary {
  font-size: 12px; text-transform: uppercase; color: var(--navy); font-weight: 700;
  letter-spacing: 0.5px; cursor: pointer; padding: 2px 0; user-select: none;
}
summary:hover { color: var(--orange); }
details[open] > summary { margin-bottom: 6px; }
.cat-list, .sub-list, .facet-group ul { list-style: none; margin: 0; padding: 0; }
.cat-list a, .sub-list a, .facet-group a {
  display: flex; justify-content: space-between; gap: 6px; padding: 4px 6px;
  color: var(--text); text-decoration: none; font-size: 13px; border-radius: 3px; cursor: pointer;
}
.cat-list a:hover, .sub-list a:hover, .facet-group a:hover { background: #eef1f6; }
.cat-list a.sel, .sub-list a.sel { background: var(--navy); color: #fff; }
/* selected category shows a caret hinting "click again to collapse" */
.cat-list > li > a.sel::after { content: "▾"; margin-left: auto; font-size: 10px; opacity: 0.8; }
.sub-list { margin: 2px 0 6px 14px; border-left: 2px solid var(--line); padding-left: 4px; }
/* plain right-aligned grey numbers (option B, Hudson 2026-07-24) */
.count {
  color: #8a92a6; font-size: 12px; font-weight: 400; align-self: center;
  flex-shrink: 0; font-variant-numeric: tabular-nums;
}
.cat-list a.sel .count, .sub-list a.sel .count { color: #c3cbdd; }
.facet-group a.sel .count { font-weight: 700; }

.main-col { flex: 1; min-width: 0; }
#results { min-height: 72vh; }
.idle-prompt {
  min-height: 72vh; display: flex; align-items: flex-start; justify-content: center;
  padding-top: 80px; color: var(--muted); font-size: 14px;
  background: #fff; border: 1px dashed var(--line); border-radius: 6px; margin-top: 12px;
}
.idle-prompt a { color: var(--navy); font-weight: 600; }
.search-bar input {
  width: 100%; padding: 10px 14px; font-size: 15px; border: 1px solid var(--line);
  border-radius: 6px; background: #fff;
}
.search-bar input:focus { outline: 2px solid var(--navy); }

.results-layout { display: flex; gap: 14px; margin-top: 12px; align-items: flex-start; }
.facets { width: 180px; flex-shrink: 0; }
.facet-group { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; margin-bottom: 8px; }
.facet-group a.sel { font-weight: 600; }
.facet-group .box { font-size: 12px; }
.chips { margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: var(--navy); color: #fff; font-size: 12px; padding: 3px 9px;
  border-radius: 12px; text-decoration: none; cursor: pointer;
}

.table-col { flex: 1; min-width: 0; overflow-x: auto; }
.items-table td.desc { white-space: nowrap; }
.result-meta { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.items-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); font-size: 13px; }
.items-table th {
  text-align: left; background: var(--navy); color: #fff; padding: 7px 9px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.items-table td { padding: 6px 9px; border-top: 1px solid var(--line); vertical-align: middle; }
.items-table tbody tr:hover { background: #f4f7fb; }
.mono { font-family: Consolas, monospace; font-size: 12px; white-space: nowrap; }
.forgot-link { font-family: var(--mf-font-display); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px; color: var(--navy);
  text-decoration: none; }
.forgot-link:hover { color: #EC4E2A; text-decoration: none; }
.num { text-align: right; }
.empty { text-align: center; color: var(--muted); padding: 24px; }

.band { padding: 2px 9px; border-radius: 10px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.band-in_stock { background: #e9f5e4; color: #2c5e1a; }
.band-low { background: #fdf3e0; color: #8a5a07; }
.band-order_in { background: #e6f1fb; color: #0c447c; }
.band-call_us { background: #eceef1; color: #555c66; }

.qty-input { width: 64px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; }
.btn-add {
  background: var(--mf-action); color: var(--mf-text-on-orange); border: 2px solid transparent;
  border-radius: var(--mf-radius-md); padding: 5px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.btn-add:hover { background: var(--mf-action-hover); }
.btn-add:active { background: var(--mf-action-active); transform: translateY(1px); }
.btn-add:disabled, .qty-input:disabled { opacity: 0.45; cursor: not-allowed; }
tr.item-row { cursor: pointer; }
tr.item-row.open { background: #eef3fa; }
tr.item-row.open td { border-bottom: none; }

.thumb-cell { width: 34px; padding: 2px 4px !important; }
.thumb { width: 30px; height: 30px; object-fit: contain; display: block; background: #fff; border: 1px solid var(--line); border-radius: 3px; }
.detail-img img { max-width: 180px; max-height: 180px; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 4px; }
.detail-row td { background: #f8fafc; }
.item-detail { padding: 8px 6px; }
.detail-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.detail-head .close { margin-left: auto; color: var(--muted); }
.detail-grid { display: flex; gap: 48px; }
.detail-grid h3 { font-size: 12px; text-transform: uppercase; color: var(--navy); margin: 0 0 6px; }
.spec-list { margin: 0; padding-left: 18px; font-size: 13px; }
.spec-list li { margin-bottom: 2px; }

/* Standalone item page (direct link / search-engine landing) */
.crumbs { margin: 10px 2px 6px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--navy); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.item-page h1 { font-size: 20px; margin: 4px 0 2px; color: var(--navy); }
.item-page .item-no-line { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.item-page .item-detail { border: 1px solid var(--line); border-radius: 6px; background: #f8fafc; padding: 14px 16px; }
.item-page-add { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.items-table .item-link { color: inherit; text-decoration: none; border-bottom: 1px dotted #9aa7c0; }
.items-table .item-link:hover { color: var(--orange); border-bottom-color: var(--orange); }

.pager { display: flex; gap: 14px; align-items: center; padding: 10px 2px; font-size: 13px; }
.pager a { color: var(--navy); cursor: pointer; text-decoration: none; font-weight: 600; }

.qo-layout { display: flex; gap: 24px; align-items: flex-start; max-width: 1300px; }
.qo-input { width: 380px; flex-shrink: 0; }
.qo-input h1 { font-size: 20px; color: var(--navy); margin: 0 0 4px; }
.qo-input textarea {
  width: 100%; font: 13px/1.5 Consolas, monospace; padding: 10px;
  border: 1px solid var(--line); border-radius: 6px; margin: 10px 0; resize: vertical;
}
.qo-results { flex: 1; min-width: 0; padding-top: 6px; }
.qo-h2 { font-size: 15px; color: var(--navy); margin: 18px 0 8px; }
.ok-mark { color: #2c5e1a; font-weight: 700; }
.bad-mark { color: #a32d2d; font-weight: 700; }
.btn-suggest {
  background: #fff; border: 1px solid var(--navy); color: var(--navy); border-radius: 4px;
  padding: 3px 10px; margin-right: 6px; cursor: pointer; font-size: 12px; font-family: Consolas, monospace;
}
.btn-suggest:hover { background: var(--navy); color: #fff; }
.qo-done { background: #e9f5e4; color: #2c5e1a; padding: 12px 16px; border-radius: 6px; font-size: 14px; }
.qo-results .btn-primary { margin-top: 12px; }

.cart-layout { display: flex; gap: 24px; align-items: flex-start; max-width: 1300px; }
.cart-main { flex: 1; min-width: 0; }
.cart-main h1 { font-size: 20px; color: var(--navy); margin: 0 0 12px; }
.cart-side { width: 300px; flex-shrink: 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 16px; }
.cart-side h2 { font-size: 14px; color: var(--navy); margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.4px; }
.cart-side label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.cart-side input[type=text], .cart-side select, .cart-side textarea {
  width: 100%; padding: 7px; margin-top: 4px; border: 1px solid var(--line);
  border-radius: 4px; font-size: 13px; font-family: inherit;
}
.cart-side .btn-primary { width: 100%; margin-top: 14px; }
.cart-actions { margin-top: 10px; }
.btn-plain.remove { color: #a32d2d; font-size: 13px; }

/* Credit application */
.ca-wrap { max-width: 860px; margin: 0 auto; background: #fff; border: 1px solid var(--line);
  border-radius: var(--mf-radius-lg); padding: 28px 34px; box-shadow: var(--mf-shadow-sm); }
.ca-wrap h1 { font-family: var(--mf-font-display); text-transform: uppercase;
  letter-spacing: var(--mf-tracking-tight); color: var(--mf-text-strong); font-size: 22px; margin: 0 0 6px; }
.ca-form h2 { font-size: 13px; text-transform: uppercase; letter-spacing: var(--mf-tracking-widest);
  color: var(--navy); border-bottom: 2px solid var(--navy); padding-bottom: 5px; margin: 26px 0 12px; }
.ca-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px 16px; }
.ca-grid label, .ca-form > label { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ca-grid input, .ca-grid select { width: 100%; padding: 7px 9px; margin-top: 3px;
  border: 1px solid var(--line); border-radius: var(--mf-radius-md); font-size: 13px; font-weight: 400; }
.ca-wide { grid-column: span 2; }
.ca-person { margin-bottom: 8px; }
.ca-radios { display: flex; gap: 20px; margin: 6px 0 14px; }
.ca-radio { font-size: 13.5px; font-weight: 600; color: var(--text); }
.ca-check { display: block; font-size: 13px; margin: 12px 0; color: var(--text); }
.ca-terms { max-height: 300px; overflow-y: auto; border: 1px solid var(--line);
  border-radius: var(--mf-radius-md); padding: 12px 16px; font-size: 12px; color: var(--mf-steel-700);
  background: var(--mf-steel-50); }
.ca-terms ol { padding-left: 20px; } .ca-terms li { margin-bottom: 8px; }
.sig-wrap { margin: 14px 0; }
.sig-label { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.sig-pad {
  display: block; width: 440px; max-width: 100%; height: 130px; touch-action: none;
  background: #fff; border: 1px dashed var(--mf-border-strong); border-radius: var(--mf-radius-md);
  cursor: crosshair;
}
.sig-pad:hover { border-color: var(--navy); }
.sig-clear { padding: 2px 0; font-size: 12px; }
.sig-img { max-width: 320px; max-height: 110px; border: 1px solid var(--line); border-radius: var(--mf-radius-md); background: #fff; padding: 4px; display: block; }
@media (max-width: 800px) { .ca-grid { grid-template-columns: 1fr; } .ca-wide { grid-column: span 1; } }

/* Invoices & statement */
.page-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .stmt-btn { margin: 0 0 0 auto; }
@media print { .stmt-btn { display: none; } }
.stmt-cards { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 20px; }
.stmt-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--mf-radius-lg);
  padding: 12px 18px; min-width: 128px; box-shadow: var(--mf-shadow-sm);
}
.stmt-label {
  display: block; font-size: 11px; text-transform: uppercase;
  letter-spacing: var(--mf-tracking-widest); color: var(--mf-text-faint); margin-bottom: 4px;
}
.stmt-value { font-family: var(--mf-font-display); font-size: 19px; color: var(--mf-text-strong); }
.stmt-bad { border-color: var(--mf-orange-200); background: var(--mf-orange-50); }
.stmt-bad .stmt-value { color: var(--mf-orange-700); }
.pdf-link { color: var(--navy); font-weight: 700; font-size: 12px; text-decoration: none; }
.pdf-link:hover { color: var(--orange); }

@media print {
  .topbar, .footer, .flash, .banner { display: none !important; }
  body { background: #fff; }
}

@media (max-width: 1000px) {
  .catalogue-layout, .results-layout { flex-direction: column; }
  .sidebar, .facets { width: 100%; }
}

/* --- category tiles (Bremick-style browse grid) --- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px; margin: 12px 0 14px; }
.cat-tile { background: #fff; border: 1px solid #dfe3ea; border-radius: 6px;
  padding: 8px 6px 7px; text-align: center; cursor: pointer; text-decoration: none;
  color: #1B3668; display: flex; flex-direction: column; align-items: center; gap: 5px;
  transition: border-color .12s, box-shadow .12s; }
.cat-tile:hover { border-color: #EC4E2A; box-shadow: 0 2px 6px rgba(27,54,104,.14);
  text-decoration: none; }
.cat-tile img { height: 42px; width: auto; max-width: 92%; object-fit: contain; }
.cat-tile .tile-ph { height: 42px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: #c6cddc; }
.cat-tile .tile-name { font-size: 10px; font-weight: 700; line-height: 1.2;
  text-transform: uppercase; letter-spacing: .2px; }
.tile-back { border-style: dashed; color: #7a8299; }

/* --- attribute filter tiles (sub-category level) --- */
.attr-tabs { margin: 0 0 12px; }
.attr-tab-bar { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 2px solid #dfe3ea;
  margin-bottom: 10px; }
.attr-tab { background: none; border: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 700;
  color: #7a8299; cursor: pointer; }
.attr-tab.active { color: #1B3668; border-bottom-color: #EC4E2A; }
.attr-tab .count { font-weight: 400; font-size: 11px; }
.attr-tiles { display: flex; gap: 8px; flex-wrap: wrap; }
.attr-tiles.hidden { display: none; }
.attr-tile { background: #fff; border: 1px solid #dfe3ea; border-radius: 6px;
  padding: 8px 12px; text-align: center; cursor: pointer; text-decoration: none;
  color: #1B3668; display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 86px; transition: border-color .12s, box-shadow .12s; }
.attr-tile:hover { border-color: #EC4E2A; box-shadow: 0 2px 6px rgba(27,54,104,.14);
  text-decoration: none; }
.attr-tile .attr-val { font-size: 12px; font-weight: 700; line-height: 1.2; }
.attr-tile .tile-count { font-size: 11px; color: #7a8299; }
.attr-tile.sel { background: #1B3668; border-color: #1B3668; color: #fff; }
.attr-tile.sel .tile-count { color: #b9c4dd; }
