/* Parchi · warm paper, ink, and a brick-orange accent. Phone first. */
:root {
  --bg: #F6F2EA; --card: #FFFFFF; --ink: #1D1A16; --ink2: #5E574C; --ink3: #8C8478; --line: #E6DFD2; --line2: #D6CDBD;
  --acc: #C2410C; --acc-d: #9A3412; --acc-l: #FFEDD5; --ok: #15803D; --ok-l: #DCFCE7; --bad: #B91C1C; --bad-l: #FEE2E2; --amber: #B45309; --amber-l: #FEF3C7;
  --blue: #1D4ED8; --blue-l: #DBEAFE; --teal: #0F766E; --teal-l: #CCFBF1; --violet: #6D28D9; --violet-l: #EDE9FE; --grey-l: #EEEAE2;
  --r: 14px; --r-s: 10px; --sh: 0 1px 2px rgba(40, 30, 10, .06), 0 1px 1px rgba(40, 30, 10, .04);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --tab-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15.5px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
body.noscroll { overflow: hidden; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--acc); }
img { max-width: 100%; }
svg { flex: none; }
.muted { color: var(--ink2); } .small, small { font-size: 13px; } .center { text-align: center; }
.bad-text { color: var(--bad); }
:focus-visible { outline: 2.5px solid var(--acc); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px;
  background: var(--acc); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, transform .05s; }
