/* Southern Wholesale - white, light blue, light gray, light maroon, light green, light yellow */
:root{
  /* ===== COLORS (change the theme here) ===== */
  --bg:#f3f6fa; --ink:#14202e; --muted:#5d6b7b; --line:#dbe2ea; --soft:#eef3f8; --soft-2:#e3eaf2;
  --blue:#d9eafc; --blue-2:#c3dcf8; --blue-ink:#0f3a6d; --blue-line:#a8c9ee;
  --maroon:#7a1f2e; --maroon-bg:#f6e0e4; --maroon-line:#e2b4bd;
  --danger:#8f2233; --danger-bg:#f9e4e7; --ok:#1c6a42; --ok-bg:#dcf2e5;
  --warn:#69500a; --warn-bg:#fbf1c7; --info:#0f3a6d; --info-bg:#e0eefc;
  /* ===== ACCENT PALETTE: a small rotating set of colors used sparingly for brand tabs and a few
     graphical touches, so the site reads as colorful without losing its clean, minimal feel ===== */
  --acc-teal:#0d6e5f; --acc-teal-bg:#dcf3ee;
  --acc-amber:#92530a; --acc-amber-bg:#fbe8d0;
  --acc-violet:#5b3fa6; --acc-violet-bg:#ece4fb;
  --acc-rose:#9c2f55; --acc-rose-bg:#fbe0ea;
  --acc-cyan:#0a7a86; --acc-cyan-bg:#d8f1f3;
  --acc-green:#3f7a1f; --acc-green-bg:#e7f3dc;
  /* ===== SHAPES: buttons and fields are rounded squares ===== */
  --r:14px; --r-sm:10px;
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body{margin:0;font:16px/1.5 var(--font);color:var(--ink);background:var(--bg);min-height:100vh;display:flex;flex-direction:column}
body.modal-open{overflow:hidden}
img{max-width:100%}
a{color:var(--ink);text-underline-offset:2px}
h1{font-size:28px;line-height:1.2;margin:0 0 20px;letter-spacing:-.01em;font-weight:650}
h2{font-size:20px;line-height:1.3;margin:0 0 12px;font-weight:650}
h3{margin:0}
p{margin:0 0 12px}
.container{width:100%;max-width:1200px;margin:0 auto;padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}
main.page{flex:1;padding-top:28px;padding-bottom:56px}
.muted{color:var(--muted)} .small{font-size:14px} .center{text-align:center}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.danger-text{color:var(--danger)}
:focus-visible{outline:2px solid var(--ink);outline-offset:2px}

/* ---------- header ---------- */
.site-header{position:sticky;top:0;z-index:30;background:#fff;border-bottom:1px solid var(--line)}
.header-row{display:flex;align-items:center;justify-content:space-between;min-height:64px;gap:16px}
.logo-wrap{position:relative;display:flex;align-items:center;gap:4px;min-width:0}
.logo{display:inline-flex;align-items:center;text-decoration:none}
.logo img{max-height:44px;width:auto;display:block}
.wordmark{font-size:19px;font-weight:700;letter-spacing:-.01em}
.logo-edit{position:relative;opacity:1}
.logo-wrap:hover .logo-edit,.logo-edit:focus-within{opacity:1}
@media (hover:none){.logo-edit{opacity:1}}
.site-nav{display:flex;align-items:center;gap:2px}
.site-nav a,.linklike{display:inline-flex;align-items:center;padding:8px 12px;border-radius:var(--r-sm);color:var(--ink);text-decoration:none;font-size:15px;background:none;border:0;font-family:inherit;cursor:pointer;white-space:nowrap}
.site-nav a:hover,.linklike:hover{background:var(--soft)}
.site-nav a.active{font-weight:600;background:var(--soft)}
.nav-form{margin:0}
.count{display:inline-block;min-width:20px;height:20px;padding:0 6px;margin-left:6px;border-radius:10px;background:var(--ink);color:#fff;font-size:12px;font-weight:600;line-height:20px;text-align:center}
.icon-btn.nav-toggle{display:none}
@media screen, (max-width:1080px){
  .icon-btn.nav-toggle{display:inline-grid}
  .site-nav{display:none;position:absolute;top:100%;left:0;right:0;background:#fff;border-bottom:1px solid var(--line);flex-direction:column;align-items:stretch;padding:8px 16px 16px;gap:0;box-shadow:0 10px 20px rgba(0,0,0,.06)}
  .site-nav.open{display:flex}
  .site-nav a,.linklike{padding:13px 12px;width:100%;justify-content:flex-start}
  .nav-form{width:100%}
}

/* ---------- buttons & controls ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border:1px solid var(--ink);border-radius:var(--r-sm);background:#fff;color:var(--ink);font:inherit;font-weight:500;line-height:1.1;text-decoration:none;cursor:pointer;transition:background .15s,color .15s}
.btn:hover{background:var(--soft)}
.btn-primary{background:var(--ink);color:#fff}
.btn-primary:hover{background:#000}
.btn-danger{color:var(--danger);border-color:var(--danger)}
.btn-danger:hover{background:var(--danger-bg)}
.btn-plain{border-color:transparent}
.btn-sm{min-height:36px;padding:0 12px;font-size:14px}
.btn-lg{min-height:58px;padding:0 36px;font-size:17px;min-width:220px}
.btn-block{display:flex;width:100%}
.btn:disabled{opacity:.5;cursor:not-allowed}
.icon{width:18px;height:18px;flex:none;vertical-align:-3px}
.icon-btn{display:inline-grid;place-items:center;width:38px;height:38px;border:0;border-radius:var(--r-sm);background:transparent;color:var(--ink);cursor:pointer;padding:0}
.icon-btn:hover{background:var(--soft-2)}
.linklike{font:inherit}

.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.field>label,.field>.label{font-size:14px;font-weight:500}
input,select,textarea{font:inherit;color:inherit;width:100%;min-height:44px;padding:9px 12px;border:1px solid #cdcdcd;border-radius:var(--r-sm);background:#fff}
textarea{min-height:0;resize:vertical}
input:focus,select:focus,textarea:focus{outline:2px solid var(--ink);outline-offset:0;border-color:var(--ink)}
input:disabled{background:var(--soft);color:var(--muted)}
input[type=checkbox],input[type=radio]{width:18px;height:18px;min-height:0;padding:0;accent-color:var(--ink);flex:none}
input[type=file]{padding:8px;min-height:0;font-size:14px}
.input-sm{max-width:110px;min-height:40px}
.hint{font-size:13px;color:var(--muted)}
.role-fixed{display:flex;align-items:center;gap:8px;min-height:44px;padding:9px 12px;border:1px solid #cdcdcd;border-radius:var(--r-sm);background:var(--soft);color:var(--ink);font-weight:600}
.role-fixed .icon{width:18px;height:18px;color:var(--muted)}
.req{font-weight:400;font-size:12px;color:var(--danger)}
/* Round 18 item 1: the optional brand/model picture, uploaded from the admin Rename/Edit modals. */
.catimg-box{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.catimg-prev{display:flex;align-items:center;justify-content:center;width:64px;height:64px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--soft);overflow:hidden;flex:none}
.catimg-prev img{max-width:100%;max-height:100%;object-fit:contain}
.catimg-none{font-size:11px;color:var(--muted);text-align:center;padding:0 4px}
.catimg-actions{display:flex;gap:8px;flex-wrap:wrap}
.pw{position:relative}.pw input{padding-right:48px}
.pw-toggle{position:absolute;right:3px;top:3px}
.form-msg{display:none;padding:10px 12px;border-radius:var(--r-sm);background:var(--danger-bg);color:var(--danger);font-size:14px}
.form-msg.show{display:block}
.stack{display:flex;flex-direction:column;gap:16px}
.stack-lg{display:flex;flex-direction:column;gap:24px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.grid-3{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:16px}
.row-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.check{display:flex;align-items:center;gap:10px;padding:5px 0;cursor:pointer}
.fieldset{border:1px solid var(--line);border-radius:8px;padding:14px 16px;margin:0;min-width:0}
.fieldset legend{padding:0 6px;font-weight:600;font-size:14px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-flex;align-items:center;gap:8px;border:1px solid #cdcdcd;border-radius:999px;padding:6px 14px;cursor:pointer;font-size:15px}
.chip:has(input:checked){background:var(--ink);color:#fff;border-color:var(--ink)}
.chip:has(input:checked) input{accent-color:#fff}
.filters{display:flex;gap:8px;margin:0 0 16px;flex-wrap:wrap}
.filters input[type=search]{flex:1;min-width:200px;max-width:380px}
.filters select{width:auto}
.filters input,.filters select{min-height:40px;padding:6px 10px}
.filters .btn{min-height:40px}

/* ---------- messages ---------- */
.alert{padding:12px 14px;border-radius:8px;margin:0 0 16px;font-size:15px}
.alert-ok{background:var(--ok-bg);color:var(--ok)}
.alert-error{background:var(--danger-bg);color:var(--danger)}
.alert-info{background:var(--info-bg);color:var(--info)}
.alert-warn{background:var(--warn-bg);color:var(--warn)}
.alert a{color:inherit;font-weight:600}
.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));transform:translateX(-50%);background:var(--ink);color:#fff;padding:11px 18px;border-radius:8px;font-size:15px;opacity:0;pointer-events:none;transition:opacity .2s;z-index:200;max-width:calc(100vw - 32px);text-align:center}
.toast.show{opacity:1}
.empty{text-align:center;padding:56px 16px;color:var(--muted);border:1px dashed #cfcfcf;border-radius:var(--r)}
.empty .icon{width:36px;height:36px;margin-bottom:8px}
.empty p{margin-bottom:14px}
.badge{display:inline-block;padding:3px 10px;border-radius:999px;font-size:13px;font-weight:500;background:var(--soft-2);color:#444;white-space:nowrap}
.b-pending{background:var(--warn-bg);color:var(--warn)}
.b-delivery{background:var(--info-bg);color:var(--info)}
.b-done{background:var(--ok-bg);color:var(--ok)}
.b-review{background:#f1ecfa;color:#5b3d99}
.b-returned{background:var(--soft-2);color:#444}
.b-rejected{background:var(--danger-bg);color:var(--danger)}

/* ---------- popovers ---------- */
.pop-wrap{position:relative}
.popover{position:absolute;top:100%;left:0;margin-top:6px;min-width:210px;background:#fff;border:1px solid var(--line);border-radius:var(--r);box-shadow:0 10px 30px rgba(0,0,0,.12);padding:6px;z-index:60}
.popover-right{left:auto;right:0}
.popover a,.popover button{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:10px 12px;border:0;background:none;border-radius:6px;font:inherit;color:inherit;text-align:left;text-decoration:none;cursor:pointer}
.logo-edit .popover button{justify-content:flex-start}
.popover a:hover,.popover button:hover{background:var(--soft)}
.popover .current{font-weight:600}
.popover .disabled{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:10px 12px;color:var(--muted);cursor:not-allowed}

/* ---------- modal ---------- */
.modal{position:fixed;inset:0;z-index:100;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;padding:16px;overflow-y:auto;animation:fade .15s}
.modal-box{position:relative;background:#fff;border-radius:12px;width:100%;max-width:440px;padding:28px 24px 24px;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow-y:auto;box-shadow:0 20px 50px rgba(0,0,0,.25)}
.modal-wide{max-width:540px}
.modal-x{position:absolute;top:10px;right:10px}
.modal h2{padding-right:36px}
.modal-sub{font-weight:600;margin:-4px 0 10px}
.danger-zone{margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}
.done-mark{width:56px;height:56px;border-radius:50%;background:var(--ok-bg);color:var(--ok);display:grid;place-items:center;margin:8px auto 16px}
.done-mark .icon{width:28px;height:28px}
@keyframes fade{from{opacity:0}to{opacity:1}}

/* ---------- home ---------- */
main.home{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;min-height:calc(100vh - 170px);padding-top:0}
.home-actions{display:flex;gap:14px;justify-content:center;flex-wrap:wrap}
@media screen, (max-width:600px){.home-actions{flex-direction:column;width:100%;max-width:none}.btn-lg{width:100%}}
/* admin/editor: quick-link buttons only on mobile, a single View Inventory link on desktop (the top nav already covers this on wider screens) */

@media screen, (max-width:760px){.staff-links-desktop{display:none}}

/* ---------- tabs / category nav ---------- */
.tabs{display:flex;align-items:stretch;gap:2px;overflow-x:auto;border-bottom:1px solid var(--line);scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tab-group{display:inline-flex;align-items:stretch;flex:none;color:inherit;text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-1px}
.tab-group:hover{background:var(--soft)}
.tab-group.active{border-bottom-color:var(--ink);font-weight:600}
.tab{display:inline-flex;align-items:center;gap:6px;padding:13px 14px;color:inherit;text-decoration:none;white-space:nowrap;font-size:15px}
.tab-caret{display:inline-flex;align-items:center;padding:0 10px 0 0;border:0;background:none;color:var(--muted);cursor:pointer}
.tab-caret .icon{transition:transform .15s}
.tab-caret[aria-expanded=true] .icon{transform:rotate(180deg)}
.tab-add{flex:none;align-self:center;margin-left:8px;display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 12px;border:1px dashed #b5b5b5;border-radius:999px;background:#fff;font:inherit;font-size:14px;cursor:pointer;color:var(--ink);white-space:nowrap}
.tab-add:hover{border-style:solid;background:var(--soft)}
.tabs-plain{margin-bottom:22px}
.cat-menu{border:1px solid var(--line);border-top:0;background:#fff;padding:8px;max-height:60vh;overflow:auto;border-radius:0 0 var(--r) var(--r)}
.cat-menu ul{list-style:none;margin:0;padding:0}
.cat-menu ul ul{padding-left:18px;margin-left:8px;border-left:1px solid var(--line)}
.cat-row{display:flex;align-items:center}
.cat-row a{flex:1;padding:10px 12px;border-radius:6px;text-decoration:none}
.cat-row a:hover{background:var(--soft)}
.cat-caret{border:0;background:none;padding:8px 10px;cursor:pointer;color:var(--muted)}
.cat-caret .icon{transition:transform .15s}
.cat-caret[aria-expanded=true] .icon{transform:rotate(180deg)}
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:18px 0;flex-wrap:wrap}
.toolbar-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.ftree{list-style:none;margin:0;padding:0}
.fsub{margin:0 0 4px 8px;padding-left:14px;border-left:1px solid var(--line)}

/* ---------- product listing ---------- */
.product-list{border:1px solid var(--line);border-radius:var(--r);background:#fff;overflow:hidden}
.is-off{opacity:.65}

/* ---------- tables ---------- */
.table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--r);background:#fff}
.table{width:100%;border-collapse:collapse;font-size:15px}
.table th{text-align:left;font-weight:600;font-size:13px;color:var(--muted);padding:12px 14px;background:var(--soft);border-bottom:1px solid var(--line);white-space:nowrap}
.table td{padding:12px 14px;border-bottom:1px solid var(--line);vertical-align:middle}
.table tbody tr:last-child td{border-bottom:0}
.num,.table th.num{text-align:right;white-space:nowrap}
.table td[data-label="Order"],.table td[data-label="Date"],.table td[data-label="Delivery"],.table td[data-label="Requested"]{white-space:nowrap}
td.actions>*{margin:2px 6px 2px 0}
.inline{display:inline-block;margin:0}
.doc-thumb{width:64px;height:48px;object-fit:cover;border:1px solid var(--line);border-radius:4px;display:block}
.doc-large{max-width:100%;max-height:340px;border:1px solid var(--line);border-radius:8px}
@media screen, (max-width:760px){
  .stack-sm thead{display:none}
  .stack-sm,.stack-sm tbody,.stack-sm tr,.stack-sm td{display:block;width:100%}
  .stack-sm tr{padding:12px 14px;border-bottom:1px solid var(--line)}
  .stack-sm tbody tr:last-child{border-bottom:0}
  .stack-sm td{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:6px 0;border:0;text-align:right}
  .stack-sm td[data-label]::before{content:attr(data-label);color:var(--muted);font-size:13px;text-align:left;flex:none}
  .stack-sm td.actions{justify-content:flex-start;flex-wrap:wrap;padding-top:10px}
  .stack-sm td.num{text-align:right}
}

/* ---------- panels & layout ---------- */
.panel{border:1px solid var(--line);border-radius:var(--r);padding:20px;background:#fff}
.panel h2{margin-bottom:0}
.panel.stack h2{margin-bottom:-4px}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start}
.narrow{max-width:440px;margin:24px auto}
.narrow-form{max-width:580px}
.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:20px;flex-wrap:wrap}
.page-head h1{margin:0}
.section-title{margin:36px 0 12px}
.form-subhead{margin:18px 0 4px;font-size:15px}
.funds{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 16px;margin-bottom:20px}
.funds strong{font-size:24px}
.label{display:block;font-size:13px;color:var(--muted);margin-bottom:2px}
details.collapsible{margin-bottom:20px}
details.collapsible>summary{cursor:pointer;display:flex;align-items:center;gap:10px;font-weight:600;list-style:none;flex-wrap:wrap}
details.collapsible>summary::-webkit-details-marker{display:none}
details.collapsible[open]>summary{margin-bottom:16px}
details.collapsible summary .muted{font-weight:400}
.pager{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin-top:28px}
/* Centered, paragraph-style footer text */
.site-footer{border-top:1px solid var(--line);padding:30px 0;font-size:14.5px;color:var(--muted);text-align:center}
.footer-para{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}
.footer-para p{margin:0}
.footer-name{color:var(--ink);font-size:17px;font-weight:700;letter-spacing:.01em;margin-bottom:4px}
.site-footer a{color:inherit;text-decoration:none}
.site-footer a:hover{text-decoration:underline}

.doc-box{flex:1;display:flex;flex-direction:column;gap:10px;min-width:0}
.doc-box .btn{align-self:flex-start}
.field.flagged input{border-color:var(--danger);background:var(--danger-bg)}
.field.flagged>label::after{content:" - please update";color:var(--danger);font-weight:400}

.invoice-page .inv-actions{max-width:820px;margin:0 auto 16px;display:flex;gap:8px;justify-content:space-between}
.invoice-page .alert{max-width:820px;margin-left:auto;margin-right:auto}

/* ---------- printed reports (product list, account list, payment list): a proper bordered table, with the
   Southern Wholesale header and a footer repeating on every printed page, not just the first ---------- */
.report-table{width:100%;border-collapse:collapse;font-size:13px}
.report-table th,.report-table td{border:1px solid #333;padding:7px 10px;text-align:left;vertical-align:top}
.report-table thead tr.report-brand-row th{border:none;padding:0 0 10px}
.report-brand{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;padding-bottom:8px;border-bottom:2px solid #222}
.report-brand h1{margin:0;font-size:19px}
.report-brand .muted{font-size:12.5px}
.report-brand-right{text-align:right;font-size:12.5px;line-height:1.4}
.report-table thead tr.report-col-row th{background:#eef2f7;font-weight:700;font-size:11.5px;text-transform:uppercase;letter-spacing:.02em;color:#333}
.report-table tbody tr:nth-child(even){background:#f8f9fb}
.report-table td.num,.report-table th.num{text-align:right;white-space:nowrap}
.report-table tfoot td{border:none;border-top:2px solid #222;padding-top:8px;text-align:center;font-size:11px;color:#666}
@media print{
  .report-table{font-size:10.5pt}
  .report-table thead{display:table-header-group}
  .report-table tfoot{display:table-footer-group}
  .report-table tr{break-inside:avoid;page-break-inside:avoid}
  @page{margin:.5in}
  @page{@bottom-right{content:"Page " counter(page) " of " counter(pages);font-size:9pt;color:#666}}
}

/* ---------- responsive ---------- */
@media screen, (max-width:900px){
  .two-col{grid-template-columns:1fr}
  .checkout{grid-template-columns:1fr}
  .checkout .summary{position:static}
  .inv-meta{grid-template-columns:1fr 1fr}
}
@media screen, (max-width:560px){
  h1{font-size:24px}
  .grid-2,.grid-3{grid-template-columns:1fr}
  main.page{padding-top:20px}
  .modal-box{padding:24px 18px 20px}
  .invoice{padding:20px 16px}
  .inv-biz{text-align:left}
}

/* ================= THEME LAYER: colors, shapes, new features ================= */
body{background:var(--bg)}
h1{font-weight:800} h2{font-weight:750}
.site-header{background:#fff;box-shadow:0 1px 0 rgba(15,58,109,.05)}
.wordmark{font-weight:800}
.site-nav a,.linklike{font-weight:600;border-radius:var(--r-sm)}
.site-nav a.active{background:var(--blue);color:var(--blue-ink)}
.count{background:var(--maroon);color:#fff;border-radius:8px}
.btn{border-color:#bfc9d6;border-radius:var(--r-sm);font-weight:600;box-shadow:0 1px 2px rgba(20,32,46,.06);transition:background .15s,color .15s,border-color .15s,box-shadow .15s,transform .1s}
.btn:hover{background:var(--soft);border-color:var(--blue-line);box-shadow:0 4px 10px rgba(20,32,46,.1);transform:translateY(-1px)}
.btn:active{transform:translateY(0);box-shadow:0 1px 2px rgba(20,32,46,.08)}
.btn-primary{background:var(--blue);border-color:var(--blue-line);color:var(--blue-ink);font-weight:700;box-shadow:0 2px 6px rgba(15,58,109,.16)}
.btn-primary:hover{background:var(--blue-2);border-color:var(--blue-ink);box-shadow:0 6px 14px rgba(15,58,109,.22)}
.btn-danger{background:var(--maroon-bg);border-color:var(--maroon-line);color:var(--maroon)}
.btn-danger:hover{background:#f0ccd3;border-color:var(--maroon)}
.btn-plain{background:transparent;border-color:transparent;box-shadow:none}
.btn-plain:hover{box-shadow:none;transform:none}
.icon-btn{border-radius:var(--r-sm);transition:background .15s,transform .1s}
.icon-btn:hover{transform:translateY(-1px)}
input,select,textarea{border:1px solid #bfc9d6;border-radius:var(--r-sm)}
input:focus,select:focus,textarea:focus{outline:2px solid var(--blue-line);border-color:var(--blue-ink)}
input[type=checkbox],input[type=radio]{accent-color:var(--blue-ink)}
:focus-visible{outline-color:var(--blue-ink)}
.panel,.table-wrap,.product,.invoice,.empty{border-color:var(--line);border-radius:var(--r);box-shadow:0 1px 2px rgba(20,32,46,.04)}
.empty{background:#fff;border-color:var(--blue-line)}
.modal-box{border-radius:var(--r)}
.table th{background:var(--soft);color:var(--blue-ink);font-weight:700}
.table tbody tr:hover td{background:#f8fbfe}
.tab-group{border-radius:var(--r-sm) var(--r-sm) 0 0;transition:background .15s,color .15s}
.tab-group:hover{background:var(--soft)}
.tab-group.active{background:var(--blue);color:var(--blue-ink);border-bottom-color:var(--blue-ink);font-weight:700}
.tab-add{border-radius:var(--r-sm);border-color:var(--blue-line);transition:background .15s,border-color .15s,transform .1s;box-shadow:0 1px 2px rgba(20,32,46,.05)}
.tab-add:hover{transform:translateY(-1px);box-shadow:0 3px 8px rgba(20,32,46,.1)}
.chip{transition:background .15s,color .15s,border-color .15s}
.cp-item{transition:background .15s,border-color .15s,transform .1s;box-shadow:0 1px 2px rgba(20,32,46,.04)}
.cp-item:hover{transform:translateY(-1px);box-shadow:0 3px 8px rgba(20,32,46,.08)}
.badge{border-radius:8px;font-weight:600}
.b-pending{background:var(--warn-bg);color:var(--warn)} .b-delivery{background:var(--blue);color:var(--blue-ink)}
.b-done{background:var(--ok-bg);color:var(--ok)} .b-review{background:var(--maroon-bg);color:var(--maroon)}
.b-returned{background:var(--soft-2);color:#3c4a5a} .b-rejected{background:var(--maroon-bg);color:var(--maroon)}
.alert{border-radius:var(--r-sm)}
.site-footer{background:#fff;border-top:1px solid var(--line)}
.product:hover{border-color:var(--blue-line)}
.pager{align-items:center}
.pager-gap{padding:0 4px;color:var(--muted)} .pager-info{margin-left:10px}
.checks{display:flex;gap:18px;flex-wrap:wrap} .check{display:inline-flex;align-items:center;gap:8px;cursor:pointer}
.actions-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.warn-text{color:var(--warn)}
.tax-alert-flag{display:inline-flex;vertical-align:-4px;margin-left:4px;cursor:help}
input[type=color]{padding:3px;min-height:44px;cursor:pointer}
input[type=range]{min-height:0;padding:0;accent-color:var(--blue-ink)}
main.home .home-actions .btn-lg{border-radius:14px}
body.has-hero main.home{min-height:0;align-items:flex-start;padding-top:36px;padding-bottom:64px}

/* ---------- scrolling message bar ---------- */
.marquee{position:relative;height:38px;overflow:hidden;font-size:14px;line-height:38px;border-bottom:1px solid rgba(0,0,0,.07)}
.marquee-view{overflow:hidden;height:100%;white-space:nowrap}
.marquee-track{display:inline-flex;animation:marq 40s linear infinite;will-change:transform}
.marquee-item{display:inline-block;padding:0 2.2rem}
.marquee-item::after{content:"\2022";margin-left:2.2rem;opacity:.55}
.marquee.is-empty .marquee-track{animation:none}
.marquee.is-empty .marquee-item::after{content:none}
@keyframes marq{to{transform:translateX(-50%)}}
@media (hover:hover){.marquee:hover .marquee-track{animation-play-state:paused}}
.marquee-edit{position:absolute;right:10px;top:4px;width:30px;height:30px;border-radius:8px;border:1px solid rgba(0,0,0,.2);background:rgba(255,255,255,.95);color:#111;display:grid;place-items:center;cursor:pointer;opacity:1;padding:0}
.marquee:hover .marquee-edit,.marquee-edit:focus-visible{opacity:1}
.marquee-preview{padding:10px 14px;border-radius:var(--r-sm);font-size:14px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}

/* ---------- homepage banners ---------- */
.hero{width:100%;max-width:1920px;margin:0 auto;position:relative}
.hero-view{position:relative;overflow:hidden;background:var(--soft-2)}
.hero-track{display:flex;width:100%;touch-action:pan-y}
/* Round 8 item 3: banners are taller now - 16:9 instead of 4:1 (same ratio at every width, still just
   one picture for both phone and computer - see the Round 7 note below). */
.hero-slide{flex:0 0 100%;aspect-ratio:16/9;overflow:hidden}
.hero-slide picture,.hero-slide img{display:block;width:100%;height:100%;object-fit:cover;-webkit-user-drag:none;user-select:none}
.hero-dots{position:absolute;left:0;right:0;bottom:10px;display:flex;justify-content:center;gap:8px}
.hero-dots button{width:9px;height:9px;border-radius:5px;border:0;background:rgba(255,255,255,.65);padding:0;cursor:pointer;box-shadow:0 0 0 1px rgba(0,0,0,.18);transition:width .2s}
.hero-dots button.on{background:#fff;width:24px}
.hero-edit{position:absolute;top:12px;right:12px;z-index:2;background:#fff}
.hero-empty{display:grid;place-items:center;aspect-ratio:16/9;background:var(--soft);border:2px dashed var(--blue-line)}
.hero-empty>div{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:12px;color:var(--blue-ink)}
.hero-empty .icon{width:28px;height:28px}
@media screen, (max-width:760px){
  /* Round 7 item 2: the banner shape is the same at every width, on purpose - with a single image used
     for both phone and computer (no more separate crops), keeping the box ratio identical everywhere is
     what makes the same picture actually look the same on a phone as on a computer, just scaled down.
     (Before Round 7 this used to be a different ratio on narrow screens, which is why phone needed its
     own crop.) */
  .hero-dots{bottom:6px}.hero-empty .muted{display:none}.hero-edit{top:8px;right:8px}
}
.banner-list{list-style:none;margin:0 0 16px;padding:0;display:flex;flex-direction:column;gap:10px}
.banner-list li{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:start;border:1px solid var(--line);border-radius:var(--r-sm);padding:8px}
/* Round 7 item 2: one picture per banner now (previously a Phone thumbnail and a Computer thumbnail
   side by side) - still wrapped in .bl-thumbs for layout, but with only one .bl-thumb inside it. */
.bl-thumbs{display:flex;flex:1;min-width:0}
.bl-thumb-single{width:100%;max-width:260px}
.bl-thumb img{width:100%;border-radius:6px;display:block;aspect-ratio:16/9;object-fit:cover}
.bl-missing{display:flex;align-items:center;justify-content:center;text-align:center;aspect-ratio:16/9;border:1.5px dashed #cfcfcf;border-radius:6px;color:var(--muted);font-size:12px;padding:4px}
.bl-actions{display:flex;gap:6px;flex-wrap:wrap}
@media screen, (max-width:560px){.banner-list li{grid-template-columns:1fr}.bl-actions{grid-column:1/-1}.bl-thumb-single{max-width:none}}
.modal-box.modal-wide{max-width:760px}
.crop-stage{position:relative;width:100%;overflow:hidden;background:#1b2530;border-radius:var(--r-sm);box-shadow:0 0 0 2px var(--blue-ink);touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}
.crop-stage:active{cursor:grabbing}
.crop-stage img{position:absolute;left:0;top:0;max-width:none;display:block;pointer-events:none}
.crop-stage+p{margin-top:12px}
.filters input[type=date]{width:auto;min-width:160px}
.zoom-row{display:flex;align-items:center;gap:12px;margin:8px 0 12px}

/* ---------- admin: select + print, add-section rows ---------- */
.bulk-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 12px}
.bulk-actions{display:flex;gap:8px;flex-wrap:wrap}
.table th.sel,.table td.sel{width:1%;text-align:center}
.table td.sel input{width:20px;height:20px}
.section-rows{display:flex;flex-direction:column;gap:8px;margin:8px 0}
.section-row{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;align-items:center}
.section-row input{min-height:40px}
.section-row [data-remove-section]{font-size:20px;line-height:1;padding:0 10px;min-height:40px}
@media screen, (max-width:520px){.section-row{grid-template-columns:1fr 1fr auto}}
.btn-plus{border-style:dashed;border-color:var(--blue-ink);color:var(--blue-ink);background:#fff}
.btn-plus:hover{background:var(--blue)}

/* ---------- print ---------- */
@page{margin:.4in}
@media print{
  .site-header,.site-footer,.no-print,.toast,.modal,.alert,.marquee,.hero{display:none!important}
  html,body{background:#fff}
  body{display:block;font-size:12pt;min-height:0}
  main.page,main.page.container{display:block;width:100%;max-width:none;margin:0;padding:0}
  .invoice-page{width:100%;max-width:none}
  .table-wrap,.panel{box-shadow:none}
  .table-wrap{border:0;overflow:visible}
  .table th{background:none}
}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}

/* ---------- money inputs ---------- */
.money-input{position:relative}
.money-input>span{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none}
.money-input input{padding-left:26px}
.table .money-input{max-width:140px}
.table .money-input input{min-height:40px}

/* ---------- guest catalog notice (item 11) ---------- */
.catalog-notice{display:flex;gap:12px;align-items:center;background:var(--info-bg);border:1px solid var(--blue-line);border-radius:var(--r);padding:12px 16px;margin:0 0 20px}
.catalog-notice .icon{width:24px;height:24px;flex:none;color:var(--maroon)}
.catalog-notice p{margin:0;font-size:15px;line-height:1.55;color:var(--blue-ink)}
.catalog-notice strong{color:var(--maroon)}
.catalog-notice a{color:var(--blue-ink);font-weight:600;text-decoration:underline}

/* ---------- Shop by Category: cascading popup picker (item 3) ---------- */
.cat-picker-box{max-width:420px;padding-top:20px}
.cp-head{display:flex;align-items:center;gap:8px;margin-bottom:14px;padding-right:30px}
.cp-back{flex:none}
.cp-title{margin:0;font-size:18px;flex:1}
.cp-list{display:flex;flex-direction:column;gap:8px;max-height:60vh;overflow-y:auto}
.cp-item{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:14px 16px;border:1px solid var(--line);border-radius:var(--r-sm);background:#fff;font:inherit;font-size:16px;font-weight:600;color:var(--ink);cursor:pointer;text-align:left}
.cp-item:hover{background:var(--soft);border-color:var(--blue-line)}
.cp-item .icon{width:18px;height:18px;color:var(--muted);flex:none}
.cp-empty{padding:20px 0;text-align:center}

/* ---------- Brand tabs + subcategory popup (items 1/2/3) ---------- */
.tabs-wrap{position:relative}
.crumbs{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.cp-item-row{display:flex;align-items:center;gap:6px}
.cp-item-row .cp-item{flex:1}
.cp-item-row form.inline{display:flex}
.cp-item-row .icon-btn{flex:none}

/* ---------- 2-column product list: Code / Product Name ----------
   Round 9 item 1: the Brand/Model column was removed from this customer-facing list (it's still shown
   above as the brand tabs used to filter the list, and still available on hover/long-press via this
   row's title tooltip - just no longer its own column). Round 16: the Product Name is shown exactly as it
   was entered (no abbreviating); a long name wraps onto a second line instead of being cut off. */
.plist3-head,.plist3-row{display:grid;grid-template-columns:minmax(96px,34%) 1fr;gap:8px;align-items:center}
.plist3-head{padding:10px 16px;background:var(--soft);border-bottom:1px solid var(--line);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--blue-ink)}
.plist3-row{padding:12px 16px;border-bottom:1px solid var(--line);font-size:14.5px;cursor:default}
.product-list .plist3-row:last-child{border-bottom:0}
.plist3-row:hover{background:var(--soft)}
.plist3-flavor{min-width:0;overflow-wrap:anywhere;line-height:1.3;font-weight:700}
/* Round 10 item 6: product codes have no length limit now (e.g. GBX2-50K-01), so the code is allowed to wrap
   onto a second line rather than ever being cut off. */
.plist3-code{min-width:0;font-weight:700;color:var(--blue-ink);font-size:13.5px;letter-spacing:.01em;overflow-wrap:anywhere;line-height:1.3}
.plist3-flavor{color:var(--ink)}
@media screen, (max-width:560px){
  .plist3-head,.plist3-row{grid-template-columns:minmax(92px,36%) 1fr;gap:6px;padding-left:12px;padding-right:12px}
  .plist3-head{font-size:9.5px}
  .plist3-row{font-size:13px}
  .plist3-code{font-size:11.5px;letter-spacing:0}
}

/* ---------- Payments: list cards (item 8) ---------- */
.pay-list{display:flex;flex-direction:column;gap:12px}
.pay-row{display:flex;align-items:center;gap:14px;padding:16px 18px;background:#fff;border:1px solid var(--line);border-radius:var(--r);box-shadow:0 1px 2px rgba(20,32,46,.04)}
.pay-select{display:flex;flex:none}
.pay-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.pay-top{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline;font-size:14px;color:var(--muted)}
.pay-date{font-weight:700;color:var(--ink)}
.pay-inv{color:var(--muted)}
.pay-cust{font-size:16.5px;font-weight:700}
.pay-method{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center}
.pay-amt{flex:none;font-size:20px;font-weight:800;color:var(--blue-ink);white-space:nowrap}
.pay-actions{flex:none;display:flex;align-items:center;gap:2px}
@media screen, (max-width:640px){
  .pay-row{flex-wrap:wrap;padding:14px}
  .pay-select{order:-1}
  .pay-main{order:0;flex-basis:100%}
  .pay-amt{order:1;margin-left:auto}
  .pay-actions{order:2;flex-basis:100%;justify-content:flex-end;border-top:1px solid var(--line);margin-top:8px;padding-top:8px}
}

/* ---------- Payments: View modal - invoice preview + download (item 8) ---------- */
.pv-meta{display:grid;grid-template-columns:1fr 1fr;gap:12px 20px;margin:0 0 20px;padding:16px;background:var(--soft);border-radius:var(--r-sm)}
.pv-meta div{display:flex;flex-direction:column;gap:2px}
.pv-meta dt{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--muted);margin:0}
.pv-meta dd{margin:0;font-size:15.5px;font-weight:600}
.pv-amount{color:var(--blue-ink);font-size:19px;font-weight:800}
.pv-invoice h3{font-size:15px;margin-bottom:10px}
.pv-invoice-box{background:#eef3f8;border:1px solid var(--line);border-radius:var(--r-sm);overflow:hidden;min-height:200px;max-height:65vh;display:flex;align-items:center;justify-content:center}
.pv-invoice-box iframe{width:100%;height:65vh;border:0;display:block}
.pv-invoice-box img{max-width:100%;max-height:65vh;display:block;margin:0 auto}
@media screen, (max-width:560px){.pv-invoice-box iframe,.pv-invoice-box img{height:50vh;max-height:50vh}}

/* ---------- Payments: multiple invoices per payment (item 4) ---------- */
.pv-invoice-item{margin-bottom:20px;padding-bottom:20px;border-bottom:1px solid var(--line)}
.pv-invoice-item:last-child{margin-bottom:0;padding-bottom:0;border-bottom:0}
.pv-invoice-name{font-weight:600;margin-bottom:8px;font-size:14px;color:var(--muted)}
.pv-invoice-item .pv-invoice-box{max-height:45vh}
.pv-invoice-item .pv-invoice-box iframe,.pv-invoice-item .pv-invoice-box img{height:45vh;max-height:45vh}
.invoice-rows{display:flex;flex-direction:column;gap:8px;margin:8px 0}
.invoice-row{display:flex;align-items:center;gap:8px}
.invoice-row input[type=file]{flex:1;min-width:0}
.invoice-row [data-remove-invoice]{font-size:20px;line-height:1;padding:0 10px;min-height:40px;flex:none}
.invoice-row-existing{padding:10px 12px;background:var(--soft);border-radius:var(--r-sm);justify-content:space-between}
.invoice-row-name{font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.check-inline{display:inline-flex;align-items:center;gap:6px;font-size:14px;white-space:nowrap;flex:none}

/* ---------- second banner strip under View Inventory (item 12) ---------- */
@media screen, (max-width:760px){
  main.home{gap:12px}
  /* Round 7 item 1: a tighter vertical rhythm on mobile only, so the homepage needs as little scrolling
     as possible on a phone - header, featured banner, promotional banner and the footer. Desktop keeps
     its original, more generous spacing; this only trims mobile.
     Round 8 item 3: banners got noticeably taller (16:9 instead of 4:1, a deliberate request), which on
     its own re-adds more scrolling than this spacing alone can claw back - trimmed a little further here
     regardless, since every bit of margin still helps. */
  body.has-hero main.home{padding-top:14px;padding-bottom:18px}
  .site-footer{padding:14px 0}
}

/* ---------- product page (desktop): cascading drop-down menus ---------- */
.cat-nav{position:relative}
@media screen, (max-width:760px){.cat-nav{position:sticky;top:65px;z-index:25;background:#fff}}
.cat-fly{position:absolute;z-index:50}
.fly{list-style:none;margin:0;padding:6px;min-width:210px;background:#fff;border:1px solid var(--line);box-shadow:0 12px 28px rgba(0,0,0,.12)}
.cat-fly>.fly{border-radius:0 0 var(--r) var(--r);border-top:0;animation:flyDown .16s ease-out}
.fly li{position:relative}
.fly a{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:10px 12px;border-radius:6px;text-decoration:none;color:inherit;white-space:nowrap}
.fly li:hover>a,.fly li:focus-within>a{background:var(--soft)}
.fly .fly{display:none;position:absolute;top:-7px;left:calc(100% + 8px);border-radius:var(--r);animation:flyRight .16s ease-out}
.fly .fly.flip{left:auto;right:calc(100% + 8px);animation-name:flyLeft}
.fly .fly::before{content:"";position:absolute;top:0;bottom:0;left:-16px;width:16px}
.fly .fly.flip::before{left:auto;right:-16px}
.fly li:hover>.fly,.fly li:focus-within>.fly{display:block}
@keyframes flyDown{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
@keyframes flyRight{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:none}}
@keyframes flyLeft{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:none}}
@media screen, (max-width:760px){.cat-fly{display:none!important}}

/* keep the field highlighted by form validation from hiding under the sticky header */
html{scroll-padding-top:90px}

/* ---------- loading splash (item 6) ---------- */
.load-screen{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:#fff;opacity:1;transition:opacity .35s ease}
.load-screen.is-hidden{opacity:0;pointer-events:none}
.load-screen-inner{display:flex;flex-direction:column;align-items:center;gap:18px}
.load-logo{max-width:170px;max-height:72px;object-fit:contain;animation:loadPulse 1.3s ease-in-out infinite}
.load-wordmark{font-size:22px;font-weight:700;color:var(--ink);animation:loadPulse 1.3s ease-in-out infinite}
.load-spinner{width:34px;height:34px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--blue-ink);animation:loadSpin .8s linear infinite}
@keyframes loadSpin{to{transform:rotate(360deg)}}
@keyframes loadPulse{0%,100%{opacity:1}50%{opacity:.5}}
@media (prefers-reduced-motion: reduce){.load-logo,.load-wordmark,.load-spinner{animation:none}}

/* ---------- Round 5: a touch of color across the site (item 5) ---------- */
.site-header{position:sticky;overflow:visible}
.site-header::before{content:"";position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,var(--acc-teal) 0%,var(--acc-cyan) 20%,var(--blue-ink) 40%,var(--acc-violet) 60%,var(--acc-rose) 80%,var(--acc-amber) 100%)}
.btn-primary{background:linear-gradient(135deg,var(--blue-2),var(--acc-cyan-bg))}
.btn-primary:hover{background:linear-gradient(135deg,var(--blue-2),var(--acc-teal-bg))}
.tab-add{color:var(--acc-teal);border-color:var(--acc-teal)}
.tab-add:hover{background:var(--acc-teal-bg)}
.btn-plus{border-color:var(--acc-teal);color:var(--acc-teal)}
.btn-plus:hover{background:var(--acc-teal-bg)}
.empty .icon{color:var(--acc-cyan)}

/* ---------- Round 5: brand tabs as minimal, colored pill buttons (item 1) ----------
   Each brand gets a soft tinted pill that cycles through a small 6-color accent set (tab-c0..tab-c5,
   assigned in render_brand_tabs()); "All Products" stays a neutral dark pill so it always reads as the
   default/reset option. Wraps onto multiple lines on narrow screens instead of scrolling off-edge, since
   there are usually only a handful of brands. */
.brand-tabs{display:flex;flex-wrap:wrap;align-items:center;gap:8px;border-bottom:0;padding:6px 0 12px}
.brand-tabs .tab-group{flex:none;margin-bottom:0;border-bottom:0;border-radius:999px;border:1px solid transparent;background:var(--soft);box-shadow:none}
.brand-tabs .tab-group:hover{transform:translateY(-1px);box-shadow:0 3px 8px rgba(20,32,46,.1)}
.brand-tabs .tab-group.active{border-bottom:0}
.brand-tabs .tab{padding:9px 16px;font-size:14px;font-weight:700;border-radius:999px}
.brand-tabs .tab-group-all{background:var(--ink)}
.brand-tabs .tab-group-all .tab{color:#fff}
.brand-tabs .tab-group-all:hover{background:#000}
.brand-tabs .tab-c0{background:var(--acc-teal-bg);border-color:var(--acc-teal)}
.brand-tabs .tab-c0 .tab{color:var(--acc-teal)}
.brand-tabs .tab-c1{background:var(--acc-amber-bg);border-color:var(--acc-amber)}
.brand-tabs .tab-c1 .tab{color:var(--acc-amber)}
.brand-tabs .tab-c2{background:var(--acc-violet-bg);border-color:var(--acc-violet)}
.brand-tabs .tab-c2 .tab{color:var(--acc-violet)}
.brand-tabs .tab-c3{background:var(--acc-rose-bg);border-color:var(--acc-rose)}
.brand-tabs .tab-c3 .tab{color:var(--acc-rose)}
.brand-tabs .tab-c4{background:var(--acc-cyan-bg);border-color:var(--acc-cyan)}
.brand-tabs .tab-c4 .tab{color:var(--acc-cyan)}
.brand-tabs .tab-c5{background:var(--acc-green-bg);border-color:var(--acc-green)}
.brand-tabs .tab-c5 .tab{color:var(--acc-green)}
.brand-tabs .tab-add{margin-left:0}

/* ---------- Round 6 item 5: bring filter chips in line with the pill/shadow/hover-lift/blue-accent
   language every other control on the site already uses (buttons, tab-add, brand tabs). Chips were the
   one control still using a flat hardcoded gray border with no shadow or hover lift, and a dark ink/white
   "selected" color instead of the blue accent used everywhere else for an active/selected state. ---------- */
.chip{border-color:var(--line);background:#fff;box-shadow:0 1px 2px rgba(20,32,46,.05);transition:background .15s,color .15s,border-color .15s,box-shadow .15s,transform .1s}
.chip:hover{border-color:var(--blue-line);box-shadow:0 3px 8px rgba(20,32,46,.1);transform:translateY(-1px)}
.chip:has(input:checked){background:var(--blue);color:var(--blue-ink);border-color:var(--blue-ink);font-weight:700;box-shadow:0 2px 6px rgba(15,58,109,.16)}
.chip:has(input:checked):hover{box-shadow:0 4px 10px rgba(15,58,109,.22)}
.chip:has(input:checked) input{accent-color:var(--blue-ink)}

/* ---------- per-customer Price popup: a plain notepad (Round 10 item 2) ---------- */
.price-modal-box{max-width:560px}
.price-notepad{display:block;width:100%;box-sizing:border-box;margin-top:14px;min-height:280px;max-height:60vh;resize:vertical;padding:12px 14px;border:1px solid var(--line);border-radius:var(--r-sm);background:#fff;font:inherit;font-size:16px;line-height:1.55;color:var(--ink);box-shadow:0 1px 2px rgba(20,32,46,.04);transition:border-color .15s,box-shadow .15s}
.price-notepad:focus{outline:none;border-color:var(--blue-line);box-shadow:0 0 0 3px var(--blue)}
.price-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}
@media screen, (max-width:560px){
  .price-notepad{min-height:220px}
  .price-modal-actions{justify-content:stretch}
  .price-modal-actions .btn{flex:1}
}

/* ---------- Round 10 item 6: product code = the model's fixed code format + an editable serial ---------- */
.code-compose{display:flex;align-items:stretch;min-width:0}
.code-compose input{min-width:0;flex:1}
.code-prefix{display:inline-flex;align-items:center;flex:0 1 auto;max-width:65%;padding:0 12px;background:var(--soft);border:1px solid #bfc9d6;border-right:0;border-radius:var(--r-sm) 0 0 var(--r-sm);font-weight:700;color:var(--blue-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:all}
.code-prefix:not([hidden]) + .code-serial{border-radius:0 var(--r-sm) var(--r-sm) 0;max-width:40%}
.field-error{color:var(--danger);font-weight:600;font-size:14px}

/* =====================================================================================================
   Round 15: the computer version is the phone version.
   Every phone rule above (the @media screen, (max-width:...) blocks) now applies on every screen, and the rules that only
   styled the wider computer layout were removed. The page is the same phone-style page at any window size, centred in a
   column (change --col to make it narrower or wider). Printing is not affected.
   ===================================================================================================== */
:root{--col:640px}
@media screen{
  .container{max-width:var(--col)}
  .site-header,.marquee,.hero,.site-footer{width:100%;max-width:var(--col);margin-left:auto;margin-right:auto}
}
.bulk-selectall{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:600;white-space:nowrap}
.bulk-selectall input{width:20px;height:20px}

/* =====================================================================================================
   Round 19: the Inventory "card list" - a scrollable stack of rounded-rectangle cards (brand/model name
   on the left, a square picture on the right, or a colored monogram if none has been uploaded), shared
   by the customer Products page and the staff Inventory page (includes/ui.php render_inv_cards()).
   Replaces the Round 18 swipeable carousel, and (on the staff side) the old pill-shaped brand tabs +
   popup picker. Plain <a>/<button> elements - no JS needed for layout, navigation or the press feedback
   below, which is the same squash-and-settle already used by every button on the site (motion.css adds
   the springy overshoot on top of this baseline; .inv-card still presses nicely without it).
   ===================================================================================================== */
.inv-list{display:flex;flex-direction:column;gap:12px;margin:4px 0 20px}
.inv-card-wrap{position:relative}
.inv-card{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;min-height:108px;padding:14px 16px;border-radius:var(--r);background:#fff;border:1px solid var(--line);box-shadow:0 1px 2px rgba(20,32,46,.05);text-decoration:none;color:inherit;transition:background .15s,box-shadow .2s,transform .15s}
.inv-card:hover{box-shadow:0 4px 14px rgba(20,32,46,.09)}
.inv-card:active{transform:scale(.97)}
.inv-card:focus-visible{outline:2px solid var(--blue-line);outline-offset:2px}
.inv-card-name{font-weight:700;font-size:16px;color:var(--blue-ink);overflow-wrap:anywhere;flex:1 1 auto;min-width:0}
.inv-card-pic{flex:none;width:92px;height:92px;border-radius:var(--r-sm);overflow:hidden;display:flex;align-items:center;justify-content:center;background:var(--soft)}
.inv-card-pic img{width:100%;height:100%;object-fit:contain;-webkit-user-drag:none;pointer-events:none}
.inv-mono{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:36px;font-weight:700}
.inv-c0{background:var(--acc-teal-bg);color:var(--acc-teal)}
.inv-c1{background:var(--acc-amber-bg);color:var(--acc-amber)}
.inv-c2{background:var(--acc-violet-bg);color:var(--acc-violet)}
.inv-c3{background:var(--acc-rose-bg);color:var(--acc-rose)}
.inv-c4{background:var(--acc-cyan-bg);color:var(--acc-cyan)}
.inv-c5{background:var(--acc-green-bg);color:var(--acc-green)}
.inv-card-edit{position:absolute;top:8px;right:8px;z-index:2;width:34px;height:34px;background:#fff;border:1px solid var(--line);box-shadow:0 1px 3px rgba(20,32,46,.12)}
.inv-card-add{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:56px;border:1.5px dashed var(--acc-teal);border-radius:var(--r);background:none;color:var(--acc-teal);font:inherit;font-weight:600;cursor:pointer;transition:background .15s,transform .15s;margin-bottom:12px}
.inv-card-add:hover{background:var(--acc-teal-bg)}
.inv-card-add:active{transform:scale(.97)}
