/*
 * Design system.
 * Light "paper" by default, a lifted green-slate dark mode; LTR + RTL through logical properties.
 * Identity: the green #014127 is the shelf (sidebar, primary surfaces); the yellow #F4F201 is the price tag
 * (the active menu item and the main action). Everything else is quiet: hairlines, white panels, one type family.
 */

@font-face { font-family: "Plex Mono"; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url(fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "Plex Arabic"; src: url(fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "Plex Arabic"; src: url(fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "Plex Arabic"; src: url(fonts/ibm-plex-sans-arabic-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; src: url(fonts/ibm-plex-sans-arabic-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; src: url(fonts/ibm-plex-sans-arabic-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --font-ui: "Plex Arabic", system-ui, "Segoe UI", Tahoma, sans-serif;
  --font-code: "Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r-panel: 14px; --r-ctl: 10px; --r-sm: 7px;
  --side-w: 256px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* brand (same in both themes) */
  --shelf: #014127;
  --shelf-2: #0a5236;
  --shelf-line: rgba(232, 246, 238, .12);
  --shelf-ink: #ecf5f0;
  --shelf-muted: rgba(236, 245, 240, .62);
  --tag: #F4F201;
  --tag-ink: #1b2a05;

  /* light (default) */
  --bg: #f3f6f3;
  --surface: #ffffff;
  --surface-2: #f6f9f6;
  --surface-solid: #ffffff;
  --surface-pop: #ffffff;
  --border: #dfe7e1;
  --border-2: #c8d5cc;
  --text: #11291f;
  --text-2: #33493f;
  --muted: #64776d;
  --accent: var(--tag);
  --accent-ink: var(--tag-ink);
  --accent-soft: #fbfbc9;
  --brand: #014127;
  --brand-fill: #014127;
  --focus: #0b6b45;
  --ok: #157a46; --ok-soft: #e2f2e8;
  --warn: #8f6200; --warn-soft: #fbf0d3;
  --bad: #b3372b; --bad-soft: #fbe6e3;
  --info: #2c5c98; --info-soft: #e5edf8;
  --grid: #e9efea;
  --shadow-pop: 0 18px 44px -18px rgba(1, 40, 24, .32), 0 2px 6px rgba(1, 40, 24, .06);
  --chart-1: #014127; --chart-2: #86ac34; --chart-3: #a7b6ad; --chart-4: #d9c400;
  color-scheme: light;
}

[data-theme="dark"] {
  --shelf: #012b1a;
  --shelf-2: #063b26;
  --bg: #13221b;
  --surface: #1a2b23;
  --surface-2: #1f3329;
  --surface-solid: #1a2b23;
  --surface-pop: #20342a;
  --border: #2a4136;
  --border-2: #375246;
  --text: #e8f1ec;
  --text-2: #c2d2c8;
  --muted: #94a89c;
  --accent-soft: rgba(244, 242, 1, .14);
  --brand: #8fd6ae;
  --brand-fill: #0b5a39;
  --focus: #b7e6c9;
  --ok: #6fd69c; --ok-soft: rgba(111, 214, 156, .12);
  --warn: #f2c35c; --warn-soft: rgba(242, 195, 92, .12);
  --bad: #ff8b7d; --bad-soft: rgba(255, 139, 125, .12);
  --info: #8bbcf5; --info-soft: rgba(139, 188, 245, .12);
  --grid: #24382e;
  --shadow-pop: 0 20px 50px -18px rgba(0, 0, 0, .6);
  --chart-1: #F4F201; --chart-2: #6fd69c; --chart-3: #8ea397; --chart-4: #c9d97a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 15px/1.6 var(--font-ui); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.content a:not([class]), .legal a, .auth-card a:not([class]), .alert a, .hint a, p a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; }
p { margin: 0 0 .8em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
::selection { background: var(--tag); color: var(--tag-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.mono, .num, .kpi-value { font-family: var(--font-ui); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; }
.ltr { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.flip-back { transform: scaleX(-1); }
[dir="rtl"] .flip-back { transform: none; }
.spacer { flex: 1; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.mt { margin-top: 18px; } .mb { margin-bottom: 16px; } .mt-s { margin-top: 8px; }
.ok-text { color: var(--ok); } .bad-text { color: var(--bad); } .warn-text { color: var(--warn); }
.accent-text { color: var(--brand); }
.only-light { display: none; } [data-theme="light"] .only-light { display: block; } [data-theme="light"] .only-dark { display: none; }
.grow-1 { flex: 1; min-width: 0; }
.center-items { align-items: center; }
.push-bottom { margin-top: auto; }
.pre-line { white-space: pre-line; }
.center-text { text-align: center; align-items: center; }
.inline-form { display: inline-block; }
.note { margin: 2px 0 0; color: var(--text-2); }

/* ---- type ---- */
.h-display { font-size: 26px; font-weight: 600; letter-spacing: -.015em; }
[dir="rtl"] .h-display { letter-spacing: 0; }
.h-display.sm { font-size: 24px; margin-bottom: 4px; }
.title-meta { color: var(--muted); font-size: 14px; margin-top: 2px; display: block; }
.eyebrow { font-size: 13px; color: var(--muted); }

/* ---- shell: the green shelf ---- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 40;
  display: flex; flex-direction: column; gap: 4px; padding: 18px 14px 16px;
  background: var(--shelf); color: var(--shelf-ink); scrollbar-width: thin; scrollbar-color: var(--shelf-line) transparent;
}
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 18px; }
.brand-mark { width: 32px; height: 32px; display: inline-grid; flex: none; }
.brand-mark.big { width: 48px; height: 48px; margin-bottom: 16px; }
.side .brand-mark svg rect:first-child { fill: #0a5236; }
.side-store { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; padding: 12px; margin: 0 0 8px; border-radius: var(--r-panel); background: rgba(255, 255, 255, .06); border: 1px solid var(--shelf-line); transition: background .2s; }
a.side-store:hover { background: rgba(255, 255, 255, .1); }
.side-store-name { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.side-user small { display: block; color: var(--shelf-muted); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-group { margin: 14px 12px 4px; font-size: 12px; color: var(--shelf-muted); }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 8px;
  color: var(--shelf-ink); text-decoration: none; font-size: 14px; opacity: .86; transition: background .15s, opacity .15s;
}
.nav-link .ic { width: 18px; height: 18px; opacity: .85; }
.nav-link:hover { background: rgba(255, 255, 255, .07); opacity: 1; }
/* the price tag: active item */
.nav-link.active {
  opacity: 1; background: var(--tag); color: var(--tag-ink); font-weight: 600; border-radius: 6px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); padding-inline-end: 22px;
}
[dir="rtl"] .nav-link.active { clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%); }
.nav-link.active .ic { opacity: 1; }
.nav-link.as-btn { width: 100%; border: 0; background: none; cursor: pointer; font: inherit; text-align: start; }
.side-foot { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--shelf-line); }
.plan-pill { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-size: 12.5px; color: var(--shelf-ink); background: rgba(255, 255, 255, .06); }
.plan-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #7ee2a4; flex: none; }
.plan-pill.warn .dot { background: var(--tag); }
.plan-pill.bad .dot { background: #ff8b7d; }
.side .icon-btn { background: transparent; border-color: var(--shelf-line); color: var(--shelf-ink); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 24px 32px 8px; }
.topbar-title { flex: 1; min-width: 0; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.side .side-close, .topbar .menu-btn { display: none; }
.content { padding: 12px 32px 48px; display: flex; flex-direction: column; gap: 18px; max-width: 1480px; }

/* ---- panels ---- */
.card { position: relative; min-width: 0; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); }
.card.pad-0 { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-title { font-size: 15.5px; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.card-head h2 .ic, .card-title .ic { color: var(--brand); width: 18px; height: 18px; }
.card-head.pad { padding: 18px 20px 0; }
.card-sub { color: var(--muted); font-size: 13.5px; margin: -6px 0 14px; }
.gridded::before { content: none; }

.grid { display: grid; gap: 18px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cols-main { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; }

/* KPIs: one ledger strip with hairline dividers, not four floating cards */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-panel); overflow: hidden; }
.kpis > .card, .kpis > .kpi { border: 0; border-radius: 0; background: var(--surface); }
.kpi { position: relative; padding: 18px 20px; min-height: 118px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; text-decoration: none; color: inherit; }
.kpi-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; position: relative; z-index: 1; }
.kpi-chip { font-size: 11.5px; padding: 1px 7px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.kpi-value { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin-top: 8px; direction: ltr; text-align: start; unicode-bidi: plaintext; position: relative; z-index: 1; }
.kpi-value small { font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-inline-start: 4px; }
.small-kpi { font-size: 18px !important; line-height: 1.4; }
.kpi-foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12.5px; color: var(--muted); position: relative; z-index: 1; flex-wrap: wrap; }
.chart.kpi-spark { position: absolute; inset-inline-end: 16px; top: 12px; width: 34%; height: 32px; opacity: .9; }
.stack-tight { flex-direction: column; align-items: flex-start; gap: 2px; }
.delta { font-size: 12px; font-weight: 500; padding: 1px 7px; border-radius: 5px; }
.delta.up { color: var(--ok); background: var(--ok-soft); }
.delta.down { color: var(--bad); background: var(--bad-soft); }
a.kpi:hover { background: var(--surface-2); }

/* ---- controls ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-ctl);
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font: 500 14px var(--font-ui);
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: var(--text-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.btn .ic { width: 17px; height: 17px; }
.btn-accent { background: var(--tag); border-color: #dcdb00; color: var(--tag-ink); font-weight: 600; }
.btn-accent:hover { background: #ebe900; border-color: #c9c800; }
.btn-brand { background: var(--shelf); border-color: var(--shelf); color: #fff; }
.btn-brand:hover { background: var(--shelf-2); border-color: var(--shelf-2); }
[data-theme="dark"] .btn-brand { background: #0b5a39; border-color: #0b5a39; }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: var(--bad-soft); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15.5px; }
.btn.block { width: 100%; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: var(--r-ctl); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor: pointer; text-decoration: none; transition: .15s; flex: none;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-2); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn.sm .ic { width: 15px; height: 15px; }
.lang-btn .mono { font-size: 13px; font-weight: 600; }
kbd { font: 500 11px var(--font-code); padding: 1px 6px; border-radius: 5px; border: 1px solid currentColor; opacity: .55; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--surface); flex-wrap: wrap; }
.seg a, .seg button, .seg label { padding: 6px 13px; border-radius: 7px; font-size: 13.5px; color: var(--text-2); text-decoration: none; border: 0; background: none; cursor: pointer; font-family: inherit; white-space: nowrap; }
.seg a:hover, .seg button:hover, .seg label:hover { color: var(--text); background: var(--surface-2); }
.seg .on, .seg input:checked + label { background: var(--shelf); color: #fff; }
[data-theme="dark"] .seg .on, [data-theme="dark"] .seg input:checked + label { background: #0b5a39; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.hint, .field .hint { font-size: 12.5px; color: var(--muted); }
.field .err, .err { font-size: 12.5px; color: var(--bad); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fields.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fields .full { grid-column: 1 / -1; }
.input, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="tel"], input[type="date"], input[type="url"], select, textarea {
  width: 100%; height: 42px; padding: 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--border-2); background: var(--surface);
  color: var(--text); font: 15px var(--font-ui); transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
input:disabled { background: var(--surface-2); color: var(--muted); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 34px; }
[dir="rtl"] select { background-position: 12px 18px, 17px 18px; }
select option { background: var(--surface-pop); color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
input.invalid, select.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
input[type="number"] { -moz-appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-icon { position: relative; }
.input-icon .ic { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; width: 18px; height: 18px; }
.input-icon input { padding-inline-start: 40px; }
.ltr-input { direction: ltr; text-align: start; }
[dir="rtl"] .ltr-input { text-align: right; }
.w-auto { width: auto !important; }
.sm-input { height: 34px !important; padding: 0 10px !important; font-size: 13.5px !important; border-radius: 8px !important; }
select.sm-input { padding-inline-end: 28px !important; background-position: calc(100% - 14px) 14px, calc(100% - 9px) 14px !important; }
[dir="rtl"] select.sm-input { background-position: 9px 14px, 14px 14px !important; }
.qty-input { width: 92px !important; }
.note-input { width: 150px !important; }
.file-input { height: auto !important; padding: 8px 10px !important; }
.color-input { width: 46px !important; padding: 4px !important; cursor: pointer; }
.big-input { height: 54px !important; font-size: 22px !important; font-weight: 600; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: var(--border-2); position: relative; transition: .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: .2s var(--ease); }
.switch input:checked + .track { background: var(--shelf); }
[data-theme="dark"] .switch input:checked + .track { background: #2f9a64; }
.switch input:checked + .track::after { inset-inline-start: 19px; }
.switch input:focus-visible + .track { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: start; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.card:not(.pad-0) .table th { background: transparent; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr.click-row { cursor: pointer; }
.table .num { text-align: end; white-space: nowrap; direction: ltr; unicode-bidi: plaintext; }
[dir="rtl"] .table .num { text-align: left; }
.table .actions { text-align: end; white-space: nowrap; }
.table a.rowlink { text-decoration: none; font-weight: 500; color: var(--text); }
.table a.rowlink:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.rank { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--shelf); color: var(--tag); font-weight: 600; font-size: 14px; flex: none; }
.avatar.sm { width: 24px; height: 24px; font-size: 12px; background: var(--tag); color: var(--tag-ink); }
.w-bar { width: 22%; min-width: 90px; }
.w-idx { width: 40px; }
.bar-svg { width: 100%; min-width: 60px; height: 6px; display: block; }
.bar-svg .bar-bg { fill: var(--grid); }
.bar-svg .bar-fg { fill: var(--chart-1); }
[dir="rtl"] .bar-svg { transform: scaleX(-1); }
.dot-svg { width: 10px; height: 10px; display: inline-block; vertical-align: 0; flex: none; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { color: var(--ok); background: var(--ok-soft); }
.badge.warn { color: var(--warn); background: var(--warn-soft); }
.badge.bad { color: var(--bad); background: var(--bad-soft); }
.badge.info { color: var(--info); background: var(--info-soft); }
.badge.muted { color: var(--muted); background: var(--surface-2); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; }
.alert > .ic { margin-top: 2px; width: 18px; height: 18px; }
.alert > div { flex: 1; }
.alert.ok { background: var(--ok-soft); border-color: transparent; } .alert.ok > .ic { color: var(--ok); }
.alert.warn { background: var(--warn-soft); border-color: transparent; } .alert.warn > .ic { color: var(--warn); }
.alert.bad { background: var(--bad-soft); border-color: transparent; } .alert.bad > .ic { color: var(--bad); }
.alert.info { background: var(--info-soft); border-color: transparent; } .alert.info > .ic { color: var(--info); }
.alert-x { width: 26px; height: 26px; border: 0; background: none; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 16px; text-align: center; color: var(--muted); }
.empty .ic { width: 32px; height: 32px; opacity: .5; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 14px 0; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover .title { color: var(--brand); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reminder { display: flex; gap: 12px; padding: 11px 13px; border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: inherit; align-items: center; transition: border-color .15s; }
.reminder:hover { border-color: var(--border-2); }
.reminder .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--info); }
.reminder.warn .dot { background: var(--warn); }
.reminder.bad .dot { background: var(--bad); }
.reminder .grow { flex: 1; font-size: 13.5px; }
.reminder .ic { width: 16px; height: 16px; color: var(--muted); }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 9px 18px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.steps-list { margin: 0; padding-inline-start: 20px; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; }

/* ---- documents (purchase view) ---- */
.doc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); overflow: hidden; }
.doc-head { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; padding: 22px 24px; border-bottom: 1px solid var(--border); border-top: 4px solid var(--shelf); }
.doc-kicker { font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.doc-title { font-size: 22px; }
.doc-meta { display: grid; grid-template-columns: repeat(2, minmax(150px, auto)); gap: 10px 28px; margin: 0; }
.doc-meta dt { font-size: 12.5px; color: var(--muted); }
.doc-meta dd { margin: 0; font-weight: 500; }
.doc-table td, .doc-table th { padding-inline: 24px; }
.doc-foot { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; padding: 18px 24px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }
.doc-notes { max-width: 520px; }
.doc-totals { margin: 0; min-width: 260px; display: flex; flex-direction: column; gap: 6px; }
.doc-totals > div { display: flex; justify-content: space-between; gap: 24px; font-size: 14px; }
.doc-totals dt { color: var(--muted); }
.doc-totals dd { margin: 0; font-weight: 500; direction: ltr; unicode-bidi: plaintext; }
.doc-totals .grand { padding-top: 8px; margin-top: 2px; border-top: 1px solid var(--border-2); font-size: 18px; }
.doc-totals .grand dt { color: var(--text); font-weight: 600; }
.doc-totals .grand dd { font-weight: 600; }
.doc-totals small { font-size: 12px; color: var(--muted); font-weight: 400; }

/* purchase form: item lines with a product picker */
.lines-table { table-layout: fixed; min-width: 640px; }
.lines-table .c-idx { width: 44px; } .lines-table .c-qty { width: 110px; } .lines-table .c-cost { width: 140px; }
.lines-table .c-amount { width: 130px; } .lines-table .c-del { width: 52px; }
.lines-table td { padding: 8px 10px; vertical-align: middle; }
.lines-table th { padding: 10px; }
.lines-table tbody tr:hover { background: transparent; }
.lines-table input { height: 38px; }
.pl-net { font-weight: 500; }
.picker { position: relative; }
.pick-list { position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 30; margin: 0; padding: 4px; list-style: none; max-height: 280px; overflow-y: auto;
  background: var(--surface-pop); border: 1px solid var(--border-2); border-radius: var(--r-ctl); box-shadow: var(--shadow-pop); }
.pick-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.pick-list li.hi, .pick-list li[data-id]:hover { background: var(--accent-soft); }
.pick-list .pk-meta { color: var(--muted); font-size: 12.5px; direction: ltr; }
.pick-list .pk-empty { color: var(--muted); cursor: default; }
.purchase-foot { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.qr-check { padding-top: 6px; }

/* ---- charts ---- */
.chart { width: 100%; position: relative; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .axis { font: 11px var(--font-ui); fill: var(--muted); }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .tip { position: absolute; pointer-events: none; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-pop); font-size: 12.5px; box-shadow: var(--shadow-pop); transform: translate(-50%, -112%); white-space: nowrap; opacity: 0; transition: opacity .12s; z-index: 5; }
.chart .tip.show { opacity: 1; }
.chart .tip b { font-weight: 600; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-inline-end: 6px; vertical-align: middle; }
.legend i.lg-1 { background: var(--chart-1); } .legend i.lg-2 { background: var(--chart-2); } .legend i.lg-3 { background: var(--chart-3); }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.chart.donut { width: 160px; flex: none; }
.donut-center { font-family: var(--font-ui); font-weight: 600; }

/* ---- overlays ---- */
dialog.modal { border: 1px solid var(--border); border-radius: var(--r-panel); padding: 0; background: var(--surface-pop); color: var(--text); width: min(560px, calc(100vw - 24px)); box-shadow: var(--shadow-pop); }
dialog.modal.wide { width: min(860px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(8, 28, 19, .45); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { flex: 1; font-size: 16px; }
.modal-body { padding: 20px; max-height: min(70vh, 720px); overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; background: var(--surface-2); }
.toasts { position: fixed; inset-block-end: 18px; inset-inline-end: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 100; max-width: min(420px, calc(100vw - 36px)); }
.toast { display: flex; gap: 10px; align-items: center; padding: 11px 15px; border-radius: var(--r-ctl); background: var(--text); color: var(--bg); box-shadow: var(--shadow-pop); font-size: 14px; animation: toast-in .25s var(--ease); }
.toast .ic { width: 18px; height: 18px; }
.toast.ok .ic { color: #7ee2a4; } .toast.bad .ic { color: #ff9a8e; } .toast.warn .ic { color: var(--tag); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---- auth ---- */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; }
.auth-card { width: min(440px, 100%); padding: 32px; }
.auth-card.wide { width: min(700px, 100%); }
.auth-top { position: fixed; top: 16px; inset-inline-end: 16px; display: flex; gap: 8px; z-index: 5; }
.auth-foot { margin-top: 16px; font-size: 14px; color: var(--muted); text-align: center; }
.pw-meter { height: 4px; border-radius: 4px; background: var(--grid); overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--bad); transition: width .25s, background .25s; }
.mode-plain { background: var(--bg) linear-gradient(var(--shelf), var(--shelf)) top / 100% 6px no-repeat; }

/* ---- public site ---- */
.pub-nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 20px; padding: 12px clamp(16px, 4vw, 48px); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.pub-nav nav { display: flex; gap: 24px; flex: 1; justify-content: center; }
.pub-nav nav a { text-decoration: none; color: var(--text-2); font-size: 14px; }
.pub-nav nav a:hover { color: var(--text); }
.pub-wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; padding: clamp(48px, 8vw, 96px) 0 64px; }
.hero-title { font-size: clamp(34px, 4.6vw, 56px); font-weight: 600; letter-spacing: -.03em; line-height: 1.08; margin-bottom: 18px; max-width: 16ch; }
[dir="rtl"] .hero-title { letter-spacing: 0; line-height: 1.3; max-width: 18ch; }
.legal .hero-title { max-width: none; font-size: clamp(30px, 4vw, 44px); }
.hero-lead { font-size: 18px; color: var(--text-2); max-width: 54ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-facts { display: flex; gap: 20px; flex-wrap: wrap; list-style: none; padding: 0; margin: 22px 0 0; color: var(--muted); font-size: 14px; }
.hero-facts li { display: inline-flex; gap: 6px; align-items: center; }
.hero-facts .ic { width: 16px; height: 16px; color: var(--ok); }
/* the shelf scene: a printed receipt standing on the store's shelf, with its price tag */
.shelf-scene { margin: 0; position: relative; display: flex; flex-direction: column; align-items: center; padding-top: 12px; }
.paper-receipt {
  width: min(300px, 80%); background: #fffef8; color: #1e2a24; padding: 22px 20px 26px; position: relative; z-index: 1; margin-bottom: -2px;
  font: 13px/1.6 var(--font-code); box-shadow: 0 30px 40px -28px rgba(1, 40, 24, .55), 0 1px 0 rgba(0, 0, 0, .04);
  -webkit-mask: radial-gradient(circle 6px at 50% 0, transparent 98%, #000) 0 0 / 16px 100% repeat-x;
          mask: radial-gradient(circle 6px at 50% 0, transparent 98%, #000) 0 0 / 16px 100% repeat-x;
  direction: rtl; font-family: var(--font-ui);
}
.pr-store { text-align: center; font-weight: 600; font-size: 16px; }
.pr-kind { text-align: center; color: #5b6b62; font-size: 12.5px; }
.pr-rule { border-top: 1px dashed #b9c3bd; margin: 10px 0; }
.pr-line { display: flex; justify-content: space-between; gap: 12px; }
.pr-line span:last-child { font-family: var(--font-code); direction: ltr; }
.pr-total { font-weight: 600; font-size: 15px; }
.pr-qr { width: 76px; height: 76px; margin: 14px auto 0; background:
  conic-gradient(#1e2a24 25%, transparent 0 50%, #1e2a24 0 75%, transparent 0) 0 0 / 12px 12px, #fffef8; outline: 6px solid #fffef8; box-shadow: 0 0 0 7px #1e2a24; }
.shelf-board { width: 100%; height: 22px; background: var(--shelf); border-radius: 4px; position: relative; box-shadow: 0 14px 24px -14px rgba(1, 40, 24, .6); }
.price-tag {
  position: absolute; top: 14px; inset-inline-end: 12%; display: grid; gap: 0; padding: 10px 18px 12px 30px; background: var(--tag); color: var(--tag-ink);
  border-radius: 4px; clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%); transform: rotate(-3deg); box-shadow: 0 10px 20px -12px rgba(0, 0, 0, .4);
}
[dir="rtl"] .price-tag { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); padding: 10px 30px 12px 18px; transform: rotate(3deg); }
.pt-hole { position: absolute; inset-inline-start: 12px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--shelf); }
[dir="rtl"] .pt-hole { inset-inline-start: auto; inset-inline-end: 12px; }
.pt-label { font-size: 12.5px; font-weight: 500; }
.pt-value { font-size: 20px; font-weight: 600; line-height: 1.2; }

.section { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 30px; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 10px; }
[dir="rtl"] .section-head h2 { letter-spacing: 0; }
.feature-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; }
.feature { display: flex; gap: 14px; padding: 22px 0; border-top: 1px solid var(--border); }
.feature .fi { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--shelf); color: var(--tag); }
.feature .fi .ic { width: 19px; height: 19px; }
.feature h3 { font-size: 16px; margin-bottom: 4px; }
.feature p { color: var(--text-2); font-size: 14.5px; margin: 0; }
.band { background: var(--shelf); color: var(--shelf-ink); }
.band .section-head p { color: var(--shelf-muted); }
.band-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.steps-flow { list-style: none; counter-reset: s; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.steps-flow li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; padding: 14px 16px; border-radius: var(--r-ctl); background: rgba(255, 255, 255, .06); }
.steps-flow li::before { content: counter(s); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--tag); color: var(--tag-ink); font-weight: 600; font-size: 14px; }
.steps-flow b { font-weight: 600; }
.steps-flow span { color: var(--shelf-muted); font-size: 14px; }
.pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.price-card { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.price-card.pop { border: 2px solid var(--shelf); }
[data-theme="dark"] .price-card.pop { border-color: var(--tag); }
.price { font-size: 38px; font-weight: 600; letter-spacing: -.02em; direction: ltr; text-align: start; unicode-bidi: plaintext; }
.price small { font-size: 14px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-2); }
.ticks li { display: flex; gap: 10px; }

/* Offers: the old price struck through, a price-tag badge, and a banner on the Subscription page. */
.price-old { font-weight: 400; color: var(--muted); text-decoration-thickness: 1.5px; text-decoration-color: var(--bad); margin-inline-end: 2px; }
.price .price-old { font-size: .55em; text-decoration-thickness: 2px; margin-inline-end: 4px; }
.badge.offer { background: var(--tag); color: var(--tag-ink); font-weight: 600; }
.offer-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.offer-stack .offer-banner { margin-bottom: 0; }
.price-card.has-offer:not(.pop) { border-color: #dcdb00; }
[data-theme="dark"] .price-card.has-offer:not(.pop) { border-color: rgba(244, 242, 1, .45); }
.offer-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 18px; border-radius: var(--r-panel);
  background: var(--shelf); color: #fff; border: 1px solid var(--shelf); }
.offer-banner .grow { flex: 1; min-width: 0; }
.offer-banner .small { color: rgba(255, 255, 255, .78); }
.offer-icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--tag); color: var(--tag-ink); }
.offer-title { font-weight: 600; font-size: 15.5px; }
.offer-off { display: inline-block; margin-inline-start: 6px; padding: 1px 8px; border-radius: 6px; background: var(--tag); color: var(--tag-ink); font-size: 13px; }
.offer-left { flex: none; font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); white-space: nowrap; }
.pay-amount { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; margin-bottom: 12px; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px solid var(--border); }
.pay-amount .price { font-size: 28px; }
.btn-wa { background: #1f8f4e; border-color: #1f8f4e; color: #fff; }
.btn-wa:hover { background: #187a41; border-color: #187a41; }
.section-label { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--border); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
td.actions { white-space: nowrap; }
@media (max-width: 640px) { .offer-banner { flex-wrap: wrap; } }
.ticks .ic { width: 17px; height: 17px; color: var(--ok); flex: none; margin-top: 3px; }
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 500; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-2); margin: 10px 0 0; max-width: 70ch; }
.cta-band { margin: 24px 0 64px; padding: 34px 36px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: space-between; border-radius: var(--r-panel); background: var(--shelf); color: var(--shelf-ink); }
.cta-band h2 { font-size: clamp(22px, 2.6vw, 30px); }
.cta-band p { margin: 6px 0 0; color: var(--shelf-muted); }
.site-foot { border-top: 1px solid var(--border); padding: 26px 0 36px; color: var(--muted); font-size: 13.5px; }
.site-foot .row { justify-content: space-between; }
.site-foot a { color: var(--text-2); }
.legal { max-width: 760px; }
.legal h2 { font-size: 19px; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--text-2); }
.legal ul { padding-inline-start: 22px; display: flex; flex-direction: column; gap: 6px; }

/* ---- cashier ---- */
.mode-pos { overflow: hidden; }
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 420px; height: 100vh; height: 100dvh; }
.pos-left { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pos-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--shelf); }
.pos-top .icon-btn { background: rgba(255, 255, 255, .08); border-color: var(--shelf-line); color: var(--shelf-ink); }
.pos-search { flex: 1; position: relative; }
.pos-search input { height: 48px; border-radius: var(--r-ctl); font-size: 17px; padding-inline-start: 46px; border: 0; background: #fff; color: #11291f; }
.pos-search input:focus { box-shadow: 0 0 0 3px var(--tag); }
.pos-search .ic { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: #64776d; width: 20px; height: 20px; z-index: 1; }
.pos-search kbd { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); color: #64776d; }
.net-pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: var(--r-ctl); font: 500 13px var(--font-ui); background: rgba(255, 255, 255, .08); border: 1px solid var(--shelf-line); color: var(--shelf-ink); white-space: nowrap; cursor: pointer; }
.net-pill .ic { width: 16px; height: 16px; }
.net-pill.online .ic { color: #7ee2a4; }
.net-pill.offline { background: var(--tag); color: var(--tag-ink); border-color: var(--tag); }
.net-pill .count { padding: 0 7px; border-radius: 5px; background: rgba(0, 0, 0, .12); }
.cat-bar { display: flex; gap: 6px; padding: 10px 16px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); background: var(--surface); }
.cat-bar::-webkit-scrollbar { display: none; }
.cat-chip { flex: none; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; font: 500 13.5px var(--font-ui); display: inline-flex; gap: 8px; align-items: center; }
.cat-chip i { width: 8px; height: 8px; border-radius: 50%; }
.cat-chip:hover { border-color: var(--border-2); }
.cat-chip.on { color: #fff; background: var(--shelf); border-color: var(--shelf); }
.tiles { flex: 1; overflow-y: auto; padding: 14px 16px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; align-content: start; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 104px; padding: 12px 12px 12px 14px; text-align: start;
  border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; overflow: hidden; transition: border-color .12s, transform .08s;
}
[dir="rtl"] .tile { padding: 12px 14px 12px 12px; }
.tile:hover { border-color: var(--shelf); }
.tile:active { transform: scale(.98); }
.tile .t-name { font-weight: 500; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .t-price { font-weight: 600; font-size: 17px; direction: ltr; text-align: start; unicode-bidi: plaintext; }
.tile .t-meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.tile .t-stripe { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; }
.tile .t-low { color: var(--warn); }
.tile .t-out { color: var(--bad); }
.tile.flash { animation: tile-flash .35s var(--ease); }
@keyframes tile-flash { 50% { border-color: var(--shelf); box-shadow: 0 0 0 3px var(--accent-soft); } }
.cart { display: flex; flex-direction: column; min-height: 0; border-inline-start: 1px solid var(--border); background: var(--surface); }
.cart-head { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 72px; border-bottom: 1px solid var(--border); }
.cart-head .title { flex: 1; font-weight: 600; }
.cart-number { font-size: 12px; color: var(--muted); }
.cart-lines { flex: 1; overflow-y: auto; padding: 6px 8px; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 10px; border-radius: var(--r-ctl); border: 1px solid transparent; cursor: pointer; }
.cart-line:hover { background: var(--surface-2); }
.cart-line.sel { border-color: var(--border-2); background: var(--surface-2); }
.cart-line .cl-name { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-line .cl-total { font-weight: 600; font-size: 15px; text-align: end; direction: ltr; unicode-bidi: plaintext; }
.cart-line .cl-sub { font-size: 12.5px; color: var(--muted); direction: ltr; unicode-bidi: plaintext; text-align: start; }
.cart-line .cl-ctrl { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.qty-box { display: inline-flex; align-items: center; border: 1px solid var(--border-2); border-radius: 8px; overflow: hidden; background: var(--surface); }
.qty-box button { width: 28px; height: 26px; border: 0; background: transparent; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.qty-box button:hover { background: var(--surface-2); }
.qty-box button .ic { width: 14px; height: 14px; }
.qty-box span { min-width: 38px; text-align: center; font-size: 13px; font-weight: 500; }
.cart-empty { display: grid; place-items: center; height: 100%; color: var(--muted); text-align: center; padding: 30px; }
.cart-empty .ic { width: 40px; height: 40px; opacity: .35; margin: 0 auto 8px; }
.cart-sum { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; font-size: 14px; background: var(--surface-2); }
.cart-sum .r { display: flex; justify-content: space-between; color: var(--muted); }
.cart-sum .r b { font-weight: 500; color: var(--text-2); direction: ltr; unicode-bidi: plaintext; }
.cart-sum .grand { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border-2); }
.cart-sum .grand span { font-weight: 600; }
.cart-sum .grand b { font-size: 32px; font-weight: 600; letter-spacing: -.02em; color: var(--text); direction: ltr; unicode-bidi: plaintext; }
.cart-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 16px; background: var(--surface-2); }
.cart-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px 16px; background: var(--surface-2); }
.cart-pay .btn { height: 56px; font-size: 17px; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pay-total { text-align: center; padding: 14px; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px solid var(--border); }
.pay-total b { display: block; font-size: 38px; font-weight: 600; letter-spacing: -.02em; direction: ltr; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick button { height: 44px; border-radius: var(--r-ctl); border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font: 600 15px var(--font-ui); cursor: pointer; }
.quick button:hover { border-color: var(--shelf); }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.numpad button { height: 50px; border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: 600 19px var(--font-ui); cursor: pointer; }
.numpad button:hover { border-color: var(--border-2); }
.change-line { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--ok-soft); }
.change-line b { font-size: 24px; font-weight: 600; color: var(--ok); direction: ltr; }
.change-line.short { background: var(--bad-soft); }
.change-line.short b { color: var(--bad); }
.pos-overlay { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(8, 28, 19, .5); z-index: 80; color: #fff; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .3); border-top-color: var(--tag); animation: spin .8s linear infinite; margin: 0 auto; }
.empty .spinner { border-color: var(--border); border-top-color: var(--shelf); }
@keyframes spin { to { transform: rotate(360deg); } }

/* receipt (screen preview + 80 mm print) */
.receipt { background: #fff; color: #111; width: 302px; margin: 0 auto; padding: 16px 14px; font: 12px/1.45 var(--font-ui); border: 1px solid #e3e3e3; border-radius: 4px; }
.receipt .rc-center { text-align: center; }
.receipt .rc-title { font-weight: 700; font-size: 15px; }
.receipt .rc-sub { font-size: 11px; color: #333; }
.receipt hr { border: 0; border-top: 1px dashed #999; margin: 8px 0; }
.receipt table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.receipt td { padding: 2px 0; vertical-align: top; }
.receipt .n { text-align: end; white-space: nowrap; font-family: var(--font-code); direction: ltr; unicode-bidi: plaintext; }
.receipt .rc-total td { font-weight: 700; font-size: 14px; padding-top: 4px; }
.receipt .rc-qr { display: flex; justify-content: center; margin: 10px 0 4px; }
.receipt .rc-qr svg, .receipt .rc-qr img { width: 150px; height: 150px; }
.receipt .rc-note { font-size: 10.5px; text-align: center; color: #333; }
.receipt .ar { direction: rtl; }
.receipt .bi { display: flex; justify-content: space-between; gap: 8px; }
#print-area { display: none; }

@media print {
  @page { margin: 0; }
  body { background: #fff !important; }
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { display: block; position: absolute; inset: 0 auto auto 0; }
  #print-area .receipt { width: 72mm; padding: 2mm 3mm; border: 0; border-radius: 0; }
  body.printing-page * { visibility: visible; }
  body.printing-page .side, body.printing-page .topbar-actions, body.printing-page .seg, body.printing-page form, body.printing-page .btn, body.printing-page .menu-btn, body.printing-page .alert { display: none !important; }
  body.printing-page .shell { display: block; }
  body.printing-page .card, body.printing-page .doc { break-inside: avoid; border-color: #ccc; }
  body.printing-page #print-area { display: none; }
}

/* ---- responsive ---- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-main { grid-template-columns: minmax(0, 1fr); }
  .pos { grid-template-columns: minmax(0, 1fr) 370px; }
  .fields.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(290px, 86vw); transform: translateX(-105%); transition: transform .25s var(--ease); box-shadow: 0 0 60px rgba(0, 0, 0, .35); }
  [dir="rtl"] .side { transform: translateX(105%); }
  .shell.side-open .side { transform: none; }
  .side .side-close, .topbar .menu-btn { display: inline-grid; }
  .topbar { padding: 16px 18px 6px; }
  .content { padding: 10px 18px 40px; }
  .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .hero, .band-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .feature-list, .pricing { grid-template-columns: minmax(0, 1fr); }
  .pub-nav nav { display: none; }
  .pos { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .cart { border-inline-start: 0; border-top: 1px solid var(--border); max-height: 52vh; }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .fields, .fields.three, .fields.four { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none !important; }
  .pay-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-card { padding: 22px; }
  .h-display { font-size: 22px; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .pos-top { flex-wrap: wrap; padding: 10px 12px; gap: 8px; }
  .pos-top .pos-search { order: 9; flex-basis: 100%; }
  .pos-top .pos-search kbd, .pos-top #fullscreen { display: none; }
  .pos-top .net-pill { margin-inline-start: auto; }
  .cart-pay .btn { height: 50px; }
  .doc-meta { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.pos-top .brand-mark svg rect:first-child { fill: #0a5236; }
.badge.plain::before { display: none; }

/* ==== customer credit book (آجل) ==================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* settings: the switch card */
.feature-card.on { border-color: color-mix(in srgb, var(--shelf) 45%, var(--border)); box-shadow: inset 4px 0 0 var(--tag); }
[dir="rtl"] .feature-card.on { box-shadow: inset -4px 0 0 var(--tag); }
.feature-head { display: flex; align-items: flex-start; gap: 16px; }
.feature-head .grow { flex: 1; min-width: 0; }
.feature-head h2 { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.feature-head p { margin: 6px 0 0; max-width: 62ch; }
.feature-icon { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(145deg, var(--shelf), var(--shelf-2)); color: var(--tag); }
.feature-icon .ic { width: 26px; height: 26px; }
.switch.big .track { width: 52px; height: 30px; }
.switch.big .track::after { width: 24px; height: 24px; }
.switch.big input:checked + .track::after { inset-inline-start: 25px; }
.feature-points { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.feature-points li { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; color: var(--text-2); }
.feature-points li .ic { color: var(--brand); flex: none; width: 20px; height: 20px; margin-top: 1px; }
.feature-points li b { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.feature-card:not(.on) .feature-points { opacity: .72; }
.feature-foot { margin-top: 18px; align-items: flex-end; }

/* KPI band */
.kpi .kpi-label .ic { width: 16px; height: 16px; color: var(--brand); }
.kpi.kpi-alert { background: linear-gradient(180deg, var(--bad-soft), var(--surface) 70%); }
.kpi.kpi-alert .kpi-value { color: var(--bad); }

/* add form */
.add-cust > summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 9px; list-style: none; }
.add-cust > summary::-webkit-details-marker { display: none; }
.add-cust > summary .ic { color: var(--brand); }
.add-cust[open] > summary { margin-bottom: 16px; }
details.card > summary.card-title { cursor: pointer; list-style: none; }
details.card > summary.card-title::-webkit-details-marker { display: none; }

/* customer cards */
.cust-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.cust-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel);
  transition: border-color .15s, box-shadow .2s var(--ease), transform .2s var(--ease); }
.cust-card:hover { border-color: var(--border-2); box-shadow: var(--shadow-pop); transform: translateY(-2px); }
.cust-card.over { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }
.cust-card.settled .cust-bal b { color: var(--muted); }
.cust-top { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.cust-top .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cust-avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; font-size: 15px;
  background: linear-gradient(145deg, var(--shelf), var(--shelf-2)); color: var(--tag); letter-spacing: .02em; }
.cust-avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.cust-avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.cust-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-phone { font-size: 12.5px; color: var(--muted); direction: ltr; text-align: start; unicode-bidi: plaintext; }
.cust-bal { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.cust-bal-label { width: 100%; font-size: 12.5px; color: var(--muted); }
.cust-bal b { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; direction: ltr; }
.cust-bal small { color: var(--muted); font-size: 12.5px; }
.limit-meter { display: block; width: 100%; height: 6px; }
.lm-track { fill: var(--surface-2); stroke: var(--border); stroke-width: .3; }
.lm-fill.ok { fill: var(--ok); } .lm-fill.warn { fill: #d99a00; } .lm-fill.bad { fill: var(--bad); }
.cust-limit { margin-top: -6px; }
.cust-actions { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--border); margin-top: auto; }

/* one customer */
.cust-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr); gap: 18px 28px; align-items: center;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--tag) 12%, transparent), transparent 55%), var(--surface); }
.cust-hero.over { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }
.cust-hero-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.cust-hero-id .grow { flex: 1; min-width: 0; }
.cust-hero-name { font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cust-hero-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.cust-hero-meta > * { display: inline-flex; align-items: center; gap: 6px; color: inherit; }
.cust-hero-meta .ic { width: 15px; height: 15px; }
.cust-hero-meta a.mono { direction: ltr; color: var(--text-2); }
.cust-hero-figs { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: space-between; }
.cust-hero-bal { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.cust-hero-bal .label { width: 100%; }
.cust-hero-bal b { font-size: 40px; font-weight: 600; letter-spacing: -.03em; line-height: 1; direction: ltr; }
.cust-hero.over .cust-hero-bal b { color: var(--bad); }
.cust-hero-ring { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cust-hero-ring.none { min-width: 84px; }
.limit-ring { width: 84px; height: 84px; }
.lr-track { fill: none; stroke: var(--surface-2); stroke-width: 7; }
.lr-fill { fill: none; stroke-width: 7; stroke-linecap: round; }
.lr-fill.ok { stroke: var(--ok); } .lr-fill.warn { stroke: #d99a00; } .lr-fill.bad { stroke: var(--bad); }
.limit-ring text { font: 600 14px var(--font-code); fill: var(--text); }
.cust-hero-kv { font-size: 13px; }
.cust-hero-actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--border); }

/* statement timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-block: 18px; inset-inline-start: 17px; width: 2px; background: var(--border); }
.tl-item { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; }
.tl-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--border-2); color: var(--muted); position: relative; z-index: 1; }
.tl-dot .ic { width: 16px; height: 16px; }
.k-sale .tl-dot { border-color: #d99a00; color: #b07c00; background: var(--warn-soft); }
.k-payment .tl-dot { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.k-return .tl-dot { border-color: var(--info); color: var(--info); background: var(--info-soft); }
.tl-body { min-width: 0; padding-top: 2px; }
.tl-title { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-ref { font-size: 12px; font-weight: 500; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); text-decoration: none; color: var(--text-2); }
.tl-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tl-amt { text-align: end; display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.tl-amt b { font-size: 15px; direction: ltr; }
.tl-amt b.up { color: #b07c00; } .tl-amt b.down { color: var(--ok); }
[data-theme="dark"] .tl-amt b.up, [data-theme="dark"] .k-sale .tl-dot { color: var(--warn); }

/* payment form */
.pay-card-c .seg { display: flex; width: 100%; }
.pay-card-c .seg label { flex: 1; text-align: center; }

/* returns: refund to */
.choice-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--r-ctl); background: var(--surface); transition: border-color .15s, background .15s; }
.choice > span .ic { grid-row: span 2; color: var(--brand); margin-top: 2px; }
.choice > span small { color: var(--muted); font-size: 12.5px; }
.choice input:checked + span { border-color: var(--shelf); background: color-mix(in srgb, var(--tag) 10%, var(--surface)); }
[data-theme="dark"] .choice input:checked + span { border-color: var(--brand); }
.choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* day close */
.close-credit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.close-credit > div { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px solid var(--border); }
.close-credit span { display: flex; align-items: center; gap: 6px; }
.close-credit .ic { width: 15px; height: 15px; }
.close-credit b { font-size: 18px; direction: ltr; text-align: start; }

/* ---- cashier ---- */
.cart-actions.four { grid-template-columns: repeat(4, 1fr); }
.cart-pay.three { grid-template-columns: 1fr 1fr 1fr; }
.cart-pay.three .btn { font-size: 15px; padding: 0 8px; }
.cart-pay.three .btn kbd { display: none; }
.btn-credit { background: var(--surface); border: 2px solid var(--shelf); color: var(--shelf); font-weight: 600; }
.btn-credit:hover { background: color-mix(in srgb, var(--tag) 18%, var(--surface)); }
[data-theme="dark"] .btn-credit { border-color: var(--brand); color: var(--brand); }
#cust-chip { padding: 0 12px 8px; }
.cust-chip-in { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-ctl); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--tag) 60%, var(--border)); }
.cust-chip-in .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.cust-chip-in b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-list { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; }
.cust-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--surface);
  color: inherit; font: inherit; text-align: start; cursor: pointer; transition: border-color .15s, background .15s; }
.cust-row:hover, .cust-row:focus-visible { border-color: var(--shelf); background: var(--surface-2); outline: none; }
.cust-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cr-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-phone { font-size: 12.5px; color: var(--muted); direction: ltr; text-align: start; unicode-bidi: plaintext; }
.bal-chip { font: 600 13.5px var(--font-code); padding: 4px 10px; border-radius: 999px; direction: ltr; background: var(--surface-2); color: var(--text-2); }
.bal-chip.ok { background: var(--ok-soft); color: var(--ok); }
.bal-chip.warn { background: var(--warn-soft); color: var(--warn); }
.bal-chip.bad { background: var(--bad-soft); color: var(--bad); }
.cust-new { margin-top: 12px; padding: 14px; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px dashed var(--border-2); }
.cust-one-head { display: flex; align-items: center; gap: 14px; }
.cust-one-head .grow { flex: 1; min-width: 0; }
.cust-one-head b { font-size: 18px; }
.cust-one-head .mono { direction: ltr; text-align: start; }
.bal-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bt { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.bt > span { font-size: 12.5px; color: var(--muted); }
.bt > b { font-size: 20px; font-weight: 600; direction: ltr; text-align: start; overflow: hidden; text-overflow: ellipsis; }
.bt.ok { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.bt.warn { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); background: var(--warn-soft); }
.bt.bad { border-color: color-mix(in srgb, var(--bad) 50%, var(--border)); background: var(--bad-soft); }
.bt.bad > b { color: var(--bad); }
.bt.after { border-color: var(--shelf); background: color-mix(in srgb, var(--tag) 14%, var(--surface)); }
.credit-panel { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--surface); }
.cp-who { display: flex; align-items: center; gap: 10px; }
.cp-who b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-who .mono { direction: ltr; }
.bal-flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }
.bf-arrow { color: var(--muted); display: grid; place-items: center; }
[dir="rtl"] .bf-arrow svg { transform: scaleX(-1); }
.change-line.account { background: var(--accent-soft); }
.change-line.account b { color: var(--text); }
#cust-title { display: flex; align-items: center; gap: 8px; }
#cust-title .ic { color: var(--brand); }

@media (max-width: 640px) {
  .feature-head { flex-wrap: wrap; }
  .feature-points, .choice-row, .close-credit { grid-template-columns: minmax(0, 1fr); }
  .cust-hero { grid-template-columns: minmax(0, 1fr); }
  .cust-hero-bal b { font-size: 32px; }
  .bal-tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tl-item { grid-template-columns: 32px minmax(0, 1fr); }
  .tl-amt { grid-column: 2; text-align: start; flex-direction: row; gap: 10px; align-items: baseline; }
  .cart-actions.four { grid-template-columns: repeat(2, 1fr); }
}
@media print {
  body.printing-page .no-print { display: none !important; }
}

/* cashier language menu (Arabic, English, Urdu, Bengali) */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; cursor: pointer; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-pop { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 30; min-width: 150px; padding: 6px; display: flex; flex-direction: column; gap: 2px; background: var(--surface-pop); border: 1px solid var(--border); border-radius: var(--r-ctl); box-shadow: var(--shadow-pop); }
.lang-pop a { padding: 8px 12px; border-radius: 7px; color: var(--text); text-decoration: none; font-size: 14.5px; }
.lang-pop a:hover { background: var(--surface-2); }
.lang-pop a.on { background: var(--shelf); color: #fff; }
html[lang="bn"] { --font-ui: "Plex Arabic", "Nirmala UI", "Noto Sans Bengali", "Vrinda", system-ui, sans-serif; }
html[lang="ur"] { --font-ui: "Plex Arabic", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; }
.add-cust:not([open]) { display: none; } /* opened by the "New customer" button */

/* ==== brand (logos from Admin > Brand & website) ===================================================== */
img.only-light, img.only-dark { display: none; }
[data-theme="light"] img.only-light { display: block; }
[data-theme="dark"] img.only-dark { display: block; }
.wordmark, .nav-word, .side-word, .auth-word, .foot-word { width: auto; max-width: 100%; object-fit: contain; }
.nav-word { height: 30px; }
.side-word { height: 27px; }
.side-brand { padding: 6px 4px; }
.auth-word { height: 40px; margin: 0 auto 22px; }
.auth-card > .brand, .auth-card > a.brand { display: flex; justify-content: center; }
.foot-word { height: 34px; }
.brand-img { height: 100%; width: auto; }
.pos-top .brand-mark { width: 40px; height: 40px; padding: 4px; border-radius: 10px; background: rgba(255, 255, 255, .07); display: grid; place-items: center; }
.pos-mark { height: 30px; width: auto; }
.help-link { color: var(--shelf-ink) !important; background: rgba(255, 255, 255, .06); margin-bottom: 6px; }
.help-link .ic { color: #7ee2a4; }

/* ==== public website =================================================================================== */
body.lp { background:
  radial-gradient(1200px 520px at 85% -120px, color-mix(in srgb, var(--tag) 16%, transparent), transparent 70%),
  radial-gradient(900px 600px at 0% 0%, color-mix(in srgb, var(--shelf) 10%, transparent), transparent 70%), var(--bg); }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--shelf); color: #fff; }
.skip-link:focus { top: 12px; }
.only-mobile { display: none !important; }
.kicker { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--brand); background: color-mix(in srgb, var(--shelf) 9%, transparent); border: 1px solid color-mix(in srgb, var(--shelf) 18%, transparent); margin-bottom: 14px; }
[data-theme="dark"] .kicker { background: rgba(143, 214, 174, .1); border-color: rgba(143, 214, 174, .22); }
.section-head.center { text-align: center; margin-inline: auto; }
.lp-h2 { font-size: clamp(26px, 3.2vw, 40px); font-weight: 650; letter-spacing: -.025em; line-height: 1.15; margin: 0 0 12px; }

/* nav */
.lp-nav { position: sticky; top: 0; z-index: 50; transition: background .2s, box-shadow .2s, border-color .2s; border-bottom: 1px solid transparent; }
.lp-nav.scrolled, .lp-nav.open { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--border); box-shadow: 0 8px 30px -22px rgba(1, 40, 24, .5); }
.lp-nav-in { width: min(1200px, 100% - 32px); margin-inline: auto; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding: 14px 0; }
.lp-brand { display: flex; align-items: center; }
.lp-links { display: flex; justify-content: center; gap: 4px; }
.lp-links a { padding: 8px 14px; border-radius: 9px; text-decoration: none; color: var(--text-2); font-size: 14.5px; font-weight: 500; }
.lp-links a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.lp-actions { display: flex; align-items: center; gap: 8px; }
.lp-burger { display: none; }

/* hero */
.lp-hero { position: relative; overflow: hidden; }
.lp-glow { position: absolute; inset: -20% -10% auto; height: 120%; pointer-events: none;
  background: radial-gradient(500px 300px at 72% 30%, color-mix(in srgb, var(--tag) 22%, transparent), transparent 70%),
              radial-gradient(420px 280px at 90% 70%, color-mix(in srgb, var(--shelf) 22%, transparent), transparent 70%); filter: blur(10px); opacity: .9; }
.lp-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; padding: clamp(40px, 7vw, 92px) 0 clamp(56px, 7vw, 96px); }
.lp-eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 6px 20px -14px rgba(1, 40, 24, .4); }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #22b45e; box-shadow: 0 0 0 0 rgba(34, 180, 94, .5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(34, 180, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 180, 94, 0); } }
.lp-title { font-size: clamp(36px, 5.2vw, 64px); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; margin: 22px 0 18px; max-width: 15ch; text-wrap: balance; }
[dir="rtl"] .lp-title { letter-spacing: 0; line-height: 1.25; }
.lp-lead { font-size: clamp(16.5px, 1.5vw, 19px); color: var(--text-2); max-width: 52ch; margin: 0; }
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.lp-cta .btn.lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.lp-cta .btn-accent { box-shadow: 0 12px 28px -14px rgba(160, 158, 0, .9); }
[dir="rtl"] .lp-cta .btn-accent .ic { transform: scaleX(-1); }
.btn-glass { background: color-mix(in srgb, var(--surface) 70%, transparent); border-color: var(--border-2); backdrop-filter: blur(8px); }
.btn-glass .ic { color: #1f8f4e; }
.btn-glass-dark { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; }
.btn-glass-dark:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .4); }
.lp-checks { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: 14px; }
.lp-checks li { display: inline-flex; align-items: center; gap: 7px; }
.lp-checks .ic { width: 17px; height: 17px; color: #22b45e; }

/* hero: the product picture */
.lp-visual { position: relative; margin: 0; padding: 26px 26px 40px; }
.mock-win { position: relative; z-index: 1; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 50px 90px -40px rgba(1, 40, 24, .55), 0 14px 30px -18px rgba(1, 40, 24, .3); transform: perspective(1400px) rotateY(-6deg) rotateX(3deg); }
[dir="rtl"] .mock-win { transform: perspective(1400px) rotateY(6deg) rotateX(3deg); }
.mock-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--shelf); }
.mock-mark { height: 24px; width: auto; }
.mock-search { flex: 1; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 9px; background: #fff; color: #7b8a82; font-size: 12px; white-space: nowrap; overflow: hidden; }
.mock-search .ic { width: 14px; height: 14px; flex: none; }
.mock-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--tag); color: var(--tag-ink); font-size: 11.5px; font-weight: 600; }
.mock-pill i { width: 7px; height: 7px; border-radius: 50%; background: #1f8f4e; }
.mock-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); min-height: 260px; }
.mock-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px; align-content: start; background: var(--surface-2); }
.mock-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 66px; padding: 9px 10px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--border); border-inline-start: 3px solid var(--c, #86ac34); font-size: 11.5px; }
.mock-tile b { font-weight: 500; line-height: 1.3; }
.mock-tile em { font-style: normal; font-weight: 700; font-size: 13px; color: var(--text); text-align: start; }
.mock-tile.t0 { --c: #e0b600; } .mock-tile.t1 { --c: #c9853c; } .mock-tile.t2 { --c: #8a6a3c; } .mock-tile.t3 { --c: #5c3c1e; } .mock-tile.t4 { --c: #2c7bbf; } .mock-tile.t5 { --c: #d6c25a; }
.mock-tile.t2 { outline: 2px solid color-mix(in srgb, var(--tag) 70%, transparent); outline-offset: 1px; }
.mock-cart { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-inline-start: 1px solid var(--border); font-size: 12px; }
.mc-head { font-weight: 600; font-size: 12.5px; margin-bottom: 2px; }
.mc-line { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); }
.mc-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-line b { font-family: var(--font-code); font-weight: 500; direction: ltr; }
.mc-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--border-2); }
.mc-total b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; direction: ltr; }
.mc-pay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.mc-pay span { display: grid; place-items: center; height: 30px; border-radius: 8px; font-size: 11px; font-weight: 600; }
.p-card { background: var(--shelf); color: #fff; }
.p-credit { border: 1.5px solid var(--shelf); color: var(--shelf); }
[data-theme="dark"] .p-credit { border-color: var(--brand); color: var(--brand); }
.p-cash { background: var(--tag); color: var(--tag-ink); }
.mock-receipt { position: absolute; z-index: 2; bottom: 0; inset-inline-start: -6px; width: 150px; padding: 14px 12px 12px; background: #fffef8; color: #1e2a24;
  border-radius: 6px; transform: rotate(-5deg); box-shadow: 0 30px 40px -24px rgba(1, 40, 24, .6); text-align: center;
  -webkit-mask: radial-gradient(circle 5px at 50% 0, transparent 98%, #000) 0 0 / 13px 100% repeat-x; mask: radial-gradient(circle 5px at 50% 0, transparent 98%, #000) 0 0 / 13px 100% repeat-x; }
[dir="rtl"] .mock-receipt { transform: rotate(5deg); }
.mr-store { font-weight: 700; font-size: 13px; direction: rtl; }
.mr-kind { font-size: 10px; color: #5b6b62; direction: rtl; }
.mr-qr { width: 64px; height: 64px; margin: 10px auto 8px; background: conic-gradient(#1e2a24 25%, transparent 0 50%, #1e2a24 0 75%, transparent 0) 0 0 / 10px 10px, #fffef8;
  outline: 5px solid #fffef8; box-shadow: 0 0 0 6px #1e2a24; }
.mr-ok { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 10px; font-weight: 600; color: #157a46; }
.mr-ok .ic { width: 12px; height: 12px; }
.mock-chip { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--surface-pop);
  border: 1px solid var(--border); box-shadow: 0 20px 40px -20px rgba(1, 40, 24, .45); font-size: 12.5px; animation: floaty 6s ease-in-out infinite; }
.mock-chip > .ic { width: 30px; height: 30px; padding: 6px; border-radius: 9px; flex: none; }
.mock-chip span { display: flex; flex-direction: column; line-height: 1.3; }
.mock-chip small { color: var(--muted); font-size: 11.5px; }
.chip-1 { top: -14px; inset-inline-end: 18%; }
.chip-1 > .ic { background: var(--ok-soft); color: var(--ok); }
.chip-2 { bottom: -4px; inset-inline-end: 4%; animation-delay: -3s; }
.chip-2 > .ic { background: var(--accent-soft); color: var(--tag-ink); }
[data-theme="dark"] .chip-2 > .ic { color: var(--tag); }
@keyframes floaty { 50% { transform: translateY(-8px); } }

/* facts strip */
.lp-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: -12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 20px 50px -36px rgba(1, 40, 24, .45); overflow: hidden; }
.fact { display: flex; flex-direction: column; gap: 4px; padding: 22px 24px; }
.fact + .fact { border-inline-start: 1px solid var(--border); }
.fact b { align-self: flex-start; font-size: 30px; font-weight: 700; letter-spacing: -.02em; color: var(--brand); line-height: 1.1; }
.fact b .ic { width: 30px; height: 30px; }
.fact span { color: var(--text-2); font-size: 14px; }

/* how it works */
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: s; }
.lp-steps li { position: relative; padding: 26px 24px 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.lp-steps li:nth-child(2) { background: linear-gradient(160deg, var(--shelf), var(--shelf-2)); color: #fff; border-color: transparent; box-shadow: 0 30px 60px -36px rgba(1, 40, 24, .7); }
.lp-steps li:nth-child(2) p { color: rgba(255, 255, 255, .78); }
.lp-steps li:nth-child(2) .step-ic { background: var(--tag); color: var(--tag-ink); }
.step-n { position: absolute; top: 10px; inset-inline-end: 18px; font: 700 64px/1 var(--font-code); color: color-mix(in srgb, var(--text) 7%, transparent); }
.lp-steps li:nth-child(2) .step-n { color: rgba(255, 255, 255, .1); }
.step-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: color-mix(in srgb, var(--shelf) 10%, transparent); color: var(--brand); margin-bottom: 16px; }
.step-ic .ic { width: 22px; height: 22px; }
.lp-steps h3 { font-size: 18px; font-weight: 650; margin: 0 0 6px; }
.lp-steps p { margin: 0; color: var(--text-2); font-size: 14.5px; }

/* features */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bento-card { padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); transition: transform .25s var(--ease), box-shadow .25s, border-color .2s; }
.bento-card:hover { transform: translateY(-3px); border-color: var(--border-2); box-shadow: 0 24px 40px -30px rgba(1, 40, 24, .5); }
.bento-card.wide { grid-column: span 2; }
.bento-card .fi { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--shelf); color: var(--tag); margin-bottom: 16px; }
.bento-card .fi .ic { width: 20px; height: 20px; }
.bento-card h3 { font-size: 17px; font-weight: 650; margin: 0 0 6px; }
.bento-card p { margin: 0; color: var(--text-2); font-size: 14.5px; max-width: 60ch; }
.bento-card.hl { background: radial-gradient(500px 220px at 90% 0%, color-mix(in srgb, var(--tag) 20%, transparent), transparent 70%), linear-gradient(150deg, var(--shelf), #02301d); color: #fff; border-color: transparent; }
.bento-card.hl p { color: rgba(255, 255, 255, .8); }
.bento-card.hl .fi { background: var(--tag); color: var(--tag-ink); }

/* credit book spotlight */
.lp-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.lp-points { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.lp-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.lp-points .ic { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); flex: none; margin-top: 1px; }
.credit-demo { position: relative; padding: 24px; border-radius: 24px; background: linear-gradient(150deg, color-mix(in srgb, var(--tag) 20%, var(--surface)), var(--surface-2)); border: 1px solid var(--border); }
.cd-card { padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 30px 50px -34px rgba(1, 40, 24, .5); max-width: 380px; margin-inline: auto; }
.cd-top { display: flex; align-items: center; gap: 12px; }
.cd-top .grow { display: flex; flex-direction: column; }
.cd-top small { color: var(--muted); }
.cd-bal { display: flex; align-items: baseline; gap: 6px; margin: 16px 0 10px; }
.cd-bal b { font-size: 36px; font-weight: 700; letter-spacing: -.02em; }
.cd-bal small { color: var(--muted); }
.cd-meter { height: 7px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.cd-meter i { display: block; height: 100%; width: 49%; border-radius: 99px; background: var(--ok); }
.cd-meta { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.cd-actions { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.cd-float { position: absolute; bottom: -16px; inset-inline-end: 22px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px;
  background: var(--shelf); color: #fff; font-size: 13px; box-shadow: 0 20px 34px -20px rgba(1, 40, 24, .8); animation: floaty 6s ease-in-out infinite; }
.cd-float .ic { width: 16px; height: 16px; color: #7ee2a4; }
.cd-float b { color: var(--tag); }

/* pricing */
.lp-pricing { align-items: stretch; }
.lp-pricing .price-card { position: relative; padding: 28px 24px 24px; border-radius: 18px; }
.lp-pricing .price-card.pop { border: 2px solid var(--shelf); box-shadow: 0 34px 60px -40px rgba(1, 40, 24, .6); transform: translateY(-8px); }
[data-theme="dark"] .lp-pricing .price-card.pop { border-color: var(--brand); }
.pop-flag { position: absolute; top: -13px; inset-inline-start: 22px; padding: 4px 12px; border-radius: 999px; background: var(--shelf); color: var(--tag); font-size: 12px; font-weight: 600; }
.center-text { text-align: center; }

/* FAQ */
.lp-faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 48px; align-items: start; }
.lp-faq .faq { max-width: none; }
.lp-faq .faq details { padding: 18px 4px; }
.lp-faq .faq summary { font-size: 16.5px; }

/* final call */
.lp-final { position: relative; overflow: hidden; padding: 40px clamp(24px, 4vw, 48px); border-radius: 24px; gap: 28px;
  background: radial-gradient(600px 300px at 90% 0%, color-mix(in srgb, var(--tag) 22%, transparent), transparent 70%), linear-gradient(150deg, var(--shelf), #02301d); }
.lp-final .cta-mark { height: 72px; width: auto; flex: none; opacity: .95; }
.lp-final .grow { flex: 1; min-width: 220px; }
.lp-final h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 650; }

/* footer */
.lp-foot { margin-top: 24px; border-top: 1px solid var(--border); background: var(--surface); }
.lp-foot-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding: 48px 0 28px; }
.lp-foot-brand p { max-width: 44ch; font-size: 14px; margin: 14px 0 18px; }
.lp-foot h4 { font-size: 13.5px; font-weight: 600; color: var(--text); margin: 4px 0 12px; }
.lp-foot-grid > div:not(.lp-foot-brand) { display: flex; flex-direction: column; gap: 9px; }
.lp-foot-grid a { color: var(--text-2); text-decoration: none; font-size: 14px; }
.lp-foot-grid a:hover { color: var(--brand); }
.lp-foot-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 0 30px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.social-row { display: flex; flex-wrap: wrap; gap: 8px; }
.social-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s; }
.social-btn .ic { width: 19px; height: 19px; }
.social-btn:hover { transform: translateY(-2px); color: #fff; border-color: transparent; background: var(--net, var(--shelf)); }
.s-whatsapp { --net: #1f8f4e; } .s-instagram { --net: #d6246e; } .s-tiktok { --net: #111; } .s-x { --net: #111; } .s-snapchat { --net: #e6c800; }
.s-youtube { --net: #e1251b; } .s-facebook { --net: #1877f2; } .s-linkedin { --net: #0a66c2; }

/* floating WhatsApp */
.wa-float { position: fixed; z-index: 60; bottom: 20px; inset-inline-end: 20px; display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 20px 0 16px;
  border-radius: 999px; background: #1f8f4e; color: #fff; text-decoration: none; font-weight: 600; box-shadow: 0 16px 34px -14px rgba(16, 90, 48, .9);
  transition: transform .2s var(--ease), background .2s; }
.wa-float:hover { transform: translateY(-2px); background: #187a41; }
.wa-float .ic { width: 24px; height: 24px; }

/* reveal on scroll (only when JS is on and motion is welcome) */
html.js-reveal .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js-reveal .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .mock-chip, .cd-float, .pulse { animation: none; } }

/* ==== admin ============================================================================================= */
.admin-hello { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: radial-gradient(600px 200px at 100% 0%, color-mix(in srgb, var(--tag) 14%, transparent), transparent 70%), var(--surface); }
.admin-hello h2 { font-size: 20px; font-weight: 650; margin: 0 0 2px; }
.admin-hello p { margin: 0; }
.quick-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.delta { font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 6px; }
.delta.up { color: var(--ok); background: var(--ok-soft); } .delta.down { color: var(--bad); background: var(--bad-soft); }
.kpi-value small { margin-inline-start: 6px; }
.stat-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.stat { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: inherit; min-width: 0; }
a.stat:hover { border-color: var(--border-2); }
.stat > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.stat b { font-size: 20px; font-weight: 650; line-height: 1.2; direction: ltr; text-align: start; }
.stat small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.stat-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; flex: none; }
.stat-ic .ic { width: 18px; height: 18px; }
.stat-ic.ok { background: var(--ok-soft); color: var(--ok); } .stat-ic.warn { background: var(--warn-soft); color: var(--warn); }
.stat-ic.bad { background: var(--bad-soft); color: var(--bad); } .stat-ic.info { background: var(--info-soft); color: var(--info); }
.donut-wrap { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; align-items: center; }
.donut-box { height: 170px; }
.legend.col { display: flex; flex-direction: column; gap: 10px; }
.legend.col span { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.legend.col b { margin-inline-start: auto; }
.lg-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; }
.checklist .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.checklist small { color: var(--muted); font-size: 12.5px; }
.ck { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none; }
.ck .ic { width: 15px; height: 15px; }
.checklist .done .ck { background: var(--ok-soft); color: var(--ok); }
.checklist .done b { color: var(--text-2); font-weight: 500; }
.checklist .todo .ck { background: var(--warn-soft); color: var(--warn); }
.dimmed { opacity: .5; }
.section-title { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 650; margin-bottom: 12px; }
.section-title .ic { color: var(--brand); }

/* brand page */
.brand-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: center; }
.brand-hero-stage { display: grid; grid-template-rows: 1fr 1fr; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); min-height: 200px; }
.bh-light, .bh-dark { display: grid; place-items: center; padding: 22px; }
.bh-light { background: #fff; }
.bh-dark { background: var(--shelf); }
.bh-word { height: 44px; width: auto; max-width: 90%; }
.brand-hero-side h2 { font-size: 19px; font-weight: 650; margin: 0 0 6px; }
.brand-hero-side .tags { margin-top: 12px; }
.brand-hero-side .tag { display: inline-flex; align-items: center; gap: 5px; }
.brand-hero-side .tag .ic { width: 13px; height: 13px; color: var(--ok); }
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.logo-slot { display: flex; flex-direction: column; gap: 10px; }
.logo-slot-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.logo-preview { height: 130px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.logo-preview.on-light { background: repeating-conic-gradient(#f2f4f2 0% 25%, #fff 0% 50%) 0 0 / 18px 18px; }
.logo-preview.on-dark { background: var(--shelf); }
.logo-preview img { max-height: 84px; max-width: 86%; width: auto; }
.logo-preview img.is-new { outline: 2px dashed var(--tag); outline-offset: 6px; }
.slot-favicon img { height: 48px; image-rendering: auto; }
.slot-icon img { height: 96px; border-radius: 22px; }
.file-pick { position: relative; display: block; cursor: pointer; }
.file-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-pick > span { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-ctl); border: 1.5px dashed var(--border-2); color: var(--text-2); font-size: 13.5px; overflow: hidden; }
.file-pick > span > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-pick:hover > span, .file-pick input:focus-visible + span { border-color: var(--shelf); color: var(--text); }
.preview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.prev-card { display: flex; flex-direction: column; gap: 12px; }
.prev-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.fake-tabs { display: flex; gap: 2px; padding: 8px 8px 0; background: #dfe3e1; border-radius: 10px 10px 0 0; }
[data-theme="dark"] .fake-tabs { background: #0d1a14; }
.fake-tab { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 9px 9px 0 0; font-size: 12px; min-width: 0; flex: 1; color: #555; }
.fake-tab.on { background: var(--surface); color: var(--text); flex: 2; }
.fake-tab img { width: 16px; height: 16px; flex: none; }
.fake-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fake-tab i { margin-inline-start: auto; font-style: normal; color: var(--muted); }
.dotph { width: 14px; height: 14px; border-radius: 50%; background: #bfc7c3; flex: none; }
.fake-url { display: flex; align-items: center; gap: 6px; margin-top: -12px; padding: 8px 12px; border-radius: 0 0 10px 10px; background: var(--surface-2); border: 1px solid var(--border); border-top: 0; font-size: 12.5px; color: var(--text-2); }
.fake-url .ic { width: 13px; height: 13px; color: var(--ok); }
.fake-phone { padding: 18px 14px; border-radius: 18px; background: linear-gradient(160deg, #1d3b6b, #4a2d6b 60%, #b46a3c); }
.fake-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.fa-app { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fa-app img { width: 100%; max-width: 54px; aspect-ratio: 1; border-radius: 13px; }
.fa-app figcaption { font-size: 10px; color: #fff; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fa-app.ph { width: 100%; max-width: 54px; aspect-ratio: 1; border-radius: 13px; background: rgba(255, 255, 255, .25); justify-self: center; }
.fake-side { display: flex; flex-direction: column; gap: 9px; padding: 16px 14px; border-radius: 14px; background: var(--shelf); min-height: 130px; }
.fs-word { height: 22px; width: auto; max-width: 80%; margin-bottom: 6px; }
.fs-line { height: 9px; border-radius: 5px; background: rgba(255, 255, 255, .14); }
.fs-line.w1 { width: 70%; } .fs-line.w2 { width: 85%; } .fs-line.w3 { width: 55%; }
.fs-line.on { height: 22px; background: var(--tag); }
.fake-share { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.fake-share img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.fsh-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; font-size: 13px; }
.fsh-host { color: var(--muted); font-size: 11.5px; text-align: start; }
.social-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.social-field { display: flex; align-items: flex-end; gap: 12px; }
.social-field .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sf-label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.sf-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none; color: #fff; background: var(--net, var(--shelf)); }
.sf-icon .ic { width: 20px; height: 20px; }
.sf-icon.s-snapchat { color: #111; }
.wa-line { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px solid var(--border); }
.wa-line .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

/* ==== responsive ======================================================================================== */
@media (max-width: 1100px) {
  .stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .lp-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .lp-visual { max-width: 640px; margin-inline: auto; width: 100%; }
  .lp-title { max-width: 18ch; }
  .lp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
  .fact:nth-child(3) { border-inline-start: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--border); }
  .lp-steps { grid-template-columns: minmax(0, 1fr); }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-split, .lp-faq { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .lp-foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-foot-brand { grid-column: 1 / -1; }
  .brand-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .lp-nav-in { grid-template-columns: auto 1fr; }
  .lp-burger { display: inline-grid; }
  .lp-links { display: none; position: absolute; top: 100%; inset-inline: 12px; flex-direction: column; padding: 10px; border-radius: 16px; background: var(--surface-pop);
    border: 1px solid var(--border); box-shadow: var(--shadow-pop); }
  .lp-nav.open .lp-links { display: flex; }
  .lp-links a { padding: 12px 14px; font-size: 16px; }
  .only-mobile { display: block !important; }
  .lp-actions { justify-content: flex-end; }
  .lp-pricing .price-card.pop { transform: none; }
}
@media (max-width: 640px) {
  .lp-actions .lang-btn, .lp-actions [data-theme-toggle] { display: none; }
  .lp-nav.open .lp-actions .lang-btn, .lp-nav.open .lp-actions [data-theme-toggle] { display: inline-grid; }
  .nav-word { height: 26px; }
  .lp-visual { padding: 18px 6px 40px; }
  .mock-body { grid-template-columns: minmax(0, 1fr); }
  .mock-cart { border-inline-start: 0; border-top: 1px solid var(--border); }
  .mock-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mock-win, [dir="rtl"] .mock-win { transform: none; }
  .chip-2 { display: none; }
  .mock-receipt { width: 120px; inset-inline-start: -2px; }
  .lp-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fact { padding: 16px; }
  .fact b { font-size: 24px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento-card.wide { grid-column: auto; }
  .lp-final { flex-direction: column; align-items: flex-start; }
  .lp-foot-grid { grid-template-columns: minmax(0, 1fr); }
  .wa-float { width: 56px; height: 56px; padding: 0; justify-content: center; }
  .wa-float span { display: none; }
  .stat-strip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .donut-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .preview-grid, .social-fields { grid-template-columns: minmax(0, 1fr); }
}
.legend.col i.lg-dot { width: 10px; height: 10px; border-radius: 3px; }

/* sign-in, install and error pages */
body.mode-plain { background: radial-gradient(900px 520px at 100% -10%, color-mix(in srgb, var(--tag) 15%, transparent), transparent 70%), radial-gradient(760px 520px at 0% 110%, color-mix(in srgb, var(--shelf) 13%, transparent), transparent 70%), var(--bg); }
.auth-card { border-radius: 22px; box-shadow: 0 50px 90px -60px rgba(1, 40, 24, .55), 0 2px 6px rgba(1, 40, 24, .04); }
.auth-card > h1.h-display { text-align: center; }
.auth-card > h1.h-display + p.muted { text-align: center; margin-top: -2px; }
.cart-actions.four { gap: 6px; }
.cart-actions.four .btn { padding: 0 6px; gap: 5px; font-size: 12.5px; min-width: 0; overflow: hidden; }
.cart-actions.four .btn .ic { width: 15px; height: 15px; flex: none; }
.cart-actions.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cart-actions .btn > span, .cart-actions .btn { white-space: nowrap; text-overflow: ellipsis; }

.vat-note { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--muted); font-size: 13.5px; }
.vat-note .ic { width: 16px; height: 16px; color: var(--brand); }
