@font-face { font-family:Cairo; font-weight:400; font-style:normal; font-display:swap; src:url(/fonts/cairo-400.ttf) format('truetype') }
@font-face { font-family:Cairo; font-weight:600; font-style:normal; font-display:swap; src:url(/fonts/cairo-600.ttf) format('truetype') }
@font-face { font-family:Cairo; font-weight:700; font-style:normal; font-display:swap; src:url(/fonts/cairo-700.ttf) format('truetype') }
@font-face { font-family:Cairo; font-weight:800; font-style:normal; font-display:swap; src:url(/fonts/cairo-800.ttf) format('truetype') }
@font-face { font-family:Cairo; font-weight:900; font-style:normal; font-display:swap; src:url(/fonts/cairo-900.ttf) format('truetype') }
:root {
  --cream:#fff6ed; --peach:#fde2cf; --white:#fff; --brown:#642714; --forest:#2e5739;
  --pink:#e3a5ca; --orange:#ec6426; --ink:#45291f; --muted:#775b4d; --line:#ddc8b9;
  --border:#a78570; --focus:#a6410e; --green-pale:#ecf3eb; --amber-pale:#fff0d7;
  --amber-ink:#704506; --red-pale:#fce8e4; --red-ink:#8e2d22; --blue-pale:#e7eef5;
  --blue-ink:#315572; --radius:17px; --shadow:0 10px 28px rgba(100,39,20,.05);
}
* { box-sizing:border-box }
html { color-scheme:light }
body { margin:0; background:var(--cream); color:var(--ink); font:1rem/1.6 Cairo, Tahoma, Arial, sans-serif }
h1,h2,h3,p { margin:0 }
h1,h2,h3 { color:var(--brown); line-height:1.3 }
h1 { font-size:clamp(1.85rem,3.3vw,2.65rem); font-weight:900 }
h2 { font-size:1.25rem }
h3 { font-size:1rem }
a { color:var(--forest) }
button,input,select,textarea { font:inherit }
button { cursor:pointer }
button:disabled { cursor:default }
:focus-visible { outline:3px solid var(--focus); outline-offset:3px }
[hidden] { display:none!important }
.numbers, bdi { font-variant-numeric:tabular-nums }
.ltr { direction:ltr; unicode-bidi:isolate }
.icon { flex:none; width:19px; height:19px; vertical-align:middle; stroke:currentColor; stroke-width:1.7; fill:none; stroke-linecap:round; stroke-linejoin:round }
.skip { position:fixed; inset:8px auto auto 8px; transform:translateY(-150%); padding:8px 12px; background:white; z-index:9 }
.skip:focus { transform:none }
.shell { min-height:100vh; display:grid; grid-template-columns:234px minmax(0,1fr) }
.sidebar { display:flex; flex-direction:column; gap:24px; padding:22px 15px; background:var(--forest); color:var(--cream);
  position:sticky; top:0; height:100dvh }