.btn:hover { background: var(--acc-d); } .btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 19px; height: 19px; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.xl { min-height: 54px; font-size: 16.5px; border-radius: 14px; }
.btn.block { display: flex; width: 100%; }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line2); }
.btn.ghost:hover { background: #FBF8F2; }
.btn.ok { background: var(--ok); } .btn.ok:hover { background: #166534; }
.btn.bad { background: var(--bad); } .btn.ghost.bad { background: var(--card); color: var(--bad); box-shadow: inset 0 0 0 1.5px #F1C4C4; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .btn-row.tight { gap: 4px; flex-wrap: nowrap; }
.btn-row > .btn { flex: 1 1 auto; }
.btn-col { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.link { background: none; border: 0; padding: 4px 2px; color: var(--acc); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.link svg { width: 16px; height: 16px; } .link.bad { color: var(--bad); }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: rgba(0, 0, 0, .05); } .icon-btn.sm { width: 32px; height: 32px; } .icon-btn.sm svg { width: 18px; }
.icon-btn.line { box-shadow: inset 0 0 0 1.5px var(--line2); background: var(--card); }
.icon-btn:disabled { opacity: .35; }
.btnlike { font: inherit; text-align: left; cursor: pointer; border: 0; width: 100%; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.lbl { font-weight: 700; font-size: 13.5px; color: var(--ink2); }
.hint { color: var(--ink3); font-size: 12.5px; }
input:not([type=checkbox]):not([type=file]), select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line2); border-radius: var(--r-s); background: #fff; font-size: 16px; }
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-l); }
select.mini { width: auto; min-height: 42px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 420px) { .three { grid-template-columns: 1fr 1fr; } }
.pass { position: relative; } .pass input { padding-right: 64px; } .pass .link { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.check input { width: 19px; height: 19px; accent-color: var(--acc); }
.row-check { display: flex; padding: 10px 2px; border-bottom: 1px solid var(--line); white-space: normal; }
.row-check span { display: flex; flex-direction: column; } .row-check small { color: var(--ink2); font-weight: 500; }
.toggle { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .sw { flex: none; width: 46px; height: 28px; border-radius: 99px; background: var(--line2); position: relative; transition: background .2s; margin-top: 1px; }
.toggle .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.toggle input:checked + .sw { background: var(--ok); } .toggle input:checked + .sw::after { transform: translateX(18px); }
.toggle input:focus-visible + .sw { outline: 2.5px solid var(--acc); outline-offset: 2px; }
.toggle .tl { display: flex; flex-direction: column; } .toggle .tl small { color: var(--ink2); }
.seg { display: flex; background: var(--grey-l); border-radius: 12px; padding: 3px; gap: 3px; }
.seg.wrap { flex-wrap: wrap; }
.seg button { flex: 1 1 auto; border: 0; background: none; padding: 9px 12px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--ink2); cursor: pointer; }
.seg button[aria-pressed=true] { background: #fff; color: var(--ink); box-shadow: var(--sh); }
.inline-add { display: flex; gap: 8px; margin-top: 14px; }

/* ---------- cards, pills, rows ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: var(--sh); margin-bottom: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head > b { white-space: nowrap; }
.card-head b { display: inline-flex; align-items: center; gap: 6px; }
.card-head svg { width: 19px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: var(--grey-l); color: var(--ink2); }
.pill.blue { background: var(--blue-l); color: var(--blue); } .pill.green { background: var(--ok-l); color: var(--ok); } .pill.teal { background: var(--teal-l); color: var(--teal); }
.pill.violet { background: var(--violet-l); color: var(--violet); } .pill.amber { background: var(--amber-l); color: var(--amber); } .pill.red { background: var(--bad-l); color: var(--bad); }
.rows { display: flex; flex-direction: column; background: var(--card); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; margin-bottom: 14px; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; width: 100%; color: var(--ink); }
.row:last-child { border-bottom: 0; } button.row:hover { background: #FBF8F2; }
.row.off { opacity: .55; }
.row > svg:last-child { color: var(--ink3); width: 18px; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .row-main small { color: var(--ink2); }
.row-img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; background: var(--grey-l); display: grid; place-items: center; font-weight: 800; color: var(--ink3); font-size: 13px; }
.due { font-weight: 800; color: var(--bad); font-size: 13.5px; white-space: nowrap; }
.li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); }
.li:last-child { border-bottom: 0; } .li > div { display: flex; flex-direction: column; min-width: 0; } .li small { color: var(--ink2); }
.li .r { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; } span.r { display: inline; }
.sec { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink3); margin: 22px 2px 8px; font-weight: 800; }
.note-box { background: var(--acc-l); color: #7C2D12; padding: 12px 14px; border-radius: var(--r-s); margin-bottom: 12px; font-size: 14.5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.note-box p { margin: 4px 0 0; width: 100%; }
.note-box.warn { background: var(--amber-l); color: #78350F; } .note-box.bad { background: var(--bad-l); color: #7F1D1D; }
.errbox { background: var(--bad-l); color: #7F1D1D; padding: 12px 14px; border-radius: var(--r-s); display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 6px 0 12px; }
.empty { text-align: center; padding: 40px 20px; color: var(--ink2); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty b { color: var(--ink); font-size: 17px; } .empty p { margin: 0 0 10px; max-width: 340px; }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--acc-l); color: var(--acc-d); font-weight: 800; }
.code { background: var(--grey-l); padding: 12px; border-radius: 10px; white-space: pre-wrap; font: 14px/1.5 ui-monospace, Menlo, Consolas, monospace; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 12px 0 0; } dt { color: var(--ink2); font-size: 13.5px; } dd { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ---------- loading, toast ---------- */
.loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 60px 20px; color: var(--ink2); }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 3.5px solid var(--line); border-top-color: var(--acc); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#pc-busy { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; background: rgba(246, 242, 234, .45); }
#pc-busy.on { display: grid; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 18px + var(--safe-b)); transform: translateX(-50%); z-index: 100; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
  display: flex; gap: 8px; align-items: center; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: calc(100% - 32px); animation: up .2s ease-out; }
.toast.bad { background: var(--bad); } .toast svg { width: 19px; color: #86EFAC; }
@keyframes up { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- sheet (bottom sheet on phones) ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 80; background: rgba(29, 26, 22, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; animation: rise .2s ease-out; }
@keyframes rise { from { transform: translateY(30px); opacity: .6; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 6px 18px; } .sheet-head b { font-size: 17px; }
.sheet-body { padding: 6px 18px 18px; overflow-y: auto; }
.sheet-foot { padding: 12px 18px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--card); }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 20px; max-height: 86vh; } .sheet-foot { border-radius: 0 0 20px 20px; } }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 0%, #FDE7D3 0, transparent 50%), var(--bg); }
.login-card { width: 100%; max-width: 400px; background: var(--card); border-radius: 20px; padding: 26px 22px; box-shadow: 0 10px 40px rgba(60, 30, 0, .1); }
.login-card h1 { font-size: 26px; margin: 20px 0 16px; }
.brand { display: flex; gap: 12px; align-items: center; } .brand > div { display: flex; flex-direction: column; min-width: 0; } .brand b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .brand small { color: var(--ink2); }
.logo { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--acc); color: #FFF7ED; display: grid; place-items: center; font-weight: 800; font-size: 22px; }

/* ---------- shell: bottom bar on phones, side menu on computers ---------- */
.shell { min-height: 100vh; }
.main { padding: 14px 14px calc(var(--tab-h) + 24px + var(--safe-b)); max-width: 1100px; margin: 0 auto; }
.side { display: none; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); backdrop-filter: blur(8px); }
.tabbar a { flex: 1; height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink3); text-decoration: none; font-size: 11.5px; font-weight: 700; position: relative; }
.tabbar a.on { color: var(--acc); } .tabbar a svg { width: 24px; height: 24px; }
.tabbar em, .side em { position: absolute; top: 8px; left: calc(50% + 6px); background: var(--acc); color: #fff; font-style: normal; font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px; }
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 240px 1fr; }
  .side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; height: 100vh; padding: 20px 14px; border-right: 1px solid var(--line); background: #FBF8F2; }
  .side nav { display: flex; flex-direction: column; gap: 2px; }
  .side nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: var(--ink2); text-decoration: none; font-weight: 700; position: relative; }
  .side nav a:hover { background: rgba(0,0,0,.04); } .side nav a.on { background: var(--acc-l); color: var(--acc-d); }
  .side em { position: static; margin-left: auto; }
  .side-out { margin-top: auto; color: var(--ink2); }
  .tabbar { display: none; }
  .main { padding: 24px 28px 60px; width: 100%; }
  .toast { bottom: 28px; }
  .cart-bar { left: 240px !important; }
}

