/* ABUSHHIWA Shipping — based on the ABUSHHIWA POS design */
: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); grid-template-rows: 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; min-height: 0; height: 100%; overflow: hidden; }
.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; }
.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; }
}

.auth-contact p { margin: 0 0 .5rem; color: #fff; font-weight: 500; }
.auth-contact .btn-row { margin-top: 0; }
.btn.wa { background: #25d366; color: #0b2e1a; }
.btn.wa:hover { background: #1ebe5b; }
.btn.ghost-light { background: transparent; color: #fff; border-color: var(--ink-2); }
.btn.ghost-light:hover { border-color: #c3cde3; }
.wa-float { position: fixed; bottom: 1.2rem; inset-inline-end: 1.2rem; z-index: 50; display: inline-flex; align-items: center; gap: .5rem; background: #25d366; color: #0b2e1a; text-decoration: none; font-weight: 700; padding: .7rem 1.1rem .7rem .8rem; border-radius: 99px; box-shadow: 0 8px 24px rgba(10, 18, 40, .25); }
[dir=rtl] .wa-float { padding: .7rem .8rem .7rem 1.1rem; }
.wa-float:hover { background: #1ebe5b; }
@media (max-width: 560px) { .wa-float span { display: none; } .wa-float { padding: .8rem; } }

.notice.ok { background: var(--go-soft); color: var(--go-2); }
.check-mail { text-align: center; justify-items: center; }
.check-mail .btn { width: 100%; }
.check-mail p { margin: 0; }
.mail-ic { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--info-soft); color: var(--info); }
.auth-form .form h2 { font-size: 1.35rem; }

.version-line { text-align: center; color: var(--muted); font-size: .8rem; margin: 1.5rem 0 0; direction: ltr; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .7rem; margin-top: .6rem; }
.contact-card { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--text); }
.contact-card:hover { border-color: var(--ink-3); }
.contact-card strong { display: block; }
.contact-card small { color: var(--muted); }
.cc-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--info-soft); color: var(--info); flex: none; }
.contact-card.wa { border-color: #25d366; background: #effcf4; }
.contact-card.wa .cc-ic { background: #25d366; color: #fff; }
.msg-list { list-style: none; padding: 0; margin: .4rem 0 0; }
.msg-list li { padding: .8rem 0; border-bottom: 1px solid var(--line-2); }
.msg-list li:last-child { border-bottom: 0; }
.msg-top { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.msg-list p { margin: .3rem 0; white-space: pre-wrap; }
.msg-list small { color: var(--muted); }
.check-mail a.btn { width: 100%; }

.nowrap { white-space: nowrap; }
.stock-line { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #f6f8fb; border-radius: var(--r-sm); padding: .7rem .9rem; flex-wrap: wrap; }
.stock-line > div { display: grid; }
.stock-line strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.sm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.sm-head > div { display: grid; }
.sm-name { font-size: 1.15rem; }
.sm-total { text-align: end; }
.sm-total strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.add-stock { background: var(--go-soft); border-radius: var(--r); padding: .9rem 1rem 1rem; }
.add-stock h3 { display: flex; align-items: center; gap: .4rem; color: var(--go-2); }
.add-stock .hint { margin: .2rem 0 .7rem; }
.add-stock-grid { display: grid; grid-template-columns: 1fr 1.2fr 1fr auto; gap: .7rem; align-items: end; }
.add-stock-grid label { display: grid; gap: .3rem; font-weight: 500; font-size: .92rem; }
.batch-tbl input { min-height: 36px; }
.batch-tbl .qty-in { width: 100px; text-align: end; }
tr.editing td { background: var(--info-soft); }
.shift-tbl td small.alt { display: block; color: var(--muted); }
@media (max-width: 700px) { .add-stock-grid { grid-template-columns: 1fr 1fr; } .add-stock-grid .btn { grid-column: 1 / -1; } }

.sale-done { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .5rem; padding: 2rem 1rem; }
.sale-done p { margin: 0; }
.sd-check { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--go-soft); color: var(--go); }
.sd-change { display: flex; gap: 1rem; align-items: baseline; background: var(--go-soft); color: var(--go-2); padding: .5rem 1.2rem; border-radius: var(--r); margin: .3rem 0; }
.sd-change strong { font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.sd-actions { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; margin: .6rem 0; }
.sd-actions .btn.big { width: auto; min-width: 200px; }
.btn.wa-outline { width: 100%; border-color: #25d366; color: #128c4b; }
.btn.wa-outline:hover:not(:disabled) { background: #effcf4; }
.receipt-opts { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.receipt-opts .check .ic { color: var(--muted); }
body.receipt-page { background: var(--bg); min-height: 100vh; }
#rv { max-width: 460px; margin: 0 auto; padding: 1rem; }
.rv-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; flex-wrap: wrap; }
.rv-bar .btn-row { margin: 0; }
#rv-frame { width: 100%; border: 0; background: #fff; border-radius: var(--r); box-shadow: 0 6px 20px rgba(23,32,58,.12); min-height: 400px; }
.rv-card { background: var(--paper); border-radius: var(--r); padding: 1.5rem; text-align: center; margin-top: 15vh; }

/* ---------- 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; }
.grid2 { align-items: start; }

/* ---------- v1.6: product photos ---------- */
.photo-field { display: flex; gap: 14px; align-items: flex-start; padding: 10px; border: 1px dashed var(--line); border-radius: var(--r); background: #fafbfd; }
.photo-box { flex: 0 0 112px; height: 112px; border-radius: var(--r-sm); background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; position: relative; }
.photo-box img { width: 100%; height: 100%; object-fit: contain; }
.photo-box.loading::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.7) center / 28px no-repeat; }
.photo-box.loading::before { content: ""; position: absolute; width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--info); border-radius: 50%; animation: spin .8s linear infinite; z-index: 1; }
.photo-empty { display: grid; place-items: center; gap: 2px; color: var(--ink-3); text-align: center; }
.photo-empty small { font-size: .78rem; }
.photo-side { flex: 1; min-width: 0; display: grid; gap: 8px; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.photo-actions label.btn { cursor: pointer; }
.photo-status { display: block; line-height: 1.45; }
.photo-status.ok { color: var(--go-2); }
.photo-status.warn { color: var(--warn); }
.photo-status.err { color: var(--bad); }
@media (max-width: 520px) { .photo-field { flex-direction: column; } .photo-box { flex-basis: auto; width: 100%; height: 160px; } }

.pthumb { flex: 0 0 auto; width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--line-2); display: grid; place-items: center; overflow: hidden; color: var(--ink-3); }
.pthumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.p-cell { display: flex; align-items: center; gap: 10px; }
.p-cell > div { min-width: 0; }

/* ---------- v1.6: price checker ---------- */
.pc-intro { display: flex; gap: 22px; align-items: flex-start; }
.pc-intro h2 { font-size: 1.3rem; margin-bottom: .5rem; }
.pc-intro p { color: var(--muted); }
.pc-art { flex: 0 0 auto; width: 96px; height: 96px; border-radius: 22px; background: var(--go-soft); color: var(--go); display: grid; place-items: center; }
.steps-list { margin: 1rem 0; padding-inline-start: 1.3rem; display: grid; gap: .45rem; }
@media (max-width: 640px) { .pc-intro { flex-direction: column; } }

.kiosk { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: linear-gradient(180deg, #f4f6fa, var(--bg)); user-select: none; }
.k-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; background: var(--ink); color: #fff; }
.k-store { display: flex; align-items: center; gap: 12px; font-size: 1.25rem; min-width: 0; }
.k-store img { height: 44px; max-width: 120px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; }
.k-title { display: grid; text-align: center; font-weight: 700; font-size: 1.15rem; line-height: 1.3; }
.k-title .k-en { font-weight: 500; font-size: .85rem; color: var(--ink-3); }
.k-exit { background: transparent; border: 1px solid rgba(255,255,255,.25); color: var(--ink-3); border-radius: 50%; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
.k-exit:hover { color: #fff; border-color: #fff; }
.k-main { display: grid; place-items: center; padding: 3vh 4vw; overflow: auto; }
.k-idle, .k-result.none { display: grid; justify-items: center; text-align: center; gap: 10px; color: var(--muted); }
.k-ic { color: var(--ink-3); margin-bottom: 10px; }
.k-ic.pulse { animation: kpulse 2.2s ease-in-out infinite; }
@keyframes kpulse { 50% { transform: scale(1.07); color: var(--info); } }
.k-big { font-size: clamp(1.5rem, 3.6vw, 2.6rem); font-weight: 700; color: var(--text); line-height: 1.25; }
.k-big.k-en { font-size: clamp(1.1rem, 2.4vw, 1.7rem); font-weight: 500; color: var(--muted); }
.k-sub { font-size: clamp(1rem, 1.8vw, 1.3rem); }
.k-sub.k-en { font-size: clamp(.9rem, 1.5vw, 1.1rem); }
.k-result:not(.none) { width: min(1100px, 100%); display: grid; grid-template-columns: minmax(200px, 42%) 1fr; gap: 4vw; align-items: center; background: var(--paper); border-radius: 22px; padding: clamp(18px, 3vw, 40px); box-shadow: 0 18px 50px rgba(29, 43, 79, .12); animation: fade .25s ease; }
.k-photo { aspect-ratio: 1; border-radius: 16px; background: #fff; border: 1px solid var(--line-2); display: grid; place-items: center; overflow: hidden; color: var(--ink-3); }
.k-photo img { width: 100%; height: 100%; object-fit: contain; }
.k-info { display: grid; gap: 8px; min-width: 0; }
.k-name { font-size: clamp(1.6rem, 3.8vw, 3rem); line-height: 1.2; overflow-wrap: anywhere; }
.k-name-en { font-size: clamp(1.1rem, 2.2vw, 1.6rem); color: var(--muted); margin: 0; overflow-wrap: anywhere; }
.k-price { margin-top: 1vh; color: var(--go); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.k-price .num { font-size: clamp(3rem, 9vw, 7rem); }
.k-price .cur { font-size: clamp(1.4rem, 3vw, 2.4rem); }
.k-unit { margin: 0; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.k-code { margin: 0; color: var(--ink-3); font-family: ui-monospace, Consolas, monospace; font-size: .9rem; direction: ltr; }
.k-scan { display: flex; gap: 10px; align-items: center; padding: 14px 22px; background: var(--paper); border-top: 1px solid var(--line); }
.k-scan .scan-ic { color: var(--ink-3); }
.k-scan input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; font-size: 1.1rem; background: #fafbfd; }
.k-cam { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r); }
@media (max-width: 760px) {
  .k-result:not(.none) { grid-template-columns: 1fr; text-align: center; }
  .k-photo { max-width: 260px; justify-self: center; width: 100%; }
  .k-unit { justify-content: center; }
  .k-title { display: none; }
  .k-cam span { display: none; }
}
html[dir=rtl] .k-name-en, html[dir=rtl] .k-code { text-align: right; }
@media (orientation: portrait) and (max-width: 1100px) {
  .k-result:not(.none) { grid-template-columns: 1fr; text-align: center; }
  .k-photo { max-width: 46vh; justify-self: center; width: 100%; }
  html[dir] .k-name-en, html[dir] .k-code { text-align: center; }
  .k-unit { justify-content: center; }
}

/* ---------- v1.6.1: camera scanner ---------- */
.cam-box { max-height: 60vh; }
.cam-frame { position: absolute; inset: 22% 8%; border: 3px solid rgba(255,255,255,.85); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); pointer-events: none; }
.cam-line { inset-inline: 10%; }
.cam-msg { position: absolute; inset-inline: 10px; bottom: 10px; text-align: center; color: #fff; background: rgba(0,0,0,.6); border-radius: 8px; padding: 6px 10px; font-size: .9rem; }
.cam-msg[hidden] { display: none; }
.cam-torch { position: absolute; top: 10px; inset-inline-end: 10px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; }
.cam-torch.on { background: #ffd43b; color: #000; }
.cam-alt { display: grid; gap: 10px; margin-top: 10px; }
.cam-alt label.btn { justify-content: center; cursor: pointer; }
.cam-type { display: flex; gap: 8px; }
.cam-type input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; font-size: 1rem; direction: ltr; }

/* =================== ABUSHHIWA Shipping =================== */
.muted { color: var(--muted); } .small { font-size: .86rem; } .pre { white-space: pre-wrap; } .mono { font-family: ui-monospace, Consolas, monospace; }
.ellipsis { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.late { color: var(--bad); font-weight: 600; } .ok { color: var(--go-2); } .due { color: var(--warn); }
.pad { padding: 1rem; } .empty { text-align: center; padding: 2.2rem 1rem !important; color: var(--muted); }
.page.wide { max-width: 1400px; }
.back { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); color: var(--text); }
[dir=rtl] .back .ic { transform: none; } [dir=ltr] .back .ic { transform: scaleX(-1); }
.page-head h1 { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.head-actions { margin-inline-start: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.btn.wa { background: #25d366; color: #fff; } .btn.wa:hover:not(:disabled) { background: #1ebe5a; }
.btn.danger-ghost { background: var(--paper); border-color: var(--bad-soft); color: var(--bad); }
.btn.danger-ghost:hover { background: var(--bad-soft); }
.danger-ic { color: var(--bad); }
.brand-big { height: 46px; width: auto; background: #fff; border-radius: 10px; padding: 4px; }
.brand-side { width: 52px; height: 52px; object-fit: contain; background: #fff; border-radius: 12px; padding: 4px; }
.brand-foot-line { color: #8fa0c7; font-size: .85rem; margin: 0; } .brand-foot-line a { color: #c3cde3; }
.track-box { display: grid; gap: .35rem; max-width: 460px; }
.track-box label { color: #c3cde3; font-weight: 600; }
.track-box div { display: flex; gap: .4rem; }
.track-box input { flex: 1; min-width: 0; border-radius: var(--r-sm); border: 0; padding: .7rem .9rem; font: inherit; text-transform: uppercase; }
.track-box .btn.primary { background: var(--go); }
.user-chip { border: 0; cursor: pointer; font: inherit; }
.code-badge { display: inline-block; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; font-weight: 700; background: var(--ink); color: #fff; border-radius: 5px; padding: .05rem .4rem; direction: ltr; unicode-bidi: isolate; vertical-align: middle; }
.code-badge.big { font-size: 1rem; padding: .15rem .55rem; }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.filters > label:not(.check) { display: flex; align-items: center; gap: .35rem; font-size: .88rem; color: var(--muted); }
.filters select, .filters input[type=date] { min-height: 40px; width: auto; }
.search.big input { min-height: 46px; font-size: 1.02rem; }
.sum-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.sum-chip { background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: .3rem .8rem; font-size: .88rem; }
.tbl tr.click { cursor: pointer; }
.tbl .num, .tbl td.num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl tr.act-del td { color: var(--bad); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
.grid3 .span2 { grid-column: span 2; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } .three-col .panel { margin: 0 0 1rem; }
.panel h3 { display: flex; align-items: center; gap: .45rem; font-size: 1.05rem; margin: 0 0 .7rem; }
.panel h4 { margin: 1rem 0 .4rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: .6rem; }
.panel-head h3 { margin: 0; }
.panel.tip { display: flex; gap: .8rem; align-items: flex-start; background: var(--info-soft); border-color: #cfdcf7; }
.panel.tip p, .panel.tip ol { margin: .3rem 0 0; }
.wide-form { max-width: 1000px; } .wide-form .panel { display: grid; gap: .9rem; }
.form-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }
.form-actions .btn.big { width: auto; min-width: 220px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .7rem .9rem; display: grid; gap: .6rem; margin: 0; }
legend { font-weight: 600; padding: 0 .3rem; }
.check.disabled { opacity: .55; }
.check small { color: var(--muted); }
.perms .check { align-items: flex-start; } .perms .check span { display: grid; } .perms .check small { font-weight: 400; }
/* quick actions */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.qa { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .9rem .6rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; font: inherit; font-weight: 600; cursor: pointer; text-align: center; }
.qa:hover { border-color: var(--ink-3); background: #f8fafd; } .qa .ic { color: var(--go); }
.quick-actions.big .qa { padding: 1.2rem .6rem; }
.stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat b { font-size: 1.55rem; font-weight: 700; font-variant-numeric: tabular-nums; } .stat b small { font-size: .8rem; color: var(--muted); }
a.stat { text-decoration: none; color: inherit; } a.stat:hover { background: #f8fafd; }
.stat.bad b { color: var(--bad); } .stat.wide { grid-column: span 2; } .stat-money { font-size: 1.15rem !important; line-height: 1.5; }
/* customer */
.cust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } .cust-grid .panel { margin: 0 0 1rem; }
.kv { display: grid; gap: .45rem; margin: 0; }
.kv > div { display: grid; grid-template-columns: 150px 1fr; gap: .6rem; }
.kv dt { color: var(--muted); font-size: .88rem; } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv.cols { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
.bal-block { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .7rem .9rem; margin-bottom: .6rem; }
.bal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.bal-rows > div { display: flex; justify-content: space-between; padding: .2rem 0; }
.bal-rows .bal-left { border-top: 1px dashed var(--line); margin-top: .2rem; padding-top: .45rem; font-size: 1.08rem; }
.bal-unpaid .bal-left b, .bal-partial .bal-left b { color: var(--warn); }
.bal-paid .bal-left b { color: var(--go-2); }
.bar { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin: .5rem 0 .2rem; } .bar span { display: block; height: 100%; background: var(--go); border-radius: 99px; }
.bal { display: inline-block; font-weight: 600; font-size: .88rem; margin-inline-end: .3rem; }
.bal-unpaid, .bal-partial { color: var(--warn); } .bal.bal-paid { color: var(--go-2); } .bal.bal-credit { color: var(--info); }
.pill.pay-paid { background: var(--go-soft); color: var(--go-2); } .pill.pay-partial { background: var(--warn-soft); color: var(--warn); }
.pill.pay-unpaid { background: var(--bad-soft); color: var(--bad); } .pill.pay-credit { background: var(--info-soft); color: var(--info); }
.pill.info { background: var(--info-soft); color: var(--info); }
/* status pills */
.pill.st { white-space: nowrap; }
.st-booked { background: #eef0f5 !important; color: #4a5470 !important; }
.st-received, .st-loaded { background: #e7eefc !important; color: #2d5bc9 !important; }
.st-departed, .st-in_transit { background: #ece6fb !important; color: #5b3cc4 !important; }
.st-arrived, .st-customs { background: #fff1db !important; color: #9a5b00 !important; }
.st-ready, .st-out_for_delivery { background: #dff5f1 !important; color: #08766a !important; }
.st-delivered { background: var(--go-soft) !important; color: var(--go-2) !important; }
.st-on_hold { background: var(--warn-soft) !important; color: var(--warn) !important; }
.st-cancelled { background: var(--bad-soft) !important; color: var(--bad) !important; }
/* timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 30px 120px 1fr auto; gap: .6rem; align-items: start; padding: .45rem 0; border-bottom: 1px solid var(--line-2); position: relative; }
.timeline li:last-child { border-bottom: 0; }
.tl-ic { width: 28px; height: 28px; border-radius: 50%; background: var(--line-2); color: var(--muted); display: grid; place-items: center; }
.timeline li.ok .tl-ic { background: var(--go-soft); color: var(--go-2); } .timeline li.bad .tl-ic { background: var(--bad-soft); color: var(--bad); }
.tl-date { color: var(--muted); font-size: .86rem; padding-top: .25rem; } .tl-text { padding-top: .2rem; display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: baseline; }
.ev-note { display: block; width: 100%; background: #f6f8fb; border-radius: 6px; padding: .3rem .55rem; font-size: .92rem; }
.timeline.events li { grid-template-columns: 30px 150px 1fr auto; }
/* stages */
.stages { padding: 1.1rem 1.2rem; }
.stage-line { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); position: relative; }
.stage-line::before { content: ""; position: absolute; top: 14px; inset-inline: 5%; height: 3px; background: var(--line); }
.stage-line li { position: relative; display: grid; justify-items: center; gap: .3rem; text-align: center; font-size: .74rem; color: var(--muted); }
.stage-line .dot { width: 30px; height: 30px; border-radius: 50%; background: var(--paper); border: 3px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: .78rem; z-index: 1; }
.stage-line li.done { color: var(--go-2); } .stage-line li.done .dot { background: var(--go); border-color: var(--go); color: #fff; }
.stage-line li.now { color: var(--ink); font-weight: 700; } .stage-line li.now .dot { border-color: var(--go); color: var(--go); box-shadow: 0 0 0 4px var(--go-soft); }
.stages.off .stage-line { opacity: .55; } .stage-note { margin: -.4rem 0 .8rem; text-align: center; }
.route-big { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; text-align: center; background: #f6f8fb; border-radius: var(--r-sm); padding: .8rem; }
.route-big div { display: grid; } .route-big small { color: var(--muted); } .route-big b { font-size: 1.1rem; }
.route-mid { color: var(--info); justify-items: center; }
.route-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: .8rem; align-items: center; }
.route-arrow { color: var(--ink-3); } [dir=rtl] .route-arrow .ic { transform: scaleX(-1); }
.dates-kv > div { grid-template-columns: 1fr auto; }
.note-box { background: var(--warn-soft); border-radius: var(--r-sm); padding: .6rem .8rem; margin-top: .8rem; } .note-box p { margin: .2rem 0 0; }
/* files */
.file-kind { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }
.file-kind label { display: flex; align-items: center; gap: .4rem; } .file-kind select { width: auto; }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.file { display: flex; align-items: flex-start; gap: .3rem; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .4rem; background: #fafbfd; }
.file-open { flex: 1; min-width: 0; display: grid; gap: .2rem; border: 0; background: none; text-align: start; cursor: pointer; font: inherit; color: inherit; padding: 0; }
.thumb { height: 110px; border-radius: 5px; background: var(--line-2); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.fname { font-weight: 600; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .file small { color: var(--muted); font-size: .76rem; }
/* picker */
.picker { position: relative; font-weight: 400; }
.picker-box { position: relative; } .picker-ic { position: absolute; inset-inline-start: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; }
.picker-box input { padding-inline-start: 2.3rem; }
.picker-list { position: absolute; inset-inline: 0; top: calc(100% + 4px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: 0 12px 30px rgba(10,18,40,.15); z-index: 20; max-height: 320px; overflow-y: auto; }
.picker-list button { display: flex; width: 100%; align-items: center; gap: .5rem; border: 0; background: none; padding: .55rem .7rem; text-align: start; font: inherit; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.picker-list button small { margin-inline-start: auto; color: var(--muted); }
.picker-list button:hover, .picker-list button.on { background: var(--info-soft); }
.picker-new { color: var(--go-2); font-weight: 600 !important; }
.picked { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .45rem .6rem; background: #f8fafd; min-height: 46px; }
.picked-name { display: grid; flex: 1; min-width: 0; } .picked-name small { color: var(--muted); }
/* bill editor */
.lines-wrap { overflow-x: auto; }
.lines-tbl td { padding: .3rem .3rem; } .lines-tbl input, .lines-tbl select { min-height: 38px; }
.lines-tbl input.n { text-align: end; width: 100px; } .lines-tbl input.short { width: 120px; }
.line-total { font-weight: 600; min-width: 90px; }
.totals { display: grid; gap: .35rem; max-width: 360px; margin-inline-start: auto; }
.totals > div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.totals input { width: 120px; text-align: end; min-height: 36px; }
.totals .grand { border-top: 2px solid var(--ink); padding-top: .5rem; font-size: 1.15rem; }
.panel.deposit { background: var(--go-soft); border-color: #bfe5d2; }
.inv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.doc-frame { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.doc-frame iframe { width: 100%; height: 1000px; border: 0; display: block; }
.money-card > div { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid var(--line-2); }
.money-card > div b { font-size: 1.1rem; } .money-card > div.due b { color: var(--warn); font-size: 1.3rem; }
.pay-list { list-style: none; padding: 0; margin: 0; } .pay-list li { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px dashed var(--line-2); }
.pay-list small { display: block; color: var(--muted); font-size: .78rem; }
.pay-for { display: flex; flex-wrap: wrap; gap: .3rem 1rem; background: #f6f8fb; border-radius: var(--r-sm); padding: .6rem .8rem; font-size: .92rem; }
.pay-for .due { font-weight: 700; }
/* sharing */
.share-sum { background: #f6f8fb; border-radius: var(--r-sm); padding: .5rem .7rem; font-size: .92rem; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: .4rem 0 .8rem; }
.share-btn { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .9rem .3rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--ink); text-decoration: none; font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; }
.share-btn:hover { border-color: var(--ink-3); } .share-btn.wa { color: #128c4b; }
.share-form { margin-bottom: .8rem; }
.share-link { display: flex; gap: .4rem; align-items: center; } .share-link input { flex: 1; min-width: 0; font-size: .82rem; background: #f6f8fb; }
.track-share { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; } .qr-box svg { width: 150px; height: 150px; display: block; }
.big-code { font-size: 1.5rem; font-weight: 700; margin: 0 0 .5rem; letter-spacing: .08em; }
/* labels preview */
.label-preview { background: #eef1f6; border-radius: var(--r-sm); padding: .8rem; display: grid; place-items: center; overflow: auto; }
.lbl-sheet .lbl { width: 100mm; height: 150mm; transform-origin: top center; }
.lbl { border: 1.5px solid #000; padding: 3mm 4mm; display: flex; flex-direction: column; gap: 2mm; overflow: hidden; background: #fff; color: #000; }
.lbl-top { display: flex; align-items: center; gap: 2mm; border-bottom: 1px solid #000; padding-bottom: 2mm; }
.lbl-top img { height: 10mm; max-width: 22mm; object-fit: contain; }
.lbl-top div { flex: 1; display: flex; flex-direction: column; line-height: 1.2; } .lbl-top small { font-size: 8pt; }
.lbl-mode { border: 1px solid #000; border-radius: 2mm; padding: .5mm 2mm; font-size: 9pt; font-weight: 700; }
.lbl-num { font-size: 26pt; font-weight: 800; text-align: center; direction: ltr; }
.lbl-bc { height: 22mm; } .lbl-bc svg { width: 100%; height: 100%; display: block; }
.lbl-mid { display: flex; gap: 3mm; flex: 1; min-height: 0; }
.lbl-info { flex: 1; display: flex; flex-direction: column; gap: 1mm; font-size: 10pt; min-width: 0; }
.lbl-cust { font-size: 12pt; font-weight: 700; } .lbl-code { border: 1px solid #000; padding: 0 1.5mm; border-radius: 1mm; direction: ltr; display: inline-block; }
.lbl-qr { width: 30mm; display: flex; flex-direction: column; align-items: center; } .lbl-qr svg { width: 30mm; height: 30mm; } .lbl-qr small { font-size: 7.5pt; direction: ltr; }
.lbl-foot { display: flex; justify-content: space-between; border-top: 1px solid #000; padding-top: 2mm; font-size: 12pt; }
/* reports */
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.bars li { display: grid; grid-template-columns: 110px 1fr 40px; gap: .5rem; align-items: center; font-size: .9rem; }
.bb { height: 10px; background: var(--line-2); border-radius: 99px; overflow: hidden; } .bb span { display: block; height: 100%; background: var(--info); border-radius: 99px; }
.bars b { text-align: end; }
.month-chart { display: flex; gap: .5rem; align-items: flex-end; height: 170px; padding-top: 1rem; }
.mc { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .2rem; min-width: 26px; }
.mc-bar { width: 70%; background: var(--go); border-radius: 4px 4px 0 0; min-height: 2px; } .mc-n { font-size: .78rem; font-weight: 600; } .mc-l { font-size: .72rem; color: var(--muted); direction: ltr; }
.big-money { font-size: 1.3rem; font-weight: 700; margin: .2rem 0; } .big-money small { font-size: .78rem; font-weight: 400; }
.seg button { border: 0; background: none; padding: .4rem .8rem; border-radius: 4px; font: inherit; font-weight: 500; cursor: pointer; }
.seg button.on { background: var(--paper); box-shadow: 0 1px 2px rgba(23,32,58,.15); font-weight: 600; }
/* team / settings */
.page-tabs { max-width: none; justify-content: flex-start; margin-inline: 0; }
.page-tabs a { padding: .6rem 0; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; text-decoration: none; }
.page-tabs a.on { color: var(--ink); border-bottom-color: var(--go); }
.logo-row { display: flex; gap: 1rem; align-items: center; }
.logo-row .logo-box { width: 130px; height: 90px; border: 1px dashed var(--line); border-radius: var(--r-sm); display: grid; place-items: center; background: #fafbfd; color: var(--muted); overflow: hidden; }
.logo-row .logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.btn-col { display: grid; gap: .4rem; justify-items: start; }
.sub-status.ok { border-color: #bfe5d2; background: var(--go-soft); } .sub-status.info { background: var(--info-soft); border-color: #cfdcf7; } .sub-status.bad { background: var(--bad-soft); border-color: #f2c8c1; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: .8rem; }
.plan { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .8rem; display: grid; gap: .2rem; text-align: center; } .plan b { font-size: 1.2rem; }
.inline-form { display: flex; gap: .5rem; } .inline-form input { flex: 1; }
.msg-list { list-style: none; padding: 0; margin: 0; } .msg-list li { border-bottom: 1px solid var(--line-2); padding: .5rem 0; } .msg-list p { margin: .2rem 0 0; }
@media (max-width: 1000px) {
  .inv-layout { grid-template-columns: 1fr; } .doc-frame iframe { height: 760px; }
  .three-col { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .cust-grid, .grid4 { grid-template-columns: 1fr 1fr; } .cust-grid { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr; } .grid3 .span2 { grid-column: 1 / -1; }
  .kv.cols { grid-template-columns: 1fr; }
  .stage-line .stg-lbl { display: none; } .stage-line li.now .stg-lbl { display: block; position: absolute; top: 34px; white-space: nowrap; } .stage-line { margin-bottom: 2rem; }
  .route-grid { grid-template-columns: 1fr; } .route-arrow { display: none; }
  .timeline li, .timeline.events li { grid-template-columns: 30px 1fr auto; } .tl-date { grid-column: 2; padding: 0; } .tl-text { grid-column: 2; }
  .share-grid { grid-template-columns: repeat(2, 1fr); }
  .stat.wide { grid-column: auto; }
  .nav-item span { white-space: nowrap; }
}
@media (max-width: 560px) {
  .grid3, .grid4 { grid-template-columns: 1fr; }
  .kv > div { grid-template-columns: 1fr; gap: 0; }
  .plans { grid-template-columns: 1fr; }
  .filters > * { flex: 1 1 100%; }
  .tbl th:nth-child(5), .tbl td:nth-child(5) { display: table-cell; }
  .ellipsis { max-width: 140px; }
}
.timeline li.tl-empty { display: block; }
.code-box { background: #f8fafd; }
.code-box legend { display: flex; align-items: center; gap: .35rem; }
.code-mode { justify-self: start; }
.code-auto-line { margin: 0; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
#code-manual { display: grid; gap: .3rem; } #code-manual[hidden] { display: none; }
#code-in { font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; }
.hint.ok { color: var(--go-2); }
