/* Dopa Beans POS — brand guideline: espresso #3D1C12, cream #F9E7D7, tan #F7D9B8 (+ dopamine orange for actions) */
:root {
  --bg: #F9E7D7; --surface: #FFFFFF; --surface-2: #FDF4EC; --ink: #3D1C12; --ink-2: #66402F; --muted: #8E6F5E; --line: #EFD5BD; --line-2: #F6E4D3;
  --brand: #3D1C12; --brand-2: #55281A; --accent: #E8833A; --accent-d: #C9671F; --accent-soft: #F7D9B8; --tan: #F7D9B8; --cream: #F9E7D7;
  --green: #22915F; --green-soft: #E0F4EA; --red: #CF3F35; --red-soft: #FBE5E3; --amber: #D99117; --amber-soft: #FDF1D8;
  --blue: #2F72CF; --blue-soft: #E3EDFB; --violet: #7B55C7; --violet-soft: #EEE7FA;
  --radius: 14px; --radius-sm: 9px; --shadow: 0 1px 2px rgba(61,28,18,.06), 0 4px 14px rgba(61,28,18,.06); --shadow-lg: 0 18px 50px rgba(61,28,18,.22);
  --side: 232px; --font: 'Segoe UI', 'Cairo', Tahoma, 'Noto Sans Arabic', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 14.5px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
h2, h3, h4 { margin: 0; } h2 { font-size: 21px; } h3 { font-size: 16px; } h4 { font-size: 14.5px; margin: 16px 0 8px; display: flex; gap: 10px; align-items: center; }
a { color: inherit; text-decoration: none; }
.boot { display: grid; place-items: center; height: 100vh; font-size: 48px; animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .4; transform: scale(.92); } }
.muted { color: var(--muted); } .sm { font-size: 12.5px; } .center { text-align: center; } .nowrap { white-space: nowrap; } .hidden { display: none !important; }
.neg { color: var(--red); font-weight: 600; } .pos { color: var(--green); font-weight: 600; }
.grow { flex: 1; } .mt { margin-top: 12px; } .pad { padding: 14px 18px; margin: 0; } .full { width: 100%; }
small.cur { font-size: .62em; font-weight: 600; color: var(--muted); }
code { font-family: Consolas, monospace; font-size: 12px; background: var(--line-2); padding: 1px 6px; border-radius: 5px; direction: ltr; display: inline-block; }