/* ---------- page parts ---------- */
.page { max-width: 1000px; margin: 0 auto; } .page.narrow { max-width: 680px; }
.page-head { display: flex; align-items: center; gap: 8px; margin: 2px 0 14px; min-height: 44px; }
.page-head .ph-t { flex: 1; min-width: 0; } .page-head h1 { font-size: 23px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-head p { margin: 2px 0 0; color: var(--ink2); font-size: 13.5px; }
.page-head .ph-r { display: flex; gap: 6px; align-items: center; }
.page-head > .icon-btn:first-child { margin-left: -8px; }
.hello { margin: 6px 2px 16px; } .hello small { color: var(--ink2); font-weight: 600; } .hello h1 { font-size: 28px; }
.new-order { margin-bottom: 14px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; } .stats.three { grid-template-columns: repeat(3, 1fr); margin: 12px 0; }
.stat { background: var(--card); border-radius: var(--r); padding: 14px; box-shadow: var(--sh); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card .stat { background: var(--bg); box-shadow: none; }
.stat small { color: var(--ink2); font-weight: 600; } .stat b { font-size: 21px; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; } .stat b.sm { font-size: 15px; } .stat span { color: var(--ink3); font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile { background: var(--card); border: 0; border-radius: var(--r); padding: 14px; box-shadow: var(--sh); text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.tile:hover { box-shadow: 0 0 0 2px var(--acc-l), var(--sh); } .tile b { font-size: 26px; } .tile span { color: var(--ink2); font-weight: 700; font-size: 14px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; margin: 0 -2px; } .chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 0; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line2); padding: 8px 14px; border-radius: 99px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--ink2); }
.chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.filter-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; } .filter-row .search { flex: 1; margin: 0; }
.search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--line2); border-radius: 12px; padding: 0 6px 0 12px; margin-bottom: 10px; }
.search:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-l); }
.search svg { color: var(--ink3); } .search input { border: 0 !important; box-shadow: none !important; padding-left: 0 !important; min-height: 44px; background: transparent; }
.search.big input { min-height: 52px; font-size: 17px; }

