/* ABUSHHIWA POS — counter blue, receipt paper, register green */
:root {
  --ink: #1d2b4f;
  --ink-2: #2b3c66;
  --ink-3: #8fa0c7;
  --bg: #e9edf3;
  --paper: #ffffff;
  --line: #d5dbe5;
  --line-2: #e7ebf1;
  --text: #17203a;
  --muted: #5d6882;
  --go: #0d8a5d;
  --go-2: #0a6f4a;
  --go-soft: #e3f4ec;
  --warn: #a8690f;
  --warn-soft: #fbf1df;
  --bad: #bf3426;
  --bad-soft: #fbe9e6;
  --info: #2d5bc9;
  --info-soft: #e7eefc;
  --r: 10px;
  --r-sm: 6px;
  --side-w: 92px;
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
#app { height: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--info); }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 1.5rem; font-weight: 600; }
h2 { font-size: 1.1rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--info) 55%, transparent); outline-offset: 2px; }
.ic { flex: none; vertical-align: middle; }
.hint { color: var(--muted); font-size: .9rem; margin: .25rem 0; }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; direction: ltr; unicode-bidi: isolate; }
.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--bad); font-weight: 600; }
.warn { color: var(--warn); font-weight: 600; }
.ok-text { color: var(--go-2); font-weight: 600; }
.err-text { color: var(--bad); }
.danger-text { color: var(--bad) !important; }
.lead { color: var(--muted); max-width: 70ch; margin: 0 0 1.25rem; }
.opt { color: var(--muted); font-weight: 400; font-size: .85em; }
kbd { font: 600 .72rem var(--font); padding: 1px 6px; border-radius: 4px; background: rgba(255,255,255,.18); margin-inline-start: .4rem; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 42px; padding: 0 1rem; border-radius: var(--r-sm);
  border: 1px solid transparent; background: var(--paper); cursor: pointer;
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--ink-2); }
.btn.ghost { background: var(--paper); border-color: var(--line); color: var(--text); }
.btn.ghost:hover:not(:disabled) { border-color: var(--ink-3); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.small { min-height: 34px; padding: 0 .7rem; font-size: .88rem; }
.btn.big { min-height: 50px; font-size: 1.05rem; width: 100%; }
.btn.pay { background: var(--go); color: #fff; min-height: 64px; font-size: 1.35rem; width: 100%; border-radius: var(--r); }
.btn.pay:hover:not(:disabled) { background: var(--go-2); }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid #fff; border-inline-end-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.ghost.loading::after { border-color: var(--ink); border-inline-end-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--line-2); color: var(--text); }
.danger-ic:hover { color: var(--bad); background: var(--bad-soft); }
.link { border: 0; background: none; padding: 0; color: var(--info); cursor: pointer; font-weight: 500; }
.file-btn { cursor: pointer; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .75rem; }
.pill { display: inline-block; padding: 0 .5rem; border-radius: 99px; background: var(--info-soft); color: var(--info); font-size: .78rem; font-weight: 600; line-height: 1.6; }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.red { background: var(--bad-soft); color: var(--bad); }

/* ---------- forms ---------- */
.form { display: grid; gap: .9rem; }
.form label, label.field { display: grid; gap: .3rem; font-weight: 500; font-size: .92rem; }
:where(input:not([type=checkbox]):not([type=radio]), select, textarea) {
  width: 100%; min-height: 42px; padding: .45rem .7rem;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--info); box-shadow: 0 0 0 3px var(--info-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.input-row { display: flex; gap: .4rem; align-items: center; }
.check { display: flex !important; align-items: center; gap: .5rem; font-weight: 500; cursor: pointer; grid-template-columns: none !important; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.grow { flex: 1; }
details summary { cursor: pointer; color: var(--info); font-weight: 500; margin-bottom: .6rem; }
details[open] { display: grid; gap: .9rem; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--line-2); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: .4rem .85rem; border-radius: 4px; font-weight: 500; font-size: .92rem; }
.seg input:checked + span { background: var(--paper); box-shadow: 0 1px 2px rgba(23,32,58,.15); font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid var(--info-soft); }
.inline-form { display: flex; gap: .6rem; }
.inline-form input { font-variant-numeric: tabular-nums; letter-spacing: .04em; direction: ltr; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); }
.auth-brand { background: var(--ink); color: #dfe6f5; padding: 3rem clamp(1.5rem, 5vw, 4.5rem); display: flex; flex-direction: column; gap: 1.4rem; justify-content: center; }
.brand-row { display: flex; align-items: center; gap: .7rem; }
.brand-row .logo svg rect { fill: #fff; }
.brand-row .logo svg path:first-of-type { fill: var(--ink); }
.wordmark { font-weight: 500; letter-spacing: .06em; color: #fff; font-size: 1.05rem; direction: ltr; }
.wordmark b { color: #7fe0b6; font-weight: 700; }
.auth-brand h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 600; color: #fff; max-width: 18ch; }
.auth-sub { max-width: 52ch; margin: 0; color: #c3cde3; font-size: 1.05rem; }
.receipt-demo {
  background: var(--paper); color: var(--text); width: min(340px, 100%); padding: 1rem 1.1rem 1.4rem;
  font-variant-numeric: tabular-nums; border-radius: 4px 4px 0 0;
  -webkit-mask: linear-gradient(#000 0 0) top/100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/14px 10px repeat-x;
          mask: linear-gradient(#000 0 0) top/100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/14px 10px repeat-x;
  transform: rotate(-1.2deg);
}
[dir=rtl] .receipt-demo { transform: rotate(1.2deg); }
.rd-line, .rd-total { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.rd-total { border: 0; font-weight: 700; font-size: 1.1rem; padding-top: .6rem; }
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.features li { display: flex; gap: .6rem; align-items: center; }
.features .ic { color: #7fe0b6; }
.plans-line { color: #c3cde3; font-size: .95rem; }
.plans-line p { margin: 0 0 .5rem; }
.plans-line ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.6rem; flex-wrap: wrap; }
.plans-line li { display: grid; }
.plans-line b { color: #fff; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.auth-form { background: var(--paper); padding: 2rem clamp(1.25rem, 4vw, 3.5rem) 3rem; display: flex; flex-direction: column; justify-content: center; }
.auth-form .form { max-width: 460px; width: 100%; margin-inline: auto; }
.auth-top { display: flex; justify-content: flex-end; margin-bottom: 1rem; }
.tabs { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--line); margin: 0 auto 1.4rem; max-width: 460px; width: 100%; }
.tabs button { border: 0; background: none; padding: .6rem 0; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; font-size: 1.05rem; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--go); }
.lang-btn { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: .3rem .8rem; cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--text); }
.notice { display: flex; gap: .5rem; align-items: center; padding: .7rem .9rem; border-radius: var(--r-sm); margin: 0 auto 1rem; max-width: 460px; width: 100%; }
.page .notice { max-width: none; }
.notice.warn { background: var(--warn-soft); color: #6f4a0c; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); height: 100%; }
.side { background: var(--ink); display: flex; flex-direction: column; align-items: stretch; padding: .8rem .45rem; gap: .25rem; overflow-y: auto; }
.side-brand { display: grid; place-items: center; padding: .2rem 0 .9rem; }
.side-brand svg rect { fill: #fff; }
.side-brand svg path:first-of-type { fill: var(--ink); }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .65rem .2rem; border-radius: var(--r-sm); color: #b8c3dc; text-decoration: none; font-size: .78rem; font-weight: 500; text-align: center; }
.nav-item:hover { background: var(--ink-2); color: #fff; }
.nav-item.on { background: #fff; color: var(--ink); }
.main { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.top { display: flex; align-items: center; gap: 1rem; padding: .55rem 1.25rem; background: var(--paper); border-bottom: 1px solid var(--line); min-height: 58px; flex-wrap: wrap; }
.top-title { font-size: 1.05rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: .5rem; }
.banner { padding: .3rem .8rem; border-radius: 99px; font-size: .88rem; font-weight: 600; text-decoration: none; display: inline-flex; gap: .35rem; align-items: center; }
.banner.info { background: var(--info-soft); color: var(--info); }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.status { display: inline-flex; align-items: center; gap: .35rem; border: 0; background: none; cursor: pointer; font-size: .85rem; font-weight: 500; padding: .3rem .5rem; border-radius: var(--r-sm); }
.status.on { color: var(--go-2); }
.status.off { color: var(--bad); }
.status:hover { background: var(--line-2); }
#view { flex: 1; min-height: 0; overflow-y: auto; outline: none; }
.shell { overflow: hidden; }

/* ---------- pages ---------- */
.page { padding: 1.5rem clamp(1rem, 3vw, 2rem) 3rem; max-width: 1200px; }
.page.narrow { max-width: 820px; }
.page-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-head .count { color: var(--muted); font-weight: 400; font-size: 1rem; }
.head-actions { margin-inline-start: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.toolbar { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar select { width: auto; min-width: 170px; }
.search { position: relative; flex: 1; min-width: 220px; }
.search .ic { position: absolute; inset-inline-start: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-inline-start: 2.3rem; }
.custom { display: flex; align-items: center; gap: .4rem; }
.custom input { width: auto; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem 1.3rem; margin-bottom: 1rem; }
.panel > h2 { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.panel h2.mt { margin-top: 1.2rem; }
.sub-panel { margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--line-2); }
.sub-panel h3 { display: flex; gap: .4rem; align-items: center; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.two-col .panel { margin: 0 0 1rem; }

.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.panel .table-wrap { border: 0; margin-top: .4rem; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: start; font-size: .82rem; font-weight: 600; color: var(--muted); padding: .65rem .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: #f7f9fc; }
.tbl th.num { text-align: end; }
.tbl td { padding: .6rem .8rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #f8fafd; }
.tbl td small.alt { display: block; color: var(--muted); }
.tbl.compact td { padding: .45rem .3rem; }
.tbl tr.voided td { color: var(--muted); text-decoration: line-through; }
.tbl tr.voided td:last-child, .tbl tr.voided .pill { text-decoration: none; }
.row-actions { display: flex; gap: .2rem; justify-content: flex-end; align-items: center; white-space: nowrap; }
td.row-actions { display: table-cell; text-align: end; }
td.row-actions > * { vertical-align: middle; }
.empty-cell { text-align: center; padding: 3rem 1rem !important; color: var(--muted); }
.big-hint { font-size: 1.2rem; font-weight: 600; color: var(--text); margin: .5rem 0 .2rem; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 1rem; }
.stat { background: var(--paper); padding: 1rem 1.1rem; display: grid; gap: .15rem; }
.stat span { color: var(--muted); font-size: .88rem; }
.stat strong { font-size: 1.45rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: .78rem; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: .8rem; }
.bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; min-width: 0; }
.bar span { width: 100%; max-width: 36px; background: var(--ink); border-radius: 3px 3px 0 0; }
.bar:hover span { background: var(--go); }
.bar small { font-size: .7rem; color: var(--muted); direction: ltr; }

/* ---------- sell screen ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; padding: 1rem; height: 100%; }
.pos-main { display: flex; flex-direction: column; min-height: 0; gap: .75rem; }
.scanbar { position: relative; display: flex; align-items: center; gap: .3rem; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r); padding: .3rem .35rem; }
.scan-ic { color: var(--ink); padding-inline: .5rem .2rem; display: grid; }
.scanbar input { border: 0 !important; box-shadow: none !important; font-size: 1.15rem; min-height: 48px; background: transparent; }
.suggest { position: absolute; top: calc(100% + 4px); inset-inline: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 10px 30px rgba(23,32,58,.18); z-index: 20; overflow: hidden; }
.suggest button { display: flex; width: 100%; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border: 0; background: none; cursor: pointer; text-align: start; border-bottom: 1px solid var(--line-2); }
.suggest button:hover, .suggest button.on { background: var(--info-soft); }
.s-price { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }

/* the receipt strip */
.strip {
  flex: 1; min-height: 0; overflow-y: auto; background: var(--paper);
  border-radius: var(--r) var(--r) 0 0; padding: .3rem 0 1.4rem;
  -webkit-mask: linear-gradient(#000 0 0) top/100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/16px 10px repeat-x;
          mask: linear-gradient(#000 0 0) top/100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/16px 10px repeat-x;
}
.strip-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); padding: 2rem; }
.strip-empty .ic { color: var(--ink-3); }
.strip-head, .lines li { display: grid; grid-template-columns: minmax(0, 1fr) 132px 110px 110px 40px; gap: .6rem; align-items: center; padding: 0 1rem; }
.strip-head { position: sticky; top: 0; background: var(--paper); font-size: .8rem; color: var(--muted); font-weight: 600; padding-block: .55rem; border-bottom: 1px solid var(--line); z-index: 1; }
.strip-head span:nth-child(n+3) { text-align: end; }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { padding-block: .55rem; border-bottom: 1px dashed var(--line); }
.lines li.flash { animation: flash .6s ease-out; }
@keyframes flash { from { background: var(--go-soft); } to { background: transparent; } }
.l-name { min-width: 0; display: grid; }
.l-name strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-name small { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.l-qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.qbtn { border: 0; background: var(--line-2); width: 36px; height: 38px; display: grid; place-items: center; cursor: pointer; color: var(--text); }
.qbtn:hover { background: var(--line); }
.l-qty input.qin { border: 0 !important; min-height: 38px; text-align: center; padding: 0 .2rem; font-weight: 600; font-variant-numeric: tabular-nums; border-radius: 0; }
.l-price input { text-align: end; min-height: 38px; font-variant-numeric: tabular-nums; padding-inline: .5rem; }
.l-total { text-align: end; font-weight: 600; font-variant-numeric: tabular-nums; }
.keys-hint { margin: 0; color: var(--muted); font-size: .78rem; }

/* customer display: the one dark, bold element */
.pos-side { display: flex; flex-direction: column; gap: .7rem; min-height: 0; overflow-y: auto; }
.due { background: var(--ink); color: #fff; border-radius: var(--r); padding: 1.1rem 1.2rem 1.2rem; display: grid; gap: .1rem; }
.due-label { color: var(--ink-3); font-size: .9rem; }
.due-amount { font-size: clamp(2.2rem, 3.6vw, 3rem); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; color: #fff; overflow-wrap: anywhere; }
.due-amount .cur { font-size: .45em; font-weight: 500; color: var(--ink-3); }
.due-count { color: var(--ink-3); font-size: .88rem; }
.sums { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: .5rem 1rem; }
.sums div { display: flex; justify-content: space-between; padding: .35rem 0; }
.sums div + div { border-top: 1px solid var(--line-2); }
.sums dt { color: var(--muted); }
.sums dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.sums .grand dd, .sums .grand dt { color: var(--text); font-size: 1.1rem; font-weight: 700; }
.modal .sums { margin-top: .8rem; }
.side-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }

.lock-panel { max-width: 520px; margin: 10vh auto; text-align: center; padding: 2rem; background: var(--paper); border-radius: var(--r); border: 1px solid var(--line); }
.lock-ic { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--bad-soft); color: var(--bad); margin-bottom: .8rem; }
.lock-panel h2 { font-size: 1.4rem; margin-bottom: .5rem; }
.lock-panel p { color: var(--muted); margin-bottom: 1.4rem; }

/* ---------- modals ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(17, 25, 48, .55); display: grid; place-items: center; padding: 1rem; z-index: 100; animation: fade .12s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--paper); border-radius: var(--r); width: min(520px, 100%); max-height: calc(100vh - 2rem); overflow-y: auto; padding: 1.2rem 1.4rem 1.4rem; box-shadow: 0 24px 60px rgba(10, 18, 40, .35); animation: rise .16s ease-out; }
.modal.wide { width: min(820px, 100%); }
@keyframes rise { from { transform: translateY(8px); opacity: .6; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.modal-head h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.2rem; }
.modal-actions .btn.pay { width: auto; flex: 1; min-height: 56px; font-size: 1.15rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; margin-top: .4rem; align-items: center; }
.confirm-text { font-size: 1.05rem; margin: .3rem 0 1.2rem; }
.pay-total { display: flex; justify-content: space-between; align-items: baseline; background: var(--ink); color: #fff; border-radius: var(--r-sm); padding: .9rem 1rem; margin-bottom: .9rem; }
.pay-total span { color: var(--ink-3); }
.pay-total strong { font-size: 1.9rem; font-variant-numeric: tabular-nums; }
.methods { display: flex; width: 100%; margin-bottom: .9rem; }
.methods label { flex: 1; text-align: center; }
#recv { font-size: 1.6rem; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; min-height: 56px; }
.quick { display: flex; flex-wrap: wrap; gap: .4rem; }
.quick .btn { font-variant-numeric: tabular-nums; flex: 1; }
.change-box { display: flex; justify-content: space-between; align-items: baseline; padding: .8rem 1rem; border-radius: var(--r-sm); background: var(--go-soft); color: var(--go-2); }
.change-box strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.change-box.short { background: var(--bad-soft); color: var(--bad); }
.held-list, .device-list { list-style: none; padding: 0; margin: 0; }
.held-list li, .device-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line-2); }
.held-list li > div:first-child, .device-list li > div:first-child { display: grid; }
.held-list small, .device-list small { color: var(--muted); }
.cam-box { position: relative; background: #000; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 4/3; }
.cam-box video, #cam-lib, #cam-lib video { width: 100% !important; height: 100% !important; object-fit: cover; }
.cam-line { position: absolute; inset-inline: 12%; top: 50%; height: 2px; background: #ff4d4d; box-shadow: 0 0 10px #ff4d4d; pointer-events: none; }
code.cols { display: block; background: var(--line-2); padding: .6rem .8rem; border-radius: var(--r-sm); margin: .5rem 0 1rem; direction: ltr; text-align: start; font-size: .85rem; }

/* ---------- subscription ---------- */
.sub-status { border-inline-start: 5px solid var(--go); }
.sub-status.warn { border-inline-start-color: var(--warn); }
.sub-status.bad { border-inline-start-color: var(--bad); }
.sub-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.sub-top h2 { font-size: 1.5rem; }
.days { text-align: center; display: grid; }
.days strong { font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.days span { color: var(--muted); font-size: .85rem; }
.meter { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin: .9rem 0 .5rem; }
.meter span { display: block; height: 100%; background: var(--go); border-radius: 99px; }
.sub-status.warn .meter span { background: var(--warn); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: .8rem 0 1.2rem; }
.plan { border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; }
.plan.best { border: 2px solid var(--go); }
.plan .price { font-size: 1.35rem; font-weight: 700; margin: .3rem 0 0; font-variant-numeric: tabular-nums; }
.howpay { background: #f6f8fb; border-radius: var(--r-sm); padding: 1rem 1.1rem; }

/* ---------- toasts ---------- */
#toasts { position: fixed; top: 4.2rem; inset-inline-start: 50%; transform: translateX(-50%); display: grid; gap: .5rem; z-index: 200; width: min(460px, calc(100% - 2rem)); }
[dir=rtl] #toasts { transform: translateX(50%); }
.toast { background: var(--ink); color: #fff; padding: .8rem 1rem; border-radius: var(--r-sm); box-shadow: 0 10px 30px rgba(10,18,40,.3); font-weight: 500; border-inline-start: 5px solid var(--go); animation: rise .15s ease-out; transition: opacity .3s; }
.toast.err { border-inline-start-color: #ff7a6b; }
.toast.warn { border-inline-start-color: #f2b44b; }
.toast.out { opacity: 0; }

/* ---------- v1.1: logos ---------- */
.brand-auth { height: 48px; width: auto; max-width: 180px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; }
.brand-side { width: 60px; height: 52px; object-fit: contain; background: #fff; border-radius: 9px; padding: 4px; }
.brand-foot { height: 30px; width: auto; max-width: 120px; object-fit: contain; }
.store-logo { height: 34px; width: auto; max-width: 110px; object-fit: contain; vertical-align: middle; margin-inline-end: .6rem; border-radius: 4px; }
.store-logo.big { height: 52px; max-width: 160px; }
.top-title { display: flex; align-items: center; }
.logo-edit { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: .6rem; }
.logo-box { width: 180px; height: 110px; border: 1px dashed var(--line); border-radius: var(--r-sm); display: grid; place-items: center; background: #fafbfd; padding: .5rem; }
.logo-box img { max-width: 164px; max-height: 94px; object-fit: contain; }
.logo-edit .btn-row { margin: 0; }
h3.mt { margin-top: .6rem; display: flex; align-items: center; gap: .4rem; }
.paper-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.paper-pick label { cursor: pointer; }
.paper-pick input { position: absolute; opacity: 0; }
.paper-pick span { display: grid; gap: .15rem; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .7rem .8rem; height: 100%; }
.paper-pick small { color: var(--muted); font-weight: 400; font-size: .82rem; }
.paper-pick input:checked + span { border: 2px solid var(--ink); padding: calc(.7rem - 1px) calc(.8rem - 1px); background: var(--info-soft); }
.paper-pick input:focus-visible + span { outline: 3px solid var(--info-soft); }

/* ---------- v1.1: user chip & lock ---------- */
.user-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .88rem; font-weight: 600; padding: .25rem .65rem; border-radius: 99px; background: var(--line-2); }
.user-chip small { color: var(--muted); font-weight: 500; }
.user-chip small::before { content: "·"; margin-inline-end: .35rem; }
.lockscreen { min-height: 100vh; display: flex; flex-direction: column; background: var(--ink); color: #fff; }
.lock-top { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; gap: 1rem; }
.lock-store { display: flex; align-items: center; gap: .3rem; }
.lock-store .store-logo { background: #fff; padding: 4px; border-radius: 8px; }
.lock-store strong { display: block; font-size: 1.15rem; }
.lock-store small { color: var(--ink-3); }
.lock-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem; gap: 1.6rem; }
.lock-main h1 { font-size: clamp(1.4rem, 3vw, 2rem); text-align: center; }
.tiles { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; max-width: 860px; }
.tile { width: 140px; display: grid; justify-items: center; gap: .6rem; padding: 1.1rem .6rem; border-radius: var(--r); border: 1px solid var(--ink-2); background: var(--ink-2); color: #fff; cursor: pointer; font-weight: 600; font-size: 1rem; }
.tile:hover { border-color: #7fe0b6; }
.tile.owner { background: transparent; border-style: dashed; }
.avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #7fe0b6; color: var(--ink); font-weight: 700; font-size: 1.15rem; flex: none; }
.avatar.big { width: 68px; height: 68px; font-size: 1.4rem; }
.avatar.sq { border-radius: var(--r-sm); width: 40px; height: 40px; background: var(--line-2); color: var(--ink); }
.tile.owner .avatar { background: transparent; border: 2px solid #7fe0b6; color: #7fe0b6; }
.unlock { width: 100%; display: grid; place-items: center; }
.pin-card { background: var(--paper); color: var(--text); border-radius: var(--r); padding: 1.6rem; width: min(340px, 100%); display: grid; justify-items: center; gap: .6rem; text-align: center; }
.pin-card.form { justify-items: stretch; }
.pin-card.form .avatar, .pin-card.form h2, .pin-card.form .hint { justify-self: center; }
.pin-card .avatar { background: var(--ink); color: #fff; }
.pin-dots { display: flex; gap: .7rem; min-height: 18px; margin: .3rem 0 .5rem; direction: ltr; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); }
.pin-dots span.on { background: var(--ink); }
.pin-dots.err span { border-color: var(--bad); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 72px); gap: .6rem; direction: ltr; }
.keypad button { height: 60px; border-radius: var(--r); border: 1px solid var(--line); background: #f6f8fb; font-size: 1.4rem; font-weight: 600; cursor: pointer; color: var(--text); }
.keypad button:hover { background: var(--line-2); }
.keypad button.ok { background: var(--go); color: #fff; border-color: var(--go); display: grid; place-items: center; }
.lock-foot { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 1rem; opacity: .85; }
.lock-foot .brand-foot { background: #fff; border-radius: 6px; padding: 3px; }
.wordmark.dark { color: #c3cde3; font-size: .9rem; }

/* ---------- v1.1: staff ---------- */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.panel-head h2 { display: flex; align-items: center; gap: .5rem; }
.staff-list { list-style: none; padding: 0; margin: .4rem 0 1rem; }
.staff-list li { display: flex; align-items: center; gap: .9rem; padding: .75rem 0; border-bottom: 1px solid var(--line-2); }
.staff-list li .avatar { width: 40px; height: 40px; font-size: .95rem; background: var(--ink); color: #fff; }
.staff-list li .avatar.sq { background: var(--line-2); color: var(--ink); }
.staff-list li .grow { display: grid; min-width: 0; }
.staff-list li small { color: var(--muted); }
.staff-list li.off { opacity: .6; }
fieldset.perms { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem 1rem 1rem; margin: 0; display: grid; gap: .6rem; }
fieldset.perms legend { font-weight: 600; padding: 0 .3rem; }
fieldset.perms .check { align-items: flex-start; }
fieldset.perms .check input { margin-top: 3px; }
fieldset.perms .check span { display: grid; }
fieldset.perms .check small { color: var(--muted); font-weight: 400; }
.pin-input { letter-spacing: .4em; font-variant-numeric: tabular-nums; direction: ltr; text-align: center; font-size: 1.2rem; }
@media (max-width: 860px) {
  .user-chip span, .user-chip small, #lock-btn span { display: none; }
  .paper-pick { grid-template-columns: 1fr; }
  .store-logo { height: 28px; }
}
@media (max-width: 560px) {
  .tile { width: calc(50% - .5rem); }
  .staff-list li { flex-wrap: wrap; }
  .staff-list li .row-actions { width: 100%; justify-content: flex-start; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .pos { grid-template-columns: minmax(0, 1fr) 300px; }
  .strip-head, .lines li { grid-template-columns: minmax(0, 1fr) 120px 92px 92px 36px; gap: .4rem; padding: 0 .7rem; }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 2rem 1.25rem; }
  .auth-brand .receipt-demo, .auth-brand .features { display: none; }
  .shell { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .side { order: 2; flex-direction: row; padding: .3rem; justify-content: space-around; overflow-x: auto; }
  .side-brand { display: none; }
  .nav-item { padding: .4rem .3rem; font-size: .7rem; min-width: 56px; flex: 1; }
  .pos { grid-template-columns: 1fr; height: auto; min-height: 100%; }
  .strip { min-height: 260px; max-height: 50vh; }
  .strip-head { display: none; }
  .lines li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name del" "qty total" "price total"; row-gap: .4rem; }
  .l-name { grid-area: name; } .l-qty { grid-area: qty; width: 140px; } .l-price { grid-area: price; width: 140px; }
  .l-total { grid-area: total; align-self: center; font-size: 1.05rem; }
  .lines li > .icon-btn { grid-area: del; justify-self: end; }
  .keys-hint, kbd { display: none; }
  .two-col, .stats { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .top { padding: .5rem 1rem; gap: .5rem; }
  .top-actions .lang-btn span, .status span:not(.pill) { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .grid2, .plans { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .page { padding: 1rem 1rem 2rem; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .modal { padding: 1rem; }
  .tbl th:nth-child(5), .tbl td:nth-child(5) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.l-price input[readonly] { border-color: transparent; background: transparent; cursor: default; }
