/* Northern Home Accents · ordering app
   Catalog navy and maple red, Fraunces titles, Figtree text. */
:root {
  --bg: #ffffff; --panel: #f3f5f7; --ink: #13293d; --mut: #566271; --line: #d5dbe2;
  --red: #c8102e; --redbg: #fbe9ec; --navy: #13293d; --green: #1d5c3a; --greenbg: #e3f1e8;
  --blue: #2f6690; --bluebg: #e4edf7; --warn: #8a5a00; --warnbg: #fff3d6;
}
* { box-sizing: border-box; min-width: 0; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Figtree, system-ui, -apple-system, "Segoe UI", sans-serif; overflow-x: clip; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 600; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(26px, 4vw, 38px); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
a { color: var(--red); }
[hidden] { display: none !important; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 max(3vw, 14px); }
.mut { color: var(--mut); }
.small { font-size: 14px; }
.nowrap { white-space: nowrap; }

.btn { min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--ink); }
.btn.pri { background: var(--red); border-color: var(--red); color: #fff; }
.btn.dk { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: default; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 10px; }
.logo { height: 40px; width: auto; }
.who { font-size: 14px; color: var(--mut); text-align: right; line-height: 1.25; }
.tabs { display: flex; gap: 4px; background: var(--panel); padding: 4px; border-radius: 12px; margin-left: auto; flex-wrap: wrap; }
.tabs button, .tabs a { min-height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; color: var(--mut); display: flex; align-items: center; gap: 8px; text-decoration: none; }
.tabs [aria-current=page] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.pill { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
@media (max-width: 760px) { .tabs { margin-left: 0; width: 100%; } .tabs button, .tabs a { flex: 1; justify-content: center; padding: 0 8px; } .logo { height: 32px; } }

/* Panels, fields */
.box { background: var(--panel); border-radius: 16px; padding: 18px; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--bg); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.f { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.f.w { grid-column: 1 / -1; }
.f input, .f textarea, .f select, input.in, select.in { min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 16px; font-weight: 400; }
.f textarea { resize: vertical; }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } }
.note { font-size: 13px; color: var(--mut); margin: 0; }
.err { color: var(--red); font-size: 14px; font-weight: 600; white-space: pre-line; }
.warnbox { background: var(--warnbg); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 14px; white-space: pre-line; }
.okbox { background: var(--greenbg); color: var(--green); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.section-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; justify-content: space-between; padding: 22px 0 12px; }
.section-head p { margin: 6px 0 0; color: var(--mut); }

/* Catalog */
.search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 12px; background: var(--panel); width: min(100%, 340px); }
.search input { border: 0; background: transparent; flex: 1; font-size: 16px; outline: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; scrollbar-width: none; }
.chips button { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-weight: 600; font-size: 14px; white-space: nowrap; }
.chips button[aria-pressed=true] { background: var(--c, var(--navy)); border-color: var(--c, var(--navy)); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding-bottom: 40px; }
.dcard { position: relative; padding: 0; border: 0; background: none; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.dcard img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--panel); display: block; }
.dcard b { font-size: 15px; } .dcard small { color: var(--mut); font-size: 13px; }
.dcard .in { position: absolute; top: 8px; right: 8px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 8px; }
.empty { padding: 40px 0; color: var(--mut); }

/* Design dialog */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(780px, calc(100vw - 24px)); max-height: calc(100vh - 24px); background: var(--bg); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(8,16,24,.55); }
.dl { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.dl > img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; display: block; }
.dl .side { padding: 20px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.x { align-self: flex-end; width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--bg); display: grid; place-items: center; }
.prow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.prow .ps { grid-row: 1 / 3; } .prow .nm { font-weight: 600; font-size: 15px; align-self: end; } .prow .mt { font-size: 13px; color: var(--mut); align-self: start; }
.step { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; grid-row: 1 / 3; grid-column: 3; }
.step button { width: 40px; height: 44px; border: 0; background: none; font-size: 20px; }
.step input { width: 56px; height: 44px; border: 0; background: none; text-align: center; font-weight: 700; font-size: 16px; }
.low { background: var(--warnbg) !important; color: var(--warn); }
@media (max-width: 640px) { .dl { grid-template-columns: 1fr; } .dl > img { min-height: 0; aspect-ratio: 16 / 10; } }

