@charset "UTF-8";
/* Iki Kahve POS — premium, calm design system.
   Warm ivory surfaces, soft contrast, brand teal / copper / gold from the logo.
   Logical properties (inline-start/end) keep Arabic RTL and English LTR correct from one rule set. */
:root{
  --bg:#f6f1e8;--bg-deep:#efe8dc;--surface:#fffdf9;--surface-2:#faf6ef;--surface-3:#f3ede2;
  --line:#ebe3d5;--line-strong:#dcd1bf;
  --ink:#26312d;--ink-2:#4b5650;--muted:#7a827c;--faint:#a6aaa1;
  --teal:#1d6a64;--teal-ink:#154f4a;--teal-soft:#e5efea;--teal-softer:#f0f6f2;
  --copper:#8a5a34;--copper-soft:#f3e7da;--gold:#b9935a;--gold-soft:#f7eedd;
  --green:#3d7655;--green-soft:#e6f1e8;--amber:#9a7127;--amber-soft:#fbf0d8;--red:#a9503d;--red-soft:#f8e9e3;
  --radius:16px;--radius-sm:11px;--radius-xs:8px;
  --shadow-sm:0 1px 2px rgba(74,52,28,.05);--shadow:0 1px 2px rgba(74,52,28,.04),0 10px 30px rgba(74,52,28,.06);--shadow-lg:0 24px 70px rgba(38,30,18,.16);
  --sidebar:252px;--topbar:68px;
  font-family:"Segoe UI","Noto Sans Arabic","Noto Sans",Tahoma,Arial,sans-serif;font-size:15px;color:var(--ink);background:var(--bg);
  font-synthesis:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;color-scheme:light
}
*{box-sizing:border-box}
html{caret-color:transparent}
input:not([readonly]):not([disabled]),textarea:not([readonly]):not([disabled]){caret-color:auto}
body{margin:0;background:var(--bg);min-height:100vh}
img,svg,button,.brand{user-select:none;-webkit-user-select:none}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;padding:0;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button:disabled{cursor:not-allowed;opacity:.5}
a{color:inherit;text-decoration:none}
h1,h2,h3,p{margin:0}
h1{font-size:28px;font-weight:700;letter-spacing:-.4px;line-height:1.45}
h2{font-size:18px;font-weight:650;line-height:1.55}
h3{font-size:15px;font-weight:650}
p{line-height:1.85}
small{font-size:12px}
b,strong{font-weight:650}
.icon{width:20px;height:20px;flex-shrink:0}
.muted{color:var(--muted)}
.hint{font-size:13px;color:var(--muted);line-height:1.9;margin:14px 0}
.block{display:block;margin-top:3px}
.mono{font-family:Consolas,"SF Mono",monospace;direction:ltr;unicode-bidi:embed;font-size:13px}
.nowrap{white-space:nowrap}
.wide{width:100%}
.eyebrow{font-size:10.5px;font-weight:700;letter-spacing:2px;color:var(--gold);direction:ltr;text-align:left;margin-bottom:6px;text-transform:uppercase}
[dir=rtl] .eyebrow{text-align:right}
:focus-visible{outline:2px solid var(--teal);outline-offset:3px;border-radius:6px}

