/*! Websetu Demo — © 2026 KHL. All rights reserved. Made by KHL. Unauthorised copying or resale is prohibited. */
:root {
  --brand: #e4572e; --brand-ink: #fff;
  --bg: #f6f5f3; --card: #fff; --ink: #1d1b19; --muted: #6f6a64; --line: #e7e3de;
  --ok: #1f9d55; --warn: #d97706; --bad: #dc2626; --info: #2563eb;
  --soft: #fbf3ef; --r: 12px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; }
body.noscroll { overflow: hidden; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .right { text-align: right; } .center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; } .between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.hidden { display: none !important; }

/* buttons & inputs */
.btn { border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 9px 14px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; transition: .15s; }
.btn:hover { border-color: #cfc8c0; background: #faf9f7; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(.95); }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.danger { color: var(--bad); } .btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; } .btn.lg { padding: 13px 18px; font-size: 16px; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
label.f { display: block; font-weight: 600; font-size: 12px; color: var(--muted); }
label.f > input, label.f > select, label.f > textarea { margin-top: 5px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
input[type=checkbox] { width: auto; }
textarea { min-height: 70px; resize: vertical; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; background: #eee; color: #444; }
.badge.ok { background: #e3f6ea; color: var(--ok); } .badge.warn { background: #fff3dc; color: var(--warn); }
.badge.bad { background: #fde7e7; color: var(--bad); } .badge.info { background: #e6eefe; color: var(--info); }
.badge.brand { background: var(--soft); color: var(--brand); }

table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px; border-bottom: 1px solid var(--line); background: #fbfaf8; position: sticky; top: 0; }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:hover td { background: #fcfbfa; }
.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }

.thumb { width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(135deg, var(--soft), #fff); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; font-size: 24px; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.lg { width: 100%; height: 150px; font-size: 64px; border-radius: 12px; border: 0; }
.thumb.xl { width: 100%; height: 280px; font-size: 120px; border-radius: 16px; border: 0; }
.thumb.md { width: 100%; height: 86px; font-size: 40px; border-radius: 10px; border: 0; }

/* modal & toast */
.modal-bg { position: fixed; inset: 0; background: rgba(20,16,12,.45); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .15s; }
.modal { background: #fff; border-radius: 16px; padding: 22px; width: min(480px, 100%); max-height: 92vh; overflow: auto; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(820px, 100%); }
.modal-x { position: absolute; right: 12px; top: 12px; border: 0; background: #f2f0ed; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; }
@keyframes fade { from { opacity: 0 } }
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; box-shadow: var(--shadow); transition: .3s; }
.toast.bad { background: var(--bad); } .toast.out { opacity: 0; transform: translateY(8px); }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .big { font-size: 42px; }
.pill-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.pill-tabs button { border: 1px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 99px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pill-tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.qty button { border: 0; background: #f6f4f1; width: 28px; height: 28px; font-size: 16px; cursor: pointer; }
.qty span { min-width: 30px; text-align: center; font-weight: 700; }

/* ---------- Admin layout ---------- */
.adm { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: #1d1b19; color: #d9d4ce; padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.side .brandmark { display: flex; gap: 10px; align-items: center; color: #fff; font-weight: 800; font-size: 16px; padding: 4px 8px 16px; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; color: #fff; font-weight: 900; }
.side nav a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 9px; text-decoration: none; font-weight: 600; margin-bottom: 2px; }
.side nav a:hover { background: #2b2825; color: #fff; }
.side nav a.on { background: var(--brand); color: #fff; }
.side .sect { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: #8a837b; margin: 14px 10px 6px; }
.main { padding: 20px 24px 60px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.topbar h1 { margin: 0; flex: 1; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.kpi .l { color: var(--muted); font-size: 12px; font-weight: 600; } .kpi .v { font-size: 24px; font-weight: 800; margin-top: 4px; } .kpi .s { font-size: 12px; margin-top: 2px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bars .b i { display: block; width: 100%; background: var(--brand); border-radius: 6px 6px 2px 2px; min-height: 2px; opacity: .85; }
.bars .b:hover i { opacity: 1; } .bars .b small { font-size: 10px; color: var(--muted); }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .adm { grid-template-columns: 1fr; }
  .side { position: fixed; left: -260px; width: 240px; z-index: 50; transition: .2s; }
  .side.open { left: 0; }
  .menu-btn { display: inline-flex; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .main { padding: 16px; }
}

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 20% 10%, var(--soft), var(--bg)); }
.login { width: min(380px, 100%); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.pinpad button { padding: 14px; font-size: 20px; font-weight: 700; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.pindots { display: flex; gap: 10px; justify-content: center; margin: 14px 0 4px; }
.pindots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); }
.pindots i.f { background: var(--ink); }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: 1fr 380px; height: 100vh; overflow: hidden; }
.pos-left { display: flex; flex-direction: column; min-width: 0; }
.pos-head { display: flex; gap: 10px; align-items: center; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pos-head .search { flex: 1; min-width: 180px; }
.pos-cats { padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.pos-grid { flex: 1; overflow: auto; padding: 14px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; }
.ptile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; cursor: pointer; text-align: left; font: inherit; position: relative; transition: .1s; }
.ptile:hover { border-color: var(--brand); transform: translateY(-1px); }
.ptile:active { transform: scale(.98); }
.ptile .n { font-weight: 700; font-size: 13px; margin: 6px 0 2px; line-height: 1.25; height: 32px; overflow: hidden; }
.ptile .p { font-weight: 800; color: var(--brand); }
.ptile .st { position: absolute; top: 12px; right: 12px; }
.ptile.out { opacity: .45; cursor: not-allowed; }
.pos-cart { background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.cart-head { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.cart-items { flex: 1; overflow: auto; padding: 6px 16px; }
.citem { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.citem .n { font-weight: 600; font-size: 13px; } .citem .p { font-size: 12px; color: var(--muted); }
.cart-foot { border-top: 1px solid var(--line); padding: 12px 16px; background: #fbfaf8; }
.sumrow { display: flex; justify-content: space-between; padding: 3px 0; }
.sumrow.total { font-size: 20px; font-weight: 800; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.paymodes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.paymodes button { padding: 10px 6px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; }
.paymodes button.on { border-color: var(--brand); background: var(--soft); color: var(--brand); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; box-shadow: 0 0 0 3px #1f9d5533; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px #1f9d5511; } }
.alert-dot { background: var(--bad); color: #fff; border-radius: 99px; padding: 1px 7px; font-size: 11px; font-weight: 800; }
@media (max-width: 860px) {
  .pos { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .pos-grid { overflow: visible; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .pos-cart { border-left: 0; border-top: 1px solid var(--line); }
}

/* receipt */
.receipt { font-family: 'Courier New', monospace; font-size: 12px; width: 280px; margin: 0 auto; color: #000; }
.receipt .c { text-align: center; } .receipt hr { border: 0; border-top: 1px dashed #000; }
.receipt table { width: 100%; border-collapse: collapse; } .receipt td { padding: 2px 0; vertical-align: top; }
@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { position: absolute; left: 0; top: 0; }
}

/* ---------- Storefront ---------- */
.sf-top { background: var(--ink); color: #fff; text-align: center; font-size: 12px; padding: 7px; font-weight: 600; }
.sf-head { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.sf-head .in { max-width: 1180px; margin: 0 auto; padding: 12px 16px; display: flex; gap: 14px; align-items: center; }
.sf-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; text-decoration: none; }
.sf-search { flex: 1; max-width: 460px; position: relative; }
.sf-search input { padding-left: 34px; border-radius: 99px; background: #f6f5f3; }
.sf-search::before { content: '🔍'; position: absolute; left: 12px; top: 9px; font-size: 13px; }
.cart-btn { position: relative; }
.cart-btn b { position: absolute; top: -6px; right: -6px; background: var(--brand); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 6px; }
main.wrap { max-width: 1180px; margin: 0 auto; padding: 18px 16px 60px; }
.banners { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.banner { scroll-snap-align: start; border-radius: 16px; padding: 24px 22px; color: #fff; min-height: 140px; display: flex; flex-direction: column; justify-content: center; text-decoration: none; position: relative; overflow: hidden; }
.banner::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.13); }
.banner h2 { font-size: 22px; margin: 0 0 6px; } .banner p { margin: 0; opacity: .9; }
.banner .cta { margin-top: 12px; background: #fff; color: var(--ink); align-self: flex-start; padding: 6px 12px; border-radius: 99px; font-weight: 700; font-size: 12px; }
.catrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.catcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 8px; text-align: center; text-decoration: none; font-weight: 700; transition: .15s; }
.catcard:hover, .catcard.on { border-color: var(--brand); color: var(--brand); }
.catcard .e { font-size: 32px; display: block; margin-bottom: 4px; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; margin: 26px 0 12px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; transition: .15s; }
.pcard:hover { box-shadow: 0 8px 24px rgba(0,0,0,.07); }
.pcard a.pl { text-decoration: none; }
.pcard .n { font-weight: 700; margin: 10px 0 4px; line-height: 1.3; }
.pcard .d { font-size: 12px; color: var(--muted); height: 32px; overflow: hidden; }
.pcard .pr { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 6px; }
.price { font-weight: 800; font-size: 16px; } .mrp { text-decoration: line-through; color: var(--muted); font-size: 12px; margin-left: 4px; font-weight: 500; }
.off { color: var(--ok); font-size: 12px; font-weight: 700; }
.vegmark { width: 14px; height: 14px; border: 1.5px solid var(--ok); display: inline-grid; place-items: center; border-radius: 3px; vertical-align: middle; }
.vegmark::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.vegmark.nv { border-color: #a0522d; } .vegmark.nv::after { background: #a0522d; }
.pdetail { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
@media (max-width: 760px) { .pdetail { grid-template-columns: 1fr; } .sf-head .in { flex-wrap: wrap; } .sf-search { order: 3; max-width: none; flex-basis: 100%; } }
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 60; }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(420px, 100%); background: #fff; z-index: 61; display: flex; flex-direction: column; animation: slide .2s; }
@keyframes slide { from { transform: translateX(100%); } }
.drawer .dh { padding: 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer .db { flex: 1; overflow: auto; padding: 8px 16px; }
.drawer .df { border-top: 1px solid var(--line); padding: 16px; }
.addr { border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; }
.addr.on { border-color: var(--brand); background: var(--soft); }
.steps { display: flex; gap: 6px; margin-bottom: 16px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); } .steps span.on { background: var(--brand); }
.sf-foot { background: #1d1b19; color: #cfc9c2; padding: 30px 16px; margin-top: 40px; }
.sf-foot .in { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1.4fr 1fr 1fr; gap: 24px; }
.sf-foot a { color: #fff; text-decoration: none; display: block; margin: 4px 0; }
.socials { display: flex; gap: 8px; margin-top: 10px; }
.socials a { width: 36px; height: 36px; border-radius: 50%; background: #2f2b28; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.socials a:hover { background: var(--brand); }
@media (max-width: 700px) { .sf-foot .in { grid-template-columns: 1fr; } }
.wa-float { position: fixed; right: 18px; bottom: 18px; width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; font-size: 26px; text-decoration: none; box-shadow: 0 6px 20px rgba(0,0,0,.2); z-index: 40; }
.ostatus { display: flex; gap: 4px; margin-top: 8px; }
.ostatus span { flex: 1; text-align: center; font-size: 10px; padding-top: 6px; border-top: 3px solid var(--line); color: var(--muted); }
.ostatus span.on { border-color: var(--ok); color: var(--ok); font-weight: 700; }

/* hub */
.hub { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(circle at 15% 0%, var(--soft), var(--bg) 60%); }
.hub-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; max-width: 980px; }
.hub-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; text-decoration: none; transition: .2s; display: block; }
.hub-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,.08); border-color: var(--brand); }
.hub-card .ic { font-size: 38px; } .hub-card h2 { margin: 12px 0 6px; } .hub-card ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.7; }
@media (max-width: 820px) { .hub-cards { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .hide-sm { display: none; }
  .sf-head .in { gap: 8px; }
  .sf-brand { flex: 1; font-size: 16px; min-width: 0; }
  .sf-brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #accBtn { padding: 8px; }
  .banner h2 { font-size: 18px; }
  .banners { grid-auto-columns: 85%; }
  .pgrid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .thumb.lg { height: 110px; font-size: 48px; }
}

/* A4 GST invoice (POS → Bills) */
.a4 { width: 190mm; margin: 0 auto; font: 12px/1.45 Arial, sans-serif; color: #111; }
.a4 h1 { font-size: 22px; margin: 0 0 4px; } .a4 h2 { font-size: 18px; margin: 0 0 6px; letter-spacing: .08em; }
.a4-h { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid #111; padding-bottom: 10px; }
.a4-to { padding: 10px 0; border-bottom: 1px solid #ccc; }
.a4-t { width: 100%; border-collapse: collapse; margin-top: 12px; }
.a4-t th, .a4-t td { border: 1px solid #bbb; padding: 6px; text-align: right; } .a4-t th { background: #f1f1f1; }
.a4-t td:nth-child(2), .a4-t th:nth-child(2) { text-align: left; }
.a4-sum { display: flex; justify-content: space-between; gap: 20px; margin-top: 12px; }
.a4-sum table { border-collapse: collapse; min-width: 240px; } .a4-sum td { padding: 4px 6px; text-align: right; } .a4-sum td:first-child { text-align: left; }
.a4-sum tr.g td { border-top: 2px solid #111; font-weight: 800; font-size: 15px; }
.a4-words { max-width: 55%; }
.a4-f { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 10px; border-top: 1px solid #ccc; }
.pcard .pr > div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; min-width: 0; }
.pcard .mrp { margin-left: 0; } .off { white-space: nowrap; }

/* KHL credit */
.khl-line { color: var(--brand); font-weight: 800; letter-spacing: .02em; }
.side .khl-line { margin-bottom: 8px; }
.khl-foot { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.15); padding-top: 14px; margin-top: 6px; font-size: 12px; text-align: center; color: #cfc9c2; }
.khl-foot b { color: #fff; }
/* POS header: zyada buttons ek line me */
.pos-head .btn { padding: 8px 10px; }
.pos-head .search { min-width: 150px; }

/* Barcode labels — fixed size stickers (thermal roll: 1 label per page, ya A4 sheet) */
.labels { color: #000; font-family: Arial, Helvetica, sans-serif; }
.labels.a4 { display: flex; flex-wrap: wrap; gap: 2mm; }
.labels.roll .lbl { break-after: page; page-break-after: always; }
.lbl { box-sizing: border-box; background: #fff; color: #000; border: 1px dashed #bbb; border-radius: 1.5mm; display: flex; flex-direction: column; overflow: hidden; break-inside: avoid; line-height: 1.12; }
.lbl .lt { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbl .ll { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.lbl .lb { margin-top: auto; padding-top: .6mm; }
.lbl .lc { display: flex; justify-content: space-between; gap: 2mm; font-weight: 700; font-family: 'Courier New', monospace; }
.lbl .lc b { font-family: Arial, sans-serif; font-weight: 800; }
.lbl-prev { display: grid; place-items: center; background: repeating-conic-gradient(#0000000a 0 25%, transparent 0 50%) 0 0 / 16px 16px; border-radius: 12px; padding: 18px; margin: 12px 0; overflow: auto; }
.lbl-prev .lbl { box-shadow: 0 6px 18px rgba(0,0,0,.25); border-style: solid; zoom: 1.6; }
@media print { .lbl { border-color: transparent; border-radius: 0; } }
.bc-cell svg { height: 34px; width: auto; }
/* ERP status badges / tabs */
.st-draft { background: #eee; color: #555; } .st-approved, .st-submitted { background: #e6eefe; color: var(--info); } .st-partial { background: #fff3dc; color: var(--warn); }
.st-received, .st-paid { background: #e3f6ea; color: var(--ok); } .st-correction { background: #fde7e7; color: var(--bad); } .st-rejected, .st-cancelled { background: #eee; color: #888; text-decoration: line-through; }
.timeline-mini { border-left: 3px solid var(--line); padding-left: 12px; margin: 6px 0; }
.timeline-mini div { position: relative; margin-bottom: 6px; font-size: 12px; } .timeline-mini div::before { content: ''; position: absolute; left: -18px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.imgs { display: flex; gap: 6px; flex-wrap: wrap; } .imgs img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; }

/* ---------- On/Off toggles, delivery slots, summary dashboard ---------- */
.tog { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; flex-direction: column; }
.tog input { position: absolute; opacity: 0; pointer-events: none; }
.tog i { width: 40px; height: 22px; border-radius: 99px; background: #cfd3dc; position: relative; transition: .2s; display: block; }
.tog i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.tog input:checked + i { background: var(--ok); box-shadow: 0 0 10px color-mix(in srgb, var(--ok) 50%, transparent); }
.tog input:checked + i::after { left: 21px; }
.tog input:disabled + i { opacity: .4; }
.tog .small { font-size: 10px; color: var(--muted); }
.store-tog { font-weight: 800; }
.store-tog i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.store-tog.on i { background: var(--ok); box-shadow: 0 0 8px var(--ok); } .store-tog.on { color: var(--ok); }
.store-tog.off i { background: var(--bad); box-shadow: 0 0 8px var(--bad); } .store-tog.off { color: var(--bad); border-color: var(--bad); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 8px 0 4px; }
.slot { display: grid; gap: 2px; text-align: left; padding: 9px 11px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.slot span { font-size: 12px; color: var(--muted); } .slot em { font-style: normal; font-weight: 800; font-size: 12px; color: var(--ok); }
.slot.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.slot:disabled { opacity: .4; cursor: not-allowed; } .slot:disabled em { color: var(--muted); }
.chip { display: inline-flex; gap: 6px; align-items: center; background: var(--soft); border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.chip a { text-decoration: none; color: var(--bad); }
.modal.xwide { width: min(1100px, 100%); }
.sm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sm-tile { border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); background: var(--card); position: relative; overflow: hidden; }
.sm-tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tc, var(--brand)); box-shadow: 0 0 12px var(--tc, var(--brand)); }
.sm-tile .l { font-size: 12px; font-weight: 700; color: var(--muted); } .sm-tile .v { font-size: 26px; font-weight: 800; margin: 2px 0; color: var(--tc, var(--ink)); } .sm-tile .s { font-size: 12px; color: var(--muted); }
.sm-tile.c1 { --tc: #ff2bd6; } .sm-tile.c2 { --tc: #8b6bff; } .sm-tile.c3 { --tc: #22b8e6; } .sm-tile.c4 { --tc: #f5a524; }
.sm-tile.c5 { --tc: #1fbf6a; } .sm-tile.c6 { --tc: #22b8e6; } .sm-tile.c7 { --tc: #ff7a45; } .sm-tile.c8 { --tc: #1fbf6a; } .sm-tile.bad { --tc: var(--bad); }
@media (max-width: 760px) { .sm-grid { grid-template-columns: 1fr 1fr; } }
.closed-bar { background: #fde7e7; color: var(--bad); border: 1px solid #f5b5b5; border-radius: 14px; padding: 10px 14px; margin: 10px 0; font-weight: 600; }
.pcard.off { opacity: .55; filter: grayscale(.7); }
.rd-km { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rd-km span { background: var(--soft); border-radius: 99px; padding: 4px 10px; font-size: 13px; }
.rd-tiles.four { grid-template-columns: repeat(4, 1fr); } .rd-tiles.four b { font-size: 18px; }

/* product trace timeline */
.trace-tl { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 14px; }
.trace-tl .tt { position: relative; padding: 0 0 12px; }
.trace-tl .tt i { position: absolute; left: -21px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--card); }

.policy-text { white-space: pre-wrap; line-height: 1.65; font-size: 14px; }
.plan-block { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 16px; background: rgba(4,6,14,.86); backdrop-filter: blur(6px); }

/* HR: hiring board, attendance register */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(170px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.kcol { background: var(--soft); border-radius: 14px; padding: 8px; min-height: 120px; }
.kcol .kh { font-weight: 800; font-size: 13px; margin: 2px 4px 8px; display: flex; justify-content: space-between; }
.kcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 9px; margin-bottom: 8px; }
table.reg th, table.reg td { padding: 6px 4px; text-align: center; font-size: 11px; }
table.reg td:first-child, table.reg th:first-child { text-align: left; white-space: nowrap; }
.rc.P, .rc.IN { color: var(--ok); font-weight: 800; } .rc.A { color: var(--bad); font-weight: 800; } .rc.HD { color: var(--warn); font-weight: 800; } .rc.L { color: var(--info); font-weight: 800; } .rc.WO { color: var(--muted); }
.punch { border-color: var(--brand) !important; }
.a4.letter .policy-text, .a4.slip { color: #000; }

/* Phase 2 cloud: sync status + company login */
.cloud-pill { position: fixed; left: 12px; bottom: 12px; z-index: 450; font: 700 11px/1 system-ui, sans-serif; padding: 6px 10px; border-radius: 99px; background: var(--card); color: var(--muted); border: 1px solid var(--line); cursor: pointer; box-shadow: var(--shadow); }
.cloud-pill.synced { color: var(--ok); } .cloud-pill.saving, .cloud-pill.loading { color: var(--info); } .cloud-pill.offline, .cloud-pill.error { color: var(--bad); border-color: var(--bad); }
.cloud-gate { position: fixed; inset: 0; z-index: 600; display: grid; place-items: center; padding: 16px; background: rgba(4,6,14,.88); backdrop-filter: blur(6px); }