/* ---------- the shop ---------- */
.shop { padding-bottom: 70px; }
.for-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--ink); color: #fff; padding: 10px 12px 10px 14px; border-radius: var(--r); margin-bottom: 10px; }
.for-bar small { display: block; color: #D6CDBD; font-size: 12px; } .for-bar .muted { color: #D6CDBD; }
.for-bar .btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px #5E574C; }
.search-bar { position: sticky; top: 0; z-index: 20; background: var(--bg); padding: 6px 0 2px; margin: 0 -2px; padding-left: 2px; padding-right: 2px; }
.pgrid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 760px) { .pgrid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1250px) { .pgrid { grid-template-columns: 1fr 1fr 1fr; } }
.pcard { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 12px; display: flex; flex-direction: column; }
.pc-top { display: flex; gap: 12px; margin-bottom: 8px; }
.thumb { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; flex: none; background: var(--grey-l); }
.thumb.ph { display: grid; place-items: center; font-weight: 800; color: var(--ink3); font-size: 20px; background: linear-gradient(135deg, #F3EDE2, #E9E1D2); }
.thumb.lg { width: 110px; height: 110px; } .thumb.lg.ph svg { width: 32px; height: 32px; }
.pc-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pc-info h3 { font-size: 16.5px; } .pbrand { color: var(--acc-d); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.pc-info .desc { margin: 2px 0; color: var(--ink2); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vlist { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.vrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.vrow:last-child { border-bottom: 0; } .vrow.on { background: linear-gradient(90deg, #FFF7ED, transparent); margin: 0 -12px; padding-left: 14px; padding-right: 12px; }
.v-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.v-name { font-size: 15px; }
.v-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; } .v-price .now { font-weight: 800; font-size: 17px; } .v-price small { color: var(--ink3); }
.v-price s { color: var(--ink3); font-size: 13px; } .v-price em { font-style: normal; color: var(--ok); font-weight: 800; font-size: 12.5px; }
.v-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .v-meta small { color: var(--ink3); font-size: 12px; }
.stock { font-size: 12px; font-weight: 700; } .stock.ok { color: var(--ok); } .stock.no { color: var(--bad); }
.more { align-self: flex-start; margin-top: 4px; }
.add-btn { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 16px 0 12px; border: 0; border-radius: 99px; background: var(--acc-l); color: var(--acc-d); font-weight: 800; cursor: pointer; }
.add-btn:hover { background: #FED7AA; } .add-btn svg { width: 18px; height: 18px; }
.add-btn.sm { height: 34px; }
.stepper { flex: none; display: inline-flex; align-items: center; height: 40px; border-radius: 99px; background: var(--acc); color: #fff; overflow: hidden; }
.stepper button { width: 40px; height: 40px; border: 0; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.stepper button:hover { background: rgba(0,0,0,.12); } .stepper button svg { width: 18px; height: 18px; }
.stepper input { width: 46px !important; min-height: 0 !important; height: 40px; padding: 0 !important; border: 0 !important; background: transparent !important; color: #fff; text-align: center; font-weight: 800; font-size: 16px !important; box-shadow: none !important; }
.stepper.sm { height: 34px; } .stepper.sm button { width: 34px; height: 34px; } .stepper.sm input { height: 34px; width: 40px !important; }
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--ink); color: #fff; padding: 12px 14px calc(12px + var(--safe-b)); box-shadow: 0 -6px 20px rgba(0,0,0,.12); }
.cart-bar > div { display: flex; flex-direction: column; } .cart-bar small { color: #D6CDBD; }
.cart-bar .btn { min-height: 48px; }
@media (min-width: 900px) { .cart-bar { left: 240px; padding: 14px 28px; } }

/* ---------- review / order ---------- */
.items .ci { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ci-main { display: flex; flex-direction: column; min-width: 0; } .ci-main span { color: var(--ink2); font-weight: 600; } .ci-main small .link { padding: 2px 0; font-size: 13px; }
.ci-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.add-more { margin-top: 8px; }
.sums > div { display: flex; justify-content: space-between; padding: 4px 0; color: var(--ink2); } .sums b { color: var(--ink); }
.sums .grand { border-top: 1.5px dashed var(--line2); margin-top: 6px; padding-top: 10px; font-size: 18px; color: var(--ink); font-weight: 800; }
.sums.in { margin-top: 8px; }
.sticky-foot { position: sticky; bottom: 0; padding: 12px 0 calc(12px + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 30%); z-index: 10; }
.shell:not(.hidebar) .page .sticky-foot { bottom: 0; }
.cust { display: flex; align-items: center; gap: 10px; } .cust > div:first-child { flex: 1; display: flex; flex-direction: column; min-width: 0; } .cust small { color: var(--ink2); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; } .actions .btn { flex: 1 1 140px; }
.onote { margin: 10px 0 0; padding: 10px 12px; background: var(--bg); border-radius: 10px; font-size: 14.5px; }
.tally.failed { box-shadow: inset 0 0 0 2px #F1C4C4, var(--sh); } .tally p { margin: 0 0 10px; }
.timeline { list-style: none; margin: 0; padding: 0; } .timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--line2); }
.timeline li.status::before { background: var(--acc); } .timeline li.tally::before { background: var(--teal); } .timeline li.msg::before { background: var(--blue); }
.timeline li.msg > div { background: var(--blue-l); padding: 8px 10px; border-radius: 10px; }
.timeline small { color: var(--ink3); }
.msg-box { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; } .msg-box .btn-row { justify-content: space-between; } .msg-box .btn-row .btn { flex: none; }

/* ---------- order list ---------- */
.olist { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 14px; }
@media (min-width: 760px) { .olist { grid-template-columns: 1fr 1fr; } }
.ocard { background: var(--card); border: 0; border-radius: var(--r); padding: 13px 14px; box-shadow: var(--sh); text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.ocard:hover { box-shadow: 0 0 0 2px var(--acc-l), var(--sh); }
.oc-top, .oc-mid, .oc-bot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.oc-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; } .oc-mid span { color: var(--ink2); font-size: 14px; } .oc-mid b { font-size: 16px; }
.oc-bot small { color: var(--ink3); }

/* ---------- admin bits ---------- */
.photo-row { display: flex; gap: 14px; align-items: center; }
.variant { border-left: 4px solid var(--acc-l); }
.steps { padding-left: 34px; } .steps li { padding: 6px 0; } .steps .btn { margin: 6px 0; }
.bridge.good { box-shadow: inset 0 0 0 2px #BBF7D0, var(--sh); } .bridge.warn { box-shadow: inset 0 0 0 2px #FDE68A, var(--sh); } .bridge.off { box-shadow: inset 0 0 0 2px var(--line2), var(--sh); }
.info .btn-row { margin-bottom: 4px; }

/* ---------- licence, copyright ---------- */
.copy { color: var(--ink3); font-size: 12px; text-align: center; margin: 18px 0 4px; }
.side .copy { text-align: left; margin: 6px 0 0; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .02em; }
.code.big { font-size: 22px; text-align: center; letter-spacing: .06em; }
.lic-warn { font-weight: 600; }
a.row { text-decoration: none; color: var(--ink); }

/* ---------- 2.0: staff, money, easy view, print ---------- */
.punch { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-left: 5px solid var(--line2); }
.punch.out { border-left-color: var(--acc); } .punch.in { border-left-color: var(--ok); } .punch.done { border-left-color: var(--ink3); }
.punch > div:first-child:not(.punch-row) { display: flex; flex-direction: column; } .punch small { color: var(--ink2); }
.punch-row { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 22px; width: 100%; flex-wrap: wrap; }
.punch-row > div { display: flex; flex-direction: column; gap: 2px; } .punch-row b { font-size: 22px; } .punch-row > :last-child { margin-left: auto; align-self: center; }
.tiles.three { grid-template-columns: repeat(3, 1fr); } .tiles .tile svg { color: var(--acc); }
.bar { height: 10px; background: var(--grey-l); border-radius: 99px; overflow: hidden; margin: 8px 0 4px; } .bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.scheme { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--violet); background: var(--violet-l); padding: 2px 8px; border-radius: 99px; margin: 2px 4px 2px 0; width: fit-content; }
.scheme svg { width: 14px; height: 14px; } .scheme.on { color: var(--ok); background: var(--ok-l); }
.photo-pick { display: flex; align-items: center; gap: 12px; padding: 12px; border: 2px dashed var(--line2); border-radius: 14px; cursor: pointer; font-weight: 700; color: var(--ink2); background: #fff; }
.photo-pick img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; } .pp-ic { width: 52px; height: 52px; border-radius: 12px; background: var(--acc-l); color: var(--acc); display: grid; place-items: center; }
.pick-list { max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 0 10px; background: #fff; }
.quick-out { display: flex; flex-direction: column; gap: 6px; } .chips.wrap { flex-wrap: wrap; overflow: visible; }
.pre { white-space: pre-wrap; margin: 0 0 10px; }
.row-img.round { border-radius: 50%; } a .row-img { display: block; }
.month-nav { display: flex; align-items: center; justify-content: space-between; background: var(--card); border-radius: var(--r); padding: 4px; margin-bottom: 12px; box-shadow: var(--sh); }
.month-nav b { font-size: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.sheet-grid { overflow-x: auto; } .sheet-grid table { border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.sheet-grid th, .sheet-grid td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: center; } .sheet-grid th:first-child, .sheet-grid td:first-child { text-align: left; position: sticky; left: 0; background: #fff; padding-left: 12px; }
.sheet-grid td.g { font-weight: 800; width: 26px; } .g.P { color: var(--ok); } .g.L { color: var(--amber); } .g.H { color: var(--blue); } .g.V { color: var(--violet); } .g.a { color: var(--bad); } .g.off { color: var(--ink3); }
.perm-grid { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.pg-head, .pg-row { display: grid; grid-template-columns: 1fr 52px 52px 52px; align-items: center; } .pg-head { background: var(--grey-l); font-weight: 800; font-size: 13px; padding: 8px 10px; }
.pg-head span:not(:first-child) { text-align: center; } .pg-row { padding: 6px 10px; border-top: 1px solid var(--line); font-size: 14px; }
.pg-cell { display: grid; place-items: center; cursor: pointer; } .pg-cell input { width: 20px; height: 20px; accent-color: var(--acc); }
.big-num { font-size: 26px !important; font-weight: 800; }
.receipt-card { text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; } .receipt-card .big { font-size: 20px; } .receipt-card .amt { font-size: 36px; font-weight: 800; color: var(--ok); letter-spacing: -.02em; }
.li.tgt { align-items: flex-start; } .code.small { font-size: 12px; word-break: break-all; margin: 6px 0; }
.ai-res .li svg { color: var(--ok); }
/* Easy view */
.easy { max-width: 680px; margin: 0 auto; font-size: 18px; }
.easy-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin: 6px 0 16px; } .easy-top h1 { font-size: 28px; } .easy-top small { color: var(--ink2); font-weight: 700; }
.easy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ebig { background: var(--card); border-radius: 20px; padding: 18px; box-shadow: var(--sh); display: flex; flex-direction: column; gap: 4px; border: 0; text-align: left; font: inherit; color: var(--ink); }
.ebig small { font-weight: 800; color: var(--ink2); font-size: 15px; } .ebig b { font-size: 30px; letter-spacing: -.02em; } .ebig span { color: var(--ink2); font-size: 15px; }
.ebig.green { background: #E6F4EA; } .ebig.blue { background: var(--blue-l); }
.easy-h { font-size: 20px; margin: 24px 2px 10px; }
.ecard { background: var(--card); border-radius: 18px; padding: 16px; box-shadow: var(--sh); margin-bottom: 10px; } .ecard p { margin: 4px 0; }
.e-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0; } .e-row > div { display: flex; flex-direction: column; } .e-row small { color: var(--ink2); font-size: 14px; }
.e-amt { font-size: 22px; } .e-btns { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; } .e-btns .btn { flex: 1 1 140px; font-size: 18px; }
.easy-foot { display: flex; flex-direction: column; gap: 10px; margin: 24px 0; }
/* print */
body.printing .side, body.printing .tabbar, body.printing .lic-warn { display: none !important; } body.printing .shell { display: block; } body.printing .main { padding: 14px; }
.print-wrap .no-print { margin-bottom: 14px; }
.paper { background: #fff; max-width: 800px; margin: 0 auto; padding: 28px; border-radius: 6px; box-shadow: var(--sh); color: #111; font-size: 14px; overflow-x: auto; }
.p-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid #111; padding-bottom: 12px; margin-bottom: 14px; } .p-head > div { display: flex; flex-direction: column; }
.p-co { font-size: 22px; } .p-doc { text-align: right; align-items: flex-end; } .p-doc b { font-size: 16px; letter-spacing: .08em; }
.p-to { display: flex; flex-direction: column; margin-bottom: 14px; } .p-to small { color: #555; }
.p-table { width: 100%; border-collapse: collapse; } .p-table th, .p-table td { border-bottom: 1px solid #ddd; padding: 7px 6px; text-align: left; } .p-table th:nth-child(n+3), .p-table td:nth-child(n+3) { text-align: right; }
.p-table tfoot td { text-align: right; font-weight: 600; } .p-table tfoot tr.g td { font-size: 16px; font-weight: 800; border-top: 2px solid #111; }
.p-big { font-size: 17px; line-height: 1.7; margin: 20px 0; } .p-sign { display: flex; justify-content: space-between; margin-top: 60px; padding-top: 8px; } .p-sign span:last-child { border-top: 1px solid #111; padding-top: 6px; min-width: 180px; text-align: center; }
.p-foot { margin-top: 30px; color: #888; font-size: 11px; text-align: center; }
@media print { .no-print, .side, .tabbar, .toast, .lic-warn { display: none !important; } body { background: #fff; } .main { padding: 0 !important; } .paper { box-shadow: none; padding: 0; max-width: none; } .shell { display: block !important; } }
.seg.days { display: grid; grid-template-columns: repeat(7, 1fr); } .seg.days button { padding-left: 0; padding-right: 0; min-width: 0; }
/* 3.0: stock, purchases, salary, reports */
.rows.flat { box-shadow: none; border: 1px solid var(--line); margin: 6px 0 10px; }
.btn-row.wrap { flex-wrap: wrap; margin-bottom: 14px; }
b.neg { color: var(--bad); } b.pos { color: var(--ok); }
.qty-in { width: 84px !important; min-height: 42px; text-align: right; flex: 0 0 auto; }
.po-lines { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.po-line { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--line); }
.po-line > b { grid-column: 1 / -1; font-size: 15px; }
.po-line label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink2); font-weight: 600; } .po-line input { min-height: 42px; }
.po-line .amt { font-weight: 700; padding-bottom: 10px; white-space: nowrap; }
.tot-line { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0 2px; font-size: 15px; } .tot-line b { font-size: 19px; }
.recv-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); } .recv-line > div { flex: 1; display: flex; flex-direction: column; } .recv-line small { color: var(--ink3); }
.sal-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); } .sal-line span { color: var(--ink2); }
.sal-line.big { border-bottom: 0; padding-top: 12px; } .sal-line.big span { color: var(--ink); font-weight: 700; } .sal-line.big b { font-size: 24px; }
.day-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 8px; }
.day-grid > div { background: var(--bg); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; } .day-grid b { font-size: 20px; } .day-grid small { color: var(--ink2); font-size: 12px; }
.day-grid > div.bad b { color: var(--bad); }
.rep-wrap { overflow: auto; background: var(--card); border-radius: var(--r); box-shadow: var(--sh); max-height: 70vh; }
table.rep { border-collapse: collapse; width: 100%; font-size: 13.5px; }
table.rep th { position: sticky; top: 0; background: var(--grey-l); text-align: left; padding: 9px 10px; white-space: nowrap; font-weight: 700; z-index: 1; }
table.rep td { padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
table.rep .n { text-align: right; font-variant-numeric: tabular-nums; } table.rep tfoot td { font-weight: 800; background: var(--bg); position: sticky; bottom: 0; }
.p-table.slip td:nth-child(even) { font-weight: 700; } .p-table.slip { margin-bottom: 12px; }
.row > .r { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; flex: none; }
.stats.three .stat b { font-size: 18px; } .sheet-body .seg { margin: 12px 0 6px; } .sheet-body .stats { margin-bottom: 14px; }
.p-table td:last-child { white-space: nowrap; }
/* 3.1: BUSY, check stock, buying price */
.cost-tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--acc-d); background: var(--acc-l); border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.stock-at { font-size: 12px; color: var(--ink3); margin: 0 2px 6px; }
.check-stock { margin-bottom: 12px; }
details.how { margin: 10px 0; font-size: 14px; } details.how summary { cursor: pointer; color: var(--acc); font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.busy-map { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.small-rep { max-height: 220px; margin: 10px 0; box-shadow: none; border: 1px solid var(--line); } .small-rep table.rep { font-size: 12px; }
.busy-miss { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; } .busy-miss select { max-width: 50%; }
label.btn.disabled { opacity: .6; pointer-events: none; }
