/* Shelfy — dark charcoal + lime theme */
:root{
  color-scheme:dark;
  --bg:#1b1e24; --side:#15171c; --card:#22262e; --card-2:#2a2f38; --line:#323844; --line-2:#3c4350;
  --text:#eef0f3; --muted:#9aa2af; --muted-2:#707885;
  --accent:#c8f031; --accent-hi:#d6fa52; --accent-ink:#14170c; --accent-soft:rgba(200,240,49,.12); --accent-line:rgba(200,240,49,.35);
  --green:#c8f031; --green-soft:rgba(200,240,49,.12);
  --red:#ff6b6b; --red-soft:rgba(255,107,107,.13);
  --amber:#f5b83d; --amber-soft:rgba(245,184,61,.14);
  --blue:#6cb6ff; --blue-soft:rgba(108,182,255,.13);
  --teal:#4fd1c5; --teal-soft:rgba(79,209,197,.13);
  --radius:14px; --shadow:0 1px 0 rgba(255,255,255,.02) inset,0 6px 18px rgba(0,0,0,.18);
  --chart-a:#c8f031; --chart-b:#5d6a2a; --chart-grid:#2f3540; --chart-text:#8a929e;
  --side-line:#262a32; --nav-text:#d5d9df; --nav-hover:#20242b; --nav-hover-text:#fff; --nav-sub:#aeb4bd;
  --topbar:rgba(27,30,36,.92); --label:#c3c8d0; --th-bg:#252a33; --th-text:#aeb4bd; --chip-off:#2c313a; --chip-off-text:#8f96a2;
  --scroll:#3a404c; --overlay:rgba(8,9,12,.65); --switch-off:#3a404c; --switch-knob:#cfd4db; --login-glow:rgba(200,240,49,.16);
  --row-hover:#262b34; --pav-bg:#2f3a1a; --tag-bg:#3a4a12; --entry-bg:#1f232a;
  --hero-a:#2c3a10; --hero-b:#1f2530; --hero-line:#3a4a12; --hero-label:#cfd6c0; --tabbar:#15171c; --ptop:rgba(21,23,28,.94); --tab-text:#9aa2af;
}
/* ---- light themes (Settings → Theme) ---- */
html[data-theme=mint]{
  color-scheme:light;
  --bg:#f3f6ef; --side:#ffffff; --card:#ffffff; --card-2:#f2f5ec; --line:#e2e7da; --line-2:#d2d9c6;
  --text:#1b2413; --muted:#5d6a54; --muted-2:#89947f;
  --accent:#4d7c0f; --accent-hi:#3b6309; --accent-ink:#ffffff; --accent-soft:rgba(101,163,13,.13); --accent-line:rgba(77,124,15,.4);
  --green:#3f7a0c; --green-soft:rgba(101,163,13,.13);
  --red:#d33a3a; --red-soft:rgba(211,58,58,.1); --amber:#b45309; --amber-soft:rgba(217,119,6,.12);
  --blue:#2563eb; --blue-soft:rgba(37,99,235,.1); --teal:#0f766e; --teal-soft:rgba(15,118,110,.1);
  --shadow:0 1px 2px rgba(30,40,20,.06),0 6px 18px rgba(30,40,20,.06);
  --chart-a:#84cc16; --chart-b:#c5e49a; --chart-grid:#e3e8dc; --chart-text:#6b7563;
  --side-line:#e3e8db; --nav-text:#2d3725; --nav-hover:#eef4e3; --nav-hover-text:#1b2413; --nav-sub:#5d6a54;
  --topbar:rgba(255,255,255,.92); --label:#4a5641; --th-bg:#f0f4e9; --th-text:#5d6a54; --chip-off:#eceee7; --chip-off-text:#6b7266;
  --scroll:#c8cfbd; --overlay:rgba(25,32,18,.42); --switch-off:#cfd6c4; --switch-knob:#ffffff; --login-glow:rgba(132,204,22,.22);
  --row-hover:#f5f8ef; --pav-bg:#e8f3d6; --tag-bg:#e8f3d6; --entry-bg:#f7f9f3;
  --hero-a:#e4f3cc; --hero-b:#ffffff; --hero-line:#cfe5a8; --hero-label:#4a5641; --tabbar:#ffffff; --ptop:rgba(255,255,255,.95); --tab-text:#6b7563;
}
html[data-theme=sky]{
  color-scheme:light;
  --bg:#f2f5fa; --side:#ffffff; --card:#ffffff; --card-2:#f0f4fa; --line:#e0e6ef; --line-2:#cdd6e4;
  --text:#14202f; --muted:#5a6678; --muted-2:#8792a3;
  --accent:#2563eb; --accent-hi:#1d4ed8; --accent-ink:#ffffff; --accent-soft:rgba(37,99,235,.1); --accent-line:rgba(37,99,235,.4);
  --green:#15803d; --green-soft:rgba(22,163,74,.1);
  --red:#d33a3a; --red-soft:rgba(211,58,58,.1); --amber:#b45309; --amber-soft:rgba(217,119,6,.12);
  --blue:#2563eb; --blue-soft:rgba(37,99,235,.1); --teal:#0f766e; --teal-soft:rgba(15,118,110,.1);
  --shadow:0 1px 2px rgba(20,32,47,.06),0 6px 18px rgba(20,32,47,.06);
  --chart-a:#3b82f6; --chart-b:#bcd3fb; --chart-grid:#e2e8f1; --chart-text:#677386;
  --side-line:#e1e7f0; --nav-text:#26344a; --nav-hover:#edf2fb; --nav-hover-text:#14202f; --nav-sub:#5a6678;
  --topbar:rgba(255,255,255,.92); --label:#46536a; --th-bg:#eef3fa; --th-text:#5a6678; --chip-off:#eceff5; --chip-off-text:#6b7280;
  --scroll:#c6cfdd; --overlay:rgba(15,23,42,.42); --switch-off:#cbd5e1; --switch-knob:#ffffff; --login-glow:rgba(59,130,246,.18);
  --row-hover:#f4f7fc; --pav-bg:#e2ecfd; --tag-bg:#e2ecfd; --entry-bg:#f6f9fd;
  --hero-a:#dbe8ff; --hero-b:#ffffff; --hero-line:#bfd3fb; --hero-label:#46536a; --tabbar:#ffffff; --ptop:rgba(255,255,255,.95); --tab-text:#677386;
}
html[data-theme=mint] .theme-dark-only,html[data-theme=sky] .theme-dark-only{display:none}
*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{font-family:"Plus Jakarta Sans","Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif;font-size:14px;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased}
a{color:var(--accent);text-decoration:none}
a:hover{color:var(--accent-hi)}
::selection{background:var(--accent);color:var(--accent-ink)}
.hidden{display:none!important}
.muted{color:var(--muted)} .small{font-size:12px}
.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.app{display:flex;min-height:100vh}
code{background:var(--card-2);padding:1px 5px;border-radius:5px;font-size:12px}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:var(--scroll);border-radius:10px;border:2px solid transparent;background-clip:padding-box}
::-webkit-scrollbar-track{background:transparent}

/* sidebar */
.sidebar{width:248px;flex:0 0 248px;background:var(--side);border-right:1px solid var(--side-line);color:var(--text);display:flex;flex-direction:column;position:sticky;top:0;height:100vh;overflow-y:auto;z-index:30}
.brand{font-size:22px;font-weight:800;padding:22px 22px 18px;display:flex;align-items:center;gap:11px;letter-spacing:.2px}
.logo{width:36px;height:36px;border-radius:10px;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;font-weight:900;font-size:18px}
nav{padding:6px 14px;flex:1}
.nav-link{display:flex;align-items:center;gap:12px;color:var(--nav-text);padding:10px 14px;border-radius:12px;margin:3px 0;cursor:pointer;user-select:none;font-size:14.5px;font-weight:500}
.nav-link:hover{background:var(--nav-hover);color:var(--nav-hover-text)}
.nav-link.active{background:var(--accent);color:var(--accent-ink);font-weight:700}
.nav-link .ic{width:18px;display:grid;place-items:center;opacity:.95}
.nav-link .chev{margin-left:auto;font-size:12px;transition:transform .15s;opacity:.7}
.nav-group.open>.nav-link .chev{transform:rotate(90deg)}
.nav-sub{display:none;padding-left:12px;border-left:1px solid var(--chip-off);margin:2px 0 8px 23px}
.nav-group.open .nav-sub{display:block}
.nav-sub .nav-link{padding:7px 12px;font-size:13.5px;color:var(--nav-sub);border-radius:9px}
.nav-sub .nav-link.active{background:var(--accent-soft);color:var(--accent);font-weight:600}
.nav-group.open>.nav-link.active{background:var(--accent);color:var(--accent-ink)}
.side-foot{padding:12px 14px 16px;border-top:1px solid var(--side-line)}
.side-foot .nav-link{color:var(--nav-sub)}
.agency{padding:10px 8px 0;font-size:12px;display:flex;align-items:center;gap:11px;color:var(--muted)}
.agency .av{width:38px;height:38px;border-radius:50%;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;font-weight:800;font-size:13px;flex:0 0 38px}
.agency b{color:var(--text);font-size:13.5px;display:block;line-height:1.2}

/* main */
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{height:64px;background:var(--topbar);backdrop-filter:blur(8px);border-bottom:1px solid var(--side-line);display:flex;align-items:center;gap:14px;padding:0 26px;position:sticky;top:0;z-index:20}
.hamb{display:none;border:0;background:none;font-size:22px;cursor:pointer;color:var(--text)}
.gsearch{position:relative;flex:1;max-width:520px}
.gsearch input{width:100%;padding:10px 14px 10px 38px;border:1px solid var(--line);border-radius:12px;background:var(--card);font-size:14px}
.gsearch input:focus{outline:none;border-color:var(--accent-line);box-shadow:0 0 0 3px var(--accent-soft)}
.ic-search{position:absolute;left:13px;top:8px;font-size:18px;color:var(--muted)}
.gresults{position:absolute;top:48px;left:0;right:0;background:var(--card);border:1px solid var(--line-2);border-radius:12px;box-shadow:0 18px 40px rgba(0,0,0,.45);max-height:420px;overflow:auto;z-index:50}
.gresults .grp{font-size:11px;text-transform:uppercase;color:var(--muted-2);padding:10px 14px 4px;letter-spacing:.6px;font-weight:700}
.gresults a{display:flex;justify-content:space-between;gap:10px;padding:8px 14px;color:var(--text)}
.gresults a:hover,.gresults a.sel{background:var(--accent-soft)}
.top-right{margin-left:auto}
.content{padding:26px 30px;max-width:1440px;width:100%}
.loading{padding:60px;text-align:center;color:var(--muted)}

/* page header */
.ph{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-bottom:20px;flex-wrap:wrap}
.ph h1{font-size:30px;margin:0 0 4px;font-weight:800;letter-spacing:-.3px}
.ph .sub{color:var(--muted);font-size:14px}
.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

/* cards */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px;margin-bottom:18px}
.card h3{margin:0 0 14px;font-size:16px;font-weight:700}
.card-h{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;gap:10px;flex-wrap:wrap}
.card-h h3{margin:0}
.grid{display:grid;gap:18px}
.g2{grid-template-columns:repeat(2,minmax(0,1fr))}
.g3{grid-template-columns:repeat(3,minmax(0,1fr))}
.g4{grid-template-columns:repeat(4,minmax(0,1fr))}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));gap:16px;margin-bottom:18px}
.kpi{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px 20px;box-shadow:var(--shadow);position:relative;overflow:hidden}
.kpi .l{color:var(--label);font-size:13.5px;font-weight:600;display:flex;align-items:center;gap:6px}
.kpi .v{font-size:24px;font-weight:800;margin-top:8px;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.3px}
.kpi .s{font-size:12.5px;color:var(--muted);margin-top:4px}
.kpi.green .v{color:var(--accent)} .kpi.amber .v{color:var(--amber)} .kpi.red .v{color:var(--red)} .kpi.blue .v{color:var(--blue)}

/* forms */
label{display:flex;flex-direction:column;gap:6px;font-size:12.5px;color:var(--muted);font-weight:600}
input,select,textarea{font:inherit;color:var(--text);padding:9px 11px;border:1px solid var(--line-2);border-radius:10px;background:var(--card-2);min-width:0}
input::placeholder,textarea::placeholder{color:var(--muted-2)}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--accent-line);box-shadow:0 0 0 3px var(--accent-soft)}
input[type=checkbox]{accent-color:var(--accent);width:16px;height:16px}
textarea{resize:vertical;min-height:64px}
.frow{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));margin-bottom:12px}
.filters{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end;margin-bottom:14px}
.filters input,.filters select{padding:8px 10px}
.filters .grow{flex:1;min-width:200px}
.btn{font:inherit;border:1px solid var(--line-2);background:var(--card);color:var(--text);padding:9px 16px;border-radius:12px;cursor:pointer;display:inline-flex;align-items:center;gap:7px;white-space:nowrap;font-weight:700}
.btn:hover{border-color:var(--accent-line);color:var(--accent)}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.btn.primary:hover{background:var(--accent-hi);color:var(--accent-ink)}
.btn.green{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.btn.green:hover{background:var(--accent-hi);color:var(--accent-ink)}
.btn.danger{color:var(--red);border-color:rgba(255,107,107,.35);background:transparent}
.btn.danger:hover{background:var(--red-soft);color:var(--red)}
.btn.sm{padding:5px 10px;font-size:12.5px;border-radius:9px}
.btn.block{width:100%;justify-content:center}
.btn:disabled{opacity:.45;cursor:not-allowed}
.link{color:var(--accent);cursor:pointer;background:none;border:0;padding:0;font:inherit;font-weight:600}

/* chips (filter pills) */
.chips{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
.chip{border:1px solid var(--line-2);background:transparent;color:var(--label);padding:8px 16px;border-radius:999px;cursor:pointer;font:inherit;font-weight:700;font-size:14px;display:inline-flex;gap:8px;align-items:center}
.chip span{color:var(--muted-2);font-weight:700}
.chip:hover{border-color:var(--accent-line)}
.chip.on{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.chip.on span{color:var(--accent-ink);opacity:.7}
.chips .right{margin-left:auto;color:var(--muted);font-size:13px}

/* table */
.tbl-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px}
table{border-collapse:collapse;width:100%;background:var(--card)}
th,td{padding:12px 14px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}
th{background:var(--th-bg);font-size:12px;text-transform:uppercase;letter-spacing:.7px;color:var(--th-text);font-weight:700;position:sticky;top:0;white-space:nowrap}
th.sortable{cursor:pointer} th.sortable:hover{color:var(--accent)}
tr:last-child td{border-bottom:0}
tbody tr:hover{background:var(--row-hover)}
tfoot td{font-weight:800;background:var(--th-bg);border-top:1px solid var(--line-2)}
tr.click{cursor:pointer}
td b{font-weight:700}
.pager{display:flex;justify-content:space-between;align-items:center;padding:12px 2px 0;color:var(--muted);font-size:13px;gap:10px;flex-wrap:wrap}
.pager .pbtns{display:flex;gap:6px;align-items:center}
.empty{padding:34px;text-align:center;color:var(--muted)}
.pcell{display:flex;align-items:center;gap:12px;min-width:260px}
.pav{width:38px;height:38px;border-radius:10px;background:var(--pav-bg);color:var(--accent);display:grid;place-items:center;font-weight:800;font-size:13px;flex:0 0 38px;letter-spacing:.3px}
.pcell .nm{font-weight:700;line-height:1.25}
.pcell .sb{font-size:12.5px;color:var(--muted);margin-top:2px}

/* badges */
.badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:700;letter-spacing:.2px;white-space:nowrap}
.badge.dot::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.b-paid,.b-ok{background:var(--green-soft);color:var(--accent)}
.b-pending,.b-low{background:var(--amber-soft);color:var(--amber)}
.b-partial{background:var(--blue-soft);color:var(--blue)}
.b-cancelled,.b-inactive,.b-expired{background:var(--chip-off);color:var(--chip-off-text)}
.b-red,.b-out{background:var(--red-soft);color:var(--red)}
.b-retail{background:var(--accent-soft);color:var(--accent)}
.b-wholesale{background:var(--teal-soft);color:var(--teal)}
.tag{display:inline-block;padding:3px 8px;border-radius:6px;font-size:11.5px;font-weight:700;background:var(--tag-bg);color:var(--accent);margin:2px 4px 2px 0;white-space:nowrap}
.pos{color:var(--accent)} .neg{color:var(--red)}

/* tabs */
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:16px;flex-wrap:wrap}
.tab{padding:10px 15px;cursor:pointer;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px;font-weight:700}
.tab:hover{color:var(--text)}
.tab.active{color:var(--accent);border-color:var(--accent)}