/* ---------- buttons & inputs ---------- */
.btn { border: 1px solid transparent; background: var(--surface); padding: 9px 16px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, transform .05s, box-shadow .15s; white-space: nowrap; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--brand); color: #fff; } .btn.primary:hover:not(:disabled) { background: var(--brand-2); }
.btn.pay { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(232,131,58,.35); } .btn.pay:hover:not(:disabled) { background: var(--accent-d); }
.btn.danger { background: var(--red); color: #fff; }
.btn.ghost { background: var(--surface); border-color: var(--line); } .btn.ghost:hover:not(:disabled) { background: var(--surface-2); border-color: #DCCDBD; }
.btn.danger-t { color: var(--red); }
.btn.sm { padding: 6px 11px; font-size: 13px; } .btn.lg { padding: 13px 20px; font-size: 15.5px; border-radius: 12px; } .btn.block { width: 100%; } .btn.icon { padding: 8px 11px; }
.icon-btn { background: none; border: 0; cursor: pointer; padding: 4px 8px; border-radius: 6px; color: var(--muted); font-size: 15px; } .icon-btn:hover { background: var(--line-2); color: var(--ink); }
.link { background: none; border: 0; color: var(--blue); cursor: pointer; text-decoration: underline; padding: 0 4px; }
input, select, textarea { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 9px 11px; width: 100%; outline: none; transition: border .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); padding: 0; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.w60 { width: 64px; } .w80 { width: 84px; } .w100 { width: 110px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; }
.chip { border: 1px solid var(--line); background: var(--surface); padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip-check { border: 1px solid var(--line); padding: 7px 12px; border-radius: 999px; margin: 0; background: var(--surface); cursor: pointer; }
.chips, .quick, .checks { display: flex; flex-wrap: wrap; gap: 6px; }
.quick { margin: -2px 0 12px; }
.switch { display: inline-block; position: relative; width: 40px; height: 22px; margin: 0; } .switch input { opacity: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #D8CCBF; border-radius: 99px; transition: .2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; width: 16px; height: 16px; top: 3px; right: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--green); } .switch input:checked + span::after { right: 21px; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 11px; padding: 3px; gap: 3px; } .seg.full { display: flex; margin-bottom: 12px; } .seg.full button { flex: 1; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- badges ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.st-new { background: var(--line-2); color: var(--ink-2); } .st-confirmed { background: var(--blue-soft); color: var(--blue); } .st-preparing { background: var(--amber-soft); color: #9A6404; }
.st-ready { background: var(--violet-soft); color: var(--violet); } .st-completed { background: var(--green-soft); color: var(--green); } .st-cancelled, .st-refunded { background: var(--red-soft); color: var(--red); }
.mv-sale { background: var(--blue-soft); color: var(--blue); } .mv-purchase, .mv-opening { background: var(--green-soft); color: var(--green); } .mv-waste { background: var(--red-soft); color: var(--red); }
.mv-adjust { background: var(--amber-soft); color: #9A6404; } .mv-cancel, .mv-refund { background: var(--violet-soft); color: var(--violet); }
.margin { font-weight: 700; padding: 1px 7px; border-radius: 6px; font-size: 12.5px; } .margin.good { background: var(--green-soft); color: var(--green); } .margin.mid { background: var(--amber-soft); color: #9A6404; } .margin.bad { background: var(--red-soft); color: var(--red); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; } .dot.green { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); } .dot.red { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; background: radial-gradient(circle at 50% 0%, #4A2E1C, var(--brand) 70%); }
.login-card { display: flex; flex-direction: column; align-items: center; padding: 34px 40px 30px; gap: 6px; background: var(--bg); border-radius: 26px; box-shadow: 0 30px 80px rgba(0,0,0,.4); width: min(440px, 100%); }
.login-brand { display: flex; flex-direction: column; align-items: center; text-align: center; padding-bottom: 20px; margin-bottom: 18px; border-bottom: 1px solid var(--line); width: 100%; }
.login-brand h1 { font-size: 30px; margin: 12px 0 2px; letter-spacing: .5px; } .login-brand p { margin: 0; color: var(--muted); }
.login-card h2 { font-size: 22px; } .login-card > .muted { margin: 0 0 14px; }
.logo { width: 42px; height: 42px; border-radius: 12px; background: url(/img/logo.svg) center/cover; color: transparent; font-size: 0; flex-shrink: 0; }
.logo.xl { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 10px 28px rgba(61,28,18,.25); }
.pin-display { display: flex; gap: 14px; justify-content: center; margin: 6px 0 18px; min-height: 18px; direction: ltr; }
.pin-display span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #CDBBA9; transition: .15s; } .pin-display span.on { background: var(--brand); border-color: var(--brand); transform: scale(1.1); }
.pin-display.shake { animation: shake .35s; } @keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pinpad { display: grid; grid-template-columns: repeat(3, 78px); gap: 12px; direction: ltr; justify-content: center; }
.pinpad button { height: 64px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font-size: 24px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow); transition: .1s; }
.pinpad button:active { transform: scale(.95); background: var(--line-2); } .pinpad .muted { font-size: 14px; } .pinpad .ok { background: var(--accent); color: #fff; border-color: var(--accent); font-size: 16px; }
.demo-pins { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 360px; } .demo-pins > div { width: 100%; text-align: center; margin-bottom: 4px; }

/* ---------- shell ---------- */
.app { display: flex; height: 100vh; overflow: hidden; }
.side { width: var(--side); background: var(--brand); color: #EAD9C7; display: flex; flex-direction: column; flex-shrink: 0; transition: width .2s; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand b { display: block; color: #fff; font-size: 16px; } .brand small { opacity: .6; font-size: 12px; }
.nav { flex: 1; overflow-y: auto; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; opacity: .78; transition: .15s; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.06); opacity: 1; } .nav a.on { background: var(--accent); color: #fff; opacity: 1; box-shadow: 0 4px 14px rgba(232,131,58,.35); }
.ni { width: 22px; text-align: center; font-size: 17px; }
.collapse { margin: 8px; background: rgba(255,255,255,.06); border: 0; color: inherit; padding: 8px; border-radius: 8px; cursor: pointer; }
body.mini .side { width: 64px; } body.mini .nl, body.mini .brand > div:last-child { display: none; } body.mini .brand { justify-content: center; padding: 18px 0; } body.mini .nav a { justify-content: center; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 58px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 20px; gap: 20px; flex-shrink: 0; }
.tb-shift { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; } .tb-clock { flex: 1; text-align: center; color: var(--muted); font-size: 13px; }
.tb-user { display: flex; align-items: center; gap: 10px; } .tb-user b { display: block; font-size: 13.5px; } .tb-user small { color: var(--muted); font-size: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-d); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
#page { flex: 1; overflow-y: auto; padding: 22px 26px 40px; }
#page.page-pos { padding: 0; overflow: hidden; } #page.page-kds { padding: 16px; }
.loading { padding: 60px; text-align: center; color: var(--muted); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.sec { margin: 26px 0 10px; font-size: 15px; color: var(--ink-2); }
.tabs { display: flex; gap: 4px; background: var(--surface); padding: 4px; border-radius: 12px; border: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 8px 14px; border-radius: 9px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.tabs button.on { background: var(--brand); color: #fff; } .tabs.wide { margin-bottom: 16px; width: fit-content; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }

/* ---------- cards, tables ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; } .card.flush .card-title { padding: 14px 18px 0; margin-bottom: 8px; }
.card.click { cursor: pointer; transition: .15s; } .card.click:hover { border-color: var(--accent); }
.card-title { margin-bottom: 12px; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.alert-card { border-color: #F2C7A6; background: linear-gradient(var(--surface), #FFF8F2); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: start; font-size: 12px; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; } .tbl.click tbody tr { cursor: pointer; } .tbl.click tbody tr:hover { background: var(--surface-2); }
.tbl.compact td { padding: 6px 8px; } .tbl td.ico { font-size: 24px; width: 40px; } .tbl tr.off { opacity: .5; }
.tbl tr.row-alert { background: #FFF6F0; } .matrix td.center { font-size: 15px; }
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding: 12px 16px 2px; } .filters label { min-width: 150px; } .filters .chips { margin-bottom: 10px; }
.stat-row { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; min-width: 150px; flex: 1; }
.stat small { color: var(--muted); display: block; font-weight: 600; font-size: 12px; } .stat b { font-size: 21px; } .stat.alert { border-color: #F2B9A6; background: var(--red-soft); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); } .empty-ico { font-size: 40px; opacity: .5; margin-bottom: 6px; } .empty p { margin: 0; }
.big-empty { padding: 40px; } .big-empty h3 { margin: 8px 0; }
.banner { padding: 10px 14px; border-radius: 11px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 500; }
.banner.warn { background: var(--amber-soft); color: #7A4F03; } .banner.info { background: var(--blue-soft); color: #1F4E8F; } .banner.sm { padding: 7px 11px; font-size: 13px; margin: 8px 0 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; } .kv dt { color: var(--muted); font-weight: 600; } .kv dd { margin: 0; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; } .grid-cards .card { margin: 0; }
.split { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; } .split2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 14px; align-items: end; } .span2 { grid-column: span 2; }

/* ---------- modal & toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(30,18,10,.45); display: grid; place-items: center; z-index: 50; padding: 20px; animation: fade .15s; backdrop-filter: blur(2px); }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 18px; width: min(520px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal.wide { width: min(940px, 100%); } .modal.sm { width: min(400px, 100%); } .modal.perm { width: min(720px, 100%); }
.perm-head { display: flex; align-items: center; gap: 10px; margin-top: 4px; } .perm-head h4 { margin: 0; } .perm-head .btn { margin-inline-start: auto; }
#p-desc { margin: 6px 0 12px; }
.perm-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.perm-group { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.pg-title { font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
label.perm { margin: 0; padding: 5px 6px; border-radius: 7px; cursor: pointer; } label.perm:hover { background: var(--surface); }
label.perm.changed { background: var(--amber-soft); } label.perm:has(input:disabled) { cursor: default; opacity: .75; }
@media (max-width: 700px) { .perm-groups { grid-template-columns: 1fr; } }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-2); } .modal header h3 { display: flex; gap: 10px; align-items: center; }
.modal-body { padding: 18px 20px; overflow-y: auto; } .modal footer { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line-2); align-items: center; flex-wrap: wrap; }
.modal p { margin: 0 0 12px; }
#toasts { position: fixed; bottom: 22px; left: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; animation: pop .2s; transition: .3s; max-width: 380px; }
.toast.err { background: var(--red); } .toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- POS ---------- */
.pos-layout { display: grid; grid-template-columns: 1fr 410px; height: 100%; }
.pos-menu { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.pos-top { padding: 16px 20px 10px; display: flex; flex-direction: column; gap: 12px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.search input { border: 0; box-shadow: none !important; padding: 11px 0; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; justify-content: safe center; } .cats .chip { padding: 9px 18px; font-size: 14px; }
.cats .chip:first-child { margin-inline-start: auto; }
.cats .chip:last-child { margin-inline-end: auto; }
#shift-warn { padding: 0 20px; }
.products { flex: 1; overflow-y: auto; padding: 4px 20px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; align-content: start; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; cursor: pointer; text-align: start; display: flex; flex-direction: column; gap: 3px; transition: .15s; position: relative; box-shadow: var(--shadow); }
.product:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(61,28,18,.1); } .product:active { transform: scale(.97); }
.p-img { height: 86px; border-radius: 11px; background: linear-gradient(135deg, var(--accent-soft), #F3E6D8); display: grid; place-items: center; font-size: 42px; margin-bottom: 6px; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-name { font-weight: 700; font-size: 14.5px; } .p-desc { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-price { font-weight: 800; color: var(--accent-d); margin-top: 2px; }
.product.oos { opacity: .5; } .oos-tag { position: absolute; top: 18px; left: 18px; background: var(--red); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 6px; font-weight: 700; }
.cart { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.cart.bump .lines { animation: bump .25s; } @keyframes bump { 50% { background: var(--accent-soft); } }
.cart-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line-2); } .cart-head .seg { width: 100%; } .cart-head .seg button { flex: 1; }
.cart-meta { display: flex; gap: 6px; margin-top: 10px; } .cart-meta select { width: 120px; } .cart-meta input { flex: 1; }
.lines { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 8px; }
.line-wrap { position: relative; overflow: hidden; border-bottom: 1px dashed var(--line); border-radius: 8px; margin-bottom: 2px; }
.line-del-bg { position: absolute; inset: 0; background: rgba(239, 68, 68, 0.16); color: var(--red); display: flex; align-items: center; padding: 0 16px; font-weight: 700; font-size: 13.5px; gap: 6px; border-radius: 8px; direction: ltr; }
.line { position: relative; display: flex; gap: 10px; padding: 10px 8px; align-items: flex-start; background: var(--surface); transition: transform .18s cubic-bezier(0.2, 0.9, 0.3, 1), opacity .18s ease; will-change: transform; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.line.swiping { transition: none; }
.line.deleting { transform: translateX(110%) !important; opacity: 0 !important; transition: transform .22s ease-out, opacity .22s ease-out !important; }
.l-main { flex: 1; cursor: pointer; min-width: 0; } .l-main:hover .l-name { color: var(--accent-d); }
.l-name { font-weight: 700; } .l-var { font-weight: 500; color: var(--muted); font-size: 13px; } .l-mods { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.l-note { font-size: 12px; color: #9A6404; margin-top: 3px; } .l-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; } .l-price { font-weight: 700; }
.cart-empty { text-align: center; color: var(--muted); padding: 60px 20px; } .cart-empty div { font-size: 46px; opacity: .4; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.qty button { border: 0; background: none; width: 38px; height: 38px; font-size: 18px; cursor: pointer; font-weight: 700; } .qty button:hover { background: var(--line-2); }
.qty span { min-width: 30px; text-align: center; font-weight: 700; } .qty.sm button { width: 30px; height: 28px; font-size: 14px; }
.cart-foot { border-top: 1px solid var(--line); padding: 10px 16px 14px; background: var(--surface-2); }
.cart-tools { display: flex; gap: 6px; margin-bottom: 8px; } .cart-tools .btn { flex: 1; }
.sums > div { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13.5px; color: var(--ink-2); }
.sums .disc { color: var(--red); } .sums .grand { font-size: 19px; font-weight: 800; color: var(--ink); padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--line); }
.sums.boxed { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; margin-top: 12px; } .sums .grand.neg span { color: var(--red); } .sums .grand.pos span { color: var(--green); }
.cart-actions { display: flex; gap: 8px; margin-top: 10px; }
.pm-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; } .pm-head p { margin: 2px 0 0; font-size: 13px; }
.pm-icon { width: 60px; height: 60px; border-radius: 14px; background: var(--accent-soft); display: grid; place-items: center; font-size: 32px; }
.opt-group { margin-bottom: 14px; } .og-title { font-weight: 700; margin-bottom: 7px; display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.req { background: var(--accent-soft); color: var(--accent-d); font-size: 11px; padding: 1px 8px; border-radius: 99px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 9px 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; min-width: 84px; transition: .12s; }
.opt small { color: var(--muted); font-size: 12px; } .opt.on { border-color: var(--accent); background: var(--accent-soft); } .opt.on small { color: var(--accent-d); }
.pay-total { text-align: center; padding: 10px 0 16px; } .pay-total small { color: var(--muted); font-weight: 600; } .pay-total div { font-size: 38px; font-weight: 800; }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin-bottom: 16px; }
.pm { border: 2px solid var(--line); background: var(--surface); border-radius: 14px; padding: 14px; cursor: pointer; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 15px; }
.pm span { font-size: 26px; } .pm.on { border-color: var(--accent); background: var(--accent-soft); }
#tendered { font-size: 22px; font-weight: 700; text-align: center; }
.change { text-align: center; font-size: 16px; padding: 8px; background: var(--green-soft); border-radius: 10px; color: var(--green); } .change b.neg { color: var(--red); }
.success { text-align: center; padding: 8px 0 14px; } .big-no { font-size: 56px; font-weight: 900; color: var(--accent); line-height: 1.1; }
.change-big { font-size: 22px; font-weight: 800; background: var(--green-soft); color: var(--green); padding: 10px; border-radius: 12px; margin: 10px 0; }
.held-list { display: flex; flex-direction: column; gap: 8px; } .held { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; align-items: center; }
.held-act { display: flex; gap: 8px; align-items: center; }

/* ---------- order detail ---------- */
.od { display: grid; grid-template-columns: 1fr 280px; gap: 20px; }
.timeline { list-style: none; padding: 0; margin: 0; border-right: 2px solid var(--line); }
.timeline li { padding: 0 16px 14px; position: relative; display: flex; flex-direction: column; color: var(--muted); }
.timeline li::before { content: ''; position: absolute; right: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.timeline li.done { color: var(--ink); } .timeline li.done::before { background: var(--green); } .timeline li.bad::before { background: var(--red); } .timeline span { font-size: 12.5px; color: var(--muted); }

/* ---------- KDS ---------- */
.kds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; height: calc(100vh - 160px); }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; min-height: 0; }
.kcol h3 { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.k-Confirmed h3 { color: var(--blue); } .k-Preparing h3 { color: #9A6404; } .k-Ready h3 { color: var(--violet); }
.cnt { background: var(--surface); border: 1px solid var(--line); padding: 1px 10px; border-radius: 99px; font-size: 13px; color: var(--ink); }
.kcards { padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.kcard { background: var(--surface); border-radius: 14px; border: 1px solid var(--line); border-top: 5px solid var(--blue); box-shadow: var(--shadow); animation: pop .25s; }
.k-Preparing .kcard { border-top-color: var(--amber); } .k-Ready .kcard { border-top-color: var(--violet); }
.kcard.warn { background: #FFFBF0; } .kcard.late { background: #FFF3F1; border-top-color: var(--red); } .kcard.late .ktime { background: var(--red); color: #fff; }
.kcard header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px dashed var(--line); }
.kno { font-size: 22px; } .ktype { flex: 1; font-weight: 600; color: var(--ink-2); } .ktime { background: var(--line-2); padding: 2px 9px; border-radius: 8px; font-weight: 700; font-size: 13px; }
.kcust { padding: 6px 14px 0; font-weight: 700; color: var(--accent-d); }
.kcard ul { list-style: none; margin: 0; padding: 8px 14px; } .kcard li { display: flex; gap: 8px; padding: 6px 0; font-size: 15.5px; }
.kq { font-weight: 900; color: var(--accent-d); min-width: 28px; } .kv { color: var(--muted); font-weight: 600; } .kmods { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.knote { background: var(--amber-soft); color: #7A4F03; padding: 4px 8px; border-radius: 7px; font-size: 13px; margin: 3px 0; font-weight: 600; } .kcard > .knote { margin: 0 14px 8px; }
.kcard footer { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line-2); } .kcard footer .btn { padding: 11px; font-size: 15px; }
.kempty { text-align: center; color: var(--muted); padding: 30px; }

/* ---------- menu admin ---------- */
.variant { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--surface-2); }
.v-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; } .v-head > input:first-child { width: 150px; }
.v-cost { flex: 1; font-size: 13px; color: var(--ink-2); } .effects { display: flex; flex-direction: column; gap: 6px; } .effects .row select { width: auto; flex: 1; }
.mlist { list-style: none; margin: 10px 0 0; padding: 0; } .mlist li { display: flex; justify-content: space-between; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px dashed var(--line-2); font-size: 13.5px; }
.mlist li.off { opacity: .45; text-decoration: line-through; }

/* ---------- inventory ---------- */
.stockbar { width: 70px; height: 6px; background: var(--line-2); border-radius: 99px; display: inline-block; margin-left: 8px; vertical-align: middle; overflow: hidden; }
.stockbar i { display: block; height: 100%; background: var(--green); border-radius: 99px; } .stockbar.low i { background: var(--red); }
.balance { padding: 10px 12px; background: var(--surface-2); border-radius: 10px; margin-bottom: 10px; } .balance.due { background: var(--amber-soft); }
.pu-foot { display: flex; gap: 16px; align-items: flex-end; margin-top: 14px; flex-wrap: wrap; } .pu-foot > div { font-size: 18px; padding-bottom: 12px; flex: 1; } .pu-foot label { margin: 0; }

/* ---------- shifts ---------- */
.shift-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.shift-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.paybars .pb { display: grid; grid-template-columns: 60px 1fr 90px 60px; gap: 10px; align-items: center; padding: 6px 0; }
.bar { height: 10px; background: var(--line-2); border-radius: 99px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.denoms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; } .denoms label { margin: 0; } .denoms span { font-weight: 800; }
.handover { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 12px 14px 4px; } .handover p { margin: 0 0 8px; }
.shift-mini { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; }

/* ---------- dashboard & reports ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.kpi small { color: var(--muted); font-weight: 600; } .kpi b { font-size: 27px; font-weight: 800; letter-spacing: -.5px; }
.kpi.main { background: linear-gradient(135deg, var(--brand), #4A2E1C); color: #fff; border: 0; } .kpi.main small, .kpi.main .cur { color: #E8D3BF; }
.kpis.sm .kpi b { font-size: 21px; }
.delta { font-size: 12px; font-weight: 700; } .delta.up { color: var(--green); } .delta.down { color: var(--red); } .kpi.main .delta.up { color: #8EE3B6; } .kpi.main .delta.down { color: #FFB2A8; }
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; } .dash-grid .card { margin: 0; } .dash-grid .span2 { grid-column: span 2; }
.chart { display: flex; align-items: flex-end; gap: 0; padding-top: 22px; padding-bottom: 22px; position: relative; }
.chart .col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; padding: 0 4px; }
.chart .col i { display: block; width: 100%; max-width: 46px; background: #E9D6C3; border-radius: 7px 7px 3px 3px; min-height: 2px; transition: height .4s; }
.chart .col.hl i { background: var(--accent); } .chart .col:hover i { background: var(--accent-d); }
.chart .cv { font-size: 11px; font-weight: 700; color: var(--ink-2); margin-bottom: 4px; white-space: nowrap; } .chart .cl { position: absolute; bottom: -20px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.hbars { display: flex; flex-direction: column; gap: 9px; } .hb { display: grid; grid-template-columns: 22px 130px 1fr auto; gap: 8px; align-items: center; font-size: 13.5px; }
.hb-rank { width: 22px; height: 22px; border-radius: 50%; background: var(--line-2); display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.hb:first-child .hb-rank { background: var(--accent); color: #fff; } .hb-l { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-bar { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; } .hb-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; } .hb-v { font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.live { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .lv { text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; } .lv b { font-size: 26px; }
.donut-wrap { display: flex; align-items: center; gap: 20px; } .donut { width: 130px; height: 130px; transform: rotate(-90deg); flex-shrink: 0; } .donut-wrap.lg .donut { width: 200px; height: 200px; }
.donut circle { fill: none; stroke-width: 18; } .c0 { stroke: var(--accent); background: var(--accent); } .c1 { stroke: var(--brand); background: var(--brand); } .c2 { stroke: #C9A98B; background: #C9A98B; }
.legend { list-style: none; padding: 0; margin: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto; gap: 4px 8px; align-items: center; } .legend i { width: 12px; height: 12px; border-radius: 4px; } .legend small { grid-column: 2 / 4; color: var(--muted); }
.alerts { list-style: none; margin: 0; padding: 0; } .alerts li { display: flex; gap: 10px; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); } .alerts li b { color: var(--red); }
.pl > div { display: flex; justify-content: space-between; padding: 9px 4px; border-bottom: 1px solid var(--line-2); } .pl .sub { color: var(--ink-2); padding-right: 18px; }
.pl .line { font-weight: 700; background: var(--surface-2); } .pl .total { font-size: 19px; font-weight: 800; border-top: 2px solid var(--ink); border-bottom: 0; margin-top: 6px; }
.pl .total.neg b { color: var(--red); } .pl .total.pos b { color: var(--green); }
.settings .card { max-width: 980px; } .sticky-save { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 40%); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) { .pos-layout { grid-template-columns: 1fr 360px; } .dash-grid { grid-template-columns: 1fr 1fr; } .kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
  .side { width: 64px; } .nl, .brand > div:last-child, .tb-clock { display: none; } .nav a { justify-content: center; }
  .pos-layout { grid-template-columns: 1fr; grid-template-rows: 1fr auto; } .cart { max-height: 50vh; border-right: 0; border-top: 1px solid var(--line); }
  .split, .split2, .shift-grid, .od, .dash-grid { grid-template-columns: 1fr; } .dash-grid .span2 { grid-column: auto; }
  .kds { grid-template-columns: 1fr; height: auto; } #page { padding: 16px; }
}
@media print {
  .side, .topbar, .toolbar, .filters, .tabs, .btn, #toasts { display: none !important; }
  .app, .main, #page { display: block; height: auto; overflow: visible; } body { background: #fff; } .card { box-shadow: none; break-inside: avoid; }
}

/* ---------- safe & bank, expenses, photos ---------- */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.qa { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px; cursor: pointer; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: var(--shadow); transition: .15s; }
.qa span { font-size: 24px; } .qa:hover { border-color: var(--accent); transform: translateY(-2px); }
.kpi.warn b { color: var(--red); } .kpi .link { margin-top: 2px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.chip.off { background: var(--line-2); color: var(--muted); text-decoration: line-through; border-color: transparent; } .chip small { opacity: .7; font-size: 11px; }
.photo-field { margin: 4px 0 10px; } .photo-field .row { gap: 6px; } .file-btn { margin: 0; flex-direction: row; }
.pf-preview img { height: 54px; border-radius: 8px; border: 1px solid var(--line); vertical-align: middle; }
.thumb { border: 1px solid var(--line); border-radius: 7px; padding: 0; width: 38px; height: 38px; overflow: hidden; cursor: zoom-in; background: var(--surface-2); vertical-align: middle; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-view { text-align: center; } .photo-view img { max-width: 100%; max-height: 70vh; border-radius: 10px; }
.fin-strip { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; margin-bottom: 16px; box-shadow: var(--shadow); font-size: 14px; }
.fin-strip:hover { border-color: var(--accent); } .fin-strip b { margin-inline-start: 4px; } .fin-strip .muted { margin-inline-start: auto; }

/* ---------- product photos ---------- */
.p-thumb { position: relative; width: 64px; height: 48px; border-radius: 9px; border: 1.5px dashed #D8C7B5; background: var(--accent-soft); padding: 0; cursor: pointer; overflow: hidden; display: grid; place-items: center; font-size: 24px; }
.p-thumb.has { border: 1px solid var(--line); }
.p-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-thumb i { position: absolute; inset: auto 0 0 auto; font-style: normal; font-size: 11px; background: rgba(61,28,18,.75); color: #fff; padding: 1px 4px; border-top-right-radius: 6px; opacity: 0; transition: .15s; }
.p-thumb:not(.has) i, .p-thumb:hover i { opacity: 1; } .p-thumb:hover { border-color: var(--accent); }
.p-edit-top { display: flex; gap: 18px; align-items: flex-start; }
.p-photo { width: 220px; flex-shrink: 0; } .p-photo p { margin: 6px 0 0; }
.p-photo-box { width: 220px; height: 165px; border-radius: 12px; background: linear-gradient(135deg, var(--accent-soft), #F3E6D8); display: grid; place-items: center; font-size: 60px; overflow: hidden; margin-bottom: 8px; cursor: pointer; border: 1px solid var(--line); }
.p-photo-box img { width: 100%; height: 100%; object-fit: cover; }
.p-img { aspect-ratio: 4 / 3; height: auto; }
@media (max-width: 700px) { .p-edit-top { flex-direction: column; } }

/* ---------- discount picker in the payment dialog ---------- */
.pay-disc { border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; padding: 10px 12px; margin-bottom: 6px; }
.pay-disc .lbl { margin-bottom: 6px; }
.disc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.disc-chips .chip b { color: var(--accent-d); } .disc-chips .chip.on b { color: #FFD3AE; }
.disc-custom { display: flex; gap: 6px; align-items: center; margin-top: 8px; } .disc-custom .seg button { padding: 7px 12px; }
.pay-total .pay-breakdown { font-weight: 500; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.pay-total { padding: 8px 0 14px; }
.settings-card { max-width: 980px; } .settings-card .tbl input, .settings-card .tbl select { padding: 6px 8px; }

/* discount dropdown in the payment dialog (above the received amount) */
.disc-select { flex-direction: row; align-items: center; gap: 10px; font-size: 14px; margin: 0 0 12px; }
.disc-select select { flex: 1; font-weight: 700; padding: 11px 12px; cursor: pointer; }
.disc-select select.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-d); }

.done-list { list-style: none; padding: 0; margin: 10px 0 4px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--green); font-weight: 600; }

/* refund dialog */
.refund-sum { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.refund-sum > div { display: flex; align-items: baseline; gap: 10px; } .refund-sum > div b { font-size: 24px; color: var(--red); }
.refund-sum ul { margin: 8px 0; padding-inline-start: 18px; } .refund-sum li { padding: 2px 0; }
.ok-note { margin: 0; color: var(--green); font-weight: 600; font-size: 13px; }
.pin-input { font-size: 22px; letter-spacing: 8px; text-align: center; }
input.shake { animation: shake .35s; border-color: var(--red); }

/* partial refund picker */
.rf-lines { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.rf-line { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: .12s; }
.rf-line.on { border-color: var(--red); background: var(--red-soft); }
.rf-name { flex: 1; }
.refund-hist { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 12px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); }

/* sidebar logout (red, at the bottom) */
.side-logout { margin: 8px 8px 0; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; border: 0; cursor: pointer;
  background: var(--red); color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; transition: background .15s, transform .05s; }
.side-logout:hover { background: #B4322A; } .side-logout:active { transform: translateY(1px); }
body.mini .side-logout { justify-content: center; }
@media (max-width: 900px) { .side-logout { justify-content: center; } }

/* compact login card */
.login-card { width: min(340px, 100%); padding: 24px 26px 22px; gap: 4px; border-radius: 22px; }
.login-brand { padding-bottom: 14px; margin-bottom: 12px; }
.login-brand h1 { font-size: 22px; margin: 8px 0 0; }
.login-brand p { font-size: 13px; }
.login .logo.xl { width: 60px; height: 60px; border-radius: 16px; }
.login-card h2 { font-size: 18px; }
.login-card > .muted { margin: 0 0 8px; font-size: 13px; }
.login .pin-display { margin: 2px 0 12px; gap: 12px; } .login .pin-display span { width: 13px; height: 13px; }
.login .pinpad { grid-template-columns: repeat(3, 66px); gap: 9px; }
.login .pinpad button { height: 52px; font-size: 20px; border-radius: 13px; } .login .pinpad .ok { font-size: 15px; }
.login .pinpad .muted { font-size: 14px; }

/* brand header on printed pages */
.print-head { display: none; }
@media print {
  .print-head { display: flex !important; align-items: center; gap: 14px; padding: 0 0 12px; margin: 0 0 16px; border-bottom: 2px solid var(--ink); }
  .print-head img { width: 150px; height: auto; }
  .print-head .ph-brand { flex: 1; display: flex; flex-direction: column; } .print-head .ph-brand b { font-size: 22px; } .print-head .ph-brand span { font-size: 12px; color: var(--muted); }
  .print-head .ph-meta { display: flex; flex-direction: column; align-items: flex-end; text-align: end; font-size: 12px; color: var(--ink-2); } .print-head .ph-meta b { font-size: 16px; color: var(--ink); }
  #page .page-head h2 { display: none; }
  @page { margin: 0; } /* no browser URL / date at the page edges */
  body { padding: 12mm !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- cashier app (/pos): its own full screen, tabs on top instead of the admin sidebar ---------- */
.pos-app { flex-direction: column; }
.pos-bar { display: flex; align-items: center; gap: 16px; background: var(--brand); color: #EAD9C7; padding: 0 14px; height: 60px; flex-shrink: 0; }
.pos-bar .brand { border: 0; padding: 0; } .pos-bar .brand small { color: #CBB59F; }
.pos-tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.pos-tabs a { display: flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 10px; font-weight: 700; opacity: .8; white-space: nowrap; transition: .15s; }
.pos-tabs a:hover { background: rgba(255,255,255,.07); opacity: 1; }
.pos-tabs a.on { background: var(--accent); color: #fff; opacity: 1; box-shadow: 0 4px 14px rgba(232,131,58,.35); }
.pos-bar .topbar { background: transparent; border: 0; height: auto; padding: 0; color: #EAD9C7; gap: 14px; }
.pos-bar .tb-user small { color: #CBB59F; }
.pos-app .main { min-height: 0; }
.logout-btn { background: var(--red); color: #fff; } .logout-btn:hover { background: #B4322A; }
/* live link indicator (green = connected to the other screen) */
.live-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #B9A999; margin-inline-end: 2px; }
.live-dot.on { background: #3FD08A; box-shadow: 0 0 0 3px rgba(63,208,138,.25); animation: livepulse 2s infinite; }
@keyframes livepulse { 50% { box-shadow: 0 0 0 5px rgba(63,208,138,.08); } }
@media (max-width: 900px) { .pos-bar .brand > div:last-child, .pos-bar .tb-user > div:last-child { display: none; } .pos-tabs a { padding: 8px 10px; } }

/* ---------- loyalty ---------- */
.cust-chip { flex: 1; display: flex; align-items: center; gap: 6px; background: var(--accent-soft); border: 1px solid #F2C9A6; border-radius: var(--radius-sm); padding: 4px 4px 4px 10px; cursor: pointer; font-size: 13.5px; min-width: 0; }
.cust-chip b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cust-chip span { color: var(--accent-d); font-weight: 700; white-space: nowrap; }
.cust-chip .icon-btn { margin-inline-start: auto; }
.c-res { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; max-height: 46vh; overflow-y: auto; }
.c-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 12px; align-items: center; text-align: start; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.c-row:hover { border-color: var(--accent); background: var(--accent-soft); } .c-row .pts { font-weight: 800; color: var(--accent-d); }
.c-new { border-top: 1px solid var(--line); padding-top: 6px; }
.loyal-box { border: 1.5px dashed #F2C9A6; background: #FFF8F1; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.loyal-box label { margin: 0; font-weight: 700; color: var(--accent-d); } .loyal-box .earn { color: var(--green); font-size: 13px; }
.loyal-done { background: var(--accent-soft); color: var(--accent-d); border-radius: 10px; padding: 8px; margin: 6px 0; font-size: 14px; }
.pts-badge { background: var(--accent-soft); color: var(--accent-d); font-weight: 800; padding: 2px 9px; border-radius: 99px; }
.cu-head { display: grid; grid-template-columns: 150px 1fr 1fr; gap: 18px; align-items: start; margin-bottom: 14px; }
.pts-big { background: linear-gradient(135deg, var(--brand), #4A2E1C); color: #fff; border-radius: 16px; padding: 16px; text-align: center; display: flex; flex-direction: column; }
.pts-big b { font-size: 36px; } .pts-big span { font-size: 12px; color: #E8D3BF; }
.cu-fav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .cu-fav > b { width: 100%; font-size: 13px; }
@media (max-width: 900px) { .cu-head { grid-template-columns: 1fr; } }

/* ---------- online orders (cashier) & QR page ---------- */
.tab-badge { font-style: normal; display: none; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 99px; padding: 0 5px; margin-inline-start: 4px; }
.tab-badge.on { display: inline-block; animation: pulse .8s infinite alternate; }
.online-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.on-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; border-top: 5px solid var(--blue); box-shadow: var(--shadow); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.on-card.pending { border-top-color: var(--red); background: #FFFBF8; } .on-card.accepted { border-top-color: var(--amber); } .on-card.ready { border-top-color: var(--green); }
.on-card.rejected, .on-card.completed { opacity: .6; border-top-color: var(--line); }
.on-card header { display: flex; justify-content: space-between; align-items: center; } .on-card .kno { font-size: 22px; }
.on-who a { color: var(--blue); margin-inline-start: 6px; } .on-when { font-size: 13.5px; }
.on-card ul { list-style: none; margin: 0; padding: 6px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); } .on-card li { padding: 3px 0; }
.on-total { font-size: 18px; font-weight: 800; }
.on-card footer { display: flex; gap: 6px; flex-wrap: wrap; }
.due { background: var(--line-2); border-radius: 6px; padding: 1px 7px; font-weight: 700; font-size: 12px; margin-inline-start: 6px; } .due.late { background: var(--red); color: #fff; }
.qr-split { grid-template-columns: 420px 1fr; }
.qr-poster { border: 3px solid var(--brand); border-radius: 22px; padding: 22px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 12px; background: #fff; }
.qp-logo { width: 210px; height: auto; } .qp-name { font-size: 22px; font-weight: 800; } .qp-title { font-size: 18px; font-weight: 800; color: var(--accent-d); }
.qp-qr { width: 260px; height: 260px; image-rendering: pixelated; } .qp-steps { font-weight: 700; } .qp-url { font-size: 12px; color: var(--muted); } .qp-foot { font-size: 12px; color: var(--muted); }
.howto { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; }
.mb { margin-bottom: 10px; }
@media (max-width: 900px) { .qr-split { grid-template-columns: 1fr; } }

/* ---------- dashboard sidebar: collapsible groups ---------- */
.nav-group { display: flex; flex-direction: column; }
.ng-head { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border: 0; background: none; color: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; border-radius: 10px; opacity: .9; text-align: start; }
.ng-head:hover { background: rgba(255,255,255,.06); }
.ng-chev { margin-inline-start: auto; transition: transform .15s; font-size: 12px; }
.nav-group.open .ng-chev { transform: rotate(180deg); }
.ng-items { display: none; flex-direction: column; gap: 2px; padding: 2px 10px 6px 0; border-right: 1px solid rgba(255,255,255,.12); margin-right: 22px; }
.nav-group.open .ng-items { display: flex; }
.ng-items a { padding: 8px 10px; font-size: 13.5px; }
body.mini .ng-head { display: none; } body.mini .ng-items { display: flex; border: 0; margin: 0; padding: 0; }
@media (max-width: 900px) { .ng-head { display: none; } .ng-items { display: flex; border: 0; margin: 0; padding: 0; } }
/* statements */
.statement .st-open td { background: var(--surface-2); }
@media print { .nav-group, .side { display: none !important; } }

/* ---------- cashier: ☰ menu ---------- */
.pos-menu-btn { width: 46px; height: 46px; border-radius: 12px; border: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 24px; cursor: pointer; flex-shrink: 0; }
.pos-menu-btn:active { background: var(--accent); }
.pos-sheet-back { position: fixed; inset: 0; z-index: 60; background: rgba(30,18,10,0); transition: background .18s; }
.pos-sheet-back.on { background: rgba(30,18,10,.45); }
.pos-sheet { position: absolute; top: 0; bottom: 0; right: 0; width: min(340px, 90vw); background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow-y: auto;
  transform: translateX(100%); transition: transform .18s ease-out; }
.pos-sheet-back.on .pos-sheet { transform: none; }
.pos-sheet header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--brand); color: #fff; } .pos-sheet header small { display: block; color: #E8D3BF; font-size: 12px; }
.pos-sheet header .x { margin-inline-start: auto; color: #fff; font-size: 20px; }
.ps-item { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border: 0; border-bottom: 1px solid var(--line-2); background: none; font-size: 16px; font-weight: 700; text-align: start; cursor: pointer; }
.ps-item span { font-size: 22px; width: 28px; text-align: center; } .ps-item:active { background: var(--accent-soft); } .ps-item.danger { color: var(--red); margin-top: auto; }
.inv-list { display: flex; flex-direction: column; gap: 6px; }
.inv { display: grid; grid-template-columns: 70px 60px 80px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: start; font-size: 15px; }
.inv:active { background: var(--accent-soft); }
label.check.big { font-size: 15px; } .chip.lg { padding: 10px 16px; font-size: 15px; }

/* ---------- on-screen number pad ---------- */
.touch-pad { position: fixed; left: 20px; bottom: 20px; z-index: 80; display: none; grid-template-columns: repeat(3, 76px); gap: 8px; padding: 12px; background: var(--brand); border-radius: 18px; box-shadow: var(--shadow-lg); direction: ltr; }
.touch-pad.on { display: grid; animation: pop .15s; }
.touch-pad button { height: 60px; border-radius: 12px; border: 0; background: #fff; font-size: 24px; font-weight: 700; cursor: pointer; }
.touch-pad button:active { background: var(--accent-soft); transform: scale(.96); }
.touch-pad .wide { grid-column: span 3; height: 48px; font-size: 16px; background: #EAD9C7; } .touch-pad .ok { background: var(--accent); color: #fff; }
.touch-pad.no-dot [data-k="."] { visibility: hidden; }
@media (max-width: 900px) { .touch-pad { left: 50%; transform: translateX(-50%); bottom: 10px; } }

/* ---------- touch mode (cashier app on a touch screen) ---------- */
body.touch { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
body.touch * { touch-action: manipulation; } /* no double-tap zoom */
body.touch input, body.touch textarea { -webkit-user-select: text; user-select: text; }
body.touch .product:hover { transform: none; }
body.touch .product:active { transform: scale(.96); background: var(--accent-soft); }
body.touch .products { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 14px; }
body.touch .p-name { font-size: 16px; } body.touch .p-price { font-size: 16px; }
body.touch .cats .chip { padding: 13px 22px; font-size: 16px; }
body.touch .search input { padding: 14px 0; font-size: 16px; }
body.touch .line { padding: 14px 8px; } body.touch .l-name { font-size: 15.5px; }
body.touch .qty button { width: 48px; height: 48px; font-size: 22px; } body.touch .qty.sm button { width: 42px; height: 40px; font-size: 18px; }
body.touch .qty span { min-width: 38px; font-size: 17px; }
body.touch .btn { padding: 12px 18px; } body.touch .btn.sm { padding: 10px 14px; font-size: 14px; } body.touch .btn.lg { padding: 17px 22px; font-size: 17px; }
body.touch .seg button { padding: 12px 16px; font-size: 15px; }
body.touch .opt { min-width: 100px; padding: 13px 16px; font-size: 15px; }
body.touch .pm { padding: 18px; } body.touch .chip { padding: 10px 16px; font-size: 15px; }
body.touch input, body.touch select { padding: 12px 13px; font-size: 16px; }
body.touch .pos-tabs a { padding: 12px 18px; font-size: 15px; }
body.touch .modal header .x { font-size: 22px; padding: 8px 12px; }
body.touch .cart { width: auto; } body.touch .pos-layout { grid-template-columns: 1fr 440px; }

/* login card, a bit bigger */
.login-card { width: min(390px, 100%); padding: 30px 30px 28px; }
.login .logo.xl { width: 72px; height: 72px; border-radius: 19px; }
.login-brand h1 { font-size: 26px; } .login-brand p { font-size: 14px; }
.login-card h2 { font-size: 20px; } .login-card > .muted { font-size: 14px; }
.login .pin-display { gap: 16px; margin: 4px 0 16px; } .login .pin-display span { width: 16px; height: 16px; }
.login .pinpad { grid-template-columns: repeat(3, 78px); gap: 11px; }
.login .pinpad button { height: 60px; font-size: 23px; border-radius: 15px; } .login .pinpad .ok { font-size: 16px; } .login .pinpad .muted { font-size: 15px; }

/* ---------- in-app camera ---------- */
.cam-back { position: fixed; inset: 0; z-index: 90; background: #000; display: flex; align-items: center; justify-content: center; }
.cam { width: 100%; height: 100%; display: flex; flex-direction: column; }
.cam-view { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; }
.cam-view video, .cam-view .cam-shot { max-width: 100%; max-height: 100%; object-fit: contain; }
.cam-msg { position: absolute; color: #fff; font-size: 18px; text-align: center; padding: 20px; max-width: 520px; line-height: 1.7; }
.cam-bar { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px; background: rgba(0,0,0,.85); flex-wrap: wrap; }
.cam-snap { width: 74px; height: 74px; border-radius: 50%; border: 5px solid #fff; background: var(--accent); cursor: pointer; box-shadow: 0 0 0 4px rgba(255,255,255,.25); }
.cam-snap:active { transform: scale(.92); } .cam-snap:disabled { opacity: .4; }
.cam-bar .btn.ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }

/* ---------- 🔔 online-orders notifications ---------- */
.notif-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 19px; cursor: pointer; flex-shrink: 0; filter: grayscale(.6); opacity: .75; }
.notif-btn.has { filter: none; opacity: 1; border-color: var(--red); }
.notif-btn i { position: absolute; top: -5px; left: -5px; font-style: normal; display: none; min-width: 20px; height: 20px; line-height: 20px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 800; }
.notif-btn.has i { display: block; }
.notif-btn.has { animation: bellpulse 1.6s infinite; } @keyframes bellpulse { 50% { box-shadow: 0 0 0 6px rgba(207,63,53,.18); } }
.notif-btn.ring { animation: bellring .9s; } @keyframes bellring { 10%, 30%, 50%, 70% { transform: rotate(-16deg); } 20%, 40%, 60%, 80% { transform: rotate(16deg); } }
.pos-bar .notif-btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
.pos-bar .notif-btn.has { background: #fff; border-color: #fff; }
.notif-panel { position: fixed; top: 66px; left: 16px; z-index: 70; width: min(380px, 92vw); max-height: 72vh; overflow-y: auto; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 10px; display: flex; flex-direction: column; gap: 6px; animation: pop .15s; }
.notif-panel header { display: flex; justify-content: space-between; align-items: center; padding: 6px 6px 8px; border-bottom: 1px solid var(--line-2); }
.notif-item { text-align: start; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.notif-item.pending { border-color: #F2B9A6; background: #FFF6F3; } .notif-item:active { background: var(--accent-soft); }
body.touch .notif-btn { width: 48px; height: 48px; font-size: 22px; } body.touch .notif-item { padding: 14px; }

/* ---- English (left-to-right): mirror the few rules that are tied to a side ---- */
[dir=ltr] .switch span::after { right: auto; left: 3px; } [dir=ltr] .switch input:checked + span::after { right: auto; left: 21px; }
[dir=ltr] #toasts { left: auto; right: 22px; }
[dir=ltr] .oos-tag { left: auto; right: 18px; }
[dir=ltr] .cart { border-right: 0; border-left: 1px solid var(--line); }
[dir=ltr] .timeline { border-right: 0; border-left: 2px solid var(--line); }
[dir=ltr] .timeline li::before { right: auto; left: -7px; }
[dir=ltr] .stockbar { margin-left: 0; margin-right: 8px; }
[dir=ltr] .pl .sub { padding-right: 0; padding-left: 18px; }
[dir=ltr] .p-thumb i { inset: auto auto 0 0; border-top-right-radius: 0; border-top-left-radius: 6px; }
[dir=ltr] .ng-items { padding: 2px 0 6px 10px; border-right: 0; border-left: 1px solid rgba(255,255,255,.12); margin-right: 0; margin-left: 22px; }
[dir=ltr] .pos-sheet { right: auto; left: 0; }
[dir=ltr] .touch-pad { left: auto; right: 20px; }
[dir=ltr] .notif-btn i { left: auto; right: -5px; }
[dir=ltr] .notif-panel { left: auto; right: 16px; }
@media (max-width: 900px) { [dir=ltr] .cart { border-left: 0; } [dir=ltr] .touch-pad { right: auto; left: 50%; } }
.lang-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 6px 10px; font-weight: 800; font-size: 12.5px; cursor: pointer; }
.login-card { position: relative; }
.login-card .lang-btn { position: absolute; top: 14px; inset-inline-end: 14px; }

/* payroll */
label.inline { display: flex; align-items: center; gap: 8px; font-weight: 700; } label.inline input { width: auto; }
.emp-head { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; margin-bottom: 12px; }
.emp-side { display: flex; flex-direction: column; gap: 8px; min-width: 190px; }
.pay-sum { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 6px 0 12px; }
.pay-sum > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.pay-sum span { font-size: 12px; color: var(--muted); } .pay-sum b { font-size: 17px; }
.pay-sum .tot { background: var(--surface); border-color: var(--brand); } .pay-sum .big b { font-size: 20px; color: var(--brand); }
.emp-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; } .emp-actions .btn { padding: 12px; font-size: 15px; }
tr.deleted td { opacity: .55; } tr.deleted td b { text-decoration: line-through; }
tr.sel td { background: var(--surface-2); font-weight: 700; }
@media (max-width: 900px) { .pay-sum { grid-template-columns: repeat(3, 1fr); } .emp-head { grid-template-columns: 1fr; } .emp-actions { grid-template-columns: 1fr 1fr; } }

/* suppliers */
.sup-card { cursor: pointer; } .sup-card:hover { border-color: var(--brand); }
.sup-head { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; margin-bottom: 12px; }
.sup-bal { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 220px; }
.sup-bal span { font-size: 12px; color: var(--muted); } .sup-bal b { font-size: 22px; } .sup-bal small { color: var(--muted); font-size: 11.5px; }
.sup-bal.due { border-color: var(--red); } .sup-bal.due b { color: var(--red); }
.inv-card { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; background: var(--surface); }
.inv-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; } .inv-head .grow { flex: 1; }
.inv-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.inv-sum > div { background: var(--surface-2); border-radius: 10px; padding: 6px 10px; display: flex; flex-direction: column; } .inv-sum span { font-size: 11.5px; color: var(--muted); } .inv-sum b { font-size: 16px; }
.inv-sum .due b { color: var(--red); }
.pay-row { display: grid; grid-template-columns: auto auto 1fr auto; gap: 10px; align-items: center; padding: 5px 8px; border-top: 1px dashed var(--line); font-size: 13.5px; }
.pay-row.deleted { opacity: .5; } .pay-row.deleted b { text-decoration: line-through; }
@media (max-width: 900px) { .sup-head { grid-template-columns: 1fr; } }

/* product sizes: price / cost / profit + recipe */
.v-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.v-grid label { margin: 0; } .v-grid input.ro { background: var(--surface-2); color: var(--ink-2); }
.v-profit { padding-bottom: 10px; white-space: nowrap; font-size: 13.5px; }
.v-grid .btn { margin-bottom: 4px; }
.v-recipe-title { font-weight: 800; margin: 4px 0 6px; }
.v-hint { background: var(--amber-soft); border-radius: 10px; padding: 8px 10px; margin: 4px 0 8px; color: #7a5304; }
@media (max-width: 900px) { .v-grid { grid-template-columns: 1fr 1fr; } }

/* stock count: shortage / overage */
tr.row-short td { background: var(--red-soft); } tr.row-over td { background: var(--green-soft); }
.count-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; flex-basis: 100%; font-size: 14px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); } .count-sum span { white-space: nowrap; }
.inv-sum small { font-size: 11px; color: var(--muted); } .inv-sum .ok b { color: var(--green); }

/* treasuries: cash drawer, Visa, wallet, safe, bank */
.treasuries { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px; }
.treas { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); border-top: 4px solid var(--line); }
.treas .tr-top { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink-2); } .treas .tr-ico { font-size: 20px; }
.treas b { font-size: 21px; } .treas small { color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.treas.drawer { border-top-color: var(--green); } .treas.card { border-top-color: var(--blue); } .treas.wallet { border-top-color: var(--violet); }
.treas.safe { border-top-color: var(--brand); } .treas.bank { border-top-color: var(--amber); }
.treas.live .tr-top::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-inline-start: auto; animation: trpulse 1.6s infinite; }
.treas.off { opacity: .7; }
.form-grid.nonc small { display: block; margin-top: 3px; font-weight: 700; }
@keyframes trpulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (max-width: 1100px) { .treasuries { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .treasuries { grid-template-columns: 1fr 1fr; } }

/* =====================================================================
   Polish layer: same colors, one consistent look across every screen
   ===================================================================== */
:root { --radius: 16px; --radius-sm: 10px; --h: 40px;
  --shadow: 0 1px 2px rgba(61,28,18,.05), 0 6px 18px rgba(61,28,18,.05); --shadow-hover: 0 2px 4px rgba(61,28,18,.06), 0 10px 26px rgba(61,28,18,.09); }
body { line-height: 1.5; }
h2 { font-size: 22px; font-weight: 800; letter-spacing: -.2px; } h3 { font-weight: 800; }
::selection { background: var(--accent-soft); }
* { scrollbar-width: thin; scrollbar-color: #D9CABA transparent; }

/* page frame */
#page { padding: 24px 28px 48px; }
#page > * { max-width: 1480px; margin-inline: auto; }
#page.page-pos > * { max-width: none; }
.page-head { margin-bottom: 20px; min-height: 40px; }
.page-head h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head h2 .muted { font-size: 13px; font-weight: 600; }
.sec { margin: 28px 0 12px; font-size: 15.5px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.sec .link { font-size: 12.5px; font-weight: 600; text-decoration: none; }

/* topbar */
.topbar { height: 64px; padding: 0 22px; gap: 12px; box-shadow: 0 1px 0 var(--line); border-bottom: 0; position: relative; z-index: 3; }
.tb-shift { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; gap: 8px; }
.tb-clock { flex: 1; text-align: center; font-weight: 600; color: var(--muted); }
.topbar .btn.sm, .topbar .lang-btn { height: 36px; padding: 0 14px; border-radius: 999px; }
.lang-btn { height: 36px; border-radius: 999px; padding: 0 14px; background: var(--surface-2); }
.lang-btn:hover { border-color: var(--accent); }
.tb-user { padding-inline-start: 12px; border-inline-start: 1px solid var(--line); }
.avatar { width: 36px; height: 36px; font-size: 15px; }
.notif-btn { width: 40px; height: 40px; }

/* sidebar */
.side { background: linear-gradient(180deg, var(--brand) 0%, #24150C 100%); }
.brand { padding: 20px 18px 18px; }
.nav { padding: 12px 10px; gap: 3px; }
.nav a { padding: 10px 12px; border-radius: 12px; opacity: .82; }
.nav a.on { box-shadow: 0 6px 16px rgba(232,131,58,.32); }
.ng-head { padding: 10px 12px; border-radius: 12px; opacity: .95; font-size: 13.5px; margin-top: 4px; }
.nav-group.open > .ng-head { background: rgba(255,255,255,.05); }
.ng-items { gap: 2px; padding-block: 4px 6px; }
.ng-items a { padding: 8px 12px; border-radius: 10px; font-size: 13.5px; }
.side-logout { margin: 10px; border-radius: 12px; padding: 11px 14px; }
.collapse { margin: 0 10px 10px; border-radius: 10px; }

/* cards & KPIs */
.card { border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.card.flush { padding: 0; } .card.flush .card-title { padding: 16px 20px 4px; }
.card-title { font-size: 15.5px; font-weight: 800; margin-bottom: 14px; }
.card.click:hover, .sup-card:hover { box-shadow: var(--shadow-hover); }
.kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 18px 20px; gap: 6px; border-radius: var(--radius); min-height: 112px; justify-content: center; }
.kpi small { font-size: 13px; } .kpi b { font-size: 28px; line-height: 1.15; }
.kpi.main { background: linear-gradient(135deg, var(--brand), #4A2E1C); box-shadow: 0 10px 26px rgba(61,28,18,.22); }
.grid-cards { gap: 16px; }
.split2 { gap: 18px; }
.split2 > .card { margin-bottom: 0; }

/* treasuries & finance */
.treasuries { gap: 14px; margin-bottom: 18px; }
.treas { border-radius: var(--radius); padding: 16px 18px; min-height: 118px; border-top-width: 4px; }
.treas b { font-size: 23px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.qa { flex-direction: row; padding: 10px 16px; border-radius: 999px; gap: 8px; font-size: 14px; box-shadow: var(--shadow); }
.qa span { font-size: 18px; }
.qa:hover { transform: none; box-shadow: var(--shadow-hover); }
.fin-strip { border-radius: var(--radius); padding: 14px 20px; box-shadow: var(--shadow); }

/* buttons & fields: one height everywhere */
.btn { min-height: var(--h); padding: 0 18px; border-radius: 12px; font-weight: 700; }
.btn.sm { min-height: 34px; padding: 0 13px; border-radius: 10px; font-size: 13px; }
.btn.lg { min-height: 48px; padding: 0 24px; border-radius: 14px; }
.btn.primary:hover:not(:disabled) { box-shadow: 0 6px 16px rgba(61,28,18,.2); }
.btn.ghost { border-color: var(--line); }
.btn.danger:hover:not(:disabled) { background: #B4322A; }
.btn.danger-t { background: transparent; }
input, select, textarea { min-height: var(--h); border-radius: var(--radius-sm); padding: 8px 12px; background: var(--surface); }
textarea { min-height: 80px; }
input[type=checkbox], input[type=radio] { min-height: 0; }
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: #DCCDBD; }
input[readonly] { background: var(--surface-2); }
label { gap: 6px; margin-bottom: 12px; }
.form-grid { gap: 0 16px; }
/* checkboxes inside form grids look like a field, lined up with the inputs next to them */
.form-grid > label.check { align-self: end; min-height: var(--h); margin-bottom: 12px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--ink); font-weight: 600; cursor: pointer; }
.form-grid > label.check:hover { border-color: var(--accent); }
.form-grid > div { margin-bottom: 12px; }
.chip-check { min-height: 38px; display: inline-flex; align-items: center; gap: 8px; }
.chip-check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.chip { min-height: 36px; display: inline-flex; align-items: center; }
.seg { border-radius: 12px; padding: 4px; } .seg button { min-height: 36px; border-radius: 9px; }
.tabs { border-radius: 14px; padding: 5px; box-shadow: var(--shadow); } .tabs button { min-height: 36px; border-radius: 10px; padding: 0 16px; }

/* tables */
.tbl th { font-size: 12.5px; padding: 12px 16px; letter-spacing: .1px; }
.tbl td { padding: 12px 16px; }
.tbl tbody tr { transition: background .12s; }
.tbl.click tbody tr:hover, .tbl tbody tr:hover { background: #FDFAF6; }
.tbl.compact th { padding: 8px 10px; } .tbl.compact td { padding: 8px 10px; }
.card.flush > .tbl th:first-child, .card.flush > .tbl td:first-child { padding-inline-start: 20px; }

/* toolbar / filters / banners / empty states */
.toolbar { margin-bottom: 16px; gap: 12px; }
.filters { padding: 16px 18px 4px; gap: 14px; }
.filters label { min-width: 160px; }
.banner { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid transparent; }
.banner.warn { border-color: #F4DDAE; } .banner.info { border-color: #C9DBF5; }
.empty { padding: 48px 20px; } .empty-ico { font-size: 44px; opacity: .55; }

/* modals */
.modal-back { background: rgba(30,18,10,.5); }
.modal { border-radius: 22px; }
.modal header { padding: 18px 22px; } .modal header h3 { font-size: 17px; }
.modal-body { padding: 20px 22px; }
.modal footer { padding: 14px 22px; background: var(--surface-2); border-radius: 0 0 22px 22px; }
.modal footer .btn { min-height: 42px; }
.modal h4 { font-size: 15px; margin: 18px 0 10px; }

/* badges */
.badge { padding: 3px 11px; font-size: 12px; line-height: 1.5; }

/* settings: cards in one column with the save button floating at the bottom */
.settings .card, .settings-card { max-width: 1000px; margin-inline: auto; margin-bottom: 18px; }
.sticky-save { max-width: 1000px; margin: 0 auto; display: flex; justify-content: flex-end; padding: 16px 0 4px; }
.sticky-save .btn { box-shadow: 0 8px 24px rgba(61,28,18,.25); }

/* POS keeps its own compact layout */
.pos-layout .btn { min-height: 0; }
.pos-layout .btn.pay, .pos-layout .btn.lg { min-height: 50px; }
.pos-layout input { min-height: 38px; }
.pos-bar .btn, .pos-bar .lang-btn { min-height: 36px; }

@media (max-width: 900px) {
  #page { padding: 16px 14px 40px; }
  .topbar { padding: 0 12px; gap: 8px; } .tb-clock { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; } .kpi b { font-size: 22px; } .kpi { min-height: 96px; }
}

/* cashier top bar: dark, compact, tabs get the room */
.pos-bar { height: 62px; gap: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.pos-bar .topbar { padding: 0; gap: 8px; box-shadow: none; flex: 0 0 auto; }
.pos-bar .tb-shift { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); color: #F3E3D2; padding: 5px 12px; font-size: 12.5px; }
.pos-bar .tb-user { border: 0; padding: 0; } .pos-bar .tb-user small { display: none; }
.pos-bar .lang-btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.pos-tabs { flex: 1 1 0; min-width: 0; scrollbar-width: none; } .pos-tabs::-webkit-scrollbar { display: none; }
.pos-tabs a { padding: 8px 13px; border-radius: 11px; }
@media (max-width: 1280px) { .pos-bar .tb-user > div:last-child { display: none; } .pos-bar .tb-shift .since { display: none; } }
.nav { overflow-x: hidden; } .nav a, .ng-head { white-space: normal; } .nav .nl { min-width: 0; line-height: 1.35; }
.sticky-save { pointer-events: none; } .sticky-save .btn { pointer-events: auto; }
.tb-shift { white-space: nowrap; }
@media (max-width: 1000px) { .tb-shift .since, .topbar .tb-user > div:last-child { display: none; } .tb-user { border: 0; padding: 0; } }

/* payroll board */
.pr-board { display: grid; grid-template-columns: minmax(260px, 1fr) 2.6fr; gap: 14px; margin-bottom: 18px; }
.pr-main { background: linear-gradient(135deg, var(--brand), #4A2E1C); color: #fff; border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 10px 26px rgba(61,28,18,.22); }
.pr-main small { color: #E8D3BF; font-weight: 600; font-size: 13px; } .pr-main > b { font-size: 32px; font-weight: 800; letter-spacing: -.5px; } .pr-main .cur { color: #E8D3BF; }
.pr-count { color: #F3E3D2; font-weight: 700; font-size: 13.5px; margin-bottom: auto; }
.pr-progress { height: 8px; background: rgba(255,255,255,.15); border-radius: 99px; overflow: hidden; margin-top: 14px; } .pr-progress i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.pr-prog-l { display: flex; justify-content: space-between; font-size: 12.5px; color: #E8D3BF; font-weight: 600; }
.pr-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pr-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); min-width: 0; }
.pr-tile > span { font-size: 12.5px; color: var(--muted); font-weight: 700; } .pr-tile b { font-size: 20px; font-weight: 800; } .pr-tile small { font-size: 11.5px; color: var(--muted); }
.pr-tile.pos b { color: var(--green); } .pr-tile.neg b, .pr-tile.due b { color: var(--red); } .pr-tile.ok b { color: var(--green); }
.pr-tile.strong { border-color: var(--brand); background: var(--surface-2); } .pr-tile.due { border-color: #F2C3BE; background: #FFF8F7; }
.pr-status > div { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; } .pr-status .badge { font-size: 11px; padding: 2px 8px; }
.pr-table th.n, .pr-table td.n { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pr-table tfoot td { background: var(--surface-2); font-weight: 800; border-top: 2px solid var(--line); padding-top: 14px; padding-bottom: 14px; }
.pr-table tr.off td { opacity: .55; }
@media (max-width: 1100px) { .pr-board { grid-template-columns: 1fr; } .pr-tiles { grid-template-columns: repeat(2, 1fr); } }

/* shift: click a treasury to see its invoices; invoices section */
.clickable { cursor: pointer; transition: background .12s, border-color .12s, box-shadow .12s; }
.card.clickable:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); }
.pb.clickable { border-radius: 10px; padding: 4px 6px; margin: 0 -6px; } .pb.clickable:hover, .grand.clickable:hover { background: var(--accent-soft); }
.grand.clickable { border-radius: 8px; padding-inline: 6px; margin-inline: -6px; }
.go { font-size: 12px; font-weight: 700; color: var(--accent-d); margin-inline-start: 6px; }
.card-title .go { margin-inline-start: auto; }
.sh-inv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px 10px; }
.sh-inv-head .card-title { padding: 0 !important; margin: 0; }
.chip .cnt { background: rgba(0,0,0,.08); border-radius: 99px; padding: 0 7px; font-size: 11.5px; margin-inline-start: 4px; } .chip.on .cnt { background: rgba(255,255,255,.2); }
.sh-inv th.n, .sh-inv td.n { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sh-inv tfoot td { background: var(--surface-2); font-weight: 800; border-top: 2px solid var(--line); }
.rf-from { margin-top: 6px; } .rf-from button { font-size: 13px; padding-inline: 6px; }

/* settings: title + save button pinned at the top while scrolling */
#page > .page-head.sticky-head { position: sticky; top: -24px; z-index: 6; background: var(--bg); margin: -24px -28px 20px; padding: 18px 28px 14px; box-shadow: 0 1px 0 var(--line); max-width: none; }
@media (max-width: 900px) { #page > .page-head.sticky-head { top: -16px; margin: -16px -14px 16px; padding: 12px 14px; } }

/* invoices page */
.inv-chips { margin: -4px 0 14px; }
.inv-tbl th.n, .inv-tbl td.n { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-tbl tfoot td { background: var(--surface-2); font-weight: 800; border-top: 2px solid var(--line); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; } .stat-row .stat { min-width: 0; }

/* brand: the DopaBeans word logo at the top of the sidebar / cashier bar */
.brand.brand-word { justify-content: center; padding: 18px 16px 14px; }
.brand.brand-word > .logo { display: none; }
.brand.brand-word > div:last-child { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.brand.brand-word img { display: block; width: 158px; height: auto; }
.brand.brand-word small { opacity: .65; font-size: 11.5px; letter-spacing: .3px; }
body.mini .brand.brand-word > .logo { display: grid; }
.pos-bar .brand.brand-word { padding: 0; }
.pos-bar .brand.brand-word img { width: 118px; }
.pos-bar .brand.brand-word small { display: none; }

/* =====================================================================
   SVG icons (replace the emojis): line icons that take the text color
   ===================================================================== */
.ic { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.22em; flex-shrink: 0; stroke-width: 1.8; }
.btn .ic, .chip .ic, .qa .ic, .tabs .ic, .seg .ic { width: 1.1em; height: 1.1em; }
.ni .ic { width: 20px; height: 20px; vertical-align: middle; }
.nav a .ni, .ng-head .ni { display: inline-grid; place-items: center; width: 22px; }
.nav a.on .ic { stroke-width: 2.1; }
.empty-ico .ic { width: 52px; height: 52px; stroke-width: 1.4; color: var(--muted); opacity: .8; }
.kpi small .ic, .stat small .ic, .pr-tile > span .ic { color: var(--accent-d); margin-inline-end: 2px; }
.card-title .ic, .sec .ic, .page-head h2 .ic { color: var(--accent-d); }
.page-head h2 .ic { width: 1.05em; height: 1.05em; }
.treas .tr-ico .ic { width: 22px; height: 22px; }
.treas.drawer .tr-ico { color: var(--green); } .treas.card .tr-ico { color: var(--blue); } .treas.wallet .tr-ico { color: var(--violet); }
.treas.safe .tr-ico { color: var(--brand); } .treas.bank .tr-ico { color: var(--amber); }
.qa .ic { color: var(--accent-d); }
.badge .ic { width: 1em; height: 1em; vertical-align: -0.15em; }
.notif-btn .ic { width: 20px; height: 20px; }
.icon-btn .ic { width: 18px; height: 18px; }
.neg .ic, .pos .ic { color: inherit; }
/* product tiles without a photo: a large line icon on the cream tile */
.p-thumb .ic, .product .ic, .o-item .ic { stroke-width: 1.4; color: #A0703F; }
@media print { .ic { stroke-width: 2; } }

/* =====================================================================
   UX polish (ECC): designed focus / press states, loading, motion, numbers
   ===================================================================== */
:root { --ease: cubic-bezier(.16, 1, .3, 1); --focus: 0 0 0 3px rgba(232,131,58,.35); }
body { font-variant-numeric: tabular-nums; }
/* keyboard & touch focus: visible ring on everything you can press */
:where(button, a, [tabindex], .chip, .qa, .product, .o-item, .pb.clickable, .card.clickable, tr[data-id], tr[data-oid], tr[data-eid]):focus-visible { outline: none; box-shadow: var(--focus); border-radius: 12px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { box-shadow: var(--focus); }
/* press feedback */
.btn:active:not(:disabled), .chip:active, .qa:active, .product:active, .o-item:active { transform: scale(.97); }
.btn, .chip, .qa, .product, .o-item { transition: transform .12s var(--ease), background .15s, box-shadow .2s, border-color .15s; }
.product:hover, .card.click:hover, .treas:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.treas { transition: transform .2s var(--ease), box-shadow .2s; }
/* page change: content eases in */
#page > * { animation: pageIn .32s var(--ease) both; }
#page > *:nth-child(2) { animation-delay: .03s; } #page > *:nth-child(3) { animation-delay: .06s; } #page > *:nth-child(4) { animation-delay: .09s; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#page.page-pos > * { animation: none; }
/* loading: a spinner instead of "..." */
.loading { font-size: 0; display: grid; place-items: center; min-height: 160px; padding: 40px; }
.loading::after { content: ''; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* tables: zebra-free, but the hovered row is clearly the one you'll open */
.tbl.click tbody tr:hover td { background: #FDF6EE; }
.tbl.click tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
[dir=rtl] .tbl.click tbody tr:hover td:first-child { box-shadow: inset -3px 0 0 var(--accent); }
/* empty states feel like part of the design */
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-ico { width: 84px; height: 84px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; margin-bottom: 4px; opacity: 1; }
.empty p { max-width: 420px; line-height: 1.6; }
/* product icon picker */
.icon-field { margin-bottom: 12px; }
.icon-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.icon-pick button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; font-size: 22px; color: #A0703F; }
.icon-pick button:hover { border-color: var(--accent); }
.icon-pick button.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--focus); }
.icon-pick .ic { width: 24px; height: 24px; stroke-width: 1.6; }
.p-photo-box .ic { width: 64px; height: 64px; stroke-width: 1.3; color: #A0703F; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* =====================================================================
   Accessibility pass (design review): WCAG AA contrast, labels, targets
   ===================================================================== */
/* secondary text and the dark orange used for prices/links reach 4.5:1 on white and cream */
:root { --muted: #76665A; --accent-d: #A85216; --accent-h: #F0924F;
  --green: #1B7A4F; --blue: #2865BA; --violet: #6A45B5; --red: #BC3329; }
.st-preparing { color: #875703; }
/* orange fills carry espresso text (6:1) instead of white (2.7:1) — still the brand's orange + brown */
.btn.pay, .nav a.on, .pos-tabs a.on, .pinpad .ok, .login .pinpad .ok, .touch-pad .ok, .hb:first-child .hb-rank { color: var(--brand); }
.btn.pay:hover:not(:disabled) { background: var(--accent-h); }
.nav a.on .ic, .pos-tabs a.on .ic { color: var(--brand); }
/* count bubbles inside filter chips stay readable when the chip is selected */
.chip { gap: 6px; } .chip .cnt { color: inherit; border: 0; margin-inline-start: 0; }
/* dialog close button: a comfortable finger target */
.modal header .icon-btn.x { min-width: 40px; min-height: 40px; display: inline-grid; place-items: center; border-radius: 10px; }
/* touch screens: category rows scroll by swiping, no thin scrollbar line under them */
@media (hover: none) { .cats, .o-cats { scrollbar-width: none; } .cats::-webkit-scrollbar, .o-cats::-webkit-scrollbar { display: none; } }
/* cashier: products without a photo get a shorter icon band, so more items fit on screen without scrolling */
.product .p-img:not(:has(img)) { aspect-ratio: auto; height: 72px; }

/* low-stock alerts with what to reorder */
.alerts.reorder li { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.alerts.reorder li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.alerts.reorder .ro-sug { align-items: flex-end; text-align: end; } .alerts.reorder .ro-sug b { color: var(--accent-d); }

/* settings: receipt / kitchen ticket editor with live paper previews */
.printer-test { align-self: end; }
/* attendance: the clock in / out button under the login pad, and the welcome / goodbye message */
.login-card .att-btn { margin-top: 14px; width: 100%; }
.att-done { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 6px 8px; text-align: center; }
.att-done b { font-size: 22px; } .att-done span { font-size: 17px; } .att-done small { font-size: 14px; font-weight: 700; }
.att-done.in b { color: var(--ok, #2e7d32); } .att-done.out b { color: var(--brand, #3D1C12); }
/* the staff attendance page on their phones (/attend) */
.attend-page { background: #3D1C12; min-height: 100vh; margin: 0; display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.attend { background: var(--bg, #F9E7D7); border-radius: 26px; padding: 26px 22px 22px; width: min(400px, 100%); display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: 0 30px 80px rgba(0,0,0,.4); text-align: center; }
.attend-logo { width: 60%; max-width: 210px; height: auto; }
.attend h1 { font-size: 22px; margin: 6px 0 0; }
.attend-clock { font-size: 30px; font-weight: 800; color: #3D1C12; margin-bottom: 8px; direction: rtl; }
.attend #att-box { width: 100%; display: flex; flex-direction: column; align-items: center; }
.attend .pinpad { width: 100%; }
.att-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; margin: 10px 0 6px; }
.att-pick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 150px; border: 0; border-radius: 20px;
  font: inherit; font-size: 24px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 20px rgba(61,28,18,.15); transition: transform .08s; }
.att-pick span { font-size: 40px; }
.att-pick:active { transform: scale(.97); }
.att-pick.in { background: #2e7d32; color: #fff; }
.att-pick.out { background: #3D1C12; color: #F9E7D7; }
.att-step { font-size: 20px; font-weight: 800; padding: 6px 18px; border-radius: 999px; margin-bottom: 4px; }
.att-step.in { background: #e3f2e4; color: #2e7d32; } .att-step.out { background: #f1e1d3; color: #3D1C12; }
.attend .att-back { margin-top: 12px; }
/* attendance QR card on the QR page */
.att-qr { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.att-qr img { width: 150px; height: 150px; border: 1px solid #e3cdb8; border-radius: 10px; padding: 6px; background: #fff; }
/* the employee file: header with the person, a toolbar, then each part in its own card */
.ef-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 4px 2px 14px; }
.ef-id { display: flex; align-items: center; gap: 14px; }
.ef-id h3 { margin: 0; font-size: 22px; }
.ef-avatar { width: 58px; height: 58px; font-size: 24px; }
.ef-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ef-month { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); min-width: 170px; }
.ef-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; margin-bottom: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; }
.ef-tools .btn { padding: 8px 14px; }
.ef-two { display: grid; grid-template-columns: 1fr 1.25fr; gap: 14px; }
@media (max-width: 900px) { .ef-two { grid-template-columns: 1fr; } }
.ef-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; }
.ef-sec > h4 { margin: 0 0 12px; font-size: 15px; }
.ef-sec .pay-sum { margin-top: 0; }
.ef-sec .emp-actions { margin-bottom: 0; }
.ef-empty { margin: 4px 0; }
.ef-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.ef-fact { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.ef-fact span { font-size: 12px; color: var(--muted); } .ef-fact b { font-size: 14.5px; }
.ef-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 700px) { .ef-week { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ef-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px; border-radius: 12px; font-size: 12px; text-align: center; }
.ef-day b { font-size: 12.5px; margin-bottom: 2px; }
.ef-day.on { background: #EEF6EE; border: 1px solid #CFE6D0; color: #1F5E23; }
.ef-day.off { background: var(--surface-2); border: 1px dashed var(--line); }
/* payroll: attendance table and the weekly schedule grid */
.att-sched { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 10px; align-items: center; }
.att-sched input[type=time] { min-width: 0; }
.att-sched .off input[type=time] { opacity: .4; }
.att-late { color: var(--danger, #c62828); font-weight: 700; }
.settings .steps { margin: 4px 0 12px; padding-inline-start: 20px; line-height: 1.9; }
.settings .tg-actions { gap: 8px; align-items: center; margin-top: 10px; }
.rc-edit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; }
.rc-fields { grid-template-columns: 1fr 1fr; }
.rc-previews { display: flex; gap: 12px; }
.rc-previews figure { margin: 0; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.rc-previews figcaption { font-weight: 700; font-size: 13px; color: var(--ink-2); }
.rc-previews iframe { width: 300px; height: 560px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
@media (max-width: 1250px) { .rc-edit { grid-template-columns: 1fr; } .rc-previews { flex-wrap: wrap; justify-content: center; } }

/* the approved DopaBeans wordmark on the login card */
.login-word { margin: 0; line-height: 0; } .login-word img { display: block; width: 200px; max-width: 70%; height: auto; margin: 0 auto 4px; }

/* product options (size / type / add-ons): one per row, name at the start, price at the end, a check circle */
.opts { flex-direction: column; flex-wrap: nowrap; gap: 8px; }
.opt, body.touch .opt { width: 100%; min-width: 0; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; text-align: start; font-size: 14.5px; }
.opt::before { content: ''; order: -1; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); transition: .12s; }
.opt b { flex: 1; font-weight: 700; line-height: 1.35; }
.opt small { flex-shrink: 0; font-size: 13.5px; font-weight: 700; direction: ltr; }
.opt.on::before { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 5px, var(--surface) 6px); }
.opt:hover:not(.on) { border-color: var(--accent-soft); background: var(--surface-2); }

/* happy hour: tiles at the cashier */
.product.has-offer { position: relative; border-color: var(--accent); }
.p-offer { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 1; background: var(--accent); color: #fff; font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 999px; box-shadow: 0 2px 8px rgba(232,131,58,.35); }
.p-price s, .o-price s { color: var(--muted); font-weight: 600; font-size: .82em; }
/* happy hour admin page */
.of-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.of-card { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); }
.of-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); } .of-card.off { opacity: .65; }
.of-top { display: flex; justify-content: space-between; align-items: center; }
.of-pct { font-size: 26px; font-weight: 900; color: var(--accent-d); direction: ltr; }
.of-st { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.of-st.on { background: var(--green-soft); color: var(--green); } .of-st.wait { background: var(--amber-soft); color: var(--amber); }
.of-rows { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.of-rows > div { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.of-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line-2); }
.danger-t { color: var(--red); }
.of-pick { display: flex; flex-wrap: wrap; gap: 6px; max-height: 210px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); margin-top: 8px; }
.of-dates { margin: 10px 0; } .of-dates summary { cursor: pointer; font-weight: 700; color: var(--ink-2); }
#f-of .lbl { margin: 12px 0 6px; font-weight: 700; } #f-of .checks { display: flex; flex-wrap: wrap; gap: 6px; }
.p-offer, .o-offer { direction: ltr; unicode-bidi: isolate; }
#f-of .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } #f-of .chip-check { white-space: nowrap; }
