:root{--ink:#0B0B0B;--bg:#F5F3EE;--card:#FFFFFF;--line:#E2DED5;--line-2:#CFC9BD;--muted:#5E5A54;--gold:#C9A227;--red:#8E1D16;--green:#1E6B3A;--amber:#7A5A00;
  --head:'Anton', Impact, 'Arial Narrow Bold', sans-serif;--cond:'Barlow Condensed','Arial Narrow',Arial,sans-serif;--body:'Barlow','Segoe UI',Roboto,Arial,sans-serif}
*,*::before,*::after{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--body);font-size:15px;line-height:1.5}
a{color:var(--ink)} a:hover{color:#5E5A54}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
[hidden]{display:none !important}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
h1{margin:0;font-family:var(--head);font-weight:400;font-size:34px;line-height:1.1;text-transform:uppercase}
h2{margin:0 0 12px;font-family:var(--cond);font-weight:700;font-size:19px;letter-spacing:.06em;text-transform:uppercase}
h3{margin:12px 0 4px;font-family:var(--cond);font-size:14px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
p{margin:0 0 8px}
.muted{color:var(--muted)} .small{font-size:13px} .strong{font-weight:700} .normal{font-weight:400;text-transform:none;letter-spacing:0;font-family:var(--body)}
.green-t{color:var(--green)} .amber-t{color:var(--amber)} .red-t{color:var(--red)} .r{text-align:right} .nowrap{white-space:nowrap} .grow{flex:1;min-width:0}
code{background:#ECEAE5;padding:1px 6px}
.shell{display:flex;min-height:100vh}
.side{flex:0 0 232px;background:#0B0B0B;color:#F5F3EE;padding:20px 12px;display:flex;flex-direction:column;gap:20px;position:sticky;top:0;height:100vh}
.brand{display:flex;align-items:center;gap:8px;padding:0 8px;color:#F5F3EE;text-decoration:none}
.brand span{font-family:var(--head);font-size:22px;letter-spacing:.04em}
.brand small{font-family:var(--cond);font-weight:700;font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--gold)}
.brand:hover{color:#F5F3EE}
.side nav{display:flex;flex-direction:column;gap:2px}
.side nav a{display:flex;align-items:center;min-height:44px;padding:0 14px;color:#D6D2C9;text-decoration:none;font-weight:500}
.side nav a:hover{background:#1A1A1A;color:#fff}
.side nav a.on{background:#1F1F1F;color:#fff;box-shadow:inset 3px 0 0 var(--gold)}
.side nav a.gold{color:var(--gold)}
.side .count{margin-left:auto;padding:0 8px;background:var(--gold);color:#0B0B0B;font-size:12px;font-weight:700}
.side-foot{margin-top:auto;display:flex;flex-direction:column;gap:6px;padding:0 8px;font-size:13px}
.side-foot .muted{color:#A8A399;word-break:break-all}
.store-state{font-weight:700} .store-state.open{color:#9FD8B0} .store-state.closed{color:#F3DD8B}
.linkish{background:none;border:0;padding:0;color:inherit;text-decoration:underline;cursor:pointer}
.side .linkish{color:#D6D2C9}
.main{flex:1;min-width:0;padding:28px 36px 80px;display:flex;flex-direction:column;gap:18px}
.head{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-end;justify-content:space-between}
.head p{margin:4px 0 0}
.back{color:var(--muted);font-size:14px;text-decoration:none}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:42px;padding:0 18px;border:1px solid #0B0B0B;background:#0B0B0B;color:#F5F3EE;font-weight:700;font-size:15px;text-decoration:none;cursor:pointer;white-space:nowrap}
.btn:hover{color:#F5F3EE;background:#2A2A2A}
.btn-outline{background:#fff;color:#0B0B0B} .btn-outline:hover{background:#FAF8F3;color:#0B0B0B}
.btn-danger{background:#fff;color:var(--red);border-color:var(--red)} .btn-danger:hover{background:#FBEDEB;color:var(--red)}
.btn-sm{min-height:36px;padding:0 12px;font-size:14px}
.btn[disabled]{opacity:.5;cursor:wait}
.btns{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.btns form{margin:0}
.flash{padding:12px 16px;font-weight:600;background:#E1EAF7;color:#1F4E8C}
.flash.ok{background:#E3F1E7;color:var(--green)} .flash.err{background:#F6DEDB;color:var(--red)}
.card{background:var(--card);border:1px solid var(--line);padding:20px}
.card.flush{padding:0}
.card-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.card-head h2{margin:0}
.pad{padding:12px 16px;margin:0}
.stack{display:flex;flex-direction:column;gap:14px}
.cols-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}
.cols-2.wide-left{grid-template-columns:minmax(0,2fr) minmax(0,1fr)}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end}
label{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:14px}
.label{display:block;font-weight:600;font-size:14px;margin-bottom:6px}
input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea{width:100%;min-height:42px;padding:0 12px;background:#fff;border:1px solid var(--line-2);font-weight:400;font-size:15px;border-radius:0}
textarea{padding:10px 12px;resize:vertical}
input[type=checkbox],input[type=radio]{width:18px;height:18px;accent-color:#0B0B0B}
.check{flex-direction:row;align-items:center;gap:10px;font-weight:500;cursor:pointer}
.check.big{align-items:flex-start;font-size:16px} .check.big input{margin-top:3px}
.checks{display:flex;flex-direction:column;gap:6px;max-height:240px;overflow:auto;padding:4px 0}
.inline{display:flex;gap:8px;align-items:center;flex-wrap:wrap} .inline select{width:auto;flex:1}
.inline-f{display:inline;margin:0}
.toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}
.toolbar input[type=search]{max-width:320px}
.toolbar select{width:auto}
.search{flex:0 1 320px}
.tabs{display:flex;flex-wrap:wrap;gap:6px}
.tabs a{display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:0 12px;border:1px solid #D8D3C8;background:#fff;text-decoration:none;font-weight:600;font-size:14px}
.tabs a span{padding:0 6px;background:#ECEAE5;font-size:12px}
.tabs a.on{background:#0B0B0B;color:#F5F3EE;border-color:#0B0B0B} .tabs a.on span{background:var(--gold);color:#0B0B0B}
.table-wrap{overflow-x:auto}
.tbl{width:100%;border-collapse:collapse;font-size:14px}
.tbl th{text-align:left;padding:10px 12px;font-family:var(--cond);font-size:13px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);background:#FAF8F3;border-bottom:1px solid var(--line)}
.tbl td{padding:10px 12px;border-bottom:1px solid #EEEBE4;vertical-align:middle}
.tbl tr:hover td{background:#FCFBF8}
.tbl input,.tbl select{min-height:36px !important}
.thumb-cell img,.thumb-cell .img-ph{width:48px;height:58px;object-fit:cover;background:#EDEAE3}
.img-ph{background:#EDEAE3}
.st{display:inline-block;padding:2px 10px;font-weight:700;font-size:12px;white-space:nowrap}
.st-gray{background:#ECEAE5;color:#4A4640} .st-green{background:#E3F1E7;color:var(--green)} .st-amber{background:#FBF0D2;color:var(--amber)}
.st-purple{background:#EDE3F7;color:#5B2C83} .st-blue{background:#E1EAF7;color:#1F4E8C} .st-dark{background:#0B0B0B;color:#F5F3EE} .st-red{background:#F6DEDB;color:var(--red)}
.st-select{width:auto !important;min-width:160px;font-weight:700 !important;cursor:pointer}
.st-select.st-dark{color:#F5F3EE}
.mini{display:inline-block;padding:0 6px;font-size:11px;font-weight:700}
.mini.green{background:#E3F1E7;color:var(--green)} .mini.amber{background:#FBF0D2;color:var(--amber)}
.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.kpi{background:#fff;border:1px solid var(--line);padding:16px 18px;display:flex;flex-direction:column;gap:2px;text-decoration:none}
.kpi:hover{border-color:#0B0B0B;color:var(--ink)}
.k-label{font-family:var(--cond);font-weight:700;font-size:13px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.k-val{font-family:var(--head);font-size:30px;line-height:1.15}
.att{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;background:#F2EFE8;text-decoration:none;margin-bottom:8px}
.att.warn{background:#FBF0D2}
.att:hover{outline:2px solid #0B0B0B;color:var(--ink)}
.att strong{font-family:var(--head);font-size:22px;font-weight:400}
.steps{list-style:none;margin:0;padding:0;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:4px;font-size:12px;color:#8A857C}
.steps li{display:flex;flex-direction:column;gap:6px} .steps li span{height:6px;background:#E2DED5}
.steps li.done{color:var(--ink);font-weight:600} .steps li.done span{background:#0B0B0B}
.next{background:#FAF8F3;border-color:#D8D3C8}
.ship-form{display:grid;grid-template-columns:1fr 1.4fr auto;gap:10px;align-items:end}
.item{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid #EEEBE4}
.item img,.item .img-ph{width:56px;height:68px;object-fit:cover;flex:none}
.totals{display:grid;grid-template-columns:1fr auto;gap:4px 12px;margin:12px 0 0}
.totals dt{color:var(--muted)} .totals dd{margin:0;text-align:right}
.totals .t{font-family:var(--head);font-size:20px;color:var(--ink)}
.history{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.history li{display:grid;grid-template-columns:170px 1fr;gap:12px;font-size:14px}
.sticky-save{position:sticky;bottom:0;padding:12px 0;background:linear-gradient(transparent, var(--bg) 30%)}
.hero-img-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.hero-prev img{width:120px;height:120px;object-fit:cover}

/* product editor */
.prefix-input{display:flex;align-items:stretch;border:1px solid var(--line-2);background:#fff}
.prefix-input span{display:flex;align-items:center;padding:0 10px;background:#FAF8F3;color:var(--muted);font-weight:400;border-right:1px solid var(--line-2)}
.prefix-input input{border:0 !important}
.kind-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.kind{display:flex;gap:10px;align-items:flex-start;padding:14px;border:2px solid var(--line-2);background:#fff;text-align:left;cursor:pointer}
.kind.on{border-color:#0B0B0B;background:#FAF8F3}
.kind .ring{width:18px;height:18px;flex:none;margin-top:2px;border-radius:9px;border:2px solid #A8A399}
.kind.on .ring{border:6px solid #0B0B0B}
.kind strong{display:block}
.kind small{color:var(--muted)}
.img-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px;margin-bottom:10px}
.img-tile{border:1px solid var(--line);background:#FAF8F3;display:flex;flex-direction:column}
.img-tile.main{border:2px solid #0B0B0B}
.img-tile .pic{position:relative;aspect-ratio:4/5;background:#EDEAE3}
.img-tile .pic img{width:100%;height:100%;object-fit:cover}
.img-tile .pic span{position:absolute;top:6px;left:6px;padding:0 6px;background:#0B0B0B;color:#F5F3EE;font-size:11px;font-weight:700}
.img-tile input{border-width:1px 0 0 0 !important;min-height:34px !important;font-size:13px !important}
.img-tile .acts{display:flex;border-top:1px solid var(--line)}
.img-tile .acts button{flex:1;height:34px;border:0;background:transparent;cursor:pointer}
.img-tile .acts button:hover{background:#ECEAE5}
.dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:90px;border:2px dashed var(--line-2);background:#fff;cursor:pointer;color:var(--muted)}
.dropzone input{position:absolute;width:1px;height:1px;opacity:0}
.dropzone span{font-weight:700;color:var(--ink)}
.dropzone.drag{border-color:#0B0B0B;background:#FAF8F3}
.presets{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-bottom:12px}
.chip{min-height:34px;padding:0 10px;border:1px dashed #A8A399;background:#fff;font-size:13px;font-weight:600;cursor:pointer}
.chip:hover{border-color:#0B0B0B}
label.narrow{max-width:220px;margin-bottom:12px}
.opt-box{border:1px solid var(--line);padding:14px;margin-bottom:10px;display:flex;flex-direction:column;gap:10px}
.opt-top{display:flex;gap:8px;align-items:flex-end}
.opt-top label{flex:1}
.val-row{display:grid;grid-template-columns:minmax(0,1fr) 120px 40px 40px;gap:6px;align-items:center}
.val-row button{height:40px;border:1px solid var(--line-2);background:#fff;cursor:pointer}
.add-val{display:grid;grid-template-columns:minmax(0,1fr) 120px auto;gap:6px}
.val-head{display:grid;grid-template-columns:minmax(0,1fr) 120px 86px;gap:6px;font-size:12px;color:var(--muted);font-weight:600}
.bulk{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;padding:12px;background:#FAF8F3;border:1px solid var(--line);margin:12px 0 6px}
.bulk label{flex:0 1 170px}
.variants td:first-child{width:44px}
.variants input{min-width:80px}
.variants input[type=checkbox]{min-width:0;width:20px;height:20px;min-height:0 !important}
.variants th[scope=row]{white-space:nowrap}
.variants tr.off td{opacity:.5}
.toggle-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #EEEBE4}
.toggle-row:last-child{border-bottom:0}
.toggle-row small{display:block;color:var(--muted);font-weight:400}

/* auth */
body.auth{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:20px}
.auth-card{width:min(440px,100%);background:#fff;border:1px solid var(--line);padding:28px;display:flex;flex-direction:column;gap:14px}
.brand.dark{padding:0;color:#0B0B0B} .brand.dark:hover{color:#0B0B0B}

/* print sheet */
body.sheet{background:#fff}
.sheet-page{max-width:900px;margin:0 auto;padding:28px}
.sheet-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;border-bottom:3px solid #0B0B0B;padding-bottom:10px;margin-bottom:12px}
.sheet-brand{font-family:var(--head);font-size:20px;letter-spacing:.04em;font-weight:400}
.sheet-sizes{display:flex;flex-wrap:wrap;gap:6px}
.sheet-sizes span{padding:3px 10px;border:1px solid #0B0B0B;font-weight:700}
.sheet-tbl td.big{font-weight:700;font-size:17px;letter-spacing:.04em}
.box-check{display:inline-block;width:18px;height:18px;border:2px solid #0B0B0B}

/* bulk actions */
.chk-cell{width:40px}
.chk-cell input{width:18px;height:18px;accent-color:var(--gold);cursor:pointer}
tr.picked td{background:#FBF6E6}
.bulk-bar{position:sticky;top:0;z-index:5;display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 14px;margin-bottom:10px;background:#0B0B0B;color:#F5F3EE}
.bulk-bar span{font-weight:700;margin-right:6px}
.bulk-bar .btn-outline{background:transparent;color:#F5F3EE;border-color:#F5F3EE}
/* team quotes */
.facts{display:grid;grid-template-columns:120px minmax(0,1fr);gap:8px 14px;margin:0}
.facts dt{color:var(--muted);font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;padding-top:2px}
.facts dd{margin:0}
.pre{white-space:pre-wrap}
.size-chips{display:flex;flex-wrap:wrap;gap:6px}
.size-chips span{padding:2px 10px;border:1px solid var(--line-2);font-weight:700;font-size:13px}
.roster-tbl td{padding-top:6px;padding-bottom:6px}
.msg-box{width:100%;font-family:var(--body);font-size:14px;line-height:1.5;background:#FAF9F6;border:1px solid var(--line-2);padding:10px 12px;margin-bottom:10px}
.copy-input{width:100%;margin-bottom:8px}
/* backup */
.cols-2.tight{gap:28px;margin:0}
.cols-2.tight h3{margin-top:0}
/* login help */
.auth-foot{margin:0;text-align:center;font-size:14px}
.reset-steps{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:10px}

@media print{.noprint{display:none !important}.sheet-page{padding:0}}

@media (max-width:900px){
  .shell{flex-direction:column}
  /* compact top bar: brand + one swipeable row of menu links */
  .side{position:sticky;top:0;z-index:20;height:auto;flex:none;padding:10px 0 0;gap:6px}
  .side .brand{padding:0 14px}
  .side nav{flex-direction:row;flex-wrap:nowrap;overflow-x:auto;gap:0;padding:0 6px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .side nav::-webkit-scrollbar{display:none}
  .side nav a{flex:none;min-height:44px;padding:0 12px;white-space:nowrap}
  .side nav a.on{box-shadow:inset 0 -3px 0 var(--gold)}
  .side .count{margin-left:6px}
  .side-foot{position:absolute;top:12px;right:14px;flex-direction:row;align-items:center;gap:10px;padding:0}
  .side-foot .store-state,.side-foot .muted{display:none}
  .side .linkish{min-height:32px}
  .main{padding:18px 14px 80px}
  input,select,textarea{font-size:16px !important}
  fieldset{min-width:0}
  .head{flex-wrap:wrap;gap:12px}
  .toolbar{gap:8px}
  .toolbar input[type=search]{flex:1 1 100%}
  .cols-2,.cols-2.wide-left,.grid-2,.grid-3,.kind-grid{grid-template-columns:minmax(0,1fr)}
  .facts{grid-template-columns:minmax(0,1fr)} .facts dt{padding-top:6px}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ship-form{grid-template-columns:1fr}
  .history li{grid-template-columns:1fr}
}

/* phones: tables become cards so nothing is cut off on the right */
@media (max-width:700px){
  .m-orders,.m-products{display:block}
  .m-orders thead,.m-products thead{display:none}
  .m-orders tbody,.m-products tbody{display:block}
  .m-orders tr,.m-products tr{display:grid;border-bottom:1px solid var(--line);padding:12px 14px}
  .m-orders td,.m-products td{display:block;padding:0;border:0;background:none !important}
  .m-orders tr{grid-template-columns:minmax(0,1fr) auto;gap:6px 12px}
  .m-orders .c-no{grid-column:1;grid-row:1} .m-orders .c-total{grid-column:2;grid-row:1;text-align:right;font-size:17px}
  .m-orders .c-cust{grid-column:1;grid-row:2} .m-orders .c-pay{grid-column:2;grid-row:2;text-align:right}
  .m-orders .c-items{grid-column:1 / -1;grid-row:3;color:var(--muted)}
  .m-orders .c-st{grid-column:1 / -1;grid-row:4} .m-orders .c-st select{width:100% !important;min-height:44px}
  .m-products tr{grid-template-columns:30px 60px minmax(0,1fr) auto;gap:6px 10px;align-items:center}
  .m-products .chk-cell{grid-column:1;grid-row:1 / span 3;align-self:start;width:auto}
  .m-products .thumb-cell{grid-column:2;grid-row:1 / span 3;align-self:start}
  .m-products .thumb-cell img,.m-products .thumb-cell .img-ph{width:60px;height:60px}
  .m-products .c-title{grid-column:3 / -1}
  .m-products .c-kind{grid-column:3} .m-products .c-status{grid-column:4;text-align:right}
  .m-products .c-price{grid-column:3;font-weight:700} .m-products .c-stock{grid-column:4;text-align:right;font-size:13px}
  .m-products .c-act{grid-column:3 / -1;text-align:left}
  .m-products .c-act a{display:inline-block;padding:8px 0;font-weight:700}
  .m-products td[colspan]{grid-column:1 / -1}
  .chk-cell input{width:22px;height:22px}
  .bulk-bar{top:98px}
  .m-zones,.m-zones tbody{display:block} .m-zones thead{display:none}
  .m-zones tr{display:grid;grid-template-columns:1.3fr 1fr 1fr auto;gap:6px 10px;padding:12px 0;border-bottom:1px solid var(--line);align-items:end}
  .m-zones td{display:flex;flex-direction:column;gap:4px;padding:0;border:0;background:none !important}
  .m-zones td::before{content:attr(data-label);font-size:12px;font-weight:600;color:var(--muted)}
  .m-zones td.z-name{grid-column:1 / -1;font-size:16px} .m-zones td.z-name::before{display:none}
  .m-zones input:not([type=checkbox]){width:100%}
  .m-zones input[type=checkbox]{width:24px;height:24px;margin:10px 0}
  /* product editor: one card per variant */
  .variants,.variants tbody{display:block} .variants thead{display:none}
  .variants tr{display:grid;grid-template-columns:30px repeat(3,minmax(0,1fr));gap:6px 8px;padding:12px 0;border-bottom:1px solid var(--line);align-items:end}
  .variants td:nth-child(3){grid-column:2;grid-row:2} .variants td:nth-child(4){grid-column:3;grid-row:2} .variants td:nth-child(6){grid-column:4;grid-row:2}
  .variants td:nth-child(5){grid-column:2 / -1;grid-row:3}
  .variants td{display:flex;flex-direction:column;gap:4px;padding:0;border:0;background:none !important;width:auto !important}
  .variants td[data-label]::before{content:attr(data-label);font-size:12px;font-weight:600;color:var(--muted)}
  .variants td:first-child{grid-column:1;grid-row:1;align-self:center}
  .variants td:nth-child(2),.variants th[scope=row]{grid-column:2 / -1;grid-row:1;align-self:center;font-weight:700;white-space:normal;padding:0;border:0;background:none}
  .variants input:not([type=checkbox]){min-width:0;width:100%}
  .variants td[colspan]{grid-column:1 / -1}
}