/* ---------- Form controls ---------- */
input,select,textarea{min-width:0;width:100%;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:var(--surface);padding:12px 14px;outline:none;transition:border-color .15s,box-shadow .15s,background .15s;font-size:15px}
input:hover,select:hover,textarea:hover{border-color:#cbbfa9}
input:focus,select:focus,textarea:focus{border-color:var(--teal);box-shadow:0 0 0 4px rgba(29,106,100,.1);background:#fff}
input::placeholder,textarea::placeholder{color:#aaa79d}
input[type=number]{font-variant-numeric:tabular-nums}
input[type=date]{min-height:48px}
textarea{resize:vertical;min-height:90px}
label{display:flex;flex-direction:column;gap:8px;font-size:13.5px;font-weight:600;color:var(--ink-2);margin-bottom:18px}
.checkbox{flex-direction:row;align-items:center;gap:10px;font-weight:500;font-size:14px;line-height:1.7}
.checkbox input,.role-option input{accent-color:var(--teal);width:18px;height:18px;flex-shrink:0}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.form-error{color:var(--red);font-size:13.5px;line-height:1.8}
.form-error:not(:empty){padding:11px 14px;background:var(--red-soft);border-radius:var(--radius-xs);margin-top:12px}
fieldset{border:0;padding:0;margin:0 0 18px}
legend{font-size:13.5px;font-weight:600;color:var(--ink-2);margin-bottom:10px;padding:0}

/* ---------- Buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;border:1px solid transparent;border-radius:var(--radius-sm);padding:12px 20px;font-size:14.5px;font-weight:650;transition:background .15s,border-color .15s,transform .1s,box-shadow .15s;white-space:nowrap;min-height:46px}
.btn:active:not(:disabled){transform:translateY(1px)}
.btn.primary{background:var(--teal);color:#fff;box-shadow:0 6px 16px rgba(29,106,100,.18)}
.btn.primary:hover:not(:disabled){background:var(--teal-ink)}
.btn.secondary{background:var(--surface);border-color:var(--line-strong);color:var(--ink)}
.btn.secondary:hover:not(:disabled){background:var(--surface-2);border-color:#cfc3ae}
.btn.danger,.danger{color:var(--red)!important}
.btn.secondary.danger:hover{background:var(--red-soft);border-color:#e9c8bd}
.small-btn{padding:8px 13px;font-size:13px;min-height:38px;border-radius:var(--radius-xs)}
.icon-button{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:10px;color:var(--muted);flex-shrink:0;transition:background .15s,color .15s}
.icon-button:hover{background:var(--teal-soft);color:var(--teal)}
.icon-button.danger:hover{background:var(--red-soft)}
.text-button{display:inline-flex;gap:8px;align-items:center;color:var(--teal);font-weight:650;font-size:14px;padding:6px 0}
.text-button:hover{color:var(--teal-ink)}
[dir=ltr] .btn .icon:has(path[d^="M19 12"]),[dir=ltr] .text-button .icon:has(path[d^="M19 12"]),[dir=ltr] .mobile-cart-bar .icon:has(path[d^="M19 12"]){transform:scaleX(-1)}
.language-button{border:1px solid var(--line-strong);background:var(--surface);border-radius:999px;padding:7px 13px;font-size:12.5px;color:var(--teal);font-weight:700;white-space:nowrap;min-width:46px;min-height:36px}
.language-button:hover{background:var(--teal-softer)}

/* ---------- Badges & small parts ---------- */
.badge{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:4px 11px;font-size:12px;white-space:nowrap;font-weight:650;line-height:1.6}
.badge.green{background:var(--green-soft);color:var(--green)}
.badge.amber{background:var(--amber-soft);color:var(--amber)}
.badge.red{background:var(--red-soft);color:var(--red)}
.badge.gray{background:#efede6;color:#6f756d}
.badge.gold{background:var(--gold-soft);color:#8f6a2f}
.avatar{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:12px;background:linear-gradient(145deg,var(--teal),#2a7f77);color:#fff;font-weight:700;font-size:15px;flex-shrink:0}
.small-avatar{width:36px;height:36px;border-radius:50%;font-size:14px}
kbd{font-family:inherit;font-size:11px;border:1px solid var(--line-strong);border-bottom-width:2px;border-radius:6px;padding:2px 7px;color:var(--muted);background:var(--surface-2)}
.count{display:inline-grid;place-items:center;min-width:26px;height:26px;padding:0 7px;border-radius:999px;background:var(--teal-soft);color:var(--teal);font-size:13px;font-weight:700;vertical-align:middle}

/* ---------- Boot ---------- */
.boot{min-height:100vh;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:18px;color:var(--teal);font-size:15px;text-align:center;padding:24px}
.boot img{width:240px;max-width:70vw}

/* ---------- Sign in ---------- */
.auth-layout{min-height:100vh;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);background:var(--surface)}
.auth-story{position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:center;padding:7vh 7vw;background:radial-gradient(120% 90% at 85% 10%,#fbf6ec 0%,#f1e8d8 55%,#e8ddc9 100%)}
.auth-story:after{content:"";position:absolute;inset:auto -120px -160px auto;width:420px;height:420px;border-radius:50%;background:radial-gradient(circle,rgba(29,106,100,.09),transparent 70%)}
[dir=rtl] .auth-story:after{inset:auto auto -160px -120px}
.auth-emblem{width:min(250px,42%);margin-bottom:26px;filter:drop-shadow(0 18px 30px rgba(110,74,40,.14));position:relative;z-index:1}
.auth-story h1{font-size:clamp(38px,4.4vw,58px);line-height:1.45;color:var(--teal-ink);letter-spacing:-1.5px;position:relative;z-index:1}
.auth-story>p{font-size:17px;margin-top:14px;color:#6b7a6f;position:relative;z-index:1}
.auth-story .eyebrow{color:#9b8558;position:relative;z-index:1}
.auth-points{list-style:none;padding:0;margin:28px 0 0;display:grid;gap:12px;position:relative;z-index:1}
.auth-points li{display:flex;align-items:center;gap:10px;font-size:15px;color:var(--ink-2)}
.auth-points .icon{width:22px;height:22px;padding:4px;border-radius:50%;background:rgba(29,106,100,.12);color:var(--teal)}
.auth-panel{display:flex;flex-direction:column;justify-content:center;padding:6vh clamp(24px,6vw,90px);width:100%;max-width:640px;margin:auto}
.auth-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:26px}
.auth-logo{width:210px;max-width:62%;height:auto}
.auth-panel h2{font-size:30px;margin-bottom:6px;letter-spacing:-.4px}
.auth-panel>p.muted{font-size:15px;margin-bottom:28px}
.auth-panel .btn.primary{margin-top:10px;min-height:52px;font-size:15.5px}
.auth-help{font-size:13px;color:var(--muted);margin-top:16px;line-height:1.9}
.auth-foot{font-size:12px;color:var(--faint);margin-top:28px}
.token-ok{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 14px;background:var(--green-soft);color:var(--green);border-radius:var(--radius-sm);padding:12px 14px;font-size:13.5px;font-weight:600;line-height:1.8;margin-bottom:18px}
.token-switch{color:var(--teal);font-size:13px;font-weight:650;text-decoration:underline;padding:0}
.install-card{display:flex;align-items:center;gap:14px;margin-top:24px;padding:14px 16px;border:1px solid var(--line);border-radius:var(--radius);background:linear-gradient(135deg,var(--surface-2),var(--teal-softer))}
.install-card>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.install-card b{font-size:14.5px}
.install-card small{color:var(--muted);line-height:1.7}
.install-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--teal);color:#fff;flex-shrink:0}

/* ---------- App shell ---------- */
.layout{display:flex;min-height:100vh}
.sidebar{position:fixed;inset-block:0;inset-inline-start:0;width:var(--sidebar);display:flex;flex-direction:column;background:var(--surface);border-inline-end:1px solid var(--line);padding:20px 16px 16px;z-index:20}
.brand{display:flex;align-items:center;justify-content:center;width:100%;height:92px;border-radius:var(--radius);margin-bottom:14px;flex-shrink:0;transition:background .15s}
.brand:hover{background:var(--surface-2)}
.brand img{max-width:88%;max-height:80px;object-fit:contain}
.sidebar nav{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;display:flex;flex-direction:column;gap:14px;padding-bottom:8px}
.nav-group{display:flex;flex-direction:column;gap:3px}
.nav-label{font-size:11.5px;font-weight:650;color:var(--faint);padding:0 14px;margin-bottom:5px;letter-spacing:.2px}
.nav-item{position:relative;display:flex;align-items:center;gap:12px;width:100%;padding:11px 14px;border-radius:12px;font-size:14.5px;font-weight:550;color:var(--ink-2);text-align:start;transition:background .15s,color .15s}
.nav-item .icon{width:20px;height:20px;color:var(--muted);transition:color .15s}
.nav-item:hover{background:var(--surface-2);color:var(--ink)}
.nav-item.active{background:var(--teal-soft);color:var(--teal-ink);font-weight:650}
.nav-item.active .icon{color:var(--teal)}
.nav-item.active:before{content:"";position:absolute;inset-block:10px;inset-inline-start:-16px;width:4px;border-radius:0 4px 4px 0;background:var(--teal)}
[dir=rtl] .nav-item.active:before{border-radius:4px 0 0 4px}
.nav-count{margin-inline-start:auto;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:var(--amber-soft);color:var(--amber);font-size:11.5px;font-style:normal;font-weight:700;display:grid;place-items:center}
.sidebar-bottom{flex-shrink:0;display:flex;flex-direction:column;gap:10px;padding-top:12px;border-top:1px solid var(--line)}
.install-link{display:flex;align-items:center;gap:10px;padding:11px 14px;border-radius:12px;background:var(--teal-softer);color:var(--teal-ink);font-size:14px;font-weight:650;border:1px dashed #bcd5cc}
.install-link:hover{background:var(--teal-soft)}
.account{display:flex;align-items:center;gap:6px}
.account-main{flex:1;min-width:0;display:flex;align-items:center;gap:11px;padding:8px;border-radius:12px;text-align:start}
.account-main:hover{background:var(--surface-2)}
.account-text{display:flex;flex-direction:column;min-width:0}
.account-text b{font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-text small{color:var(--muted)}
.workspace{flex:1;min-width:0;margin-inline-start:var(--sidebar);display:flex;flex-direction:column;min-height:100vh}
.topbar{position:sticky;top:0;z-index:15;height:var(--topbar);display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 32px;background:rgba(246,241,232,.86);backdrop-filter:saturate(1.4) blur(12px);-webkit-backdrop-filter:saturate(1.4) blur(12px);border-bottom:1px solid rgba(220,209,191,.55)}
.breadcrumb{display:flex;align-items:center;gap:10px;font-size:16px;min-width:0}
.breadcrumb b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top-mark{width:30px;height:30px;object-fit:contain;display:none}
.top-meta{display:flex;align-items:center;gap:12px}
.top-date{font-size:13px;color:var(--muted);white-space:nowrap}
.stock-pill{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:999px;border:1px solid var(--line-strong);background:var(--surface);font-size:13px;font-weight:650;color:var(--ink-2);white-space:nowrap;min-height:38px}
.stock-pill .icon{width:18px;height:18px}
.stock-pill:hover{background:var(--surface-2)}
.stock-pill.warn{background:var(--amber-soft);border-color:#ecd7a8;color:var(--amber)}
.stock-pill.danger{background:var(--red-soft);border-color:#ebc9be;color:var(--red)}
.demo-banner{background:var(--gold-soft);color:#86652f;font-size:13px;text-align:center;padding:9px 16px;border-bottom:1px solid #eedfc2}
#content{padding:30px 32px 48px;flex:1;width:100%;max-width:1680px;margin:0 auto}

/* ---------- Page structure ---------- */
.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:26px;flex-wrap:wrap}
.page-head h1{color:var(--ink)}
.page-head p{font-size:15px;color:var(--muted);margin-top:2px}
.head-actions,.row-actions,.share-actions,.modal-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.row-actions{justify-content:flex-end;gap:6px}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:24px;margin-bottom:22px;min-width:0;box-shadow:var(--shadow-sm)}
.panel.no-pad{padding:0;overflow:hidden}
.section-title{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:20px}
.section-title h2{font-size:17px}
.section-title p{font-size:13px;color:var(--muted);margin-top:2px}
.section-title>.icon{color:var(--gold);margin-top:4px}
.padded{padding:22px 24px 0}
.info-strip{display:flex;align-items:flex-start;gap:12px;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius-sm);padding:14px 16px;font-size:13.5px;color:var(--ink-2);line-height:1.85;margin-bottom:22px}
.info-strip .icon{color:var(--gold);margin-top:2px}
.sync-error{color:var(--red);background:var(--red-soft);border-radius:var(--radius-xs);padding:12px 14px;font-size:13.5px;margin-bottom:16px;line-height:1.8}
.local-link-warning{font-size:13.5px;background:var(--amber-soft);padding:12px 15px;border-radius:var(--radius-xs);color:var(--amber);margin-bottom:20px}
.empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:40px 20px;color:var(--muted)}
.empty .icon{width:42px;height:42px;padding:9px;border-radius:14px;background:var(--surface-3);color:var(--gold)}
.empty h3{color:var(--ink);margin-top:4px}
.empty p{font-size:14px;max-width:360px}

/* ---------- Stats ---------- */
.mini-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:20px}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}
.stat{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px 18px;display:flex;flex-direction:column;gap:6px;min-width:0;box-shadow:var(--shadow-sm)}
.stat-top{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px;color:var(--muted);font-weight:600}
.stat-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--surface-3);color:var(--copper)}
.stat-icon .icon{width:18px;height:18px}
.stat>strong{font-size:25px;font-weight:700;letter-spacing:-.3px;font-variant-numeric:tabular-nums;line-height:1.3}
.stat>strong small{font-size:13px;color:var(--muted);font-weight:600}
.stat>small{font-size:12.5px;color:var(--muted);line-height:1.6}
.stats-grid .stat{padding:20px}
.stats-grid .stat>strong{font-size:28px}
.stat.highlight{background:linear-gradient(145deg,var(--teal),#24776f);border-color:transparent;color:#fff;box-shadow:0 12px 30px rgba(29,106,100,.22)}
.stat.highlight .stat-top,.stat.highlight>small,.stat.highlight>strong small{color:rgba(255,255,255,.78)}
.stat.highlight .stat-icon{background:rgba(255,255,255,.16);color:#fff}

/* ---------- Point of sale ---------- */
.pos-layout{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:26px;align-items:start}
.pos-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:18px;flex-wrap:wrap}
.pos-head h1{font-size:26px}
.searchbox{flex-direction:row;align-items:center;gap:10px;margin:0;flex:1;max-width:420px;min-width:240px;background:var(--surface);border:1px solid var(--line-strong);border-radius:999px;padding:0 16px;color:var(--muted);transition:border-color .15s,box-shadow .15s}
.searchbox:focus-within{border-color:var(--teal);box-shadow:0 0 0 4px rgba(29,106,100,.1)}
.searchbox input{border:0;background:transparent;box-shadow:none!important;padding:12px 0;font-weight:400}
.alert-strip{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 16px;border-radius:var(--radius-sm);background:var(--amber-soft);color:#7d5c1f;border:1px solid #efdcae;margin-bottom:18px;font-size:14px}
.alert-strip>span{flex:1;min-width:200px;line-height:1.8}
.alert-strip.danger{background:var(--red-soft);border-color:#eccabf;color:#8d4231}
.categories{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 12px;margin-bottom:6px;scrollbar-width:none}
.categories::-webkit-scrollbar{display:none}
.chip{display:inline-flex;align-items:center;gap:7px;padding:9px 16px;border-radius:999px;background:var(--surface);border:1px solid var(--line);font-size:14px;font-weight:600;color:var(--ink-2);white-space:nowrap;transition:all .15s;min-height:42px}
.chip .icon{width:17px;height:17px}
.chip:hover{border-color:var(--line-strong);background:var(--surface-2)}
.chip.selected{background:var(--ink);border-color:var(--ink);color:#fff}
.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px}
.product-card{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;text-align:start;transition:transform .15s,box-shadow .15s,border-color .15s;box-shadow:var(--shadow-sm)}
.product-card:hover:not(:disabled){transform:translateY(-2px);box-shadow:var(--shadow);border-color:var(--line-strong)}
.product-card:active:not(:disabled){transform:translateY(0)}
.product-card.unavailable{opacity:.55;filter:grayscale(.5)}
.product-visual{position:relative;height:150px;display:grid;place-items:center;overflow:hidden}
.product-visual .cup-art{width:140px;height:140px;filter:drop-shadow(0 8px 8px rgba(120,86,55,.08))}
.art-turkish{background:linear-gradient(160deg,#f6efe2,#efe4d1)}
.art-espresso{background:linear-gradient(160deg,#f3eee5,#e9e1d3)}
.art-latte{background:linear-gradient(160deg,#f6f1e7,#eee5d6)}
.art-iced{background:linear-gradient(160deg,#ecf2ee,#e1ebe5)}
.art-tea{background:linear-gradient(160deg,#f1f3e6,#e6ead6)}
.art-cake{background:linear-gradient(160deg,#f8efdf,#f1e2c8)}
.stock-label,.quantity-label{position:absolute;top:10px;inset-inline-start:10px;font-size:12px;font-weight:700;padding:4px 10px;border-radius:999px;z-index:1}
.stock-label{background:#fff;color:var(--red)}
.quantity-label{background:var(--teal);color:#fff}
.product-info{padding:12px 14px 14px;display:flex;flex-direction:column;gap:2px}
.product-category{font-size:12px;color:var(--muted)}
.product-info h3{font-size:15px;line-height:1.5;min-height:22px}
.product-price{display:flex;align-items:center;justify-content:space-between;margin-top:6px}
.product-price strong{font-size:16px;color:var(--copper);font-variant-numeric:tabular-nums}
.product-price small{font-size:12px;color:var(--muted)}
.add-circle{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--teal-soft);color:var(--teal);transition:background .15s,color .15s}
.product-card:hover:not(:disabled) .add-circle{background:var(--teal);color:#fff}
.add-circle .icon{width:18px;height:18px}

.cart{position:sticky;top:calc(var(--topbar) + 20px);background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:22px;box-shadow:var(--shadow);max-height:calc(100vh - var(--topbar) - 40px);overflow-y:auto;scrollbar-width:thin}
.cart-header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:16px}
.cart-header h2{font-size:19px;display:flex;align-items:center;gap:8px}
.cart-tools{display:flex;gap:2px}
.segmented{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;background:var(--surface-3);border-radius:13px;margin-bottom:12px}
.segmented button{display:flex;align-items:center;justify-content:center;gap:7px;padding:10px;border-radius:10px;font-size:14px;font-weight:600;color:var(--muted);min-height:42px}
.segmented button .icon{width:18px;height:18px}
.segmented button.selected{background:var(--surface);color:var(--ink);box-shadow:var(--shadow-sm)}
.cart-items{min-height:150px}
.cart-item{display:grid;grid-template-columns:48px minmax(0,1fr) auto;grid-template-areas:"thumb info price" "thumb step step";gap:4px 12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}
.cart-thumb{grid-area:thumb;width:48px;height:54px;border-radius:12px;display:grid;place-items:center;overflow:hidden}
.cart-thumb .cup-art{width:54px;height:54px}
.cart-item-info{grid-area:info;display:flex;flex-direction:column;min-width:0}
.cart-item-info b{font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cart-item-info span{font-size:12.5px;color:var(--muted)}
.cart-item>strong{grid-area:price;font-size:15px;font-variant-numeric:tabular-nums}
.stepper{grid-area:step;display:inline-flex;align-items:center;gap:4px;justify-self:start;background:var(--surface-3);border-radius:999px;padding:3px}
.stepper button{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--surface);color:var(--ink-2);box-shadow:var(--shadow-sm)}
.stepper button:hover{color:var(--teal)}
.stepper .icon{width:16px;height:16px}
.stepper span{min-width:26px;text-align:center;font-weight:700;font-variant-numeric:tabular-nums}
.empty-cart{text-align:center;padding:18px 10px 10px;color:var(--muted)}
.empty-cup .cup-art{width:96px;height:96px;opacity:.65}
.empty-cart h3{color:var(--ink);margin:4px 0}
.empty-cart p{font-size:13.5px}
.note-input{flex-direction:row;align-items:center;gap:8px;margin:14px 0 6px;border:1px solid var(--line);border-radius:var(--radius-sm);padding:0 12px;color:var(--muted);background:var(--surface-2)}
.note-input input{border:0;background:transparent;box-shadow:none!important;padding:11px 0;font-weight:400;font-size:14px}
.cart-totals{display:flex;flex-direction:column;gap:8px;padding:12px 0;border-bottom:1px dashed var(--line-strong);margin-bottom:12px}
.cart-totals>div{display:flex;justify-content:space-between;align-items:center;font-size:14px;color:var(--ink-2)}
.cart-totals label{margin:0;font-weight:500;font-size:14px}
.discount-wrap{display:inline-flex;align-items:center;gap:6px;width:130px}
.discount-wrap input{padding:8px 10px;text-align:center;font-size:14px}
.discount-wrap small{color:var(--muted)}
.grand-total{padding-top:6px}
.grand-total b{font-size:16px;color:var(--ink)}
.grand-total strong{font-size:24px;color:var(--teal-ink);font-variant-numeric:tabular-nums}
.payment-label{font-size:13px;color:var(--muted);font-weight:600;margin-bottom:8px}
.payment-methods{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}
.payment-methods button{display:flex;flex-direction:column;align-items:center;gap:5px;padding:10px 6px;border:1px solid var(--line);border-radius:12px;font-size:13.5px;font-weight:600;color:var(--ink-2);background:var(--surface);min-height:62px;transition:all .15s}
.payment-methods button:hover{border-color:var(--line-strong)}
.payment-methods button.selected{border-color:var(--teal);background:var(--teal-softer);color:var(--teal-ink);box-shadow:0 0 0 1px var(--teal) inset}
.cash-box{background:var(--surface-2);border:1px solid var(--line);border-radius:14px;padding:12px 14px;margin-bottom:12px}
.cash-box>label{flex-direction:row;align-items:center;justify-content:space-between;margin:0 0 10px;font-size:14px}
.cash-box .discount-wrap{width:150px}
.quick-cash{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.quick-cash button{flex:1;min-width:56px;padding:8px 6px;border-radius:9px;border:1px solid var(--line-strong);background:var(--surface);font-size:13.5px;font-weight:650;font-variant-numeric:tabular-nums;min-height:38px}
.quick-cash button:hover{border-color:var(--teal);color:var(--teal)}
.change-row{display:flex;justify-content:space-between;align-items:center;font-size:14px;color:var(--ink-2)}
.change-row strong{font-size:20px;color:var(--green);font-variant-numeric:tabular-nums}
.change-row .short{color:var(--red);font-size:15px}
.checkout{width:100%;min-height:56px;font-size:16px;justify-content:space-between;padding:0 22px;border-radius:14px}
.cart-foot{display:flex;align-items:center;justify-content:center;gap:6px;font-size:12.5px;color:var(--muted);margin-top:10px}
.cart-foot .icon{width:16px;height:16px;color:var(--green)}
#mobile-cart{display:none}
.mobile-cart-bar{position:fixed;inset-inline:12px;bottom:84px;z-index:18;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 18px;border-radius:16px;background:var(--ink);color:#fff;box-shadow:var(--shadow-lg);font-size:15px}
.mobile-cart-bar .count{background:rgba(255,255,255,.18);color:#fff}
.mobile-cart-bar strong{font-size:17px}

/* ---------- Tables ---------- */
.table-wrap{overflow-x:auto;scrollbar-width:thin}
table{width:100%;border-collapse:collapse;font-size:14px}
th{font-size:12.5px;font-weight:650;color:var(--muted);text-align:start;padding:14px 18px;background:var(--surface-2);border-bottom:1px solid var(--line);white-space:nowrap}
td{padding:14px 18px;border-bottom:1px solid var(--line);vertical-align:middle;text-align:start}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover td{background:#fdfaf4}
td small{font-size:12px}
.table-product,.user-cell{display:flex;align-items:center;gap:12px}
.user-cell .avatar{width:36px;height:36px;border-radius:11px;font-size:14px}
.tiny-art{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;overflow:hidden;flex-shrink:0}
.tiny-art .cup-art{width:46px;height:46px}
.suggest{color:var(--teal-ink);font-size:15px}
dialog td{white-space:nowrap}
dialog .table-wrap{border:1px solid var(--line);border-radius:var(--radius-sm)}

/* ---------- Dashboard ---------- */
.filter-bar{display:flex;align-items:flex-end;gap:12px;margin-bottom:22px;flex-wrap:wrap}
.filter-bar label{margin:0;font-size:13px}
.filter-bar input{padding:10px 14px;min-height:46px}
.dashboard-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:22px}
.chart{height:250px;display:flex;align-items:flex-end;gap:10px;padding-top:24px;overflow-x:auto}
.chart-col{flex:1;min-width:34px;display:flex;flex-direction:column;align-items:center;gap:6px}
.chart-col>div{width:100%;max-width:42px;border-radius:9px 9px 4px 4px;background:linear-gradient(180deg,#2a7f77,var(--teal));transition:opacity .15s}
.chart-col>div:hover{opacity:.85}
.chart-col span{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.chart-col small{font-size:11px;color:var(--muted);white-space:nowrap}
.rank-item,.summary-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.rank-item:last-child,.summary-row:last-of-type{border-bottom:0}
.rank-item>div{flex:1;display:flex;flex-direction:column;min-width:0}
.rank-item small{color:var(--muted)}
.rank{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--gold-soft);color:#8f6a2f;font-weight:700;font-size:13px;font-family:Consolas,monospace}
.summary-row span{font-size:14px}

/* ---------- Menu, recipes ---------- */
.menu-share-banner{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px 28px;margin-bottom:26px;border-radius:20px;background:linear-gradient(135deg,var(--teal-softer),#ece4d3);border:1px solid var(--line)}
.menu-share-banner h2{font-size:22px;color:var(--teal-ink);margin:4px 0 6px}
.menu-share-banner p{font-size:14px;color:var(--ink-2);max-width:480px}
.qr-preview{background:#fff;border:1px solid var(--line);padding:16px;max-width:260px;margin:0 auto 20px;border-radius:var(--radius)}
.qr-preview svg{width:100%;display:block;height:auto}
.calibration-banner{display:flex;align-items:center;gap:20px;padding:20px 24px;border-radius:20px;background:linear-gradient(135deg,var(--gold-soft),var(--surface-2));border:1px solid #eedfc4;margin-bottom:24px}
.calibration-banner h2{font-size:19px}
.calibration-banner p{font-size:14px;color:var(--ink-2)}
.calibration-banner>div{flex:1}
.calibration-banner>span{font-size:13px;color:var(--muted);padding-inline-start:22px;border-inline-start:1px solid #e3d3b4;line-height:1.8}
.calibration-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:15px;background:#fff;color:var(--copper);box-shadow:var(--shadow-sm)}
.recipe-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:18px}
.recipe-card{display:flex;flex-direction:column;margin:0}
.recipe-card-head{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.recipe-card-head>div{flex:1;min-width:0}
.recipe-lines{flex:1;display:flex;flex-direction:column;gap:2px;margin-bottom:12px}
.recipe-lines>div{display:flex;justify-content:space-between;gap:10px;font-size:14px;padding:8px 0;border-bottom:1px dashed var(--line)}
.recipe-lines small{color:var(--muted)}
.recipe-cost{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-radius:var(--radius-sm);background:var(--surface-2);margin-bottom:14px;font-size:14px}
.recipe-cost b{color:var(--copper);font-size:16px}
.recipe-editor-row{display:grid;grid-template-columns:1.4fr 1fr 1fr 40px;gap:12px;align-items:end;padding-bottom:6px;margin-bottom:12px;border-bottom:1px solid var(--line)}
.recipe-editor-row label{font-size:12.5px;margin-bottom:10px}
.recipe-editor-row input,.recipe-editor-row select{font-size:14px;padding:11px 10px}
.recipe-editor-row .icon-button{margin-bottom:12px}
.recipe-preview{padding:16px 18px;background:var(--green-soft);border-radius:var(--radius-sm);font-size:14px;margin-top:18px;color:#45684f}
.recipe-preview>div{display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;margin-bottom:10px}
.recipe-preview small{color:#7a9480;font-size:12px}
.purchase-total{display:flex;justify-content:space-between;align-items:center;padding:16px 4px;font-size:15px;border-top:1px solid var(--line);margin-top:8px}
.purchase-total b{font-size:22px;color:var(--teal-ink)}
#purchase-form>label{margin-top:18px}

/* ---------- Settings, users ---------- */
.settings-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;align-items:start}
.brand-preview{text-align:center}
.brand-preview img{width:min(280px,80%);margin:4px auto 14px;display:block}
.swatches{display:flex;justify-content:center;gap:10px;margin-bottom:12px}
.swatches span{width:34px;height:34px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px var(--line-strong)}
.brand-preview p{font-size:13.5px;color:var(--muted)}
.info-panel h2{margin-bottom:6px}
.info-panel .btn{margin-top:14px}
.sync-meta{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:20px}
.sync-meta>div{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius-sm);padding:12px 14px;display:flex;flex-direction:column;gap:3px}
.sync-meta span{font-size:12.5px;color:var(--muted)}
.sync-meta b{font-size:14px}
.role-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:22px}
.role-card{display:flex;align-items:flex-start;gap:14px;padding:18px;border-radius:var(--radius);background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-sm)}
.role-card>div{flex:1;min-width:0}
.role-card b{font-size:15.5px}
.role-card p{font-size:13px;color:var(--muted);margin-top:4px;line-height:1.8}
.role-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;flex-shrink:0}
.role-superadmin .role-icon{background:var(--gold-soft);color:#8f6a2f}
.role-admin .role-icon{background:var(--teal-soft);color:var(--teal)}
.role-staff .role-icon{background:var(--copper-soft);color:var(--copper)}
.role-count{font-size:22px;font-weight:700;color:var(--ink-2);font-variant-numeric:tabular-nums}
.role-pick{display:grid;gap:8px}
.role-option{flex-direction:row;align-items:flex-start;gap:12px;margin:0;padding:13px 14px;border:1px solid var(--line);border-radius:var(--radius-sm);cursor:pointer;transition:border-color .15s,background .15s;font-weight:500}
.role-option:hover{border-color:var(--line-strong)}
.role-option:has(input:checked){border-color:var(--teal);background:var(--teal-softer)}
.role-option input{margin-top:3px}
.role-option span{display:flex;flex-direction:column;gap:2px}
.role-option b{font-size:14.5px;color:var(--ink)}
.role-option small{color:var(--muted);line-height:1.7;font-size:12.5px}
.install-hero{display:grid;place-items:center;padding:6px 0 10px}
.install-hero img{width:96px;height:96px;object-fit:contain;filter:drop-shadow(0 10px 16px rgba(110,74,40,.15))}
.account-extra{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}.account-extra .btn{flex:1}
.steps{margin:6px 0 4px;padding-inline-start:22px;display:grid;gap:8px;font-size:14.5px;line-height:1.8}

/* ---------- Modal, toast ---------- */
dialog{border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow-lg);padding:28px;width:520px;max-width:calc(100vw - 28px);max-height:90vh;color:var(--ink);background:var(--surface)}
dialog[open]{animation:pop .18s ease-out}
dialog::backdrop{background:rgba(38,36,30,.38);backdrop-filter:blur(4px)}
dialog.wide-modal{width:820px}
@keyframes pop{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:22px}
.modal-head h2{font-size:21px}
.modal-head p{font-size:13.5px;color:var(--muted);margin-top:4px}
.modal-actions{margin-top:22px}
dialog .panel{box-shadow:none}
.inline-form{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:center}
.inline-form .btn,.inline-form .form-error{grid-column:1/-1}
#toast{position:fixed;bottom:28px;left:50%;transform:translate(-50%,16px);background:var(--ink);color:#fff;border-radius:14px;padding:14px 22px;font-size:14.5px;box-shadow:var(--shadow-lg);z-index:100;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;max-width:min(92vw,560px);text-align:center;line-height:1.7}
#toast.show{opacity:1;transform:translate(-50%,0)}
#toast.error{background:#8f4433}

/* ---------- Receipt ---------- */
.receipt-sheet{text-align:center;width:100%;max-width:340px;margin:auto;color:#2a332f;font-size:13px}
.receipt-sheet>img{width:190px;height:auto;margin-bottom:6px}
.receipt-sheet>h3{font-size:17px}
.receipt-sheet>p{font-size:12.5px;color:var(--ink-2)}
.receipt-meta{display:flex;flex-direction:column;gap:5px;font-size:12.5px;border-block:1px dashed #c9bfae;margin:14px 0;padding:14px 0}
.receipt-line{display:flex;justify-content:space-between;padding:9px 0;text-align:start;gap:15px}
.receipt-line small{color:var(--muted)}
.receipt-line.total{border-block:1px dashed #c9bfae;font-size:18px;margin:6px 0 16px;padding:14px 0}
.receipt-thanks{margin:16px 0 8px;font-size:14px!important}
.receipt-sheet>small{color:var(--faint);font-size:11px}
#print-area{display:none}

/* ---------- Responsive ---------- */
@media(min-width:1600px){:root{--sidebar:268px}.pos-layout{grid-template-columns:minmax(0,1fr) 410px}.product-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}}
@media(max-width:1280px){.pos-layout{grid-template-columns:minmax(0,1fr) 340px;gap:20px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.role-cards{grid-template-columns:1fr}.menu-share-banner{flex-direction:column;align-items:flex-start}}
@media(max-width:1080px){
  :root{--sidebar:84px}
  .sidebar{padding:16px 12px}
  .brand{height:60px}.brand img{display:none}.brand:before{content:"";width:46px;height:46px;background:url(/assets/mark.png) center/contain no-repeat}
  .nav-label,.nav-item span,.account-text,.install-link span{display:none}
  .nav-group{gap:4px}.nav-group+.nav-group{padding-top:10px;border-top:1px solid var(--line)}
  .nav-item{justify-content:center;padding:12px}
  .nav-item.active:before{inset-inline-start:-12px}
  .nav-count{position:absolute;top:4px;inset-inline-end:4px;min-width:18px;height:18px;font-size:10px}
  .install-link{justify-content:center;padding:11px}
  .account{flex-direction:column}.account-main{justify-content:center}
  .pos-layout{grid-template-columns:minmax(0,1fr)}
  .cart{position:static;max-height:none}
  #mobile-cart{display:block}
  .dashboard-grid,.settings-grid{grid-template-columns:1fr}
  .top-date{display:none}
}
@media(max-width:760px){
  :root{--topbar:60px}
  .sidebar{inset:auto 0 0 0;width:100%;height:70px;flex-direction:row;padding:6px 8px calc(6px + env(safe-area-inset-bottom));border-inline-end:0;border-top:1px solid var(--line);box-shadow:0 -6px 24px rgba(74,52,28,.06)}
  .brand,.sidebar-bottom{display:none}
  .sidebar nav{flex-direction:row;gap:2px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;padding:0}
  .sidebar nav::-webkit-scrollbar{display:none}
  .nav-group{flex-direction:row;gap:2px}.nav-group+.nav-group{padding:0;border:0}
  .nav-item{flex-direction:column;gap:3px;min-width:70px;padding:7px 6px;border-radius:12px}
  .nav-item span{display:block;font-size:11px;white-space:nowrap}
  .nav-item.active:before{display:none}
  .workspace{margin-inline-start:0;padding-bottom:76px}
  .topbar{padding:0 14px;gap:8px}
  .top-mark{display:block}
  .breadcrumb{font-size:15px}
  .top-meta{gap:8px}
  .stock-pill span{display:none}.stock-pill{padding:8px 10px}
  #content{padding:18px 14px 40px}
  h1,.page-head h1{font-size:23px}
  .pos-head h1{font-size:21px}
  .searchbox{max-width:none;min-width:100%}
  .mini-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .mini-stats .stat{padding:12px}
  .mini-stats .stat-icon{display:none}
  .mini-stats .stat>strong{font-size:18px}
  .mini-stats .stat>small{display:none}
  .stat-top{font-size:12px}
  .product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .product-visual{height:120px}.product-visual .cup-art{width:118px;height:118px}
  .stats-grid{gap:10px}.stats-grid .stat{padding:14px}.stats-grid .stat>strong{font-size:21px}
  .form-grid,.sync-meta{grid-template-columns:1fr;gap:0}
  .panel{padding:18px}
  th,td{padding:12px 14px}
  .calibration-banner{flex-direction:column;align-items:flex-start}.calibration-banner>span{border:0;padding:0}
  .recipe-editor-row{grid-template-columns:1fr 1fr 40px}.recipe-editor-row label:first-child{grid-column:1/-1}
  .auth-layout{grid-template-columns:1fr}
  .auth-story{padding:34px 24px 26px;min-height:auto}
  .auth-emblem{display:none}
  .auth-story h1{font-size:32px}
  .auth-story>p,.auth-points{display:none}
  .auth-panel{padding:26px 20px 36px}
  dialog{padding:22px 18px;border-radius:20px}
  .modal-actions .btn{flex:1}
}
@media(max-width:380px){.mini-stats{grid-template-columns:1fr 1fr}.mini-stats .stat:last-child{display:none}.product-grid{gap:8px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
@media print{
  body{background:#fff}body>*{display:none!important}
  body>#print-area{display:block!important;width:76mm;margin:auto}
  .receipt-sheet{max-width:none;font-family:Tahoma,Arial,sans-serif;color:#000}
  .receipt-sheet>img{width:150px}
  .receipt-line{break-inside:avoid}
  .receipt-sheet small{color:#333}
  @page{size:80mm auto;margin:3mm}
}