.sidebar a { color:inherit; text-decoration:none }
.sidebar a:focus-visible { outline-color:var(--cream) }
.brand { display:flex; align-items:center; gap:10px; padding:3px 5px 15px; border-bottom:1px solid #ffffff3b }
.brand img { border-radius:50%; width:48px; height:48px }
.brand strong { display:block; font-size:1.3rem; font-weight:900; line-height:1.2 }
.brand small { font-size:.82rem; color:#fff6ed }
.sidebar nav { display:grid; gap:5px }
.sidebar nav a,.sidebar-bottom a,.sidebar-bottom button { display:flex; align-items:center; gap:10px; padding:10px 12px; min-height:44px; border-radius:10px; font-size:.92rem }
.sidebar nav a:hover,.sidebar-bottom a:hover,.sidebar-bottom button:hover { background:#ffffff1c }
.sidebar nav a[aria-current] { color:var(--brown); background:var(--peach); font-weight:800 }
.sidebar-bottom { margin-top:auto; padding-top:12px; border-top:1px solid #ffffff3b }
.sidebar-bottom a,.sidebar-bottom button { font-size:.84rem }
.sidebar-bottom button { background:transparent; color:inherit; border:0; width:100%; text-align:start }
.sidebar-bottom button:focus-visible { outline-color:var(--cream) }
.local { display:flex; align-items:center; gap:7px; padding:7px 13px 0; font-size:.81rem }
.local i { width:7px; height:7px; border-radius:50%; background:#c5d62e }
.workspace { min-width:0 }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:10px; background:var(--white); min-height:69px;
  border-bottom:1px solid var(--line); padding:10px max(22px,3.1vw) }
.topbar-title { display:flex; align-items:center; gap:11px; color:var(--brown); font-weight:750 }
.main { max-width:1530px; margin-inline:auto; padding:26px max(22px,3.1vw) 50px }
.main:focus { outline:none }
.page-head { display:flex; flex-wrap:wrap; align-items:end; justify-content:space-between; gap:12px 18px; margin-bottom:20px }
.page-head p { margin-top:4px; color:var(--muted) }
.button-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px }
.button,.icon-button { display:inline-flex; gap:8px; align-items:center; justify-content:center; text-decoration:none; min-height:43px;
  padding:7px 13px; border:1px solid var(--border); border-radius:10px; color:var(--brown); background:var(--white); font-weight:750; font-size:.9rem }
.button:hover,.icon-button:hover { background:var(--peach) }
.button.primary { background:var(--brown); border-color:var(--brown); color:var(--cream) }
.button.primary:hover { background:#491c0f }
.button.negative { color:var(--red-ink); border-color:var(--red-ink); background:var(--red-pale) }
.button.negative:hover { background:#f7d0c8 }
.button.quiet { background:transparent; border-color:transparent }
.button.quiet:hover { background:var(--cream) }
.button.compact { min-height:35px; padding:3px 9px; font-size:.84rem }
.button:disabled { opacity:.56 }
.icon-button { padding:0; width:43px }
.mobile-toggle { display:none }
.hero { position:relative; display:flex; justify-content:space-between; align-items:center; gap:18px; border-radius:24px;
  background:var(--peach); border:1px solid #ebcab5; padding:23px 25px; margin-bottom:17px }
.hero .location { display:inline-flex; align-items:center; gap:5px; font-size:.89rem; font-weight:750; color:var(--forest); margin-bottom:5px }
.hero .location .icon { width:16px; height:16px }
.hero p { color:var(--muted); margin-top:4px }
.hero .segmented { align-self:end }
.segmented { display:flex; align-items:center; gap:2px; padding:3px; background:var(--white); border:1px solid var(--line); border-radius:11px }
.segmented button { color:var(--brown); background:transparent; border:0; border-radius:8px; white-space:nowrap; padding:6px 10px; min-height:34px; font-size:.84rem }
.segmented button[aria-pressed="true"] { background:var(--forest); color:var(--cream); font-weight:800 }
.kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:15px }
.kpi,.panel { border:1px solid var(--line); border-radius:var(--radius); background:var(--white); box-shadow:var(--shadow) }
.kpi { padding:13px 15px }
.kpi .kpi-label { display:flex; align-items:center; justify-content:space-between; gap:6px; font-size:.9rem; font-weight:750 }
.kpi .kpi-icon { display:grid; place-items:center; width:33px; height:33px; border-radius:10px; color:var(--forest); background:var(--green-pale) }
.kpi.feature { background:var(--pink); color:var(--brown); border-color:#d490ba }
.kpi.feature .kpi-icon { background:#ffffff85; color:var(--brown) }
.kpi strong { display:block; margin-top:5px; color:var(--brown); font-size:clamp(1.22rem,2.35vw,2rem); line-height:1.3; overflow-wrap:anywhere }
.kpi strong small { font-size:.55em; white-space:nowrap }
.kpi .kpi-note { display:block; margin-top:4px; color:var(--muted); font-size:.82rem }
.kpi.feature .kpi-note { color:var(--brown) }
.panel { padding:15px 17px }
.panel.flush { padding:0 }
.panel-head { display:flex; align-items:center; justify-content:space-between; gap:7px 12px; flex-wrap:wrap; margin-bottom:10px }
.panel-head p { font-size:.88rem; color:var(--muted); margin-top:3px }
.panel.flush .panel-head { padding:14px 16px 0 }
.grid { display:grid; grid-template-columns:minmax(0,1.72fr) minmax(0,1fr); gap:14px; align-items:start }
.grid.equal { grid-template-columns:repeat(2,minmax(0,1fr)) }
.stack { display:grid; gap:14px }
.grid > *,.stack > * { min-width:0 }
.chart { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:stretch; gap:9px; min-height:155px; margin-top:13px }
.chart-scale { display:flex; flex-direction:column; justify-content:space-between; align-items:end; padding-bottom:24px; font-size:.78rem; color:var(--muted) }
.chart-grid { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:9px; position:relative }
.chart-grid::before { content:""; position:absolute; inset:0 0 23px; border-block-end:1px solid var(--line);
  background:repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 33.333%); pointer-events:none }
.chart-datum { position:relative; z-index:1; display:grid; grid-template-rows:minmax(0,1fr) 23px; text-align:center; min-width:0 }
.chart-track { display:flex; align-items:end; justify-content:center }
.bar { width:clamp(4px,53%,36px); min-height:2px; height:calc(100% * var(--ratio,0)); border-radius:5px 5px 0 0; background:var(--forest) }
.bar.zero { background:var(--line) }
.chart-datum bdi { align-self:end; color:var(--muted); font-size:.77rem }
.chart .today .bar:not(.zero) { background:var(--brown) }
.inventory-list { display:grid; gap:0; list-style:none; margin:0; padding:0 }
.inventory-list li { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:9px 0; border-bottom:1px solid var(--line) }
.inventory-list li:last-child { border:0 }
.inventory-list strong { display:block }
.inventory-list small { color:var(--muted) }
.empty { display:grid; justify-items:center; text-align:center; gap:5px; padding:20px 12px; color:var(--muted) }
.empty .empty-icon { display:grid; place-items:center; width:38px; height:38px; color:var(--forest); background:var(--green-pale); border-radius:11px; margin-bottom:4px }
.empty strong { color:var(--brown) }
.empty .button { margin-top:5px }
.notice,.form-error { border-radius:10px; padding:9px 12px; font-size:.91rem }
.notice { background:var(--green-pale); color:var(--forest) }
.form-error { color:var(--red-ink); background:var(--red-pale); border:1px solid #e3a399 }
.toolbar { display:flex; flex-wrap:wrap; align-items:end; justify-content:space-between; gap:9px 13px; margin-bottom:11px }
.toolbar .group { display:flex; flex-wrap:wrap; align-items:end; gap:8px }
label.field { display:grid; gap:4px; align-content:start; font-size:.88rem; color:var(--brown); font-weight:750 }
input,select,textarea { border:1px solid var(--border); border-radius:10px; padding:7px 10px; background:#fff; color:var(--ink); min-height:42px; min-width:0; width:100%; font-size:.94rem }
input::placeholder,textarea::placeholder { color:var(--muted); opacity:1 }
select { appearance:none; padding-inline-end:29px; background-image:linear-gradient(45deg,transparent 48%,var(--brown) 50%,var(--brown) 62%,transparent 64%),linear-gradient(135deg,transparent 38%,var(--brown) 40%,var(--brown) 52%,transparent 54%); background-size:6px 7px; background-repeat:no-repeat; background-position:left 10px center,left 16px center }
input[type="date"] { text-align:start }
textarea { min-height:80px; resize:vertical }
.field .help,.help { color:var(--muted); font-size:.82rem; font-weight:400 }
.search { min-width:min(252px,100%) }
.table-wrap { width:100%; overflow-x:auto }
table { border-spacing:0; border-collapse:collapse; width:100%; text-align:start; font-size:.89rem }
th,td { text-align:start; padding:9px 12px; border-bottom:1px solid var(--line); vertical-align:middle }
th { background:var(--peach); color:var(--brown); font-size:.86rem; white-space:nowrap; font-weight:800 }
tr:last-child td { border-bottom:0 }
td.money-cell,td.code-cell { white-space:nowrap }
td.table-actions { white-space:nowrap }
.table-link { min-height:33px; padding:4px 5px; color:var(--forest); background:transparent; border:0; text-decoration:underline; text-underline-offset:3px; font-weight:750 }
.table-link:hover { color:var(--brown) }
.badge { display:inline-flex; align-items:center; border-radius:999px; font-weight:750; font-size:.79rem; white-space:nowrap; padding:2px 8px }
.badge.ok { color:var(--forest); background:var(--green-pale) }
.badge.wait { color:var(--amber-ink); background:var(--amber-pale) }
.badge.stop { color:var(--red-ink); background:var(--red-pale) }
.badge.neutral { color:var(--muted); background:var(--cream) }
.badge.info { color:var(--blue-ink); background:var(--blue-pale) }
.tabs { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:13px }
.tabs .current { background:var(--peach); border-color:var(--border); color:var(--brown) }
.pager { padding:10px 13px; display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px; color:var(--muted); font-size:.87rem }
.metric-rows { display:grid; gap:6px; color:var(--muted) }
.metric-rows > div { display:flex; gap:10px; justify-content:space-between; align-items:start }
.metric-rows strong { color:var(--brown) }
.metric-rows .total { border-top:1px solid var(--line); margin-top:4px; padding-top:7px; font-size:1.13rem; color:var(--brown); font-weight:750 }
.register { grid-template-columns:minmax(0,1fr) minmax(0,1.15fr) }
.catalog { display:grid; gap:7px; max-height:490px; overflow:auto; padding:3px }
.catalog-item { display:flex; gap:8px; justify-content:space-between; align-items:center; text-align:start; width:100%; min-height:59px;
  background:white; border:1px solid var(--line); border-radius:12px; padding:7px 9px; color:var(--brown) }
.catalog-item:not(:disabled):hover { border-color:var(--brown); background:var(--cream) }
.catalog-item small { display:block; color:var(--muted); font-size:.8rem }
.catalog-item:disabled { background:var(--cream); opacity:.76 }
.catalog-item > span:last-child { display:flex; align-items:center; gap:5px; color:var(--forest); font-weight:750; text-align:end; white-space:nowrap }
.catalog-item .numbers small { display:inline; color:inherit }
.catalog-item .icon { width:15px; height:15px }
.cart-line { display:grid; grid-template-columns:minmax(85px,1fr) minmax(54px,.48fr) minmax(65px,.65fr) minmax(50px,.65fr) 34px;
  gap:6px; align-items:end; padding:8px 0; border-bottom:1px solid var(--line) }
.cart-line label { font-size:.78rem }
.cart-line input { padding-inline:6px }
.cart-line button { width:34px; min-height:40px }
.cart-name { align-self:center; line-height:1.28; overflow-wrap:anywhere; font-size:.88rem }
.cart-line .line-price { align-self:center; font-size:.85rem; overflow-wrap:anywhere }
.checkout { margin-top:12px; display:grid; gap:10px }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px }
.wide { grid-column:1/-1 }
.loading { border-radius:var(--radius); color:var(--muted); padding:24px; text-align:center }
dialog { width:min(550px,calc(100% - 26px)); max-height:calc(100dvh - 32px); border:1px solid var(--border);
  border-radius:21px; color:var(--ink); padding:0; background:var(--white); box-shadow:0 18px 40px #45291f35 }
dialog::backdrop { background:#32261f77 }
.modal-head { display:flex; justify-content:space-between; align-items:center; gap:8px; background:var(--peach); padding:12px 17px; border-bottom:1px solid var(--line) }
.modal-head .icon-button { min-height:36px; width:36px }
.modal-content { padding:15px 17px 18px }
.modal-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:13px }
.modal-content .notice,.modal-content .form-error { margin-top:10px }
.receipt-meta { display:flex; justify-content:space-between; flex-wrap:wrap; gap:7px; margin-bottom:12px; color:var(--muted); font-size:.88rem }
.receipt .metric-rows { margin-top:9px }
.toast { position:fixed; z-index:5; inset:auto auto 16px 17px; max-width:calc(100% - 34px); padding:11px 15px; color:var(--cream); background:var(--forest); border-radius:12px; box-shadow:0 9px 24px #45291f25 }
.toast.error { background:var(--red-ink) }
@media(max-width:1120px) {
  .shell { grid-template-columns:195px minmax(0,1fr) }
  .main,.topbar { padding-inline:22px }
  .register { grid-template-columns:1fr }
  .register .catalog { max-height:265px }
}
@media(max-width:900px) {
  .grid { grid-template-columns:1fr }
  .kpis { grid-template-columns:repeat(2,minmax(0,1fr)) }
}
@media(max-width:680px) {
  .shell { grid-template-columns:1fr }
  .sidebar { display:none; position:fixed; inset:60px 0 auto auto; width:min(260px,88vw); z-index:3;
    height:calc(100dvh - 60px); box-shadow:0 12px 30px #45291f4d; overflow:auto }
  .sidebar.open { display:flex }
  .topbar { min-height:60px }
  .mobile-toggle { display:inline-flex }
  .main,.topbar { padding-inline:12px }
  .main { padding-top:15px }
  .hero { padding:14px; align-items:start; flex-direction:column; gap:10px }
  .hero .segmented { align-self:start }
  .kpis { gap:7px }
  .kpi,.panel { padding:10px }
  .kpi .kpi-label { font-size:.85rem }
  .grid.equal { grid-template-columns:1fr }
  .panel.flush { padding:0 }
  .chart-grid { gap:4px }
  .chart-datum bdi { font-size:.69rem }
  th,td { padding:7px 8px }
  .page-head { margin-bottom:13px }
  .cart-line { grid-template-columns:minmax(64px,1fr) minmax(50px,.5fr) minmax(56px,.6fr) minmax(42px,.6fr) 32px }
}
@media print {
  body { background:white; print-color-adjust:exact; -webkit-print-color-adjust:exact }
  .shell { display:block }
  .sidebar,.topbar,.skip,.toast,.no-print { display:none!important }
  .main { max-width:none; padding:0 }
  .panel,.kpi { box-shadow:none }
  .panel { break-inside:avoid }
  .grid { grid-template-columns:1fr 1fr }
  .kpis { grid-template-columns:repeat(4,1fr) }
}


/* ================= Funny Pot design system v3 ================= */
:root { --cream:#f6f1ee; --peach:#fdeae3; --white:#fff; --brown:#2a1a14; --forest:#2e5739; --accent:#e8743b; --accent-ink:#c2481f; --accent-soft:#fdeae3;
  --ink:#3a2a22; --muted:#85746b; --line:#eee5df; --border:#dccfc6; --focus:#c2481f; --radius:18px;
  --shadow:0 1px 2px rgba(42,26,20,.04),0 8px 24px rgba(42,26,20,.05); --green-pale:#e8f3ea; --red-pale:#fde9e5; --amber-pale:#fff2dc }
body { font-family:Cairo,Tahoma,Arial,sans-serif; background:var(--cream); -webkit-font-smoothing:antialiased }
h1,h2,h3 { color:var(--brown); letter-spacing:-.01em }
.shell { grid-template-columns:248px minmax(0,1fr) }
/* sidebar */
.sidebar { background:var(--white); color:var(--ink); border-inline-end:1px solid var(--line); padding:20px 14px; gap:18px }
.brand { padding:4px 8px 16px; border-bottom:1px solid var(--line) }
.brand img { width:44px; height:44px; box-shadow:0 0 0 3px var(--accent-soft) }
.brand strong { color:var(--brown); font-size:1.18rem }
.brand small { color:var(--muted) }
.sidebar nav { gap:4px }
.sidebar nav a,.sidebar-bottom a,.sidebar-bottom button { color:var(--muted); border-radius:12px; font-weight:650; min-height:44px; padding:10px 13px; transition:background .15s,color .15s }
.sidebar nav a:hover,.sidebar-bottom a:hover,.sidebar-bottom button:hover { background:#f8f3f0; color:var(--brown) }
.sidebar nav a[aria-current] { background:var(--accent-soft); color:var(--accent-ink); font-weight:800 }
.sidebar nav a[aria-current] .icon { stroke-width:2 }
.sidebar-bottom { border-top:1px solid var(--line) }
.sidebar-bottom a,.sidebar-bottom button { font-size:.88rem }
.local { color:var(--muted); padding:8px 13px 0 }
.local i { background:#3fae5c; box-shadow:0 0 0 4px #3fae5c26 }
.sidebar a:focus-visible,.sidebar-bottom button:focus-visible { outline-color:var(--focus) }
/* topbar */
.topbar { background:var(--white); border-bottom:1px solid var(--line); min-height:72px; gap:14px; padding-block:12px }
.topbar-title { display:none }
.search { flex:1; max-width:460px; display:flex; align-items:center; gap:9px; padding:0 14px; height:44px; border:1px solid var(--line); border-radius:13px; background:#faf6f3; color:var(--muted); transition:border-color .15s,box-shadow .15s }
.search:focus-within { border-color:var(--accent); box-shadow:0 0 0 4px #e8743b1f; background:var(--white) }
.search input { flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--ink); height:100% }
.date-chip { margin-inline-start:auto; display:inline-flex; align-items:center; height:44px; padding:0 16px; border:1px solid var(--line); border-radius:13px; font-weight:700; color:var(--ink); font-size:.9rem; white-space:nowrap }
.bell { position:relative; display:grid; place-items:center; width:44px; height:44px; border:1px solid var(--line); border-radius:13px; color:var(--ink); text-decoration:none; transition:background .15s }
.bell:hover { background:#faf6f3 }
.bell b { position:absolute; top:-5px; inset-inline-start:-5px; min-width:19px; height:19px; padding:0 5px; border-radius:99px; background:var(--accent-ink); color:#fff; font-size:.7rem; line-height:19px; text-align:center }
/* buttons */
.button,.icon-button { border:1px solid var(--border); border-radius:12px; background:var(--white); color:var(--brown); font-weight:700; min-height:44px; padding:8px 16px; transition:background .15s,border-color .15s,transform .05s,box-shadow .15s }
.button:hover,.icon-button:hover { background:#faf6f3; border-color:#c9b9ae }
.button:active { transform:translateY(1px) }
.button.primary { background:#241611; border-color:#241611; color:#fff; box-shadow:0 6px 16px rgba(36,22,17,.22) }
.button.primary:hover { background:#3a2318; border-color:#3a2318 }
.button.negative { background:var(--red-pale); color:#a2301f; border-color:#f1c4bb }
.main { padding-top:26px }
/* cards */
.panel,.kpi { border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); background:var(--white) }
.panel { padding:18px 20px }
.panel-head h2 { font-size:1.05rem; font-weight:800 }
.page-head h1 { font-size:clamp(1.6rem,2.6vw,2.1rem) }
.badge { font-weight:800; font-size:.76rem; padding:3px 10px }
.badge.ok { background:var(--green-pale); color:#25643a }
.badge.wait { background:var(--amber-pale); color:#8a5207 }
.badge.stop { background:var(--red-pale); color:#a2301f }
table { border-collapse:separate; border-spacing:0 }
th { background:#faf6f3!important; color:var(--muted)!important; font-weight:750; font-size:.82rem }
td,th { border-color:var(--line)!important }
input,select,textarea { border-radius:11px }
input:focus,select:focus,textarea:focus { border-color:var(--accent)!important; box-shadow:0 0 0 4px #e8743b1f; outline:0 }
.segmented { background:#faf6f3 }
.segmented button[aria-pressed="true"] { background:var(--brown); color:#fff }
/* dashboard */
.db-head { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-bottom:16px }
.db-head h1 { font-size:clamp(1.55rem,2.7vw,2.1rem); font-weight:900 }
.db-head p { color:var(--muted); margin-top:2px }
.segmented2 { display:inline-flex; padding:4px; gap:2px; background:var(--white); border:1px solid var(--line); border-radius:13px }
.segmented2 button { border:0; background:transparent; color:var(--muted); font-weight:750; padding:6px 16px; min-height:36px; border-radius:10px }
.segmented2 button[aria-pressed="true"] { background:var(--brown); color:#fff }
.quick { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:18px }
.qbtn { display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:8px 18px; border-radius:12px; border:1px solid var(--border); background:var(--white); color:var(--brown); font-weight:750; font-size:.92rem; text-decoration:none; transition:background .15s,transform .05s }
.qbtn:hover { background:#faf6f3 } .qbtn:active { transform:translateY(1px) }
.qbtn.dark { background:#241611; border-color:#241611; color:#fff; box-shadow:0 6px 16px rgba(36,22,17,.22) } .qbtn.dark:hover { background:#3a2318 }
.kpis2 { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:16px }
.kpi2 { display:flex; flex-direction:column; gap:6px; padding:16px 18px 14px; background:var(--white); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); text-decoration:none; color:var(--ink); transition:transform .15s,box-shadow .15s,border-color .15s }
.kpi2:hover { transform:translateY(-2px); border-color:#e3d3c8; box-shadow:0 14px 32px rgba(42,26,20,.09) }
.kpi2-top { display:flex; align-items:center; gap:10px }
.kpi2-icon { display:grid; place-items:center; width:36px; height:36px; border-radius:11px; background:var(--accent-soft); color:var(--accent-ink) }
.kpi2.warn .kpi2-icon { background:var(--amber-pale); color:#8a5207 }
.kpi2-label { font-weight:750; color:var(--muted); font-size:.92rem }
.kpi2-go { margin-inline-start:auto; color:#b8a79b; font-size:1.3rem }
.kpi2-value { font-size:clamp(1.45rem,2.3vw,2rem); font-weight:900; color:var(--brown); line-height:1.2; margin-top:2px }
.kpi2-value small { font-size:.5em; font-weight:700; color:var(--muted) }
.spark { width:100%; height:38px; margin-top:2px }
.kpi2-foot { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; margin-top:auto; padding-top:4px }
.kpi2-foot small { color:var(--muted); font-size:.82rem }
.chip { display:inline-flex; align-items:center; gap:4px; padding:2px 10px; border-radius:99px; font-size:.78rem; font-weight:800; white-space:nowrap }
.chip.up { background:var(--green-pale); color:#25643a } .chip.down { background:var(--red-pale); color:#a2301f }
.chip.warn { background:var(--amber-pale); color:#8a5207 } .chip.neutral { background:#f3ece7; color:var(--muted) }
.row2 { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); gap:14px; margin-bottom:14px }
.row3 { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr); gap:14px }
.row2>*,.row3>* { min-width:0 }
.ptitle { display:inline-flex; align-items:center; gap:9px } .ptitle .icon { color:var(--accent-ink) }
.todo,.feed,.best { list-style:none; margin:0; padding:0 }
.todo li { display:flex; align-items:center; gap:12px; padding:12px 0; border-top:1px solid var(--line) } .todo li:first-child { border-top:0 }
.prio { flex:none; padding:2px 10px; border-radius:8px; font-size:.75rem; font-weight:850 }
.prio.high { background:var(--red-pale); color:#a2301f } .prio.mid { background:var(--amber-pale); color:#8a5207 }
.todo-main { flex:1; min-width:0 } .todo-main strong,.feed-main strong,.best strong { display:block; font-weight:750; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.todo-main small,.feed small,.best small { color:var(--muted); font-size:.82rem }
.ghost { min-height:38px; padding:5px 16px; border:1px solid var(--border); border-radius:10px; background:var(--white); color:var(--brown); font-weight:750 } .ghost:hover { background:#faf6f3 }
.feed li { border-top:1px solid var(--line) } .feed li:first-child { border-top:0 }
.feed button { display:flex; align-items:center; gap:12px; width:100%; padding:11px 0; border:0; background:transparent; text-align:start; color:inherit; border-radius:10px }
.feed button:hover { background:#faf6f3 }
.feed-icon { flex:none; display:grid; place-items:center; width:38px; height:38px; border-radius:11px; background:#f3ece7; color:var(--ink) } .feed-icon.void { background:var(--red-pale); color:#a2301f }
.feed-main { flex:1; min-width:0 } .feed-side { text-align:end; display:grid }
.area { position:relative; margin-top:6px }
.area svg { display:block; width:100%; height:230px }
.grid-line { stroke:var(--line); stroke-width:1; vector-effect:non-scaling-stroke }
.line-now { fill:none; stroke:var(--accent); stroke-width:2.6; vector-effect:non-scaling-stroke; stroke-linecap:round; stroke-linejoin:round }
.line-prev { fill:none; stroke:#b9a79a; stroke-width:1.8; stroke-dasharray:5 5; vector-effect:non-scaling-stroke }
.dot { fill:#fff; stroke:var(--accent); stroke-width:2; vector-effect:non-scaling-stroke } .dot.now { fill:var(--accent) }
.area-labels { position:relative; height:24px; margin-top:6px; font-size:.78rem; color:var(--muted) }
.area-labels span { position:absolute; transform:translateX(-50%) }
.legend-inline { display:inline-flex; align-items:center; gap:7px; font-size:.82rem; color:var(--muted) }
.legend-inline i { width:18px; height:0; border-top:3px solid var(--accent); border-radius:2px; margin-inline-start:8px } .legend-inline i.prev { border-top:2px dashed #b9a79a }
.donut2 { position:relative; width:170px; height:170px; border-radius:50%; margin:6px auto 14px }
.donut2::before { content:""; position:absolute; inset:24px; border-radius:50%; background:var(--white) }
.donut2 span { position:absolute; inset:0; display:grid; place-content:center; text-align:center; z-index:1 }
.donut2 strong { font-size:1.05rem; color:var(--brown); font-weight:900 } .donut2 small { color:var(--muted); font-size:.74rem }
.legend2 { list-style:none; margin:0; padding:0; display:grid; gap:9px }
.legend2 li { display:grid; grid-template-columns:auto 1fr auto auto; align-items:center; gap:9px; font-size:.86rem }
.legend2 i { width:11px; height:11px; border-radius:4px } .legend2 b { color:var(--muted); font-weight:700 } .legend2 em { font-style:normal; font-weight:800; color:var(--brown); min-width:70px; text-align:end }
.best li { display:flex; align-items:center; gap:12px; padding:11px 0; border-top:1px solid var(--line) } .best li:first-child { border-top:0 }
.best-n { flex:none; display:grid; place-items:center; width:34px; height:34px; border-radius:11px; background:var(--accent-soft); color:var(--accent-ink); font-weight:900 }
.best li>div { flex:1; min-width:0 } .best b { font-weight:850; color:var(--brown); white-space:nowrap }
@media (max-width:1180px) { .kpis2 { grid-template-columns:repeat(2,minmax(0,1fr)) } .row3 { grid-template-columns:1fr 1fr } .row3>:first-child { grid-column:1/-1 } }
@media (max-width:900px) { .row2 { grid-template-columns:1fr } .date-chip { display:none } .topbar-title { display:flex } .search { max-width:none } }
@media (max-width:640px) { .kpis2 { gap:9px } .kpi2 { padding:12px } .row3 { grid-template-columns:1fr } .panel { padding:14px } .quick .qbtn { flex:1 1 44% } .sidebar { background:var(--white) } }

/* ---- thermal receipt (80mm / 58mm) ---- */
.check { display:flex; align-items:center; gap:10px; margin:12px 0; font-weight:700 }
.check input { width:20px; height:20px; accent-color:var(--accent-ink) }
#receipt-print { display:none }
@media print {
  body.print-receipt { background:#fff; margin:0 }
  body.print-receipt > *:not(#receipt-print) { display:none!important }
  body.print-receipt #receipt-print { display:block; box-sizing:border-box; margin:0 auto; padding:3mm 2mm 10mm; color:#000; background:#fff;
    font-family:Cairo,Tahoma,Arial,sans-serif; font-size:12.5px; line-height:1.5; font-weight:600; direction:rtl }
  #receipt-print.paper80 { width:76mm }
  #receipt-print.paper58 { width:52mm; font-size:11px }
  #receipt-print * { color:#000!important; background:transparent!important; box-shadow:none!important }
  #receipt-print .r-head { display:grid; justify-items:center; gap:0; text-align:center; padding-bottom:2px }
  #receipt-print .r-head img { filter:grayscale(1) contrast(1.4); margin-bottom:2px }
  #receipt-print .r-head strong { font-size:1.55em; font-weight:900; line-height:1.2 }
  #receipt-print .r-rule { border-top:1.5px dashed #000; margin:5px 0 }
  #receipt-print .r-meta { display:flex; justify-content:space-between; gap:6px; font-size:.88em }
  #receipt-print .r-item { padding:2px 0; break-inside:avoid }
  #receipt-print .r-name { font-weight:800 }
  #receipt-print .r-calc, #receipt-print .r-row { display:flex; justify-content:space-between; gap:8px }
  #receipt-print .r-total { display:flex; justify-content:space-between; align-items:baseline; margin:4px 0; padding:3px 0; border-block:2px solid #000; font-size:1.3em; font-weight:900 }
  #receipt-print .r-void { text-align:center; font-weight:900; font-size:1.2em; margin:6px 0 }
  #receipt-print .r-thanks { margin:2px 0; text-align:center; font-weight:800 } #receipt-print .r-thanks.small { font-weight:600; font-size:.88em }
  #receipt-print bdi, #receipt-print small { font-size:inherit }
}

/* users */
.user-chip { display:grid; padding:10px 12px; margin-bottom:4px; border-radius:14px; background:var(--cream) }
.user-chip strong { color:var(--brown); font-weight:800 } .user-chip small { color:var(--muted) }
.plain-list { margin:0; padding-inline-start:20px; display:grid; gap:8px; line-height:1.7 }
[hidden] { display:none!important }

.code-reveal { display:grid; gap:10px; justify-items:center; text-align:center }
.code-big { font-size:2.2rem; font-weight:900; letter-spacing:.06em; padding:8px 22px; border-radius:16px; background:var(--accent-soft); color:var(--accent-ink) }
@media print {
  #receipt-print .r-label { display:grid; justify-items:center; gap:3px; text-align:center }
  #receipt-print .r-label strong { font-size:1.15em; font-weight:900; line-height:1.3 }
  #receipt-print .r-price { font-weight:800 }
  #receipt-print .r-bars { width:92%; height:16mm; margin-top:2px }
  #receipt-print .r-bars rect { fill:#000!important }
  #receipt-print .r-code { font-weight:800; letter-spacing:.12em; font-size:1.05em }
}