/* Order form */
.ord { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; padding: 22px 0 60px; align-items: start; }
.sum { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 12px; }
.tot { font-family: Fraunces, Georgia, serif; font-size: 40px; line-height: 1; }
.kv { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; }
@media (max-width: 900px) { .ord { grid-template-columns: 1fr; } .sum { position: static; } }
.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table.of { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.of th, .of td { border-bottom: 1px solid var(--line); padding: 0; text-align: center; white-space: nowrap; }
.of thead th { background: var(--navy); color: #fff; padding: 8px 6px; font-weight: 600; font-size: 12px; line-height: 1.25; vertical-align: top; }
.of thead th b { display: block; font-size: 13px; } .of thead th em { display: block; font-style: normal; font-weight: 700; }
.of th.ac, .of td.ac { position: sticky; left: 0; background: var(--bg); z-index: 1; text-align: left; padding: 4px 8px; min-width: 130px; }
.of thead th.ac { background: var(--red); color: #fff; }
.of td input { width: 56px; height: 40px; border: 0; background: transparent; text-align: center; font-size: 16px; }
.of td.low input { color: var(--warn); font-weight: 700; }
.of tfoot td, .of tfoot th { background: var(--panel); font-weight: 700; padding: 8px 6px; }
.acc { display: flex; align-items: center; gap: 6px; }
.acc img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; }
.acc .rm { margin-left: auto; width: 32px; height: 32px; border: 0; background: none; color: var(--mut); }
.acc .view { border: 0; background: none; padding: 0; display: flex; align-items: center; gap: 6px; color: inherit; }
.payopt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-weight: 600; cursor: pointer; }
.payopt input { width: 20px; height: 20px; accent-color: var(--red); }

/* Lists and status pills */
.list { display: grid; gap: 10px; }
.lrow { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); text-align: left; width: 100%; }
.lrow b { display: block; } .lrow small { color: var(--mut); }
@media (max-width: 760px) { .lrow { grid-template-columns: minmax(0, 1fr) auto; } }
.st { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; display: inline-block; background: var(--panel); color: var(--mut); }
.st-New { background: var(--redbg); color: var(--red); }
.st-Printing, .st-Finishing { background: var(--warnbg); color: var(--warn); }
.st-Ready { background: var(--bluebg); color: var(--blue); }
.st-Shipped, .st-Paid, .st-Invoiced { background: var(--greenbg); color: var(--green); }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-align: left; background: var(--bg); }
.stat small { display: block; color: var(--mut); font-weight: 600; font-size: 13px; }
.stat b { display: block; font-family: Fraunces, Georgia, serif; font-size: 26px; line-height: 1.2; }
.stat span { font-size: 13px; color: var(--mut); }
.stat[aria-pressed=true] { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
table.lines { width: 100%; border-collapse: collapse; font-size: 14px; }
.lines td, .lines th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.lines .n { text-align: right; white-space: nowrap; }
.det { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; padding: 12px 0 60px; align-items: start; }
@media (max-width: 860px) { .det { grid-template-columns: 1fr; } }
.events { list-style: none; margin: 0; padding: 0; font-size: 13px; display: grid; gap: 6px; }
.events li { border-left: 3px solid var(--line); padding-left: 8px; }

/* Product shots: small mock-ups that carry the design's art */
.ps { --s: 56px; --u: calc(var(--s) / 17); width: var(--s); height: var(--s); flex: none; display: grid; place-items: center; background: #eef1f4; border-radius: 10px; overflow: hidden; position: relative; }
.ps .art { background: #d3dbe3 var(--art) center / cover no-repeat; }
.ps .sh { box-shadow: 0 calc(var(--u) * .4) calc(var(--u) * .9) rgba(0,0,0,.22); }
.ps .c4 { width: 76%; aspect-ratio: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 6%; } .ps .c4 i { border-radius: 6%; }
.ps .c1 { width: 62%; aspect-ratio: 1; border-radius: 6%; transform: rotate(-5deg); }
.ps .ms { width: 56%; aspect-ratio: 1; border-radius: 5%; }
.ps .mr { width: 72%; aspect-ratio: 1.5; border-radius: 4%; }
.ps .orn { width: 60%; aspect-ratio: 1; border-radius: 50%; margin-top: 8%; position: relative; overflow: visible; }
.ps .orn::before { content: ""; position: absolute; top: -17%; left: 44%; width: 12%; height: 18%; border: calc(var(--u) * .25) solid #222; border-radius: 50%; }
.ps .mg, .ps .stn, .ps .sg, .ps .ph { position: relative; }
.ps .mg { width: 86%; aspect-ratio: 279 / 280; background: url(/ps/mg.webp) center / contain no-repeat; }
.ps .mg i { position: absolute; left: 32.6%; top: 6.2%; width: 66.4%; height: 84%; border-radius: 1.5% 1.5% 6% 6%; mix-blend-mode: multiply; overflow: hidden; }
.ps .mg i::after, .ps .stn i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.3), rgba(255,255,255,.12) 22%, rgba(0,0,0,0) 50%, rgba(0,0,0,.16) 85%, rgba(0,0,0,.34)); }
.ps .stn { width: 70%; aspect-ratio: 300 / 395; background: url(/ps/stn.webp) center / contain no-repeat; }
.ps .stn i { position: absolute; left: 39.8%; top: 9.4%; width: 54%; height: 66%; border-radius: 1.5%; mix-blend-mode: multiply; opacity: .92; overflow: hidden; }
.ps .sg { width: 82%; aspect-ratio: 420 / 449; }
.ps .sg i { position: absolute; left: 1.03%; top: 6.49%; width: 96.51%; height: 91.17%; }
.ps .sg::after { content: ""; position: absolute; inset: 0; background: url(/ps/sg.webp) center / 100% 100% no-repeat; }
.ps .ph i { position: absolute; display: block; background-repeat: no-repeat; background-size: 100% 100%; }
.ps .ph .base { inset: 0; }
.ps .ph-h { width: 94%; aspect-ratio: 720 / 620; } .ps .ph-h .base { background-image: url(/ps/u-h.jpg); mix-blend-mode: multiply; }
.ps .ph-h .ov { left: 10.972%; top: 9.032%; width: 75.694%; height: 56.935%; clip-path: polygon(5.87% .57%, 91.93% 0, 100% 98.02%, 0 100%); }
.ps .ph-t { width: 36%; aspect-ratio: 400 / 990; filter: drop-shadow(0 calc(var(--u) * .5) calc(var(--u) * .7) rgba(0,0,0,.28)); } .ps .ph-t .base { background-image: url(/ps/u-t.png); }
.ps .ph-t .ov { left: 8.141%; top: 50.029%; width: 84.98%; height: 46.719%; clip-path: polygon(19.13% 5.24%, 22.48% .8%, 26.66% 0, 92.41% 10.44%, 97.08% 11.92%, 100% 16.26%, 99.89% 18.26%, 86.29% 94.69%, 84.7% 98.11%, 79.19% 100%, 7.29% 88.86%, 2.67% 87.4%, 0 83.11%); }
.ps .ph-t .spr { left: 50%; top: 43.434%; width: 22.5%; height: 9.091%; background-image: url(/ps/u-k.png); }
.ps .ph .ov { background: #d3dbe3 var(--art) center / cover no-repeat; }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login .art { background: #13293d url(/art/t/071-p7.jpg) center / cover no-repeat; position: relative; }
.login .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(19,41,61,0) 40%, rgba(19,41,61,.75)); }
.login .art p { position: absolute; left: 32px; right: 32px; bottom: 28px; color: #fff; z-index: 1; font-family: Fraunces, Georgia, serif; font-size: 26px; line-height: 1.2; margin: 0; }
.login form { align-self: center; justify-self: center; width: min(420px, 100% - 32px); display: flex; flex-direction: column; gap: 14px; padding: 40px 0; }
@media (max-width: 760px) { .login { grid-template-columns: 1fr; } .login .art { min-height: 200px; } }

/* Print */
@media print { .noprint { display: none !important; } body { font-size: 13px; } }