/* sale type cards */
.stype{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.stype .opt{border:1.5px solid var(--line-2);border-radius:12px;padding:16px;cursor:pointer;text-align:center;background:var(--card-2)}
.stype .opt b{display:block;font-size:16px;color:var(--text)}
.stype .opt span{font-size:12.5px;color:var(--muted)}
.stype .opt.on{border-color:var(--accent);background:var(--accent-soft)}
.stype .opt.on b{color:var(--accent)}
.hint{font-size:12.5px;color:var(--muted);margin-top:8px}

/* combobox */
.combo{position:relative}
.combo input{width:100%}
.combo-list{position:absolute;left:0;right:0;top:100%;margin-top:4px;background:var(--card-2);border:1px solid var(--line-2);border-radius:10px;box-shadow:0 18px 40px rgba(0,0,0,.45);max-height:300px;overflow:auto;z-index:40}
.combo-list div{padding:8px 11px;cursor:pointer;display:flex;justify-content:space-between;gap:10px;font-size:13.5px;color:var(--text)}
.combo-list div small{color:var(--muted)}
.combo-list div.sel,.combo-list div:hover{background:var(--accent-soft)}
.items-entry{display:grid;grid-template-columns:minmax(220px,3fr) 90px 110px 90px 80px auto;gap:10px;align-items:end;background:var(--entry-bg);border:1px dashed var(--accent-line);padding:14px;border-radius:12px}
.items-table input{width:80px;padding:6px 8px;text-align:right}
.items-table input.w-price{width:95px}
.totals{margin-left:auto;max-width:380px;width:100%}
.totals div{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px dashed var(--line-2)}
.totals .gt{font-size:20px;font-weight:800;color:var(--accent);border-bottom:0}

/* modal */
.modal-bg{position:fixed;inset:0;background:var(--overlay);backdrop-filter:blur(2px);display:grid;place-items:center;z-index:100;padding:16px}
.modal{background:var(--card);border:1px solid var(--line-2);border-radius:16px;width:100%;max-width:580px;max-height:92vh;overflow:auto;box-shadow:0 30px 80px rgba(0,0,0,.5)}
.modal.wide{max-width:900px}
.modal-h{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid var(--line)}
.modal-h h3{margin:0;font-size:17px}
.modal-b{padding:20px}
.modal-f{padding:14px 20px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:10px}
.x{border:0;background:none;font-size:24px;cursor:pointer;color:var(--muted)}

.toast{position:fixed;top:0;left:0;right:0;background:var(--accent);color:var(--accent-ink);font-weight:700;font-size:15px;text-align:center;padding:14px 24px;z-index:1000;box-shadow:0 8px 24px rgba(0,0,0,.25);animation:toastIn .22s ease-out}
.toast.err{background:var(--red);color:#fff}
@keyframes toastIn{from{transform:translateY(-100%)}to{transform:none}}
.error{color:var(--red);font-size:13px;margin-top:8px}

/* chart */
.chart svg{width:100%;height:auto;display:block}
.chart .lg{display:flex;gap:16px;font-size:12.5px;color:var(--muted);margin-bottom:8px}
.chart .lg i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:6px;vertical-align:-1px}
.bars-h .row{display:grid;grid-template-columns:minmax(120px,1.4fr) 2fr auto;gap:12px;align-items:center;padding:6px 0;font-size:13.5px}
.bars-h .bar{height:8px;border-radius:5px;background:var(--chip-off);overflow:hidden}
.bars-h .bar i{display:block;height:100%;background:var(--accent);border-radius:5px}

/* invoice (screen: dark card, print: white paper) */
.invoice{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:30px;max-width:880px}
.inv-head{display:flex;justify-content:space-between;gap:20px;border-bottom:2px solid var(--accent);padding-bottom:16px;margin-bottom:16px}
.inv-head h2{margin:0;color:var(--accent)}
.inv-meta{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px;font-size:13.5px}
.inv-meta b{display:block;font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.5px;margin-bottom:2px}
.sig{display:flex;justify-content:space-between;margin-top:54px;font-size:12px;color:var(--muted)}
.sig span{border-top:1px solid var(--muted-2);padding-top:5px;min-width:170px;text-align:center}
.powered{margin-top:18px;text-align:center;font-size:11px;color:var(--muted-2)}

/* login */
.login{position:fixed;inset:0;background:radial-gradient(1200px 600px at 20% -10%,var(--login-glow),transparent 60%),var(--bg);display:grid;place-items:center;z-index:300;padding:16px}
.login-card{background:var(--card);border:1px solid var(--line-2);border-radius:18px;padding:32px;width:100%;max-width:380px;display:flex;flex-direction:column;gap:14px;box-shadow:0 30px 80px rgba(0,0,0,.5)}
.brand-lg{font-size:30px;font-weight:900;display:flex;align-items:center;gap:12px}
.brand-lg .logo{width:44px;height:44px;font-size:22px;border-radius:12px}


/* money boxes: savings, cash difference, credit limit */
.save-box{display:block!important;background:var(--accent-soft);border:1px solid var(--accent-line)!important;border-radius:10px;padding:10px 12px!important;margin:8px 0;color:var(--accent);font-weight:800;font-size:16px;text-align:center}
.diff-box{border:2px solid var(--line-2);border-radius:14px;padding:14px 16px;margin:10px 0;display:flex;flex-direction:column;gap:4px;background:var(--card-2)}
.diff-box span{font-size:13px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.4px}
.diff-box b{font-size:32px;font-weight:900;letter-spacing:-.5px}
.diff-box.ok{border-color:var(--accent);background:var(--accent-soft)} .diff-box.ok b{color:var(--accent)}
.diff-box.warn{border-color:var(--amber);background:var(--amber-soft)} .diff-box.warn b{color:var(--amber)}
.credit-box{display:block!important;border:1px solid var(--line-2);border-radius:12px;padding:10px 12px!important;margin-top:10px;background:var(--card-2);font-size:13px}
.credit-box>div{display:flex;justify-content:space-between;padding:3px 0;border:0!important}
.credit-box.low{border-color:var(--amber);background:var(--amber-soft)} .credit-box.low b,.credit-box.low p{color:var(--amber)}
.credit-box.bad{border-color:var(--red);background:var(--red-soft)} .credit-box.bad b,.credit-box.bad p{color:var(--red)}
.credit-box p{margin:6px 0 0;font-weight:700}
.stamp{position:absolute;top:110px;right:40px;transform:rotate(-14deg);border:4px solid var(--red);color:var(--red);font-weight:900;font-size:30px;letter-spacing:3px;padding:6px 18px;border-radius:10px;opacity:.85;pointer-events:none;text-transform:uppercase}
.stamp.gray{border-color:#8f96a2;color:#8f96a2}

.inv-bottom{display:flex;gap:18px;margin-top:12px;align-items:flex-start}
.inv-bottom .inv-left{flex:1;min-width:0}
@media (max-width:700px){ .inv-bottom{flex-direction:column-reverse} .stamp{top:70px;right:16px;font-size:20px} }

/* mobile card rows for tables */
.mrow{background:var(--card-2);border:1px solid var(--line);border-radius:12px;padding:12px 13px;margin-bottom:10px}
.mrow.click{cursor:pointer}
.mrow .mh{font-weight:700;margin-bottom:8px;font-size:14.5px}
.mrow .mg{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px}
.mrow .mf{display:flex;flex-direction:column;min-width:0}
.mrow .mf span{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.4px;font-weight:700}
.mrow .mf b{font-weight:600;font-size:13.5px;overflow:hidden;text-overflow:ellipsis}
.mrow .ma{display:flex;gap:8px;justify-content:flex-end;margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.mrow.mtot{background:var(--accent-soft);border-color:var(--accent-line)}

/* toggle switch */
label.switch{position:relative;display:inline-block;width:44px;height:24px;flex:0 0 44px;cursor:pointer}
label.switch input{opacity:0;width:0;height:0;position:absolute}
label.switch span{position:absolute;inset:0;background:var(--switch-off);border-radius:999px;transition:.18s}
label.switch span::before{content:"";position:absolute;width:18px;height:18px;left:3px;top:3px;background:var(--switch-knob);border-radius:50%;transition:.18s}
label.switch input:checked+span{background:var(--accent)}
label.switch input:checked+span::before{transform:translateX(20px);background:var(--accent-ink)}
label.switch input:focus-visible+span{box-shadow:0 0 0 3px var(--accent-soft)}
.nbadge{margin-left:auto;background:var(--red);color:#fff;font-size:11px;font-weight:800;min-width:20px;height:20px;border-radius:10px;display:grid;place-items:center;padding:0 6px}
.nav-link.active .nbadge{background:var(--accent-ink);color:var(--accent)}
label.chk{background:var(--card-2);border:1px solid var(--line-2);border-radius:12px;padding:12px}
label.chk>span{display:flex;align-items:center;gap:8px;color:var(--text);font-size:13.5px}
h4{font-size:14px;color:var(--text)}
.modal h4{margin-top:4px}

@media (max-width:1100px){.g4{grid-template-columns:repeat(2,1fr)}.g3{grid-template-columns:1fr 1fr}}
@media (max-width:860px){
  .sidebar{position:fixed;left:0;top:0;transform:translateX(-100%);transition:transform .2s}
  .sidebar.show{transform:none;box-shadow:0 0 0 100vmax rgba(0,0,0,.55)}
  .hamb{display:block}
  .content{padding:16px}
  .ph h1{font-size:24px}
  .g2,.g3,.g4{grid-template-columns:1fr}
  .items-entry{grid-template-columns:1fr 1fr}
  .items-entry .combo,.items-entry label:first-child{grid-column:1/-1}
  .items-entry input{width:100%}
  .items-entry .btn{grid-column:1/-1;justify-content:center}
  .topbar{padding:0 12px}
  .top-right #todayLbl{display:none}
  .inv-meta{grid-template-columns:1fr}
  .kpi .v{font-size:20px}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .kpi{padding:14px}
  .ph{margin-bottom:14px}
  .ph .actions{width:100%}
  .ph .actions .gsearch{width:100%!important;max-width:none}
  .card{padding:14px;border-radius:12px}
  th,td{padding:9px 10px;font-size:13px}
  .filters>label{flex:1 1 140px}
  .filters .grow{flex-basis:100%}
  .modal-bg{padding:0;align-items:end}
  .modal{max-width:none!important;border-radius:18px 18px 0 0;max-height:94vh}
  .stype{grid-template-columns:1fr 1fr}
  .chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}
  .chip{flex:0 0 auto}
  .chips .right{display:none}
  .gsearch input{font-size:16px}
  input,select,textarea{font-size:16px}
  .tabs{flex-wrap:nowrap;overflow-x:auto}
  .tab{flex:0 0 auto}
}
@media (max-width:480px){ .kpi .v{font-size:18px} .ph h1{font-size:22px} .btn{padding:9px 12px} }
@media print{
  :root{color-scheme:light;--bg:#fff;--card:#fff;--card-2:#fff;--line:#ddd;--line-2:#ccc;--text:#111;--muted:#555;--muted-2:#777;--accent:#3d5a00;--accent-soft:#f1f7dc;--green:#3d5a00;--red:#b42318;--amber:#8a5a00;--blue:#1d4ed8;--teal:#0f766e}
  body{background:#fff;color:#111}
  .sidebar,.topbar,.no-print,.ph .actions,.toast,.chips{display:none!important}
  .content{padding:0;max-width:none}
  .card,.invoice,.kpi{border:0;box-shadow:none;padding:0;background:#fff}
  table{background:#fff} th,tfoot td{background:#f3f4f6;color:#333}
  .tbl-wrap{border:1px solid #ddd;overflow:visible}
  th{position:static}
  a{color:inherit}
  .pav{background:#eef5d6;color:#3d5a00}
}

/* ---- import wizard / bulk delete ---- */
.drop{display:flex;align-items:center;gap:14px;border:2px dashed var(--line-2);border-radius:14px;padding:16px;position:relative;flex-wrap:wrap}
.drop.on{border-color:var(--accent);background:var(--accent-soft)}
.drop>div{flex:1;min-width:180px}
.drop input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
.drop .btn{position:relative;z-index:2}
.iw-h{margin:18px 0 8px;font-size:14px}
.iw-map{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px}
.iw-count{font-size:22px;font-weight:800;padding:6px 0;color:var(--accent)}
.iw-res{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;margin-bottom:12px}
.iw-res>div{background:var(--card-2);border:1px solid var(--line-2);border-radius:12px;padding:12px}
.iw-res b{display:block;font-size:24px}
.iw-res span{color:var(--muted);font-size:12.5px}
.iw-res .bad b{color:var(--red)}
.nf-list{display:flex;flex-wrap:wrap;gap:6px;max-height:180px;overflow:auto;margin-bottom:10px}
.nf-list span{background:var(--card-2);border:1px solid var(--line-2);border-radius:7px;padding:3px 8px;font-size:12.5px}
.warn-box{background:var(--amber-soft);color:var(--amber);border-radius:12px;padding:12px;font-weight:600;margin-top:12px}
.bulkbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 10px}
.rowacts{display:inline-flex;align-items:center;gap:8px}
.selbox{width:18px;height:18px;accent-color:var(--accent);cursor:pointer;margin:0}
.up-list{display:grid;gap:8px}
.up-item{display:flex;justify-content:space-between;align-items:center;gap:10px;background:var(--card-2);border:1px solid var(--line-2);border-radius:12px;padding:10px 12px}
.zone-danger{border-color:rgba(255,92,92,.35)}
.wipe-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 14px}
@media (max-width:700px){ .wipe-grid{grid-template-columns:1fr} .iw-map{grid-template-columns:1fr 1fr} }

/* ---- languages: switcher, English reference, Urdu (RTL) ---- */
.top-right{display:flex;align-items:center;gap:12px}
.lang-box{display:inline-flex;align-items:center;gap:4px}
.lang-sel{padding:6px 26px 6px 10px;font-size:13px;border-radius:10px;min-width:0;width:auto}
.eref-btn{border:1px solid var(--line-2);background:transparent;color:var(--muted);font-weight:800;font-size:11px;border-radius:8px;padding:5px 7px;cursor:pointer;letter-spacing:.4px}
.eref-btn.on{background:var(--accent-soft);color:var(--accent);border-color:var(--accent-line)}
.eref-btn[hidden]{display:none}
.login-top{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.eref .tr::after{content:" \2066(" attr(data-en) ")\2069";font-size:.8em;font-weight:500;opacity:.6;letter-spacing:0;text-transform:none;font-family:"Plus Jakarta Sans","Segoe UI",system-ui,sans-serif}
.eref th .tr::after,.eref .mf>span .tr::after,.eref .kpi .l .tr::after{display:block;margin-top:1px}
.eref .nav-sub .tr::after{font-size:.75em}
@media (max-width:700px){ .lang-sel{padding:5px 22px 5px 8px} }

[dir=rtl] h1,[dir=rtl] h2,[dir=rtl] h3,[dir=rtl] h4{line-height:1.7}
[dir=rtl] .btn,[dir=rtl] .chip,[dir=rtl] .badge,[dir=rtl] .nav-link{line-height:1.9}
[dir=rtl] .btn{padding-top:5px;padding-bottom:5px}
[dir=rtl] input,[dir=rtl] select,[dir=rtl] textarea{font-family:inherit}
[dir=rtl] .sidebar{border-right:0;border-left:1px solid var(--side-line)}
[dir=rtl] .nav-link .chev,[dir=rtl] .nbadge{margin-left:0;margin-right:auto}
[dir=rtl] .nav-link .chev{transform:scaleX(-1)}
[dir=rtl] .nav-sub{padding-left:0;padding-right:12px;border-left:0;border-right:1px solid var(--chip-off);margin:2px 23px 8px 0}
[dir=rtl] .gsearch input{padding:10px 38px 10px 14px}
[dir=rtl] .ic-search{left:auto;right:13px}
[dir=rtl] .top-right,[dir=rtl] .chips .right,[dir=rtl] .totals{margin-left:0;margin-right:auto}
[dir=rtl] th,[dir=rtl] td{text-align:right}
[dir=rtl] .num,[dir=rtl] th.num,[dir=rtl] td.num{text-align:left}
[dir=rtl] .stamp{right:auto;left:40px;transform:rotate(14deg)}
[dir=rtl] .chart .lg i{margin-right:0;margin-left:6px}
[dir=rtl] label.switch{direction:ltr}
[dir=rtl] .lang-sel{padding:6px 10px 6px 26px}
[dir=rtl] .ph .actions{justify-content:flex-start}
@media (max-width:860px){
  [dir=rtl] .sidebar{left:auto;right:0;transform:translateX(100%)}
  [dir=rtl] .sidebar.show{transform:none}
}
@media (max-width:700px){ [dir=rtl] .stamp{left:16px;right:auto} }
/* numbers, codes and English names keep their own order inside Urdu text */
[dir=rtl] b,[dir=rtl] strong,[dir=rtl] .num,[dir=rtl] td,[dir=rtl] .v,[dir=rtl] .amt,[dir=rtl] .mf b,[dir=rtl] .net,[dir=rtl] .old,[dir=rtl] input,[dir=rtl] select,[dir=rtl] option,[dir=rtl] .nm,[dir=rtl] .sb,[dir=rtl] .m,[dir=rtl] .s{unicode-bidi:plaintext}
[dir=rtl] td,[dir=rtl] th{text-align:right}
[dir=rtl] td.num,[dir=rtl] th.num{text-align:left}
.lang-sel{max-width:140px}
@media (max-width:700px){ .lang-sel{max-width:122px;font-size:12px!important;padding:5px 20px 5px 6px} [dir=rtl] .lang-sel{padding:5px 6px 5px 20px} .eref-btn{padding:5px 6px} }

/* username / password fields stay left-to-right English */
input[type=password],input[name=password],input[name=u],input[name=username],input[name=ownerUsername],input[name=ownerPassword],input[data-ascii]{direction:ltr;text-align:left;unicode-bidi:plaintext}
.ascii-warn{border-color:var(--red)!important;box-shadow:0 0 0 3px var(--red-soft)!important}
/* settings: language + theme pickers */
.pick-row{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 4px}
.pick{border:1px solid var(--line-2);background:var(--card-2);color:var(--text);border-radius:12px;padding:9px 14px;cursor:pointer;font:inherit;font-weight:700}
.pick.on{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
.theme-pick{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px;margin:6px 0 4px}
.theme-card{border:2px solid var(--line-2);border-radius:14px;padding:8px;cursor:pointer;background:var(--card);text-align:center;font-weight:700;font-size:13px;color:var(--text)}
.theme-card.on{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.theme-card .sw{height:54px;border-radius:9px;margin-bottom:6px;display:grid;grid-template-columns:28% 1fr;overflow:hidden;border:1px solid rgba(0,0,0,.12)}
.theme-card .sw i{display:block}
.sw-dark i:first-child{background:#15171c} .sw-dark i:last-child{background:linear-gradient(#22262e 55%,#c8f031 55%,#c8f031 70%,#22262e 70%)}
.sw-mint i:first-child{background:#fff;border-right:1px solid #e3e8db} .sw-mint i:last-child{background:linear-gradient(#f3f6ef 55%,#4d7c0f 55%,#4d7c0f 70%,#f3f6ef 70%)}
.sw-sky i:first-child{background:#fff;border-right:1px solid #e1e7f0} .sw-sky i:last-child{background:linear-gradient(#f2f5fa 55%,#2563eb 55%,#2563eb 70%,#f2f5fa 70%)}
.sw-auto i:first-child{background:linear-gradient(135deg,#15171c 50%,#fff 50%)} .sw-auto i:last-child{background:linear-gradient(90deg,#c8f031,#4d7c0f,#2563eb)}
html[data-theme=mint] .modal,html[data-theme=mint] .login-card,html[data-theme=sky] .modal,html[data-theme=sky] .login-card{box-shadow:0 24px 60px rgba(15,23,42,.18)}
html[data-theme=mint] .toast,html[data-theme=sky] .toast{box-shadow:0 8px 24px rgba(15,23,42,.22)}
.lim-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
@media (max-width:700px){ .lim-grid{grid-template-columns:1fr 1fr} }
.sess-online{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--green);margin-right:6px}
.sess-off{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--muted-2);margin-right:6px}

/* ===== v2.7: tables fit the window ===== */
th{white-space:normal;line-height:1.25;letter-spacing:.4px;font-size:11.5px;padding:11px 10px;vertical-align:bottom}
td{padding:11px 10px}
.pcell{min-width:170px;gap:0}
.pcell .nm{overflow-wrap:anywhere}
td.c-prod{min-width:190px;max-width:340px}
@media (max-width:1400px){ .hide2{display:none} }
@media (max-width:1180px){ .hide1{display:none} th,td{padding:10px 8px} }
@media print{ .hide1,.hide2{display:table-cell!important} }
.rowacts{display:inline-flex;gap:6px;align-items:center;white-space:nowrap}

/* ===== calendar (always light; Fri / Sat / Sun coloured) ===== */
.dp-wrap{position:relative;display:flex;align-items:center;min-width:0;width:100%}
.dp-wrap .dp-input{width:100%;padding-right:74px;font-variant-numeric:tabular-nums;letter-spacing:.3px}
.dp-day{position:absolute;right:34px;font-size:11px;font-weight:700;color:var(--muted);pointer-events:none;padding:2px 6px;border-radius:6px}
.dp-day.fri{background:#dcf5e3;color:#17703a} .dp-day.sat{background:#fff0cc;color:#8a5a00} .dp-day.sun{background:#ffe1e1;color:#b42318}
.dp-btn{position:absolute;right:4px;width:30px;height:30px;border:0;background:transparent;color:var(--muted);cursor:pointer;border-radius:8px;display:grid;place-items:center}
.dp-btn:hover,.dp-wrap.open .dp-btn{color:var(--accent);background:var(--accent-soft)}
.dp-input.dp-bad{border-color:var(--red)!important;box-shadow:0 0 0 3px var(--red-soft)!important}
#dcust .dp-wrap{width:170px}
.dp-pop{position:fixed;z-index:1000;width:300px;background:#fff;color:#1f2430;border:1px solid #e3e6ec;border-radius:16px;box-shadow:0 18px 50px rgba(15,20,30,.28);padding:12px;font-family:"Plus Jakarta Sans","Segoe UI",system-ui,sans-serif;font-size:13px}
.dp-pop .dp-h{display:flex;gap:6px;align-items:center;margin-bottom:8px}
.dp-pop select{flex:1;background:#f5f7fa;color:#1f2430;border:1px solid #e3e6ec;border-radius:9px;padding:6px 6px;font-weight:700;font-size:13px;box-shadow:none}
.dp-pop .dp-nav{width:32px;height:32px;border:1px solid #e3e6ec;background:#fff;border-radius:9px;font-size:18px;cursor:pointer;color:#1f2430;flex:0 0 32px}
.dp-pop .dp-nav:hover{background:#f0f3f7}
.dp-w,.dp-g{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.dp-w span{text-align:center;font-size:11px;font-weight:800;color:#6b7280;padding:5px 0;border-radius:7px}
.dp-w .fri{background:#e8f8ee;color:#17703a} .dp-w .sat{background:#fff6dd;color:#8a5a00} .dp-w .sun{background:#ffeaea;color:#b42318}
.dp-g button{height:34px;border:1px solid transparent;border-radius:9px;background:#fff;color:#1f2430;font:inherit;font-weight:600;cursor:pointer;font-variant-numeric:tabular-nums}
.dp-g button.fri{background:#effbf3;color:#17703a} .dp-g button.sat{background:#fff9e8;color:#8a5a00} .dp-g button.sun{background:#fff1f1;color:#b42318}
.dp-g button:hover{border-color:#b9c2cf}
.dp-g button.today{border-color:#6b7280;font-weight:800}
.dp-g button.foc{outline:2px solid #93c5fd;outline-offset:1px}
.dp-g button.sel{background:#2f6fec!important;color:#fff!important;border-color:#2f6fec;font-weight:800}
.dp-g button:disabled{opacity:.3;cursor:not-allowed}
.dp-f{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:10px;padding-top:10px;border-top:1px solid #eef0f4}
.dp-f button{border:1px solid #e3e6ec;background:#f7f9fb;color:#1f2430;border-radius:8px;padding:5px 10px;font:inherit;font-size:12px;font-weight:700;cursor:pointer}
.dp-f button:hover{background:#eef2f7}
.dp-legend{margin-left:auto;font-size:10.5px;color:#6b7280;display:inline-flex;align-items:center;gap:3px}
.dp-legend i{display:inline-block;width:9px;height:9px;border-radius:3px;margin-left:4px}
.dp-legend i.fri{background:#bfe9cc} .dp-legend i.sat{background:#ffe3a3} .dp-legend i.sun{background:#ffc9c9}
@media (max-width:480px){ .dp-pop{width:calc(100vw - 16px);max-width:340px} .dp-g button{height:40px} }

/* ===== adjustments ===== */
.seg{display:flex;background:var(--card-2);border:1px solid var(--line);border-radius:12px;padding:4px;gap:4px;margin-bottom:10px}
.seg button{flex:1;border:0;background:transparent;color:var(--muted);font:inherit;font-weight:700;padding:9px 10px;border-radius:9px;cursor:pointer}
.seg button.on{background:var(--accent);color:var(--accent-ink)}
.adj-prod{padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--card-2);margin-bottom:8px}
.adj-now{font-size:12.5px;color:var(--muted);margin:0 0 10px}
.radio-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:4px 0 10px}
.radio-cards .chk{margin:0}
.locked-val{padding:9px 11px;border:1px dashed var(--line-2);border-radius:10px;background:var(--card-2);color:var(--text);font-weight:700;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.locked-val .link{font-size:12px}
.adj-info .card{margin-bottom:0}
.adj-info{margin-bottom:16px}
@media (max-width:700px){ .radio-cards{grid-template-columns:1fr} }

/* ===== online access toggles ===== */
.acc-tg{display:inline-flex;gap:10px;align-items:center;white-space:nowrap}
label.mini-sw{display:inline-flex;flex-direction:row;align-items:center;gap:6px;font-size:12px;font-weight:700;color:var(--muted);cursor:pointer;position:relative}
label.mini-sw input{position:absolute;opacity:0;width:0;height:0}
label.mini-sw span{width:30px;height:17px;border-radius:9px;background:var(--switch-off);position:relative;transition:.15s;flex:0 0 30px}
label.mini-sw span::after{content:"";position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:50%;background:#fff;transition:.15s;box-shadow:0 1px 2px rgba(0,0,0,.3)}
label.mini-sw input:checked+span{background:var(--accent)}
label.mini-sw input:checked+span::after{left:15px}
label.mini-sw input:checked~*{color:var(--text)}
label.mini-sw input:disabled+span{opacity:.5}
.acc-tg.big label.mini-sw{font-size:13px}
.acc-box{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--card-2);margin-top:6px}
.acc-right{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
[dir=rtl] label.mini-sw span::after{left:auto;right:2px} [dir=rtl] label.mini-sw input:checked+span::after{right:15px;left:auto}

/* ===== testing period ===== */
.test-banner{display:flex;gap:10px 16px;align-items:center;flex-wrap:wrap;padding:10px 14px;border:1px dashed var(--amber);background:var(--amber-soft);border-radius:12px;margin-bottom:16px}
.test-banner .btn{margin-left:auto}
.test-days{display:flex;align-items:baseline;gap:8px;margin:2px 0 10px}
.test-days b{font-size:30px;color:var(--amber);font-variant-numeric:tabular-nums}
.test-tag{display:inline-block;margin-top:3px;font-size:11px;font-weight:700;color:var(--amber);background:var(--amber-soft);padding:2px 7px;border-radius:6px}

/* ===== upload formats ===== */
.tpl-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:10px 0 4px}
.tpl-links{display:inline-flex;gap:6px;align-items:center;flex-wrap:wrap;font-size:12px;font-weight:700;color:var(--muted)}
.tpl-item{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 0;border-top:1px solid var(--line)}

/* ===== "Powered by" (customer portal) ===== */
.pw-bar{display:flex;padding:10px 4px;color:var(--muted)}
.pw-left{justify-content:flex-start} .pw-center{justify-content:center} .pw-right{justify-content:flex-end}
.pw-bar a,.pw-bar .pw-in{display:inline-flex;align-items:center;gap:8px;color:inherit;text-decoration:none}
.pw-bar img{display:block;max-width:220px;object-fit:contain}
.login-card .pw-bar{padding:4px 0}
.pw-preview{border:1px solid var(--line);border-radius:14px;padding:12px;background:var(--bg)}
.pw-ph{font-weight:800;margin-bottom:8px}
.pw-fake{display:grid;gap:8px;margin:6px 0} .pw-fake i{display:block;height:34px;border-radius:10px;background:var(--card-2);border:1px solid var(--line)}
.logo-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:8px}
.logo-prev{min-width:120px;height:56px;border:1px dashed var(--line-2);border-radius:10px;display:grid;place-items:center;padding:4px;background:var(--card-2)}
.logo-prev img{max-height:48px;max-width:220px}
.color-row{display:flex;gap:10px;align-items:center}
.color-row input[type=color]{width:46px;height:38px;padding:3px}
.chk-inline{flex-direction:row!important;align-items:center;gap:6px!important}
.center{text-align:center}
.acc-tg:not(.big){flex-direction:column;align-items:flex-start;gap:5px}

/* staff permissions */
.perm-h{margin:16px 0 6px;font-weight:700}
.perm-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:4px 14px}
.perm-tbl{border-collapse:collapse}.perm-tbl th,.perm-tbl td{padding:5px 14px 5px 0;text-align:left}

/* business settings */
.cat-box{border:1px solid var(--line,rgba(128,128,128,.25));border-radius:10px;padding:10px;margin-bottom:10px}
.cat-h{display:flex;gap:8px;align-items:center}.cat-h input[type=text],.cat-h input:not([type]){flex:1}
.cat-subs{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;align-items:center}
.sub-chip{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--line,rgba(128,128,128,.25));border-radius:20px;padding:2px 6px}
.sub-chip input:not([type=checkbox]){border:0;background:transparent;width:120px;padding:2px}
.sub-chip .x{border:0;background:transparent;cursor:pointer;color:inherit;font-size:16px}

/* advanced search */
.gsearch .gs-adv{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:34px;height:34px;display:flex;align-items:center;justify-content:center;border:0;background:var(--accent);color:var(--accent-ink);cursor:pointer;font-size:18px;padding:0;border-radius:10px}
.gsearch .gs-adv:hover{background:var(--accent-hi)}
.gsearch input{padding-right:42px}
[dir=rtl] .gsearch .gs-adv{right:auto;left:6px}
[dir=rtl] .gsearch input{padding-right:14px;padding-left:42px}
.gresults a.gs-more{justify-content:center;border-top:1px solid var(--line);color:var(--accent,inherit)}

/* credit terms */
.credit-terms{border:1px dashed var(--line-2,rgba(128,128,128,.4));border-radius:12px;padding:10px 12px;margin-top:10px}
.days-row{display:flex;gap:6px;align-items:center}.days-row input{flex:1;min-width:70px}.days-row .chip{padding:4px 10px}
/* close buttons: green box with a white (theme ink) cross, like the search gear */
.modal-h .x,#srX{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;border:0;background:var(--accent);color:var(--accent-ink);border-radius:10px;font-size:20px;line-height:1;padding:0;cursor:pointer;flex:none}
.modal-h .x:hover,#srX:hover{background:var(--accent-hi)}
#srX{font-size:16px}

/* phone: Mobile and Landline in two boxes on their own line */
.frow>label.ph-label{grid-column:1/-1}
.phone-box{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:4px}
.phone-box.one{grid-template-columns:1fr}
.phone-box .ph-col small{display:block;margin-bottom:4px;font-size:12px;font-weight:600;color:var(--muted)}
.phone-box .ph-in,.phone-box input[type=text]{width:100%;letter-spacing:.3px}
.phone-box input.bad{border-color:var(--red)}
@media (max-width:560px){.phone-box{grid-template-columns:1fr}}
/* search icon: green box with a white (theme ink) icon, like the gear on the right */
.gsearch .ic-search{left:6px;top:50%;transform:translateY(-50%);width:34px;height:34px;display:flex;align-items:center;justify-content:center;background:var(--accent);color:var(--accent-ink);border-radius:10px;font-size:18px;pointer-events:none}
.gsearch input{padding-left:50px}

.rl-row{display:flex;justify-content:space-between;gap:10px;padding:9px 10px;border-radius:8px;color:var(--text)}
.rl-row:hover{background:var(--accent-soft)}

/* line total shown while entering an item: read-only, plain amount (Rs: 1,250/-) */
.total-box{justify-content:flex-end;font-weight:700;font-size:15px;white-space:nowrap;user-select:none;cursor:default}

/* entry screens: list on top, new item below, totals + save always in view */
.items-flip{display:flex;flex-direction:column}
.items-flip>.card-h{order:0}
.items-flip>#itemsTbl{order:1;margin:0 0 14px!important}
.items-flip>.items-entry{order:2}
.items-flip>.hint{order:3}
.sumbar{position:sticky;bottom:0;z-index:40;display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:16px -8px -8px;padding:12px 18px;background:var(--card);border-top:3px solid var(--accent);box-shadow:0 -8px 24px rgba(0,0,0,.14);border-radius:14px 14px 0 0}
.sb-stats{display:flex;gap:22px;flex-wrap:wrap;align-items:center;font-size:14px}
.sb-stats b{font-size:16px}
.sb-stats .sb-amt{font-size:20px;color:var(--accent)}
.sb-actions{display:flex;gap:8px;flex-wrap:wrap}
.has-sumbar #save,.has-sumbar #savePrint{display:none}
.modal-f .sb-stats{font-size:13px;gap:14px}
@media print{.sumbar{display:none!important}}
/* the line total is slightly highlighted so it stands out */
.total-box{background:var(--accent-soft)!important;border:1.5px solid var(--accent-line)!important;color:var(--accent);font-size:16px;box-shadow:0 0 0 3px var(--accent-soft)}

/* X beside Add */
.add-wrap{display:flex;gap:6px;align-items:flex-end}
.xbtn{width:34px;height:37px;display:inline-flex;align-items:center;justify-content:center;border:0;background:var(--accent);color:var(--accent-ink);border-radius:10px;font-size:15px;line-height:1;padding:0;cursor:pointer;flex:none}
.xbtn:hover{background:var(--accent-hi)}

/* entry row: only the Product box until it is clicked */
.items-entry.ie-compact{grid-template-columns:1fr!important}
.items-entry.ie-compact>:not(:first-child){display:none!important}

/* ===== compact entry windows (New Sale, New Purchase, New Purchase Order, Order Received): everything fits on the screen ===== */
.entry-page .ph{background:var(--accent);color:var(--accent-ink);padding:8px 16px;border-radius:12px;align-items:center;margin-bottom:10px;gap:8px}
.entry-page .ph h1{font-size:19px;margin:0;color:var(--accent-ink);letter-spacing:0}
.entry-page .ph .sub{color:var(--accent-ink);opacity:.88;font-size:12px}
.entry-page .card{padding:10px 14px;margin-bottom:10px}
.entry-page .card h3{font-size:14px;margin:0 0 6px}
.entry-page .card-h{margin-bottom:6px}
.entry-page .st-title{display:none}
.entry-page .stype{gap:8px}
.entry-page .stype .opt{padding:5px 10px;border-radius:10px;display:flex;gap:8px;align-items:center;justify-content:center}
.entry-page .stype .opt b{display:inline;font-size:14px}
.entry-page .stype .opt span{font-size:12px}
.entry-page .hint,.entry-page #thint{font-size:12px;margin:4px 0 0}
.entry-page .frow{gap:8px;margin-bottom:6px}
.entry-page label{font-size:12px}
.entry-page input:not([type=checkbox]):not([type=radio]),.entry-page select{padding:6px 9px;font-size:14px;min-height:0}
.entry-page .frow.sale-top{grid-template-columns:150px 230px minmax(200px,1.4fr) minmax(180px,1fr);align-items:end}
.entry-page .frow>label.ph-label{grid-column:auto}
.entry-page .phone-box.one .ph-col small{display:none}
.entry-page .phone-box{margin-top:2px}
.entry-page .items-entry{padding:8px 10px;gap:8px}
.entry-page .items-table td,.entry-page .items-table th{padding:4px 8px}
.entry-page .items-table input{padding:3px 6px;height:28px;font-size:13px}
.entry-page .items-table .btn.sm{padding:2px 8px}
.entry-page .items-entry .btn,.entry-page .add-wrap .btn{height:34px!important;padding:0 14px}
.entry-page .total-box{padding:6px 10px;font-size:14px;box-shadow:none}
.entry-page #payCard .frow{grid-template-columns:repeat(auto-fit,minmax(115px,1fr))}
.entry-page #payCard input,.entry-page #payCard select{font-size:16px!important;padding:5px 8px}
.entry-page #payCard textarea,.entry-page textarea{min-height:40px;height:40px;padding:6px 8px}
.entry-page .totals>div{padding:2px 0;font-size:13px}
.entry-page .totals .gt{font-size:17px;padding:4px 0}
.entry-page .save-box{padding:4px 8px;font-size:13px;margin:4px 0}
.entry-page .items-flip>#itemsTbl{margin:0 0 8px!important}
.entry-page .empty{padding:10px}
.entry-page .sumbar{padding:8px 14px}

/* the Sale Return window: same compact, coloured style */
.compact-modal .modal-h{background:var(--accent);color:var(--accent-ink);padding:8px 14px;border-radius:12px 12px 0 0;border-bottom:0}
.compact-modal .modal-h h3{color:var(--accent-ink);font-size:16px;margin:0}
.compact-modal .modal-b{padding:8px 14px}
.compact-modal .modal-b p{margin:0 0 6px;font-size:12px}
.compact-modal .items-table td,.compact-modal .items-table th,.compact-modal table td,.compact-modal table th{padding:4px 8px}
.compact-modal input:not([type=checkbox]),.compact-modal select{padding:4px 8px;font-size:13px}
.compact-modal .frow{gap:8px;margin:6px 0}
.compact-modal .diff-box{padding:6px 10px;margin:6px 0}
.compact-modal .modal-f{padding:8px 14px}

.has-sumbar .card>.actions{display:none}
/* totals panel in two columns so the payment card stays short */
.entry-page .totals{display:grid;grid-template-columns:1fr 1fr;column-gap:22px;align-content:start}
.entry-page .totals .gt,.entry-page .totals .credit-box,.entry-page .totals .save-box{grid-column:1/-1}
.entry-page #payCard .grid.g2{gap:14px}
.entry-page #payCard .frow{margin-bottom:4px}
.entry-page #diffBox:empty{display:none}
.entry-page .diff-box{padding:4px 10px;font-size:12px;margin:4px 0}

/* payment card: boxes in one row, grand total highlighted, saving as plain bold text, small extra charges */
.entry-page #payCard .payrow{grid-template-columns:repeat(auto-fit,minmax(130px,1fr));margin-bottom:8px}
.entry-page .totals .gt{background:var(--accent-soft);border:1.5px solid var(--accent-line);border-radius:10px;padding:6px 12px;color:var(--accent);margin:4px 0}
.entry-page .totals .save-box{background:none!important;border:0!important;padding:2px 0!important;margin:2px 0!important;text-align:left!important;font-weight:700;font-size:13px;color:var(--text)!important}
.chg-mini{margin-bottom:8px}
.chg-mini h3{font-size:12px!important;margin:0 0 4px!important;color:var(--muted)}
.chg-mini h3 small{display:none}
.chg-mini .items-entry{padding:4px 6px!important;gap:6px!important;grid-template-columns:minmax(110px,2fr) 100px 100px auto!important;margin-bottom:0}
.chg-mini .items-entry label{font-size:11px}
.chg-mini .items-entry input,.chg-mini .items-entry select{padding:4px 7px!important;font-size:12px!important}
.chg-mini .items-entry .btn{height:28px!important;padding:0 10px!important;font-size:12px}
.chg-mini .items-table td{padding:2px 6px;font-size:12px}
.chg-mini .credit-box{display:flex;flex-wrap:wrap;gap:4px 16px;padding:4px 8px!important;margin:4px 0 0!important;font-size:12px}
.chg-mini .credit-box>div{display:flex;gap:6px}

.items-entry.ie-done{display:none!important}

/* extra charges: small boxes and a one-line summary */
.ch-sum{display:flex;flex-wrap:wrap;gap:2px 16px;margin-top:4px;font-size:11.5px;color:var(--muted)}
.ch-sum b{color:var(--text);font-size:12px}
.entry-page #payCard .chg-mini .items-entry input,.entry-page #payCard .chg-mini .items-entry select{font-size:12px!important;padding:3px 7px!important;height:26px;font-weight:500}
.entry-page #payCard .chg-mini .items-entry{grid-template-columns:minmax(110px,2fr) 90px 90px auto!important;padding:3px 6px!important}
.entry-page #payCard .chg-mini .items-entry .btn{height:26px!important;padding:0 10px!important;font-size:12px}
.chg-mini .items-entry label{font-size:11px;margin:0}

.wipe-cnt{font-weight:600;font-size:12px;color:var(--accent);margin-left:4px}
/* the totals / save bar always sits at the bottom edge of the screen (not in the middle of a short page) */
.has-sumbar{padding-bottom:86px}
.sumbar{position:fixed!important;left:248px;right:0;bottom:0;margin:0!important;border-radius:0!important;z-index:60}
@media (max-width:860px){.sumbar{left:0}}

/* the five main menu items sit together inside a light border so they are noticed first */
.nav-core{border:1.5px solid var(--accent);border-radius:14px;padding:4px;margin:8px 0}
.nav-core>.nav-link:not(.active),.nav-core>.nav-group>.nav-link:not(.active){background:color-mix(in srgb,var(--accent) 16%,transparent);color:var(--nav-text)}
.nav-core .nav-link:not(.active):hover{background:color-mix(in srgb,var(--accent) 26%,transparent);color:var(--nav-text)}
.nav-core .nav-link.active:hover,.nav-core .nav-group.open>.nav-link.active:hover{background:var(--accent);color:var(--accent-ink)}

/* QR code on invoices / orders */
.qr-box{display:inline-flex;flex-direction:column;align-items:center;gap:2px;margin-top:8px}
.qr-box .qr-svg{width:88px;height:88px;border:1px solid var(--line);border-radius:6px;background:#fff;display:block}
.qr-box small{font-size:9px;color:var(--muted);white-space:nowrap}
.qr-float{float:right;margin:0 0 8px 12px}
@media print{.qr-box .qr-svg{border:0}}
/* expense sub-category that must be chosen */
select.need{border-color:var(--amber)}

/* balance line under Method / Bank account */
.acct-hint{margin:-2px 0 10px;padding:6px 10px;border-radius:8px;background:var(--accent-soft);color:var(--text)}

/* a wallet without a number is disabled (not offered in the payment forms) */
.cat-box.wallet-off{opacity:.65}
.cat-box.wallet-off .wallet-note{display:block}
.cat-box:not(.wallet-off) .wallet-note{display:none}

/* Retail / Wholesale choice: bold text with a dark theme-colour outline; the chosen one is filled dark so it is clear which invoice is being made */
.stype .opt{border:2px solid var(--accent);background:var(--card);font-weight:800;transition:background .12s,color .12s}
.stype .opt b{color:var(--accent);font-weight:800}
.stype .opt span{color:var(--text);font-weight:700}
.stype .opt:hover{background:var(--accent-soft)}
.stype .opt.on,.stype .opt.on:hover{background:var(--accent);border-color:var(--accent);box-shadow:0 2px 8px color-mix(in srgb,var(--accent) 35%,transparent)}
.stype .opt.on b,.stype .opt.on span{color:var(--accent-ink)}

/* item entry box (product / qty / price): dark theme-colour border */
.items-entry{border:1.5px dashed var(--accent)}

/* payment details table: small, light text */
.bal-mini table{font-size:12.5px}
.bal-mini th,.bal-mini td,.bal-mini tfoot td{font-size:12.5px;font-weight:400;padding:6px 10px}
.bal-mini th{font-size:11px;font-weight:600}
.bal-mini tfoot td{font-weight:700}

/* business logo + name + address + phone: heads every printed page */
.biz-logo{display:block;max-width:220px;max-height:72px;object-fit:contain;margin-bottom:6px}
.inv-head .biz-logo{margin-bottom:8px}
.print-head{display:none}
.biz-head .biz-name{font-weight:800;font-size:20px;line-height:1.2}
.biz-head .biz-sub{font-size:12px;color:var(--muted);margin-top:2px}
@media print{
  .print-head{display:block;padding-bottom:10px;margin-bottom:14px;border-bottom:2px solid #333}
  .print-head .biz-sub{color:#444}
  #view:has(.invoice) .print-head{display:none!important}
}
.logo-block{margin-bottom:14px}
.logo-block .logo-row{display:flex;align-items:center;gap:10px;margin-top:8px;flex-wrap:wrap}
.logo-prev{min-width:140px;height:72px;border:1px dashed var(--accent);border-radius:10px;display:grid;place-items:center;padding:4px;background:var(--card-2)}
.logo-prev img{max-width:220px;max-height:64px;object-fit:contain}
.agency .av.has-logo{background:#fff;padding:2px;overflow:hidden}
.agency .av img{width:100%;height:100%;object-fit:contain;border-radius:50%}

/* "Powered by shelfe-app.com" is printed in the footer margin of every page */
@page{margin:12mm 12mm 18mm;@bottom-center{content:"Powered by shelfe-app.com";font-size:10px;color:#555}}
@media print{.powered{display:none!important}}

/* job title: list + add button */
.desig-row{display:flex;gap:6px;align-items:center;margin-top:4px}
.desig-row select,.desig-row input{flex:1;min-width:0}

/* filter rows adjust themselves: fields share the line and wrap when it is narrow */
.filters>label{flex:1 1 150px;min-width:0}
.filters>label.grow{flex:2 1 260px}
.filters input,.filters select,.filters .combo{width:100%;min-width:0}
.filters>label>div{width:100%}

/* narrow screens: every block shares the width and nothing pushes the page wider */
.grid>*{min-width:0}
@media (max-width:860px){.grid.g2,.grid.g3,.grid.g4{grid-template-columns:minmax(0,1fr)}}
@media (max-width:1100px){.entry-page .frow.sale-top{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}}
@media (max-width:700px){
  .items-table{display:block;max-width:100%;overflow-x:auto}
  .invoice{max-width:100%;overflow-x:auto}
  .sig{flex-wrap:wrap;gap:8px}
}
@media (max-width:700px){
  .chg-mini .items-entry,.entry-page #payCard .chg-mini .items-entry{grid-template-columns:1fr 1fr!important}
  .chg-mini .items-entry>*:first-child,.chg-mini .items-entry .btn{grid-column:1/-1}
  .entry-page #payCard .frow{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
}
@media (max-width:860px){
  .items-entry:not(.ie-compact){grid-template-columns:1fr 1fr!important}
  .items-entry:not(.ie-compact)>label:first-child,.items-entry:not(.ie-compact)>.btn{grid-column:1/-1}
}

/* previous documents list */
.pd-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--line)}
.pd-row:last-child{border-bottom:0}

/* Freight breakdown */
.ch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:8px}
.ch-part{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid var(--line-2);border-radius:10px;padding:6px 10px;background:var(--card-2)}
.ch-part label{flex-direction:row;align-items:center;gap:8px;margin:0;cursor:pointer;font-weight:600}
.ch-part input[type=number]{width:110px;padding:5px 8px}
.ch-part.on{border-color:var(--accent);background:var(--accent-soft)}
details.ch-det summary{cursor:pointer;font-weight:700;color:var(--accent)}
details.ch-det .small{margin:4px 0 4px 14px;line-height:1.7}

/* Freight breakdown: one dropdown, the chosen items as rows */
.ch-bk select{width:100%;max-width:420px;font-weight:700}
.ch-prow{display:flex;align-items:center;gap:10px;margin-top:8px;max-width:520px}
.ch-prow span{flex:1;font-weight:600}
.ch-prow .ch-pa{width:140px}

/* Save + Clear beside the amount (Add Expense) */
.exp-acts{display:flex;gap:8px;align-items:flex-end;align-self:end}
.exp-acts .btn{height:38px}

/* Testing: clear data now spans the whole page, so its choices have room */
.wipe-grid{grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}

/* Freight card, compact: amount + tick + paid-by on one line, an optional Breakdown of small boxes */
.ch2-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px}
.ch2-name{min-width:64px}
.ch2-amt{width:150px;padding:6px 10px}
.ch2-amt:disabled{opacity:.75;font-weight:800;background:var(--card-2)}
.ch2-chk{display:inline-flex;flex-direction:row;align-items:center;gap:6px;margin:0;font-weight:600;cursor:pointer}
.ch2-m{display:inline-flex;flex-direction:row;align-items:center;gap:6px;margin:0;font-weight:600}
.ch2-m select{width:auto;padding:5px 8px}
.ch2-bk{margin-top:8px}
.ch2-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:6px 12px;margin-top:8px}
.ch2-item{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:8px;margin:0;font-weight:500;font-size:13px}
.ch2-item input{width:92px;padding:4px 8px}
.ch2-add{grid-column:1/-1;display:flex;gap:8px;align-items:center}
.ch2-add input{padding:4px 8px}
#chNote{margin-top:8px}

/* payment + totals block (New Purchase / New Sale): small boxes, notes beside Save */
.sm-in{height:32px;padding:4px 10px;font-size:13px}
.pay2-row{grid-template-columns:repeat(auto-fit,minmax(150px,230px));margin-bottom:8px}
.pay2-row select{height:32px;padding:3px 8px;font-size:13px}
.pay2-foot{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;justify-content:space-between;margin-top:12px}
.pay2-notes{flex:1;min-width:220px;margin:0}
.pay2-notes input{height:34px;padding:4px 10px;font-size:13px}
.pay2-foot .actions{margin:0}
.chk-row{display:flex;flex-direction:row;align-items:center;gap:8px;margin-top:6px;font-weight:600}
/* freight card: as small as the payment boxes */
.ch2-row{gap:6px 12px}
.ch2-name{min-width:48px;font-size:13px}
.ch2-amt{width:120px;height:30px;padding:3px 8px;font-size:12.5px}
.ch2-m select{height:30px;padding:2px 8px;font-size:12.5px}
.ch2-chk{font-size:12.5px}
.ch2-grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:4px 14px;margin-top:6px}
.ch2-item{font-size:12px}
.ch2-item input{width:78px;height:26px;padding:1px 6px;font-size:12px}
.ch2-add input{height:26px;font-size:12px}
#chNote{margin-top:6px;font-size:12px}

.ch2-bkrow{display:flex;align-items:center;gap:12px;margin-top:6px}
.ch2-bkrow .btn{height:26px;padding:0 12px;font-size:12px}
.entry-page .pay2 .totals{grid-template-columns:1fr;max-width:340px}

/* the taller bottom bar with the whole calculation: small label over its figure, the Balance big and bold */
.entry-page .sumbar.sb2{padding:12px 20px;min-height:96px}
.sb2 .sb-stats{display:flex;align-items:center;gap:30px;flex-wrap:wrap}
.sb2 .sb-it{display:flex;flex-direction:column;gap:3px;min-width:64px}
.sb2 .sb-it small{font-size:11px;font-weight:600;color:var(--muted);text-transform:none}
.sb2 .sb-it b{font-size:14px;font-weight:600;color:var(--text);white-space:nowrap}
.sb2 .sb-it b small{font-size:11px;color:var(--muted)}
.sb2 .sb-it.big{padding-left:22px;border-left:2px solid var(--accent-line)}
.sb2 .sb-it.big b{font-size:28px;font-weight:800;color:var(--accent);line-height:1.1}
.sb2 .sb-it.big.neg b{color:var(--red)}
.sb2 .sb-actions .btn{height:44px;padding:0 22px;font-size:15px}

/* menu hide / show on a computer: a bigger work window */
@media (min-width:861px){
  .hamb{display:block;margin-right:4px}
  body.side-min .sidebar{display:none}
  body.side-min .content{max-width:none}
  body.side-min .sumbar{left:0!important}
}
/* bottom bar: Items and Total qty take only a little room, the amounts get the rest */
.sb2 .sb-stats{flex:1 1 auto;gap:0 26px}
.sb2 .sb-it:nth-child(-n+2){min-width:0;flex:0 0 auto;margin-right:-10px}
.sb2 .sb-it:nth-child(-n+2) b{font-size:12px}
.sb2 .sb-it:nth-child(-n+2) small{font-size:10px}
.sb2 .sb-it:nth-child(n+3){flex:1 1 0;min-width:96px}
.sb2 .sb-it:nth-child(n+3) b{font-size:15px}
.sb2 .sb-it.big{flex:1.4 1 0}

/* Freight section and Amount paid section side by side, so less height is used under the items */
.two-sec{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
.two-sec>.card,.two-sec>#chgHolder>.card{margin-bottom:0}
.two-sec>:only-child{grid-column:1/-1}
@media (max-width:1100px){.two-sec{grid-template-columns:minmax(0,1fr)}}

/* bottom bar: Items, Total qty, Total amount close together; the Notes box before the Balance */
.sb2 .sb-stats{gap:0 30px}
.sb2 .sb-grp{display:flex;gap:16px;align-items:flex-end}
.sb2 .sb-grp .sb-it{flex:0 0 auto;min-width:0;margin:0}
.sb2 .sb-grp .sb-it:nth-child(-n+2) b{font-size:12px!important}
.sb2 .sb-rest{display:flex;gap:26px;flex:1 1 auto}
.sb2 .sb-rest .sb-it{flex:1 1 0;min-width:84px;margin:0}
.sb2 .sb-bal{flex:0 0 auto;min-width:150px}
.sb2 .sb-bal .sb-it{margin:0}
.sb2 .sb-notes{display:flex;flex-direction:column;gap:3px;margin:0;width:190px}
.sb2 .sb-notes small{font-size:10px;font-weight:600;color:var(--muted)}
.sb2 .sb-notes input{height:26px;padding:2px 8px;font-size:11px}
/* amount paid stays; method and bank get small and all three share one line */
.pay2-row{display:flex;flex-wrap:nowrap;gap:8px;align-items:flex-end;grid-template-columns:none}
.pay2-row label{flex:0 0 auto;margin:0;font-size:11px}
.pay2-row #paid{width:112px}
.pay2-row #xdisc{width:90px}
.pay2-row select,.pay2-row #acct{width:104px;height:28px;padding:2px 6px;font-size:11px}
/* freight card: texts about 7 pt (9 px), the text typed into the boxes 8 - 9 pt (11 px) */
.ch2{font-size:9px}
.ch2 *{font-size:9px}
.ch2-name{font-size:11px!important}
.ch2 input[type=number],.ch2 input:not([type]),.ch2 input[type=text],.ch2 select{font-size:11px;height:22px;padding:0 6px}
.ch2-amt{width:84px!important}
.ch2-item input{width:64px!important;height:20px!important;font-size:11px!important}
.ch2 input[type=checkbox]{width:12px;height:12px}
.ch2-grid{grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:3px 12px}
.ch2-bkrow .btn{height:20px!important;padding:0 10px!important;font-size:9px!important}
#chNote,#chSum,#chSum *{font-size:9px!important}
#chgHolder>.card h3,#chgCard h3{font-size:11px}
#chgHolder>.card,#chgCard{padding:10px 14px}
.ch2 .ch2-chk,.ch2 .ch2-m,.ch2 .ch2-item span,.ch2 .ch2-add .link{font-size:9px!important}
.ch2 #chAmt,.ch2 #chMethod{font-size:11px!important}

/* entry pages: slim title bar with arrows before the title, supplier row on one line, the Freight + Amount paid sections fixed above the green bar, smaller item boxes */
.ph-nav{border:0;background:#14171d;color:#fff;width:38px;height:32px;border-radius:9px;font-size:22px;font-weight:900;line-height:1;cursor:pointer;margin-right:6px;box-shadow:0 1px 3px rgba(0,0,0,.35)}
.ph-nav:hover{background:#000}
.ph-x{font-size:22px!important;font-weight:900;line-height:1;padding:0 14px!important;background:#14171d!important;color:#fff!important;border-color:#14171d!important}
.ph-x:hover{background:#b3261e!important;border-color:#b3261e!important}
@media print{.ph-x{display:none!important}}
.entry-page .ph{padding:4px 14px;margin-bottom:8px}
.entry-page .ph h1{font-size:16px;display:flex;align-items:center}
.entry-page .ph .actions .btn{height:28px;padding:0 12px;font-size:12px}
.one-line{padding:8px 14px}
.one-line .frow{display:flex;flex-wrap:nowrap;align-items:flex-end;gap:10px;margin:0}
.one-line .frow>label{flex:1 1 0;min-width:0;margin:0}
.one-line .frow>label:first-child{flex:1.4 1 0}
.one-line #sinfo{flex:0 0 auto;margin:0 0 8px;white-space:nowrap;font-size:12px}
.one-line input,.one-line select{height:30px;padding:2px 8px;font-size:12px}
.entry-page .two-sec{position:sticky;bottom:100px;z-index:50;background:var(--bg);padding-top:6px}
.entry-page .two-sec:has(#chBk:checked){grid-template-columns:minmax(0,1.3fr) minmax(0,1fr)}
.entry-page .two-sec:has(#chBk:checked) #paid{width:220px}
.entry-page .items-entry input,.entry-page .items-entry select{height:28px;font-size:12px;padding:2px 8px}
.entry-page .items-entry label{font-size:11px}
.entry-page .items-table td,.entry-page .items-table th{padding:2px 8px;font-size:12px}
.entry-page .items-table input{height:24px;font-size:12px;padding:1px 6px}
.entry-page .card-h h3{font-size:13px}
.entry-page .two-sec{position:fixed;left:248px;right:0;bottom:96px;padding:6px 30px 8px;z-index:55;max-height:60vh;overflow:auto}
.entry-page.has-sumbar{padding-bottom:300px}
body.side-min .entry-page .two-sec{left:0}
@media (max-width:860px){.entry-page .two-sec{left:0;padding:6px 12px}}
.entry-page .two-sec{bottom:var(--sbh,96px)}
.entry-page.has-sumbar{padding-bottom:320px}

/* purchase top row joined to the green strip; small boxes sized to their content */
.entry-page .ph:has(+ .one-line){border-radius:12px 12px 0 0;margin-bottom:0}
.ph + .one-line{border-radius:0 0 12px 12px;margin-top:0;border-top:0}
.one-line .frow{gap:14px;justify-content:flex-start}
.one-line .frow>label,.one-line .frow>label:first-child{flex:0 0 auto;font-size:10px}
.one-line .frow>label:first-child{flex:1 1 220px}
.one-line input,.one-line select{font-size:12px;height:28px}
.one-line .dp-wrap,.one-line input[type=date]{width:150px}
.one-line .inv-no input{width:120px;font-weight:700}
.one-line .inv-no input::placeholder{color:var(--text);opacity:.85;font-weight:700}
.one-line #sinfo{margin-left:-6px}
.pay2 .pay2-row>label:first-child{flex:1 1 200px}
.pay2 .pay2-row #paid{width:100%}

/* top row: words beside their boxes, one slim line joined to the search bar */
.entry-page{padding-top:0!important}
.entry-page .ph{border-radius:0 0 0 0;margin-top:0}
.ph + .one-line,.entry-page .ph:has(+ .one-line){border-radius:0}
.one-line{padding:3px 14px}
.one-line .frow{align-items:center;gap:8px 18px}
.one-line .frow>label,.one-line .frow>label:first-child{flex:0 0 auto;display:flex;flex-direction:row;align-items:center;gap:6px;font-size:11px;font-weight:600;margin:0}
.one-line select#sup{width:230px}
.one-line input[type=date],.one-line .dp-wrap{width:190px}
.one-line .inv-no input{width:130px}
.one-line input,.one-line select{height:24px;font-size:12px;padding:0 8px}
.one-line #sinfo{margin:0;font-size:11px}
/* sale top card: same inline words */
.entry-page .sale-top>label{flex-direction:row;align-items:center;gap:6px;font-size:11px}

/* invoice # under the Previous button, a bigger payable figure, the "no items" note on the Items line, less empty space */
.one-line .inv-no{margin-left:auto}
.one-line #sinfo b{font-size:16px}
.entry-page .card-h{display:flex;align-items:center;gap:12px;margin-bottom:2px}
.card-h .no-items{flex:1;font-size:12px}
.entry-page #itemsTbl{margin-top:2px!important}
.entry-page .items-entry{margin-top:4px}
.entry-page .card:has(#itemsTbl){padding-top:8px;padding-bottom:8px}

/* Retail / Wholesale as small buttons in the green strip */
.ph .stype{display:flex;gap:6px;margin-left:14px;grid-template-columns:none}
.ph .stype .opt{padding:2px 14px;border:1.5px solid var(--accent-ink);background:transparent;border-radius:8px;box-shadow:none;cursor:pointer}
.ph .stype .opt b{font-size:12px;color:var(--accent-ink)!important}
.ph .stype .opt.on{background:var(--accent-ink)}
.ph .stype .opt.on b{color:var(--accent)!important}
.entry-page .st-title,.entry-page #thint{display:none}

/* Retail / Wholesale: bigger buttons, each in its own colour so they stand out on the green strip */
.ph .stype{gap:10px;margin-left:18px}
.ph .stype .opt{padding:6px 26px;border-radius:12px;border:2px solid transparent}
.ph .stype .opt b{font-size:17px;font-weight:800}
.ph .stype .opt[data-t=RETAIL]{background:#1d4ed8;border-color:#1d4ed8}
.ph .stype .opt[data-t=WHOLESALE]{background:#7c2d12;border-color:#7c2d12}
.ph .stype .opt b{color:#fff!important}
.ph .stype .opt:not(.on){opacity:.55;background:transparent}
.ph .stype .opt[data-t=RETAIL]:not(.on) b{color:#1d4ed8!important}
.ph .stype .opt[data-t=WHOLESALE]:not(.on) b{color:#7c2d12!important}
.ph .stype .opt.on{box-shadow:0 0 0 2px #fff inset;opacity:1}
.ph .stype .opt:not(.on){opacity:1;border-color:currentColor}.ph .stype .opt[data-t=RETAIL]:not(.on){border-color:#1d4ed8}.ph .stype .opt[data-t=WHOLESALE]:not(.on){border-color:#7c2d12}

/* New Sale: the green strip stops before the Retail / Wholesale buttons, which sit in the middle in theme colours, then it starts again */
.entry-page .ph.type-strip{background:transparent;padding:0;gap:14px;align-items:stretch;flex-wrap:nowrap}
.entry-page .ph.type-strip>div:first-child,.entry-page .ph.type-strip>.actions{background:var(--accent);color:var(--accent-ink);padding:4px 14px;border-radius:12px;display:flex;align-items:center;flex:1 1 0;min-width:0}
.entry-page .ph.type-strip>.actions{justify-content:flex-end}
.ph.type-strip .stype{flex:0 0 auto;margin:0;gap:12px;align-items:center;justify-content:center}
.ph.type-strip .stype .opt,.ph.type-strip .stype .opt:not(.on){padding:6px 28px;border-radius:12px;border:2px solid var(--accent);background:transparent;opacity:1;box-shadow:none}
.ph.type-strip .stype .opt b,.ph.type-strip .stype .opt:not(.on) b{font-size:17px;font-weight:800;color:var(--accent)!important}
.ph.type-strip .stype .opt.on{background:var(--accent)}
.ph.type-strip .stype .opt.on b{color:var(--accent-ink)!important}
/* New Sale top row: Date, Stock source, Customer phone, Mobile, Landline on one line; the strip gaps match */
.entry-page .ph.type-strip{gap:18px}
.ph.type-strip .stype{gap:18px}
@media (min-width:1101px){
.entry-page .frow.sale-top{display:flex;flex-wrap:nowrap;align-items:center;gap:18px}
.entry-page .sale-top>label{white-space:nowrap;flex:0 0 auto;margin:0}
.entry-page .sale-top>label>select{width:190px}
.entry-page .sale-top>label>input[type=date]{width:150px}
.entry-page .sale-top #phWrap{flex:1 1 auto;min-width:0}
.entry-page .sale-top #phWrap .ph-col small{display:none}
.entry-page .sale-top #phWrap .phone-box{display:flex;gap:10px}
}
/* New Sale payment section: the same small boxes as New Purchase */
.entry-page #payCard .pay2-row,.entry-page #payCard .payrow{display:flex;flex-wrap:nowrap;gap:8px;align-items:flex-end;grid-template-columns:none;margin-bottom:6px}
.entry-page #payCard .pay2-row>label{flex:0 0 auto;margin:0;font-size:11px;white-space:nowrap}
.entry-page #payCard #paid,.entry-page #payCard #xdisc{width:112px;height:28px;padding:2px 8px;font-size:12px}
.entry-page #payCard select,.entry-page #payCard #acct{width:112px;height:28px;padding:0 6px;font-size:11px;line-height:26px}
.entry-page #payCard .pay-hint,.entry-page #payCard .acct-hint,.entry-page #payCard .ok-box,.entry-page #payCard .info-box{font-size:11px;padding:4px 8px;margin-top:4px}
/* New Sale payment boxes: exactly the New Purchase sizes */
.entry-page #payCard #paid,.entry-page #payCard #xdisc{font-size:14px!important;font-weight:600!important;height:32px!important}
.entry-page #payCard select,.entry-page #payCard #acct{font-size:11px!important;font-weight:600!important;height:28px!important;width:104px!important}
/* New Sale: the Cash Received box stretches across the section like Amount paid in New Purchase */
.entry-page #payCard .pay2-row>label:first-child{flex:1 1 auto;min-width:0}
.entry-page #payCard .pay2-row>label:first-child #paid{width:100%!important}
.entry-page #payCard #xdisc{width:130px!important}
@media (min-width:1101px){
.entry-page .sale-top #custWrap{flex:1 1 150px;min-width:0}
.entry-page .sale-top #custWrap input{width:100%;min-width:0}
.entry-page .sale-top #phWrap .phone-box,.entry-page .sale-top #phWrap .phone-box>*{min-width:0}
.entry-page .sale-top #phWrap .phone-box input{min-width:90px;width:100%}
.entry-page .sale-top{gap:12px}
}
@media (min-width:1101px){
.entry-page .sale-top #custWrap{flex:1 1 220px}
.entry-page .sale-top #custWrap input{min-width:110px}
.entry-page .sale-top>label>select{width:170px}
.entry-page .sale-top #phWrap .phone-box input{min-width:70px}
}

.entry-page #payCard .cn-wrap{display:flex;flex-direction:row;align-items:center;gap:10px;margin:6px 0 0;font-size:11px;white-space:nowrap}
.entry-page #payCard .cn-wrap input{flex:1;height:28px;padding:2px 8px;font-size:12px}

/* bottom bar: Amount paid and Freight stay next to the totals, the free space goes before the Notes box */
.sb2 .sb-rest{flex:0 0 auto;gap:26px}
.sb2 .sb-rest .sb-it{flex:0 0 auto;min-width:0}
.sb2 .sb-notes{margin-left:auto}
.sb2 .sb-it.neg b{color:var(--red)}

/* New Sale top row: a slim card, the Customer box wider with the phone boxes right after it; the info line under it is gone */
#custInfo{display:none!important}
.entry-page .card:has(.sale-top){padding:6px 14px}
.entry-page .sale-top{margin-top:0!important}
.entry-page .sale-top input,.entry-page .sale-top select{height:32px}
@media (min-width:1101px){
.entry-page .sale-top #custWrap{flex:0 0 auto}
.entry-page .sale-top #custWrap input{width:270px;min-width:0}
.entry-page .sale-top #phWrap{flex:0 0 auto}
.entry-page .sale-top #phWrap .phone-box input{width:135px}
}
.sb2 .sb-it .sb-sub{font-size:10px;color:var(--muted);white-space:nowrap;font-weight:500}
.sb2 .sb-it .sb-sub b{font-size:10px!important;color:var(--text);font-weight:700}
/* New Sale: the note is written in the Customer note box, so the bottom bar has no Notes box */
.entry-page:has(#cnWrap) .sb-notes,body:has(#cnWrap) .sb-notes{display:none!important}
body:has(#cnWrap) .sb2 .sb-bal{margin-left:auto}
/* the sections sit right on the green line of the bottom bar; the note text is at most 8 pt (11 px) */
.entry-page .two-sec{padding-bottom:0!important}
.entry-page .two-sec>.card,.entry-page .two-sec>#chgHolder>.card{margin-bottom:0!important;border-bottom-left-radius:0;border-bottom-right-radius:0}
.entry-page #payCard .cn-wrap input,.entry-page #payCard #cnote{font-size:11px!important;font-weight:500!important}
.entry-page .two-sec{align-items:end!important}

/* New Sale phone boxes: small boxes, small text */
@media (min-width:1101px){
.entry-page .sale-top #phWrap .phone-box input{width:112px!important;height:28px!important;font-size:11px!important;padding:2px 8px}
.entry-page .sale-top #phWrap .phone-box input::placeholder{font-size:10px}
}
/* New Sale top row: the Customer box takes the free width, Phone and its two boxes end at the right edge */
@media (min-width:1101px){
.entry-page .sale-top #custWrap{flex:1 1 auto!important;min-width:0}
.entry-page .sale-top #custWrap>div{flex:1 1 auto;min-width:0}
.entry-page .sale-top #custWrap input{width:100%!important;max-width:none}
.entry-page .sale-top #phWrap{flex:0 0 auto!important;margin-left:auto}
}
@media (min-width:1101px){.entry-page .sale-top #custWrap input{min-width:150px}}

.sb2 .sb-rest .sb-it .sb-sub{max-width:170px;white-space:normal;line-height:1.15}

/* the bottom bar keeps its own height: the words line is small and tight */
.entry-page .sumbar.sb2{min-height:96px;height:96px;padding-top:6px;padding-bottom:6px;box-sizing:border-box}
.sb2 .sb-it{gap:1px}
.sb2 .sb-it .sb-sub,.sb2 .sb-rest .sb-it .sb-sub{font-size:9px;line-height:1.1;white-space:nowrap;max-width:none}
.sb2 .sb-it small{line-height:1.15}

/* slightly smaller Cancel / Save buttons and Balance figure */
.sb2 .sb-actions .btn{height:36px!important;padding:0 16px!important;font-size:13px!important}
.sb2 .sb-it.big b{font-size:23px}

/* bottom bar on ONE line at any width: figures, Balance and the buttons share the row and shrink with the window */
.entry-page .sumbar.sb2{flex-wrap:nowrap;height:auto;min-height:70px;padding:8px clamp(8px,1.2vw,20px);gap:clamp(6px,1vw,16px)}
.sb2 .sb-stats{flex:1 1 auto;min-width:0;flex-wrap:nowrap;gap:0 clamp(8px,1.5vw,28px)}
.sb2 .sb-grp,.sb2 .sb-rest{gap:clamp(8px,1.3vw,24px)}
.sb2 .sb-it{min-width:0;white-space:nowrap}
.sb2 .sb-it small{font-size:clamp(9px,.75vw,11px)}
.sb2 .sb-bal{min-width:0}
.sb2 .sb-actions{flex:0 0 auto;display:flex;gap:6px;flex-wrap:nowrap}
.sb2 .sb-actions .btn{height:clamp(30px,2.4vw,36px)!important;padding:0 clamp(8px,1vw,16px)!important;font-size:clamp(11px,.9vw,13px)!important}

.total-box,.locked-val.total-box{overflow:hidden;white-space:nowrap;text-overflow:clip;min-width:0}

.total-box{text-align:center;padding-left:8px;padding-right:8px}
/* narrow windows: the bottom bar breaks into two lines (figures, then Balance and the buttons) instead of running off the edge */
.entry-page .sumbar.sb2{flex-wrap:wrap;row-gap:4px}
.sb2 .sb-stats{flex-wrap:wrap;row-gap:4px}
.sb2 .sb-actions{margin-left:auto}
.sb2 .sb-bal{margin-left:auto}
/* the phone boxes grow and shrink with the window */
@media (min-width:1101px){
.entry-page .sale-top #phWrap .phone-box input{width:clamp(78px,8.5vw,150px)!important;min-width:0!important}
}

/* bottom bar: the text grows with the free width (container units); a long figure is scaled down by --k */
.entry-page .sumbar.sb2{container-type:inline-size}
.sb2 .sb-it b{font-size:calc(clamp(12px,1.55cqw,23px)*var(--k,1))!important}
.sb2 .sb-it.big b{font-size:calc(clamp(18px,2.6cqw,34px)*var(--k,1))!important}
.sb2 .sb-it small{font-size:clamp(9px,.95cqw,13px)}
.sb2 .sb-stats{gap:0 clamp(10px,2.1cqw,46px)}
.sb2 .sb-grp,.sb2 .sb-rest{gap:clamp(10px,2cqw,44px)}
.sb2 .sb-actions .btn{height:clamp(30px,2.7cqw,42px)!important;padding:0 clamp(10px,1.3cqw,20px)!important;font-size:clamp(11px,1.05cqw,15px)!important}

/* bottom bar: always ONE line; --bs (set by the script) shrinks everything together when the figures are long or the window is narrow */
.entry-page .sumbar.sb2{flex-wrap:nowrap;overflow:hidden;gap:calc(clamp(6px,1cqw,16px)*var(--bs,1))}
.sb2 .sb-stats{flex-wrap:nowrap;gap:0 calc(clamp(8px,1.6cqw,30px)*var(--bs,1))}
.sb2 .sb-grp,.sb2 .sb-rest{gap:calc(clamp(8px,1.5cqw,28px)*var(--bs,1))}
.sb2 .sb-it b{font-size:calc(clamp(12px,1.4cqw,21px)*var(--k,1)*var(--bs,1))!important}
.sb2 .sb-it.big b{font-size:calc(clamp(18px,2.3cqw,30px)*var(--k,1)*var(--bs,1))!important}
.sb2 .sb-it small{font-size:calc(clamp(9px,.85cqw,12px)*var(--bs,1))}
.sb2 .sb-actions{flex-wrap:nowrap;margin-left:0}
.sb2 .sb-bal{margin-left:auto}
.sb2 .sb-actions .btn{height:calc(clamp(30px,2.5cqw,40px)*var(--bs,1))!important;padding:0 calc(clamp(10px,1.2cqw,18px)*var(--bs,1))!important;font-size:calc(clamp(11px,.95cqw,14px)*var(--bs,1))!important}

.sb2 .sb-stats{overflow:hidden}
.sb2 .sb-grp,.sb2 .sb-rest,.sb2 .sb-bal,.sb2 .sb-it{flex:0 0 auto}
.sb2 .sb-bal{margin-left:auto}

/* Amount paid / Cash received in the theme colour */
.sb2 .sb-rest .sb-it:first-child b{color:var(--accent)}
/* each figure of the bottom bar sits in its own theme-colour outline, so it is clear which label it belongs to */
.sb2 .sb-it:not(.big){border:1px solid var(--accent);border-radius:8px;padding:calc(4px*var(--bs,1)) calc(10px*var(--bs,1))}

/* two outlined boxes: Items / Total qty / Total amount / Amount paid, and Credit left / Prv. Bal / Total balance */
.sb2 .sb-it:not(.big){border:0;padding:0;border-radius:0}
.sb2 .sb-grp,.sb2 .sb-cred{display:flex;align-items:flex-end;flex:0 0 auto;border:1px solid var(--accent);border-radius:10px;padding:calc(5px*var(--bs,1)) calc(12px*var(--bs,1));gap:calc(clamp(8px,1.5cqw,28px)*var(--bs,1))}
.sb2 .sb-cred:empty,.sb2 .sb-rest:empty{display:none}
.sb2 .sb-grp .sb-it:nth-child(4) b{color:var(--accent)}
.sb2 .sb-rest .sb-it:first-child b{color:inherit}

.sb2 .sb-it.big.ok b{color:var(--green,#22c55e)}
.sb2 .sb-it.big.ok{border-left-color:var(--green,#22c55e)}

.entry-page #payCard .lim-warn{margin:6px 0 0;padding:5px 10px;border-radius:8px;font-size:11px;font-weight:600;color:var(--red);background:rgba(239,68,68,.12);border:1px solid var(--red)}
/* over the credit limit: the save buttons are off until it is fixed */
body:has(#limWarn:not(.hidden):not(.ok)) .sb2 .sb-actions [data-sb]{opacity:.4;pointer-events:none}

.entry-page #payCard .lim-warn.ok{color:var(--text);background:var(--accent-soft);border-color:var(--accent-line)}
.entry-page #payCard .lim-warn.ok{color:var(--green);background:var(--green-soft);border-color:var(--green)}

/* credit-limit figure and the Note box share one line; the note box is small */
.entry-page #payCard .note-row{display:flex;align-items:center;gap:14px;margin-top:6px}
.entry-page #payCard .lim-warn{margin:0;white-space:nowrap;flex:0 0 auto;padding:4px 12px}
.entry-page #payCard .cn-wrap{margin:0;flex:0 0 auto}
.entry-page #payCard .cn-wrap input{flex:none;width:260px}

.entry-page #payCard .cn-wrap{flex:1 1 auto;min-width:0}
.entry-page #payCard .cn-wrap input{flex:1 1 auto;width:auto;min-width:0}
.entry-page #payCard .lim-warn{font-size:14px!important;font-weight:700}
/* the limit figure: plain red / green text, no outline or background, 2 pt bigger */
.entry-page #payCard .lim-warn,.entry-page #payCard .lim-warn.ok{background:none!important;border:0!important;padding:0 6px;font-size:17px!important;font-weight:700}

/* freight card (all pages): no explanatory line, Breakdown + Clear beside Paid by, the summary line 2 pt bigger */
#chNote{display:none!important}
.ch2-row{flex-wrap:wrap;align-items:center}
.ch2-bk{margin:0!important}
.ch2 #chBk{width:11px;height:11px}
.ch2 #chClear{height:20px!important;padding:0 10px!important;font-size:9px!important}
.ch2 #chSum{margin-top:4px}
#chSum,#chSum *{font-size:12px!important}
#chgHolder>.card,#chgCard{padding:8px 14px}

/* customer credit terms: payment days chips and the auto payment schedule */
.chip.on{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.pay-sched{margin:8px 0 10px;padding:8px 12px;border-radius:10px;background:var(--accent-soft);border:1px solid var(--accent-line);font-size:13px}
#cdSel{width:auto;min-width:120px}

/* customer terms: Credit duration, Payment terms and the date / amount box share one row */
.ct-row{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.ct-row>label{min-width:0}

/* payment schedule box: theme-colour border, no background; the last line is bold red */
.pay-sched{background:none!important;border:1px solid var(--accent)!important}
.pay-sched .sched-last{color:var(--red);font-weight:700}

.pay-sched .sched-last{color:var(--text)!important;font-weight:400}
.pay-sched .sched-days{display:inline-block;margin-top:4px;padding:1px 8px;border-radius:6px;background:var(--accent);color:var(--accent-ink);font-weight:800}
/* the per-payment / last-date line is highlighted like the days line */
.pay-sched .sched-last{display:inline-block;margin-top:4px;padding:1px 8px;border-radius:6px;background:var(--accent);color:var(--accent-ink)!important;font-weight:800}

/* ===== printed customer statement (financial-ledger style) ===== */
.stmt-print{display:none;font-family:Arial,Helvetica,sans-serif;color:#000;background:#fff;padding:6px 10px;font-size:12px}
.stmt-print *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
.stmt-print .st-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}
.stmt-print .st-co{display:flex;gap:12px;align-items:flex-start}
.stmt-print .st-co img{height:54px;width:auto}
.stmt-print .st-name{font-size:22px;font-weight:800}
.stmt-print .st-sub2{font-size:11px;line-height:1.5;margin-top:4px}
.stmt-print .st-title{background:#000;color:#fff;font-size:20px;font-weight:800;letter-spacing:.5px;padding:12px 44px;white-space:nowrap}
.stmt-print .st-rule{border-top:2px solid #000;margin:16px 0 18px}
.stmt-print .st-top{display:flex;gap:30px}
.stmt-print .st-info{border-collapse:collapse;width:52%;border:1.5px solid #000}
.stmt-print .st-info th{background:#000;color:#fff;text-align:left;padding:5px 10px;width:34%;font-size:11.5px;border-bottom:1px solid #fff}
.stmt-print .st-info td{padding:5px 10px;border-bottom:1px solid #000;font-size:11.5px}
.stmt-print .st-gap{flex:1}
.stmt-print .st-upd{margin:16px 0 14px}
.stmt-print .st-upd small{display:block;font-size:12px;font-weight:700}
.stmt-print .st-upd b{font-size:22px}
.stmt-print .st-led{border-collapse:collapse;width:100%;border:1.5px solid #000;margin-top:4px}
.stmt-print .st-led th{background:#000;color:#fff;text-align:left;padding:6px 8px;font-size:11.5px}
.stmt-print .st-led td{padding:5px 8px;border-bottom:1px solid #555;font-size:11.5px}
.stmt-print .st-led .n{text-align:right}
.stmt-print .st-led thead{display:table-header-group}
.stmt-print .st-led tr{break-inside:avoid}
.stmt-print .st-sub{font-weight:800;font-size:14px;margin:20px 0 6px}
.stmt-print .st-status{margin-top:10px;font-size:13px}
@media print{
  body.printing-stmt>*{display:none!important}
  body.printing-stmt>.stmt-print{display:block!important}
}
.stmt-print table,.stmt-print tbody,.stmt-print tr,.stmt-print td{background:#fff!important;color:#000!important;text-transform:none!important}
.stmt-print th{background:#000!important;color:#fff!important;text-transform:none!important;letter-spacing:0!important;font-family:Arial,Helvetica,sans-serif!important}
.stmt-print *{font-family:Arial,Helvetica,sans-serif}
.stmt-print .st-title{background:#000!important;color:#fff!important}

/* statement: smaller title box sitting on the line, a bigger single-line company name, the period */
.stmt-print .st-head{align-items:flex-end}
.stmt-print .st-name{font-size:32px;font-weight:800;white-space:nowrap;line-height:1.1}
.stmt-print .st-title{font-size:10px;padding:6px 22px;letter-spacing:.3px;align-self:flex-end}
.stmt-print .st-rule{margin:0 0 14px}
.stmt-print .st-period{display:flex;align-items:baseline;gap:14px;margin:0 0 12px}
.stmt-print .st-period b{font-size:18px}
.stmt-print .st-period span{font-size:11px}

.stmt-print .st-info td .st-big{font-size:12.8px;font-weight:800}

.stmt-print .st-led .st-tot td{border-top:1.5px solid #000}
.stmt-print .st-sum td small{font-size:13px;font-weight:700;display:inline-block;margin-top:3px}

/* import wizard: the file view with a tick on every column */
.iw-raw{max-height:260px;overflow:auto;margin-bottom:6px}
.iw-raw th .chk-col{display:flex;flex-direction:row;align-items:center;gap:6px;margin:0;white-space:nowrap;font-weight:700}
.iw-raw th.off,.iw-raw td.off{opacity:.35}
.iw-raw td{white-space:nowrap;max-width:260px;overflow:hidden;text-overflow:ellipsis}

/* edit record */
.edit-hist .eh-row{padding:8px 0;border-top:1px solid var(--line-2)}
.edit-hist .eh-row:first-of-type{border-top:0}
.edit-hist ul{margin:4px 0 0 18px;padding:0;font-size:13px}
details.edit-hist{margin-top:10px;font-size:13px}
details.edit-hist summary{cursor:pointer;font-weight:700}
/* the return / inactive stamp stays clear of the QR code at the top right, so the QR can be read */
.stamp{right:auto!important;left:44%!important;top:150px!important;font-size:26px}
[dir=rtl] .stamp{left:auto!important;right:44%!important}
@media (max-width:700px){.stamp{left:12px!important;top:230px!important;font-size:18px}}
.stamp{left:auto!important;right:170px!important;top:150px!important} /* its right edge stops before the QR column, whatever the stamp's width */
[dir=rtl] .stamp{right:auto!important;left:170px!important}
@media (max-width:700px){.stamp{right:12px!important;left:auto!important;top:230px!important}}

/* invoice: the type / status badges sit under the QR; the page heading is not printed and the logo / QR block starts at the very top of the page */
.inv-badges{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap;margin-top:6px}
@page{margin:5mm 12mm 18mm}
@media print{
  #view:has(.invoice) .ph{display:none!important}
  #view:has(.invoice) .content,#view:has(.invoice){padding-top:0!important;margin-top:0!important}
  .invoice{padding-top:0!important}
  .invoice .inv-head{padding-bottom:10px;margin-bottom:10px}
}

.inv-head .inv-badges{justify-content:flex-start}

/* invoice: Bill to (customer name bold) | the date in the middle of the page, bold | status and By on the right, under the QR */
.inv-meta3{grid-template-columns:1fr auto 1fr!important;align-items:start}
.inv-meta3 .cust-name{font-weight:800;font-size:15px}
.inv-meta3 .inv-date{text-align:center;font-weight:800;font-size:16px}
.inv-meta3 .inv-stat{text-align:right}
.inv-meta3 .inv-stat .badge{margin-left:4px}
@media (max-width:700px){.inv-meta3{grid-template-columns:1fr!important}.inv-meta3 .inv-date,.inv-meta3 .inv-stat{text-align:left}}

.inv-note{margin-top:34px;text-align:center;font-size:12px;color:var(--muted);border-top:1px solid var(--line-2);padding-top:10px}

/* invoice status block: STATUS / Wholesale / Partial (bold) / By — three lines */
.inv-meta3 .inv-stat .stat-line{display:block;font-weight:800;font-size:15px;text-transform:capitalize}
.inv-meta3 .inv-stat .by-line{display:block;margin-top:2px}
/* the computer-generated line is the footer: at the bottom of every printed page */
@media print{
  .inv-note{position:fixed;left:0;right:0;bottom:0;margin:0;border-top:0;padding:0;background:#fff}
  #view:has(.invoice) .invoice{padding-bottom:28px!important}
}

/* invoice totals: the bold green line sits above Total Qty / Total amount; every row is as tall as its text; Grand Total and the saving box are 3 pt smaller */
.invoice .inv-head{border-bottom:0;padding-bottom:6px;margin-bottom:8px}
.invoice .inv-bottom{border-top:3px solid var(--accent);padding-top:8px;margin-top:6px}
.invoice .totals div{padding:1px 0;line-height:1.25}
.invoice .totals .gt{font-size:16px}
.invoice .totals .save-box{font-size:12px;padding:5px 10px!important;margin:4px 0}

/* invoice header: [logo + company name] — [SALES INVOICE / number in a 2 pt box] — [QR] */
.inv-head3{display:flex;align-items:center;justify-content:space-between;gap:16px}
.inv-head3 .inv-co{display:flex;align-items:center;gap:12px;min-width:0}
.inv-head3 .inv-co .biz-logo{height:52px;width:auto;max-width:90px;margin:0;object-fit:contain}
.inv-head3 .inv-co h2{margin:0 0 2px}
.inv-head3 .inv-titlebox{border:2pt solid var(--accent);border-radius:8px;padding:7px 18px;text-align:center;white-space:nowrap;flex:0 0 auto}
.inv-head3 .inv-titlebox .t1{font-size:18px;font-weight:800;line-height:1.2}
.inv-head3 .inv-titlebox .t2{font-size:14px;font-weight:600;line-height:1.3}
.inv-head3 .inv-qr{flex:0 0 auto;text-align:right}
@media (max-width:700px){.inv-head3{flex-wrap:wrap}}
.inv-head3 .inv-titlebox{border-width:3px} /* 2 pt shown as 3 px on screen, exactly 2 pt in print */
@media print{.inv-head3 .inv-titlebox{border-width:2pt}}
/* invoice: the green line under the header (below the QR) stays, and the one above the totals too; both thinner; table rows tighter */
.invoice .inv-head{border-bottom:2px solid var(--accent)!important;padding-bottom:8px;margin-bottom:8px}
.invoice .inv-bottom{border-top:2px solid var(--accent)!important}
.invoice .tbl-wrap table th,.invoice .tbl-wrap table td{padding:4px 8px!important;line-height:1.25}
.invoice .tbl-wrap table th{font-size:11px}
/* printed invoice: the computer-generated line (bold) sits at the foot of the page, right above the footer line "Powered by shelfe-app.com" (smaller, not bold) */
@page inv{margin:4mm 8mm 13mm;@bottom-center{content:"Powered by shelfe-app.com";text-align:center;font-size:10px;font-weight:400;color:#555}}
@media print{
  html:has(.inv-note){page:inv} /* on the root, so no page break is forced before the invoice */
  .inv-note{position:fixed;left:0;right:0;bottom:0;margin:0;padding:0;border:0;background:#fff;text-align:center;font-size:11.3px;font-weight:700;color:#222;line-height:1.3}
  .invoice{padding-bottom:26px!important}
}
/* invoice items table: black header row with white text (also when printed) */
.invoice .tbl-wrap table thead th{background:#000!important;color:#fff!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
@media print{.invoice .tbl-wrap table thead th{background:#000!important;color:#fff!important}}
/* invoice header: the company address / phone / email in bold */
.inv-head3 .inv-co .muted.small{font-weight:700;color:var(--text)}
@media print{.inv-head3 .inv-co .muted.small{color:#111}}
/* printing on a smaller paper (A5, B5, A6 …): the whole document is scaled so the layout stays exactly as on A4 — nothing goes out of alignment */
@media print{
  .invoice{max-width:none!important;overflow:visible!important}
  .invoice .tbl-wrap{overflow:visible!important}
}
@media print and (max-width:650px){ #view,.stmt-print{zoom:.86} }
@media print and (max-width:560px){ #view,.stmt-print{zoom:.76} }
@media print and (max-width:420px){ #view,.stmt-print{zoom:.52} }
/* the small-screen (phone) layout must not be used when printing on A5 / B5: keep the A4 layout of every document and let the zoom above scale it */
@media print{
  .inv-bottom{flex-direction:row!important}
  .stamp{right:170px!important;left:auto!important;top:150px!important;font-size:26px!important}
  .inv-meta{grid-template-columns:1fr 1fr!important}
  .inv-meta3{grid-template-columns:1fr auto 1fr!important}
  .inv-meta3 .inv-date{text-align:center!important}
  .inv-meta3 .inv-stat{text-align:right!important}
  .inv-head3{flex-wrap:nowrap!important}
  .invoice th,.invoice td{font-size:13px!important;padding:4px 8px!important}
  .invoice th{font-size:11px!important}
  .grid.g2{grid-template-columns:1fr 1fr!important}
  .kpis{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}

/* invoice: a bigger QR without the number under it; the page line sits under the invoice number in the title box; A5: less empty space between the credit box and the totals */
.inv-head3 .qr-box{margin-top:0}
.inv-head3 .qr-box .qr-svg{width:120px;height:120px}
.inv-head3 .qr-box small{display:none}
.inv-head3 .inv-titlebox .t3{font-size:10px;font-weight:400;color:var(--muted);line-height:1.3;margin-top:1px}
@media print{
  .inv-bottom{gap:10px!important}
  .inv-bottom .inv-left{flex:0 1 40%!important}
  .invoice .totals{max-width:none!important;flex:1 1 0;margin-left:0!important}
  .inv-head3 .inv-titlebox .t3{color:#444}
}

/* purchase bill and purchase order: the same header, rows and lines as the sale invoice */
.po-doc{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:30px;max-width:880px}
@media print{.po-doc{border:0;padding:0;max-width:none}}
.invoice .tbl-wrap{margin-top:0}
/* the return / inactive stamp: in the middle, between the Bill to row and the table, never over the date or the status */
.stamp{top:236px!important;left:50%!important;right:auto!important;transform:translateX(-50%) rotate(-12deg)!important;opacity:.6}
[dir=rtl] .stamp{left:50%!important;right:auto!important}
@media print{.stamp{top:236px!important;left:50%!important;right:auto!important;font-size:26px!important}}
@media (max-width:700px){.stamp{top:300px!important}}

/* the return / inactive stamp: small, right under the date, so no word of the invoice is covered */
.stamp-mini{display:inline-block;margin-top:5px;padding:1px 9px;border:2px solid var(--red);color:var(--red);border-radius:6px;font-size:12px;font-weight:800;letter-spacing:1px;text-transform:uppercase;transform:rotate(-4deg);white-space:nowrap}
.stamp-mini.gray{border-color:#8f96a2;color:#8f96a2}
.invoice .stamp{display:none!important}

.inv-date .stamp-mini{display:block;width:fit-content;margin:5px auto 0}

/* the return / inactive stamp is big again, under the credit box (the empty space beside the totals) */
.stamp-big{display:block;width:fit-content;margin:22px auto 0;border:4px solid var(--red);color:var(--red);font-weight:900;font-size:28px;letter-spacing:3px;padding:6px 18px;border-radius:10px;transform:rotate(-8deg);opacity:.85;text-transform:uppercase;white-space:nowrap}
.stamp-big.gray{border-color:#8f96a2;color:#8f96a2}

/* purchase order, receive history (what actually arrived): the same table look as the order above it */
.rcv-doc .tbl-wrap table thead th{background:#000!important;color:#fff!important;-webkit-print-color-adjust:exact;print-color-adjust:exact;font-size:11px;padding:4px 8px!important}
.rcv-doc .tbl-wrap table td{padding:4px 8px!important;line-height:1.25;font-size:13px}
@media print{.rcv-doc{margin-top:14px;break-inside:auto}.rcv-doc h3{font-size:14px;margin:0 0 6px}}

/* New Sale type popup */
.sale-pick{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:6px 0 2px}
.sale-pick .sp-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:26px 14px;border:2px solid var(--accent);border-radius:14px;background:var(--accent-soft);color:var(--text);cursor:pointer;font:inherit}
.sale-pick .sp-card b{font-size:20px;font-weight:800}
.sale-pick .sp-card span{font-size:13px;color:var(--muted)}
.sale-pick .sp-card:hover,.sale-pick .sp-card:focus{background:var(--accent);outline:none}
.sale-pick .sp-card:hover b,.sale-pick .sp-card:focus b{color:var(--accent-ink)}
.sale-pick .sp-card:hover span,.sale-pick .sp-card:focus span{color:var(--accent-ink)}
@media (max-width:520px){.sale-pick{grid-template-columns:1fr}}

/* New Sale popup: the chosen card, and the field it asks for */
.sale-pick .sp-card.on{background:var(--accent);border-color:var(--accent)}
.sale-pick .sp-card.on b,.sale-pick .sp-card.on span{color:var(--accent-ink)}
.sp-extra{margin-top:14px}
.sp-line{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px}

/* an invoice that is fully returned (nothing left to pay): a red cross over the totals; the return and the total are bold */
.invoice .totals.has-x{position:relative}
.invoice .totals .void-x{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:3;overflow:visible}
.invoice .totals .void-x line{stroke:#d92d20;stroke-width:6;stroke-linecap:round;vector-effect:non-scaling-stroke;opacity:.85}
.invoice .totals .bold-row,.invoice .totals .bold-row span{font-weight:800}
@media print{.invoice .totals .void-x line{stroke:#d92d20;-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* under the Returns list: Total Return and Total amount, bold */
.ret-sum{display:flex;justify-content:space-between;gap:16px;max-width:300px;padding:2px 0;font-weight:800;font-size:13.5px}
div.small + .ret-sum{margin-top:6px;border-top:1px dashed var(--line-2);padding-top:6px}

/* the barcode under the title box (white ground, so it scans in the dark theme too) */
.inv-head3 .inv-mid{display:flex;flex-direction:column;align-items:center;gap:6px;flex:0 0 auto}
.inv-bc .barcode{display:block;width:250px;height:34px;background:#fff;border-radius:3px}
@media print{.inv-bc .barcode{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* no QR any more: the documents carry the barcode only */
.inv-head3{justify-content:space-between}
.ord-bc{float:right;margin:0 0 8px 12px}
.ord-bc .barcode{width:210px!important}
.inv-qr,.qr-box{display:none!important}
/* invoice / purchase bill / purchase order tables: Product +2 pt (wraps to a second line when long, same column width); #, Qty, Price, Disc %, Amount bold and +1 pt */
.invoice .tbl-wrap td:nth-child(3),.po-doc .tbl-wrap td:nth-child(3){font-size:15.7px!important;line-height:1.25;white-space:normal;word-break:normal;overflow-wrap:anywhere}
.invoice .tbl-wrap td:nth-child(1),.invoice .tbl-wrap td:nth-child(n+4),.po-doc .tbl-wrap td:nth-child(1),.po-doc .tbl-wrap td:nth-child(n+4){font-size:14px!important;font-weight:700}
@media print{
  .invoice .tbl-wrap td:nth-child(3),.po-doc .tbl-wrap td:nth-child(3){font-size:15.7px!important}
  .invoice .tbl-wrap td:nth-child(1),.invoice .tbl-wrap td:nth-child(n+4),.po-doc .tbl-wrap td:nth-child(1),.po-doc .tbl-wrap td:nth-child(n+4){font-size:14px!important;font-weight:700!important}
}
/* product code and product description: bold and the same size */
.invoice .tbl-wrap td:nth-child(2),.invoice .tbl-wrap td:nth-child(3),.po-doc .tbl-wrap td:nth-child(2),.po-doc .tbl-wrap td:nth-child(3){font-size:15.7px!important;font-weight:700!important}
@media print{.invoice .tbl-wrap td:nth-child(2),.invoice .tbl-wrap td:nth-child(3),.po-doc .tbl-wrap td:nth-child(2),.po-doc .tbl-wrap td:nth-child(3){font-size:15.7px!important;font-weight:700!important}}
/* product code / description: 1 pt smaller (14.4px) and tighter lines */
.invoice .tbl-wrap td:nth-child(2),.invoice .tbl-wrap td:nth-child(3),.po-doc .tbl-wrap td:nth-child(2),.po-doc .tbl-wrap td:nth-child(3){font-size:14.4px!important;line-height:1.05!important;padding-top:3px!important;padding-bottom:3px!important}
@media print{.invoice .tbl-wrap td:nth-child(2),.invoice .tbl-wrap td:nth-child(3),.po-doc .tbl-wrap td:nth-child(2),.po-doc .tbl-wrap td:nth-child(3){font-size:14.4px!important;line-height:1.05!important;padding-top:3px!important;padding-bottom:3px!important}}
/* invoice: the cash received / Exact box about 4 pt smaller */
.invoice .diff-box{padding:8px 12px;border-radius:10px;gap:1px;margin:6px 0}
.invoice .diff-box span{font-size:8px}
.invoice .diff-box b{font-size:26px;line-height:1.1}


/* credit-limit stamp: a worn ink stamp (patchy ink, double border) in five colours, with the date */
.stamp-credit{--sc:#d97706;display:block;width:fit-content;margin:16px auto 0;border:4px double var(--sc);color:var(--sc);border-radius:8px;padding:7px 16px 6px;text-align:center;transform:rotate(-4deg);opacity:.92;
  -webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='140'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' seed='7'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 0 0 0 -5.4'/></filter><rect width='260' height='140' filter='url(%23n)'/></svg>");
  mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='140'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' seed='7'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 0 0 0 -5.4'/></filter><rect width='260' height='140' filter='url(%23n)'/></svg>");
  -webkit-mask-size:260px 140px;mask-size:260px 140px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.stamp-credit b{display:block;font-size:17px;font-weight:900;letter-spacing:1px;white-space:nowrap;line-height:1.2}
.stamp-credit span{display:block;font-size:11.5px;font-weight:700;margin-top:2px}
.stamp-credit i{display:block;font-style:normal;font-size:11px;font-weight:800;letter-spacing:2px;margin-top:3px;padding-top:3px;border-top:1.5px solid var(--sc)}
.stamp-credit.lv-green{--sc:#16a34a}.stamp-credit.lv-blue{--sc:#2563eb}.stamp-credit.lv-yellow{--sc:#ca8a04}.stamp-credit.lv-amber{--sc:#ea580c}.stamp-credit.lv-red{--sc:#d92d20}
@media print{.stamp-credit{opacity:1}}
/* credit stamp: darker ink, thicker lines and fewer gaps, so it also shows clearly on a black-and-white print */
.stamp-credit{border-width:5px;opacity:1}
.stamp-credit b{font-size:18px;font-weight:900}
.stamp-credit span{font-weight:800;font-size:12px}
.stamp-credit i{font-weight:900;border-top-width:2px}
.stamp-credit.lv-green{--sc:#0b5d2a}.stamp-credit.lv-blue{--sc:#173a9b}.stamp-credit.lv-yellow{--sc:#7a4a05}.stamp-credit.lv-amber{--sc:#8a2f0a}.stamp-credit.lv-red{--sc:#8f1d14}
.stamp-credit{-webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='140'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' seed='7'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 0 0 0 -3.6'/></filter><rect width='260' height='140' filter='url(%23n)'/></svg>");
  mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='140'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' seed='7'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 0 0 0 -3.6'/></filter><rect width='260' height='140' filter='url(%23n)'/></svg>")}
@media print{.stamp-credit{filter:contrast(1.25)}}
/* invoice cash-received box: the "Cash received Rs. …" line bold and 2 pt bigger, the "Exact" 2 pt smaller */
.invoice .diff-box span{font-size:10.7px;font-weight:900;color:var(--text)}
.invoice .diff-box b{font-size:23.3px}

/* Risk Management report */
.rk-chip{display:inline-block;padding:2px 9px;border-radius:6px;font-weight:700;font-size:11px;color:#fff;min-width:60px;text-align:center;white-space:nowrap}
.rk-G{background:#2e7d32}.rk-Y{background:#f2b705;color:#1b1f23}.rk-O{background:#ef7d00}.rk-R{background:#c62828}.rk-N{background:#7b8794}
.rk-banner{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;border-radius:12px;padding:16px 22px;margin-bottom:14px;color:#fff}
.rk-bg-G{background:#2e7d32}.rk-bg-Y{background:#f2b705;color:#1b1f23}.rk-bg-O{background:#ef7d00}.rk-bg-R{background:#c62828}
.rk-bl{font-size:12px;opacity:.9}.rk-bv{font-size:28px;font-weight:800;line-height:1.15}.rk-br{text-align:right;font-size:13px;line-height:1.6}
.rk-hist{display:inline-flex;gap:3px}.rk-hist i{width:14px;height:14px;border-radius:3px;display:inline-block}
.rk-det .rk-top{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.rk-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;margin-bottom:10px}
.rk-facts div{border:1px solid var(--line);border-radius:8px;padding:6px 10px}.rk-facts span{display:block;font-size:11px;color:var(--muted)}.rk-facts b{font-size:14px}
.rk-flags{margin:0 0 10px;padding-left:0;list-style:none;display:grid;gap:4px}
.rk-ref{width:100%;border-collapse:collapse;margin:8px 0}.rk-ref th,.rk-ref td{border:1px solid var(--line);padding:5px 8px;font-size:12px;text-align:left}
@media print{.rk-banner{-webkit-print-color-adjust:exact;print-color-adjust:exact}.rk-chip,.rk-hist i{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
.rk-why{display:block;min-width:200px;max-width:340px;white-space:normal;font-size:12px;line-height:1.35}

.rk-bg-N{background:#7b8794}.rk-bwide{text-align:left;font-size:15px;max-width:640px;line-height:1.45}
.rk-svg{width:100%;height:auto;display:block;margin-top:6px}.rk-grid{stroke:var(--line);stroke-width:1}
.rk-svgt{fill:var(--muted);font-size:11px}.rk-svgv{fill:var(--text);font-size:11px;font-weight:700}
.rk-hist.big i{width:22px;height:22px;border-radius:5px}
.rk-do{list-style:disc;padding-left:20px;display:block}.rk-do li{margin:5px 0;font-size:14px;line-height:1.45}
.rk-stack{display:flex;height:26px;border-radius:7px;overflow:hidden;margin:6px 0 10px}.rk-stack i{display:block}
.rk-bars{display:grid;gap:8px;margin-bottom:8px}.rk-brow{display:grid;grid-template-columns:130px 1fr 70px;gap:10px;align-items:center;font-size:12px}
.rk-bar{background:var(--line);border-radius:5px;height:14px;overflow:hidden}.rk-bar i{display:block;height:100%}.rk-brow b{text-align:right}
@media print{.rk-bwide{color:inherit}.rk-svg,.rk-stack i,.rk-bar i{-webkit-print-color-adjust:exact;print-color-adjust:exact}.rk-chip{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* the customer's own statement inside the risk report: shown on screen too, in the same black-and-white format */
.stmt-print.rk-stmt{display:block;border-radius:10px;padding:16px 18px;margin-top:6px}
.rk-per{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
@media print{.rk-stcard{break-before:page}.stmt-print.rk-stmt{display:block!important;padding:0}}
.rk-nm{cursor:pointer}.rk-nm:hover{text-decoration:underline}
#rkt tr.click .rk-chip{cursor:pointer}
.rk-filter{margin:0 0 10px}.rk-filter .chip{display:inline-flex;align-items:center;gap:6px}.rk-filter .rk-chip{min-width:0}
/* the level filter: the coloured level names stay fully readable, the chosen one is marked by its outline */
.rk-filter .chip .rk-chip{color:#fff;opacity:1;font-size:12px;padding:3px 10px}
.rk-filter .chip .rk-chip.rk-Y{color:#1b1f23}
.rk-filter .chip.on{background:var(--card);border:2px solid var(--accent);color:var(--text)}
.rk-filter .chip.on .rk-chip{opacity:1}
.rk-filter .chip b{color:var(--text);font-size:15px}

/* the customer's risk report: name first (smaller than the business name), the level beside it, everything tight so it prints on as few pages as possible */
.rk-main .ph{margin-bottom:6px;align-items:center}
.rk-main .ph h1{font-size:17px;margin:0;display:flex;align-items:center;gap:10px;letter-spacing:0}
.rk-main .ph h1 .rk-chip{font-size:10.5px;padding:2px 9px;min-width:0}
.rk-main .ph .sub{font-size:12px;margin:0}
.rk-verdict{font-size:13px;font-weight:600;margin:2px 0 8px}
.rk-page .kpis{grid-template-columns:repeat(5,1fr);gap:8px;margin-bottom:8px}
.rk-main .kpi{padding:6px 10px;border-radius:8px}.rk-main .kpi .l{font-size:10.5px}.rk-main .kpi .v{font-size:15px;margin:1px 0}.rk-main .kpi .s{font-size:10.5px}
.rk-main .rk-hist.big i{width:15px;height:15px;border-radius:3px}
.rk-main .card{padding:8px 12px;margin-bottom:8px;border-radius:8px}
.rk-main .card h3{font-size:13px;margin:0 0 4px}
.rk-main th,.rk-main td{padding:3px 7px;font-size:11.5px;line-height:1.3}.rk-main th{font-size:10px;position:static}
.rk-main td.small{font-size:11px}.rk-main .rk-chip{font-size:10px;padding:1px 8px;min-width:0}
.rk-main .rk-cap{font-size:10.5px;margin:0 0 2px}.rk-main .rk-svg{max-height:150px;margin-top:2px}
.rk-main .rk-do li{font-size:12px;margin:2px 0;line-height:1.35}
.rk-main .grid.g2{gap:8px}
@media (max-width:900px){.rk-page .kpis{grid-template-columns:repeat(2,1fr)}}
@media print{
  .rk-main{font-size:11px}.rk-page .kpis{grid-template-columns:repeat(5,1fr)}
  .rk-main .card{border:1px solid #bbb;box-shadow:none;background:#fff;padding:5px 8px;margin-bottom:6px}
  .rk-main .grid.g2{display:grid;grid-template-columns:1fr 1fr}
  .rk-main .rk-svg{max-height:120px}
  .rk-stcard{break-before:page;border:0!important;padding:0!important}
  .stmt-print.rk-stmt{display:block!important;padding:0;zoom:.88}
}

/* customer risk report: its own header (name + address on the left, the status on the right, same height), no business header */
.rk-actions{display:flex;gap:8px;justify-content:flex-end;margin-bottom:8px}
.rk-hdr{display:flex;justify-content:space-between;align-items:stretch;gap:12px}
.rk-hl{display:flex;flex-direction:column;justify-content:center}
.rk-nm2{font-size:17px;font-weight:800;line-height:1.25}.rk-ad{font-size:12px;color:var(--muted);line-height:1.3}
.rk-hr{display:flex;align-items:stretch;gap:8px}.rk-hst{display:flex;align-items:center;font-size:12px;color:var(--muted)}
.rk-chip.rk-big{display:flex;align-items:center;justify-content:center;font-size:14px;padding:0 16px;border-radius:6px;min-width:0}
.rk-rule{border-top:2px solid var(--line);margin:6px 0 6px}
@media print{
  .rk-main,.rk-main *{color:#000!important}
  .rk-main .rk-graphs{display:none!important}
  .rk-main .card,.rk-main .kpi,.rk-main .rk-facts div{border:1px solid #000!important;background:#fff!important}
  .rk-main table th,.rk-main table td{border-bottom:1px solid #000!important;background:#fff!important}
  .rk-main table th{border-top:1px solid #000!important}
  .rk-main .rk-chip{background:#fff!important;color:#000!important;border:1px solid #000;font-weight:800}
  .rk-main .rk-hist i{border:1px solid #000}
  .rk-rule{border-top:2px solid #000}.rk-ad,.rk-hst{color:#000}
  .rk-main a{text-decoration:none}
}
/* the five boxes of the customer risk report stay in one line, also when printed */
.rk-page .rk-main .kpis{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:6px}
.rk-main .kpi{min-width:0;overflow:hidden}
@media print{.rk-page .rk-main .kpis{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:5px}.rk-main .kpi{padding:4px 6px}.rk-main .kpi .v{font-size:13px}.rk-main .kpi .l,.rk-main .kpi .s{font-size:9.5px}}
@media (max-width:640px){.rk-page .rk-main .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* the overall report on black-and-white paper: black text and outlines, shades of grey for the levels */
@media print{
  .rk-main .rk-banner{background:#fff!important;border:2px solid #000;border-radius:6px}
  .rk-main .rk-filter,.rk-main .pager,.rk-main .rk-bl{display:none!important}
  .rk-main .rk-stack{border:1px solid #000}
  .rk-main .rk-stack i.rk-R,.rk-main .rk-hist i.rk-R{background:#000!important}
  .rk-main .rk-stack i.rk-O,.rk-main .rk-hist i.rk-O{background:#444!important}
  .rk-main .rk-stack i.rk-Y,.rk-main .rk-hist i.rk-Y{background:#888!important}
  .rk-main .rk-stack i.rk-G,.rk-main .rk-hist i.rk-G{background:#ccc!important}
  .rk-main .rk-stack i.rk-N,.rk-main .rk-hist i.rk-N{background:#fff!important;box-shadow:inset 0 0 0 1px #000}
  .rk-main .rk-bar{background:#fff!important;border:1px solid #000}.rk-main .rk-bar i{background:#555!important}
  .rk-main .rk-ref td,.rk-main .rk-ref th{border:1px solid #000!important}
  .rk-main .tbl-wrap,.rk-main table{border-color:#000!important}
  .rk-main .kpi.red,.rk-main .kpi.green,.rk-main .kpi.amber,.rk-main .kpi.blue{border:1px solid #000!important}
  .rk-main .neg,.rk-main .pos{color:#000!important}
  .rk-main .rk-nm{text-decoration:none}
}
/* the overall page: its four boxes in one line */
#view>.rk-main>.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
@media (max-width:760px){#view>.rk-main>.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}

.rk-fnote{display:none}
/* the overall report is printed on a landscape page; the customers table has the name column wide and large, every figure column narrow and small */
@page rkland{size:A4 landscape;margin:10mm 10mm 16mm;@bottom-center{content:"Powered by shelfe-app.com";font-size:10px;color:#555}}
@media print{
  html:has(.rk-ov){page:rkland}
  .rk-main .rk-fnote{display:block;font-size:12px;font-weight:700;margin:2px 0 6px}
  .rk-main #rkt table{table-layout:fixed;width:100%}
  .rk-main #rkt th,.rk-main #rkt td{padding:3px 4px;font-size:10.5px;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
  .rk-main #rkt th{font-size:8px;letter-spacing:0;overflow-wrap:normal;vertical-align:bottom}
  .rk-main #rkt td.num{white-space:nowrap}
  .rk-main #rkt th:nth-child(1){width:15%}.rk-main #rkt th:nth-child(2){width:7%}.rk-main #rkt th:nth-child(3){width:5.5%}.rk-main #rkt th:nth-child(4){width:5%}
  .rk-main #rkt th:nth-child(5){width:6.5%}.rk-main #rkt th:nth-child(6){width:4.5%}.rk-main #rkt th:nth-child(7){width:5.5%}.rk-main #rkt th:nth-child(8){width:5.5%}
  .rk-main #rkt th:nth-child(9){width:7%}.rk-main #rkt th:nth-child(10){width:8%}.rk-main #rkt th:nth-child(11){width:18%}.rk-main #rkt th:nth-child(12){width:5.5%}.rk-main #rkt th:nth-child(13){width:7.5%}
  .rk-main #rkt td:nth-child(1){font-size:13px;font-weight:800}
  .rk-main #rkt td:nth-child(11){font-size:10px}.rk-main #rkt td:nth-child(13){white-space:normal;font-size:10px}
  .rk-main #rkt .rk-why{min-width:0;max-width:none;font-size:10px}
  .rk-main #rkt .rk-chip{font-size:8.5px;padding:1px 3px}
  .rk-main #rkt .rk-hist i{width:9px;height:9px}
  .rk-main #rkt tr{break-inside:avoid}
}

/* the printed order is its own document (same layout as the invoice); on paper only it is shown, on screen the working page */
.ord-print{display:none}
@media print{
  #view:has(.ord-print)>.ph,#view:has(.ord-print)>.grid,#view:has(.ord-print)>.card:not(.ord-print){display:none!important}
  .ord-print{display:block!important}
}

/* Profit Report / Profit & Loss: the same look as the risk report; the detail prints on a landscape page */
.pl-period{font-size:13px;font-weight:700;margin:6px 0 8px}
.pl-page .tabs{margin:0 0 10px}
.pl-page tr.pl-cat td{background:var(--card-2,#262b34)}.pl-page tr.pl-tot td{border-top:2px solid var(--line)}
.pl-page .pl-st td:first-child{width:auto}
@media print{
  .pl-period{font-size:12.5px;color:#000}
  .pl-page tr.pl-cat td{background:#e6e6e6!important}.pl-page tr.pl-tot td{border-top:2px solid #000!important}
  .pl-page .pl-det{table-layout:fixed;width:100%}.pl-page .pl-det th,.pl-page .pl-det td{padding:2px 4px;font-size:10.5px;line-height:1.25;white-space:normal}.pl-page .pl-det th{font-size:8.5px}.pl-page .pl-det td.num{white-space:nowrap}
  .pl-page .pl-det th:nth-child(1){width:8%}.pl-page .pl-det th:nth-child(2){width:28%}.pl-page .pl-det th:nth-child(3){width:7%}.pl-page .pl-det th:nth-child(4){width:11%}.pl-page .pl-det th:nth-child(5){width:10%}.pl-page .pl-det th:nth-child(6){width:11%}.pl-page .pl-det th:nth-child(7){width:10%}.pl-page .pl-det th:nth-child(8){width:7%}.pl-page .pl-det th:nth-child(9){width:8%}
  .pl-page .pl-det tr{break-inside:avoid}
}

/* local hub chip (bottom left, on the shop's hub only) */
.hub-chip { position: fixed; left: 12px; bottom: 12px; z-index: 60; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--card, #222); border: 1px solid var(--line, #444); color: var(--muted, #aaa); box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.hub-chip::before { content: '●'; margin-right: 6px; color: #2fbf71; }
.hub-chip.off { color: #fff; background: #b45309; border-color: #b45309; }
.hub-chip.off::before { color: #fff; }
@media print { .hub-chip { display: none !important; } }

/* waiting for a bank / wallet payment */
.pay-wait { text-align: center; padding: 6px 4px 2px; }
.pay-wait .pw-spin { width: 38px; height: 38px; margin: 4px auto 12px; border-radius: 50%; border: 4px solid var(--line, #444); border-top-color: var(--accent, #c8f031); animation: pwspin 1s linear infinite; }
.pay-wait .pw-title { font-weight: 700; font-size: 16px; }
.pay-wait .pw-amt { font-weight: 800; font-size: 30px; margin: 8px 0 2px; }
.pay-wait .pw-via { color: var(--muted, #aaa); margin-bottom: 4px; }
@keyframes pwspin { to { transform: rotate(360deg); } }

/* invoice summary window */
.sale-sum { padding: 2px 2px 0; }
.sale-sum .ss-who { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.sale-sum .ss-row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line, #3a3f49); }
.sale-sum .ss-row b { white-space: nowrap; }
.sale-sum .ss-row.neg b { color: #ef6a6a; }
.sale-sum .ss-row.big { font-size: 17px; border-bottom: 0; }
.sale-sum .ss-sep { height: 8px; }

/* invoice: how it was paid */
.totals .pay-how { align-items: flex-start; font-size: 12px; opacity: .9; }
.totals .pay-how span:last-child { text-align: right; max-width: 62%; }

/* cash & bank statement */
.as-head { margin-bottom: 10px; }
.as-head .as-nm { font-size: 22px; font-weight: 800; }
.as-head .as-per { margin-top: 4px; }
.as-page tr[data-row], .as-page tbody tr { cursor: default; }
@media print { .as-page .card.no-print, .as-page .no-print { display: none !important; } }

/* payment boxes of the invoice / bill: the amount box is big; the method and bank / wallet boxes are as wide as their text (the whole name and number), no more */
.entry-page #payCard .pay2-row > label:first-child, .pay2-row > label:first-child { flex: 1 1 200px !important; min-width: 200px !important; } /* the amount box takes all the room that is left */
.entry-page #payCard .pay2-row #paid, .pay2-row #paid { width: 100% !important; height: 34px !important; font-size: 16px !important; font-weight: 800 !important; }
@media (max-width: 1100px) { .entry-page #payCard .pay2-row, .pay2-row { flex-wrap: wrap !important; } }

/* the title bar of a new sale: Retail Invoice / Wholesale Invoice in the middle of the whole bar, the arrows stay on the left, Previous and X on the right */
.ph:has(#saleTitle) { position: relative; }
.ph h1:has(#saleTitle) { position: static; }
.ph h1:has(#saleTitle) .ph-nav:nth-child(1) { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
.ph h1:has(#saleTitle) .ph-nav:nth-child(2) { position: absolute; left: 58px; top: 50%; transform: translateY(-50%); }
#saleTitle { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 20px; font-weight: 800; letter-spacing: .2px; white-space: nowrap; }

/* payment QR card: business name + bank name on a colour band, the QR and the IBAN (or wallet number) in a box; A4 or A5 */
@page qra4 { size: A4 portrait; margin: 6mm; }
@page qra5 { size: A5 portrait; margin: 6mm; }
.qr-print { display: none; }
.qr-card { box-sizing: border-box; background: #fff; color: #000; font-family: Arial, Helvetica, sans-serif; display: flex; flex-direction: column; border: 3px solid var(--qc); border-radius: 14px; overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.qr-card * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.qr-a4 { width: 198mm; height: 285mm; } .qr-a5 { width: 136mm; height: 198mm; }
.qrc-head { background: var(--qc); color: #fff; text-align: center; padding: 9mm 6mm; }
.qrc-biz { font-weight: 800; line-height: 1.15; } .qrc-bank { font-weight: 600; margin-top: 3mm; opacity: .96; }
.qrc-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7mm; padding: 7mm; text-align: center; }
.qrc-scan { font-weight: 800; color: var(--qc); }
.qrc-qr { background: #fff; padding: 3mm; border: 2px solid #000; border-radius: 6px; }
.qrc-qr svg { display: block; width: 100%; height: auto; }
.qrc-box { border: 2.5px solid var(--qc); border-radius: 10px; padding: 4mm 8mm; min-width: 72%; max-width: 100%; }
.qrc-box small { display: block; font-weight: 800; color: var(--qc); letter-spacing: 1px; }
.qrc-box b { display: block; letter-spacing: 1px; word-break: break-all; margin-top: 1.5mm; }
.qrc-note { color: #444; }
.qr-a4 .qrc-biz { font-size: 34pt; } .qr-a4 .qrc-bank { font-size: 24pt; } .qr-a4 .qrc-scan { font-size: 24pt; } .qr-a4 .qrc-qr { width: 115mm; } .qr-a4 .qrc-box small { font-size: 12pt; } .qr-a4 .qrc-box b { font-size: 22pt; } .qr-a4 .qrc-note { font-size: 13pt; }
.qr-a5 .qrc-biz { font-size: 23pt; } .qr-a5 .qrc-bank { font-size: 17pt; } .qr-a5 .qrc-scan { font-size: 17pt; } .qr-a5 .qrc-qr { width: 78mm; } .qr-a5 .qrc-box small { font-size: 9pt; } .qr-a5 .qrc-box b { font-size: 15pt; } .qr-a5 .qrc-note { font-size: 10pt; }
.qr-prev { margin-top: 12px; display: flex; justify-content: center; }
.qr-prev .qr-card { zoom: .42; }
@media print {
  body.printing-qr > * { display: none !important; }
  body.printing-qr > .qr-print { display: block !important; }
  html:has(.qr-print-a4) { page: qra4; } html:has(.qr-print-a5) { page: qra5; }
}

/* locked opening balances */
.lock-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; padding: 8px 12px; border: 1px solid var(--line, #444); border-radius: 10px; background: rgba(255,255,255,.03); font-size: 13px; }
.lock-bar.open { border-color: var(--amber, #e0a82e); color: var(--amber, #e0a82e); }

/* a wrong IBAN: the message stays under the bank row */
.iban-err { color: #ef6a6a; font-size: 13px; line-height: 1.4; margin: 8px 2px 0; font-weight: 600; }
.cat-box input.bad { border-color: #ef6a6a !important; }

.qrc-row + .qrc-row { margin-top: 3.5mm; padding-top: 3.5mm; border-top: 1.5px solid var(--qc); }

/* the bank's / wallet's own payment QR picture */
.qrc-qr img { display: block; width: 100%; height: auto; }
.qr-thumb { width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--line, #555); background: #fff; object-fit: contain; cursor: pointer; align-self: center; }
.qc-wrap { position: relative; margin: 0 auto; touch-action: none; user-select: none; }
.qc-wrap canvas { display: block; border-radius: 6px; }
.qc-sel { position: absolute; border: 2px solid #c8f031; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); cursor: move; box-sizing: border-box; }
.qc-sel i { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; background: #c8f031; border-radius: 50%; border: 2px solid #14171d; cursor: nwse-resize; }

/* payment approvals + payment phones */
.pa-card { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line, #3a3f49); }
.pa-card:last-child { border-bottom: 0; }
.pa-amt { font-size: 26px; font-weight: 800; }
.pa-via { font-weight: 600; margin: 2px 0; }
.pa-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pp-install { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.pp-qr { width: 120px; flex: 0 0 120px; background: #fff; padding: 6px; border-radius: 8px; }
.pp-qr svg { display: block; width: 100%; height: auto; }
.pp-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line, #3a3f49); }

/* the QR image and QR Print buttons of a bank / wallet row: on their own line under the fields */
.bank-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line, #444); }
.bank-acts .qr-thumb { width: 46px; height: 46px; }

/* each bank / wallet in its own outlined box, its name on the outline */
.bank-box { position: relative; border: 2px solid rgba(200,240,49,.6) !important; border-radius: 14px !important; padding: 22px 16px 14px !important; margin-top: 26px !important; background: rgba(255,255,255,.02); }
.bank-box.wallet-box { border-color: rgba(60,200,140,.6) !important; }
.bank-tag { position: absolute; top: -14px; left: 16px; display: flex; align-items: baseline; gap: 6px; padding: 3px 14px; border-radius: 999px; background: var(--card, #23272f); border: 2px solid rgba(200,240,49,.6); font-size: 14px; max-width: calc(100% - 32px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bank-box.wallet-box .bank-tag { border-color: rgba(60,200,140,.6); }
.bank-tag .bt-k { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted, #9aa3b2); }
.bank-tag b { font-weight: 800; }

/* the user's bank / wallet payment mode, and an invoice waiting for the admin */
.perm-tbl .gate-c { text-align: center; padding: 6px 12px; white-space: nowrap }
.perm-tbl .gate-g { font-weight: 800; font-size: 14px }
/* a frame around the Edit group (columns 2-4) and around the Delete group (columns 5-7) */
.perm-tbl { --gb: 2px solid rgba(150,160,175,.65); border-collapse: separate; border-spacing: 0 }
.perm-tbl tbody td:nth-child(5), .perm-tbl thead tr:last-child th:nth-child(5), .perm-tbl thead tr:first-child th:nth-child(3) { margin-left: 0 }
.perm-tbl thead tr:first-child th.gate-g { border-top: var(--gb); border-bottom: 1px solid rgba(150,160,175,.35) }
.perm-tbl thead tr:first-child th:nth-child(2), .perm-tbl thead tr:first-child th:nth-child(3) { border-left: var(--gb); border-right: var(--gb); border-radius: 10px 10px 0 0 }
.perm-tbl thead tr:last-child th:nth-child(2), .perm-tbl tbody td:nth-child(2), .perm-tbl thead tr:last-child th:nth-child(5), .perm-tbl tbody td:nth-child(5) { border-left: var(--gb) }
.perm-tbl thead tr:last-child th:nth-child(4), .perm-tbl tbody td:nth-child(4), .perm-tbl thead tr:last-child th:nth-child(7), .perm-tbl tbody td:nth-child(7) { border-right: var(--gb) }
.perm-tbl tbody tr:last-child td:nth-child(n+2) { border-bottom: var(--gb) }
.perm-tbl tbody tr:last-child td:nth-child(2) { border-bottom-left-radius: 10px } .perm-tbl tbody tr:last-child td:nth-child(4) { border-bottom-right-radius: 10px }
.perm-tbl tbody tr:last-child td:nth-child(5) { border-bottom-left-radius: 10px } .perm-tbl tbody tr:last-child td:nth-child(7) { border-bottom-right-radius: 10px }
.perm-tbl thead tr:first-child th:nth-child(3) { margin-left: 8px }
.perm-tbl .gate-c input[type=radio] { width: 18px; height: 18px; cursor: pointer }
.perm-radio { display: grid; gap: 8px; margin: 6px 0 12px; }
.pa-tag { display: inline-block; background: rgba(200,240,49,.16); color: var(--accent, #c8f031); border-radius: 8px; padding: 2px 10px; font-size: 12px; font-weight: 800; margin-bottom: 4px; }

/* ---- thermal receipt (80 mm roll): a different layout, it appears only while printing on the thermal printer ---- */
.th-only{display:none}
body.print-thermal{background:#fff!important;color:#000!important}
body.print-thermal .sidebar,body.print-thermal .topbar,body.print-thermal .no-print,body.print-thermal .ph,body.print-thermal .toast,body.print-thermal .powered,body.print-thermal #view>.card{display:none!important}
body.print-thermal .content{padding:0!important;max-width:none!important;margin:0!important}
body.print-thermal #view{zoom:1!important;padding:0!important}
body.print-thermal .invoice{display:block!important;width:calc(var(--thmm,80mm) - 6mm)!important;max-width:none!important;margin:0 3mm!important;padding:2mm 0 1mm!important;border:0!important;box-shadow:none!important;background:#fff!important;color:#000!important;font-size:11px!important;font-family:Arial,Helvetica,sans-serif}
body.print-thermal .invoice .inv-head,body.print-thermal .invoice .inv-meta,body.print-thermal .invoice>.tbl-wrap,body.print-thermal .invoice .inv-note,body.print-thermal .invoice .powered,body.print-thermal .invoice>h4,body.print-thermal .invoice>.small,body.print-thermal .invoice .stamp,body.print-thermal .invoice .stamp-big{display:none!important}
body.print-thermal .invoice .th-only{display:block!important}
body.print-thermal .th-biz{font-size:19px;font-weight:800;text-align:center;line-height:1.15}
body.print-thermal .th-addr{text-align:center;font-size:10px;margin:2px 0 5px;line-height:1.3}
body.print-thermal .th-title{display:flex;justify-content:space-between;align-items:baseline;gap:6px;border-top:1px dashed #000;border-bottom:1px dashed #000;padding:3px 0;font-size:12px}
body.print-thermal .th-title span{font-weight:800}
body.print-thermal .th-bc{margin:5px 0 3px;height:34px}
body.print-thermal .th-bc svg{width:100%;height:34px;display:block}
body.print-thermal .th-meta{display:flex;justify-content:space-between;gap:6px;font-size:10.5px;padding-bottom:3px;border-bottom:1px dashed #000}
body.print-thermal .th-cust{padding:3px 0 4px;font-size:11px;line-height:1.3;border-bottom:1px dashed #000}
body.print-thermal .th-items{width:100%;border-collapse:collapse;margin-top:3px;font-size:10.5px;background:#fff}
body.print-thermal .th-items th{background:#000!important;color:#fff!important;font-size:9.5px;padding:2px 2px;text-align:left;text-transform:none;letter-spacing:0}
body.print-thermal .th-items td{padding:2px;vertical-align:top;border-bottom:1px dotted #888;background:#fff;color:#000}
body.print-thermal .th-items .num{text-align:right}
body.print-thermal .th-items td:nth-child(2){word-break:break-word}
body.print-thermal .invoice .inv-bottom{display:block!important;border-top:1px dashed #000!important;margin-top:4px!important;padding-top:3px!important}
body.print-thermal .invoice .inv-left,body.print-thermal .invoice .totals{width:100%!important;max-width:none!important;margin:0!important;display:block!important}
body.print-thermal .invoice .totals div{font-size:11px;padding:1px 0}
body.print-thermal .invoice .totals .gt{font-size:14px}
body.print-thermal .invoice .stamp-credit{transform:none;margin:5px auto;max-width:100%}

body.print-thermal .invoice .inv-left>div:not(.stamp-credit),body.print-thermal .invoice .credit-box,body.print-thermal .invoice .cbox{background:#fff!important;color:#000!important;border:1px solid #000!important;border-radius:4px!important;padding:3px 5px!important;font-size:10.5px!important}
body.print-thermal .invoice .inv-left>div:not(.stamp-credit) *{color:#000!important}
body.print-thermal .invoice .totals .gt,body.print-thermal .invoice .totals .gt span{color:#000!important;background:none!important;border:0!important}
body.print-thermal .invoice .save-box{color:#000!important;background:none!important;border:0!important;font-size:10.5px!important;text-align:left!important}
/* thermal: strictly black and white */
body.print-thermal .invoice,body.print-thermal .invoice *{color:#000!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
body.print-thermal .invoice .th-items th{background:#000!important;color:#fff!important}
body.print-thermal .invoice .stamp-credit{background:#fff!important;border-color:#000!important;box-shadow:none!important;filter:grayscale(1) contrast(2)}
body.print-thermal .invoice .stamp-credit *{color:#000!important;border-color:#000!important;background:none!important;text-shadow:none!important}
body.print-thermal .invoice .stamp-credit:before,body.print-thermal .invoice .stamp-credit:after{border-color:#000!important}
body.print-thermal .invoice .badge,body.print-thermal .invoice .neg,body.print-thermal .invoice .pos{background:none!important;color:#000!important}
body.print-thermal .invoice svg:not(.barcode) *{stroke:#000!important;fill:none!important}

/* ===== thermal receipt fixes ===== */
body.print-thermal .invoice,
body.print-thermal #view:has(.invoice) .invoice{padding-bottom:0!important;text-align:center!important}
body.print-thermal .th-title{justify-content:center;gap:10px}
body.print-thermal .th-meta{justify-content:center;gap:12px}
body.print-thermal .th-cust{text-align:center}
body.print-thermal .invoice .inv-left{text-align:center}

/* items: the product name gets the room, numbers stay on one line */
body.print-thermal .th-items{table-layout:auto}
body.print-thermal .th-items th,
body.print-thermal .th-items td{white-space:nowrap;text-align:left}
body.print-thermal .th-items td:nth-child(n+3),
body.print-thermal .th-items th:nth-child(n+3){text-align:right}
body.print-thermal .th-items td:nth-child(2),
body.print-thermal .th-items th:nth-child(2){white-space:normal;width:100%;font-size:11px;line-height:1.25}

/* "CASH RECEIVED" and "Exact" on one line, smaller */
body.print-thermal .invoice .inv-left>div.diff-box{display:flex!important;flex-direction:row!important;justify-content:space-between;align-items:center;gap:6px;padding:3px 6px!important;margin:4px 0!important}
body.print-thermal .invoice .inv-left>div.diff-box span{font-size:9px!important;font-weight:900;white-space:nowrap}
body.print-thermal .invoice .inv-left>div.diff-box b{font-size:12px!important;line-height:1}

/* THANK YOU stamp: smaller, centred */
body.print-thermal .invoice .stamp-credit{border-width:2px!important;padding:3px 6px 2px!important;margin:6px auto!important;transform:none}
body.print-thermal .invoice .stamp-credit b{font-size:10px!important;letter-spacing:.5px}
body.print-thermal .invoice .stamp-credit span{font-size:8px!important;margin-top:1px}
body.print-thermal .invoice .stamp-credit i{font-size:7.5px!important;margin-top:2px;padding-top:2px;border-top-width:1px!important}

/* ===== thermal: 9px text, centred on the paper ===== */
body.print-thermal .invoice,body.print-thermal .invoice *{font-size:9px!important;line-height:1.25!important}
body.print-thermal .invoice .stamp-credit b,body.print-thermal .invoice .stamp-credit span,body.print-thermal .invoice .stamp-credit i{font-size:9px!important}
body.print-thermal #view{padding:0!important}
body.print-thermal .content{margin:0 auto!important}
body.print-thermal .invoice{width:calc(var(--thmm,80mm) - 4mm)!important;margin:0 auto!important;padding-left:0!important;padding-right:0!important}
/* ===== thermal: bigger heading, bold items ===== */
body.print-thermal .invoice .th-biz{font-size:16px!important;font-weight:900!important;white-space:nowrap!important}
body.print-thermal .invoice .th-addr{font-size:12px!important}
body.print-thermal .invoice .th-cust{font-size:11.5px!important;font-weight:900!important}
body.print-thermal .invoice .th-items td{font-weight:900!important}
/* ===== thermal: keep Grand Total and You saved at 9px ===== */
body.print-thermal .invoice .totals .gt,
body.print-thermal .invoice .totals .gt *,
body.print-thermal .invoice .save-box,
body.print-thermal .invoice .save-box *{font-size:12px!important;font-weight:900!important}
/* ===== thermal: Paid by below, left, bigger ===== */
body.print-thermal .invoice .pay-how{display:block!important;margin:2px 0 0!important;text-align:left!important}
body.print-thermal .invoice .pay-how span{display:block!important;max-width:none!important;text-align:left!important;font-size:11.5px!important;font-weight:900!important}
body.print-thermal .invoice .totals>div:not(.gt):not(.save-box){font-size:11.5px!important}
/* ===== thermal totals: bigger, not bold; Grand Total and You saved at 9px ===== */
body.print-thermal .invoice .totals div,
body.print-thermal .invoice .totals div span,
body.print-thermal .invoice .totals div b,
body.print-thermal .invoice .pay-how span{font-size:11.5px!important;font-weight:400!important}
body.print-thermal .invoice .totals .gt,
body.print-thermal .invoice .totals .gt *,
body.print-thermal .invoice .save-box,
body.print-thermal .invoice .save-box *{font-size:9px!important;font-weight:900!important}

.brand-foot{position:fixed;left:0;right:0;bottom:0;z-index:5;pointer-events:none;padding:0 12px}
.brand-foot .pw-bar{padding:2px 0;opacity:.85}
.brand-foot a{pointer-events:auto}
body{padding-bottom:18px}
@media print{.brand-foot{display:none}}

/* where are we working: the online server (LIVE) or the shop's local hub (LOCAL), and when it last synced */
.top-right{flex-direction:column;align-items:flex-end;gap:2px}
.top-right .tr-row{display:flex;align-items:center;gap:12px}
.mode-line{font-size:12px;font-weight:700;white-space:nowrap}
.mode-line::before{content:'●';margin-right:6px}
.mode-line.live{color:#2fbf71} .mode-line.local{color:#4aa3ff} .mode-line.warn{color:#f0a020} .mode-line .mode-rest{font-weight:500;color:var(--muted)}
@media (max-width:860px){.mode-line{font-size:11px;white-space:normal;text-align:right}}
@media print{.mode-line{display:none!important}}
.hub-qr{width:150px;background:#fff;padding:6px;border-radius:10px}.hub-qr svg{display:block;width:100%;height:auto}
.hub-steps{margin:8px 0 0;padding-left:20px}.hub-steps li{margin:3px 0}

.mode-row{display:flex;align-items:center;gap:8px;justify-content:flex-end}
.sync-btns{display:inline-flex;gap:6px}
.sync-btn{border:1px solid var(--line);background:var(--card-2,#262a33);color:var(--text);border-radius:999px;padding:2px 10px;font-size:12px;font-weight:700;cursor:pointer;line-height:20px}
.sync-btn:hover{border-color:var(--accent)} .sync-btn:disabled{opacity:.6;cursor:default}
.sync-btn .ic-sync{display:inline-block}
.sync-btn.spin .ic-sync{animation:syncspin 1s linear infinite}
@keyframes syncspin{to{transform:rotate(360deg)}}
@media (max-width:860px){.sync-btn .lbl{display:none}.mode-row{flex-wrap:wrap}}
@media print{.sync-btns{display:none!important}}

/* hub daily rule banner + hub sync panel */
.guard-bar{position:fixed;left:50%;bottom:14px;transform:translateX(-50%);z-index:9000;max-width:min(920px,calc(100vw - 24px));display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:10px 14px;border-radius:12px;font-size:13px;font-weight:600;box-shadow:0 6px 24px rgba(0,0,0,.35);border:1px solid #f0a020;background:#3a2c0b;color:#ffd98a}
.guard-bar.stop{border-color:#ff5d5d;background:#4a1515;color:#ffc2c2}
.guard-bar span{flex:1 1 320px}
@media print{.guard-bar{display:none!important}}
.hub-sync-card .hs-row{display:flex;gap:10px;align-items:flex-start;padding:8px 0;border-top:1px solid var(--line);font-size:13px}
.hub-sync-card .hs-row:first-of-type{border-top:0}
.hs-dot{flex:0 0 10px;height:10px;margin-top:5px;border-radius:50%;background:#8a93a3}
.hs-row.ok .hs-dot{background:#2fbf71}.hs-row.warn .hs-dot{background:#f0a020}.hs-row.bad .hs-dot{background:#ff5d5d}

/* how new the shop's data is (online server, shop with a hub) */
.fresh-note{margin:0 0 10px;font-size:12px}
.fresh-note .fn{display:inline-block;padding:5px 10px;border-radius:8px;border:1px solid var(--line);line-height:1.4}
.fresh-note .fn.ok{color:#2fbf71;border-color:rgba(47,191,113,.4)}
.fresh-note .fn.warn{color:#f0a020;border-color:rgba(240,160,32,.5)}
.fresh-note .fn.bad{color:#ff7a7a;border-color:rgba(255,93,93,.55);font-weight:600}
@media print{.fresh-note .fn{border:0;padding:0 0 4px;color:#000!important;font-size:11px}}

/* the internet quality in the status line */
.mode-line .net{font-weight:600}
.mode-line .net.good b{color:#2fbf71}.mode-line .net.normal b{color:#f0a020}.mode-line .net.poor b,.mode-line .net.off b{color:#ff6b6b}

/* status in two lines: 1 = server / hub + internet, 2 = the shop hub */
.mode-line{white-space:normal}
.mode-line .ml1{display:block}
.mode-line .ml2{display:block;padding-left:14px;font-weight:500;color:var(--muted)}

/* the dot of the status line: big, in the middle of the two lines, breathing; it rings while the page checks the server */
.mode-line{display:flex;align-items:center;gap:10px;text-align:left}
.mode-line::before{content:none}
.mode-line .ml-text{display:flex;flex-direction:column}
.mode-line .ml2{padding-left:0}
.mode-line .ml-dot{flex:0 0 auto;width:14px;height:14px;border-radius:50%;background:currentColor;animation:mlBreath 2.6s ease-in-out infinite}
.mode-line.busy .ml-dot{animation:mlPing 1.4s ease-out 1}
@keyframes mlBreath{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.82)}}
@keyframes mlPing{0%{transform:scale(1.35);box-shadow:0 0 0 0 currentColor}70%{transform:scale(1);box-shadow:0 0 0 10px transparent}100%{transform:scale(1);box-shadow:0 0 0 0 transparent}}
@media (prefers-reduced-motion:reduce){.mode-line .ml-dot,.mode-line.busy .ml-dot{animation:none}}

/* the shop hub is on and in touch: its line is big and in the colour of the theme */
.mode-line .ml2.on{font-size:inherit;font-weight:700;color:var(--accent)} /* same size as the first line, in the colour of the theme */

/* Server / Hub page: the speed of each connected device */
.net.good b{color:#2fbf71}.net.normal b{color:#f0a020}.net.poor b,.net.off b{color:#ff6b6b}
.kpi.amber .v{color:#f0a020}

/* connection path: shop internet -- shop PC -- server */
.pathrow{display:flex;align-items:center;flex-wrap:wrap;margin:6px 0 4px}
.pnode{flex:0 0 auto;min-width:130px;padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:var(--card-2,#262a33);text-align:center;font-weight:700;font-size:13px}
.pnode small{display:block;font-weight:500;color:var(--muted);font-size:11px}
.plink{flex:1 1 110px;min-width:110px;height:40px;display:flex;align-items:center;justify-content:center;position:relative;font-size:12px;font-weight:700}
.plink::before{content:'';position:absolute;left:0;right:0;top:50%;height:4px;margin-top:-2px;border-radius:2px;background:currentColor;opacity:.85}
.plink span{position:relative;background:var(--card,#1f2229);padding:1px 8px;border-radius:8px}
.plink.good{color:#2fbf71}.plink.normal{color:#f0a020}.plink.poor{color:#ff6b6b}.plink.unknown{color:#8a93a3}
.plink.down{color:#ff6b6b}.plink.down::before{background:repeating-linear-gradient(90deg,currentColor 0 8px,transparent 8px 14px)}
.pverdict{margin:10px 0 0;font-size:13px;font-weight:600}
.pverdict.ok{color:#2fbf71}.pverdict.warn{color:#f0a020}.pverdict.bad{color:#ff6b6b}
@media (max-width:700px){.pnode{min-width:100px}.plink{flex-basis:70px;min-width:70px}}

/* super admin: the Server page */
.svrow{display:grid;grid-template-columns:150px 1fr;gap:4px 12px;align-items:center;margin:8px 0}
.svrow .svl{font-weight:700;font-size:13px}.svrow .svv{font-size:13px;text-align:right}
.svrow .svbar{grid-column:1 / -1}
.svbar{height:8px;border-radius:5px;background:var(--line,#343945);overflow:hidden}
.svbar i{display:block;height:100%;border-radius:5px;background:#2fbf71;transition:width .6s}
.svbar i.warn{background:#f0a020}.svbar i.bad{background:#ff6b6b}
.svgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px 18px;margin-top:12px;font-size:13px}
.svtot td{border-top:2px solid var(--line,#343945);background:rgba(255,255,255,.03)}

/* the Server table of the super admin: two-line headings, tight cells */
.svt{font-size:12px}
.svt th{white-space:normal;line-height:1.2;padding:8px 6px;font-size:10.5px;vertical-align:bottom}
.svt td{padding:7px 6px;vertical-align:middle}
.svt td.num,.svt th.num{text-align:right}
.svt td .small{font-size:10.5px}
.svt td b.net{font-size:11px}
.svt td:first-child{min-width:150px}.svt td:nth-child(2){min-width:72px}
.svt td,.svt th{padding-left:4px;padding-right:4px}
.svt td:first-child{min-width:125px}.svt td:nth-child(2){min-width:64px}
.svt td.num{font-size:11.5px}.svt td.num .small{font-size:10px}
/* connection path on a phone: the nodes one under the other, the links as short upright lines */
@media (max-width:700px){
  .pathrow{flex-direction:column;align-items:stretch}
  .pnode{width:100%;min-width:0;box-sizing:border-box}
  .plink{flex:0 0 44px;min-width:0;height:44px;width:100%}
  .plink::before{left:50%;right:auto;top:0;bottom:0;width:4px;height:auto;margin:0 0 0 -2px}
  .plink.down::before{background:repeating-linear-gradient(180deg,currentColor 0 8px,transparent 8px 14px)}
}
