/* BYSPORTS Sales Pro — black, white & green */
:root {
  --ink: #0a0a0a;
  --ink-2: #161616;
  --ink-3: #2a2a2a;
  --paper: #ffffff;
  --canvas: #f4f5f2;
  --line: #e4e6e1;
  --line-2: #d4d7d1;
  --text: #121412;
  --muted: #697068;
  --green: #00a651;
  --green-hover: #008f45;
  --green-ink: #006b34;
  --green-soft: #e7f6ed;
  --red: #d92d20;
  --red-soft: #fdecea;
  --amber: #b54708;
  --amber-soft: #fef3e2;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(10, 10, 10, .04), 0 6px 24px -12px rgba(10, 10, 10, .12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans Bengali', sans-serif;
  --side: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--text); background: var(--canvas); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; line-height: 1.25; }
h2 { font-size: 15.5px; font-weight: 650; }
h3 { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; background: var(--canvas); padding: 1px 6px; border-radius: 6px; word-break: break-all; }
kbd { font: 600 10.5px var(--font); padding: 2px 6px; border-radius: 6px; border: 1px solid currentColor; opacity: .55; }
[hidden] { display: none !important; }
.ic { flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.neg { color: var(--red) !important; }
.pos-ok { color: var(--green-ink) !important; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eyebrow { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; font-weight: 500; }
.link { color: var(--green-ink); font-weight: 600; font-size: 13px; }
.link:hover { text-decoration: underline; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--side); background: var(--ink); color: #c9ccc7; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 40; padding: 18px 12px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; color: #fff; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--green); color: var(--ink); display: grid; place-items: center; font-weight: 900; font-size: 19px; letter-spacing: -.04em; }
.brand-mark.lg { width: 44px; height: 44px; font-size: 23px; border-radius: 12px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-weight: 800; letter-spacing: .06em; font-size: 15px; }
.brand-text small { color: var(--green); font-weight: 600; font-size: 11.5px; letter-spacing: .04em; }
.loc-switch { padding: 0 8px 14px; }
.loc-switch label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #7d817b; margin-bottom: 5px; font-weight: 600; }
.loc-switch select { width: 100%; background: var(--ink-2); color: #fff; border: 1px solid var(--ink-3); border-radius: 9px; padding: 8px 10px; font: 500 13px var(--font); }
.loc-badge { display: flex; align-items: center; gap: 8px; margin: 0 8px 14px; padding: 9px 11px; background: var(--ink-2); border-radius: 9px; color: #fff; font-weight: 600; font-size: 13px; }
.loc-badge .ic { color: var(--green); }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; font-weight: 500; font-size: 14px; position: relative; transition: background .15s, color .15s; }
.nav a:hover { background: var(--ink-2); color: #fff; }
.nav a.active { background: var(--ink-2); color: #fff; font-weight: 600; }
.nav a.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--green); }
.nav a.active .ic { color: var(--green); }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #6c706a; padding: 16px 11px 6px; font-weight: 600; }
.me { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--ink-3); padding: 14px 4px 0; margin-top: 12px; }
.me-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink-3); color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.me-text strong { color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { font-size: 11.5px; color: #8a8e88; }
.me .icon-btn { color: #9ca09a; }
.me .icon-btn:hover { background: var(--ink-2); color: #fff; }

.main { flex: 1; margin-left: var(--side); min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 22px 32px 6px; min-height: 70px; }
.topbar h1 { font-size: 24px; font-weight: 750; letter-spacing: -.025em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn.menu-btn { display: none; }
.content { padding: 12px 32px 48px; display: flex; flex-direction: column; gap: 18px; max-width: 1480px; }
.content > .eyebrow { margin-bottom: -6px; }
.scrim { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent; font: 600 14px var(--font); cursor: pointer; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--green-hover); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-3); }
.btn-ghost { background: var(--paper); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 50px; padding: 0 22px; font-size: 15.5px; border-radius: 12px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--canvas); color: var(--text); }
.icon-btn.sm { width: 30px; height: 30px; }

/* ---------- Cards & layout ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 480px; }
.card.narrow-wide { max-width: 860px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head.pad, .pad { padding: 18px 20px 0; }
.card-head.sub { margin: 20px 0 8px; }
.card.flush .card-head.pad { margin-bottom: 12px; }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid-main.rev { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-2.cards { gap: 18px; align-items: start; }
.grid-2.tight { gap: 10px; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 14px; }
.kpis.three { grid-template-columns: 1.35fr 1fr 1fr; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); min-width: 0; }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.kpi-value { font-size: 26px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value.sm { font-size: 20px; }
.kpi-sub { font-size: 12.5px; color: var(--muted); }
.kpi-hero { background: var(--ink); border-color: var(--ink); color: #fff; position: relative; overflow: hidden; }
.kpi-hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 166, 81, .45), transparent 70%); }
.kpi-hero .kpi-label, .kpi-hero .kpi-sub { color: #a7aba5; }
.kpi-hero .kpi-value { font-size: 32px; }
.trend { font-weight: 700; }
.trend.up { color: #3ddc84; }
.trend.down { color: #ff7b72; }
.kpi:not(.kpi-hero) .trend.up { color: var(--green-ink); }

/* Bars */
.bars { display: flex; align-items: stretch; gap: 6px; height: 200px; padding-top: 6px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; background: linear-gradient(to top, var(--canvas) 1px, transparent 1px) bottom / 100% 25%; border-radius: 6px; }
.bar { width: 100%; background: var(--ink); border-radius: 6px 6px 3px 3px; transition: height .4s ease; min-height: 0; }
.bar.today { background: var(--green); }
.bar-col:hover .bar { background: var(--green); }
.bar-x { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bars.dense { gap: 3px; }
.bars.dense .bar-x { font-size: 9.5px; }

/* Meters & lists */
.meters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.meter-row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 13.5px; }
.meter { height: 7px; border-radius: 99px; background: var(--canvas); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.meters li:nth-child(2) .meter span { background: var(--ink); }
.meters li:nth-child(3) .meter span { background: #6a9f7f; }
.meters li:nth-child(4) .meter span { background: #9aa097; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.list-plain li:last-child { border-bottom: 0; }
.list-plain a { font-weight: 600; }
.list-plain strong { font-variant-numeric: tabular-nums; text-align: right; }
.rank { list-style: none; counter-reset: r; margin: 0; padding: 0; }
.rank li { counter-increment: r; display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rank li:last-child { border-bottom: 0; }
.rank li::before { content: counter(r); width: 24px; height: 24px; border-radius: 7px; background: var(--canvas); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.rank li:first-child::before { background: var(--green); color: #fff; }
.rank-name { flex: 1; min-width: 0; font-weight: 550; font-size: 13.5px; display: flex; flex-direction: column; }
.rank-name small { color: var(--muted); font-weight: 400; font-size: 12px; }
.rank-qty { font-weight: 700; font-variant-numeric: tabular-nums; }
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line-2); font-variant-numeric: tabular-nums; }
.ledger li.total { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 4px; padding-top: 12px; font-size: 16px; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; font-size: 13.5px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.dl a { font-weight: 600; color: var(--green-ink); }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick a { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; background: var(--canvas); font-weight: 600; font-size: 13.5px; }
.quick a:hover { background: var(--green-soft); }
.quick .ic { color: var(--green-ink); }

/* Tags */
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--canvas); color: var(--ink-3); font-size: 11.5px; font-weight: 650; white-space: nowrap; vertical-align: middle; }
.tag.green { background: var(--green-soft); color: var(--green-ink); }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.dark { background: var(--ink); color: #fff; }
.stock-badge { display: inline-flex; min-width: 30px; justify-content: center; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--green-soft); color: var(--green-ink); font-variant-numeric: tabular-nums; }
.stock-badge.low { background: var(--amber-soft); color: var(--amber); }
.stock-badge.out { background: var(--red-soft); color: var(--red); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 11px 16px; background: #fafbf9; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th.num { text-align: right; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #fafbf9; }
.table tr.dim td { opacity: .5; }
.table td.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.table td a { color: inherit; }
.table td a.link { color: var(--green-ink); }
.var-table input { min-width: 82px; height: 36px; }
.qty-input { width: 80px; text-align: right; }
.totals-block { padding: 14px 20px 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; max-width: 360px; margin-left: auto; }
.totals-block div { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.totals-block .grand { font-size: 18px; font-weight: 750; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form h3 { margin-top: 8px; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
input, select, textarea { font: 400 14.5px var(--font); color: var(--text); background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 0 12px; height: 42px; width: 100%; transition: border-color .15s, box-shadow .15s; }
textarea { padding: 10px 12px; height: auto; resize: vertical; }
input[type=file] { padding: 8px; height: auto; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--green); margin: 0; flex-shrink: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0, 166, 81, .18); }
input.invalid { border-color: var(--red); }
fieldset:disabled input, fieldset:disabled select, fieldset:disabled textarea { background: var(--canvas); }
.input-xl { height: 56px; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.switch { flex-direction: row; align-items: center; gap: 10px; font-weight: 550; cursor: pointer; }
.switch.sm { font-size: 12px; }
.radio { flex-direction: row; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 400; margin-bottom: 8px; }
.radio:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.radio input { margin-top: 2px; }
.inline-row { display: flex; gap: 10px; align-items: center; }
.inline-row input:not([type=checkbox]) { flex: 1; }
.row-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.row-actions.left { justify-content: flex-start; }
.row-actions.sticky { position: sticky; bottom: 12px; }
.form-error { color: var(--red); font-size: 13px; font-weight: 600; min-height: 1px; }
.filters { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.filters label { font-size: 12px; min-width: 140px; }
.filters .grow { flex: 1; min-width: 200px; }
.seg { display: inline-flex; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; font: 600 13px var(--font); padding: 0 12px; height: 34px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.seg button.on, .seg button:hover { background: var(--ink); color: #fff; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--ink); border-color: var(--green); }
.summary-strip { display: flex; flex-wrap: wrap; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.summary-strip > div { flex: 1; min-width: 130px; padding: 14px 20px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); }
.summary-strip > div:last-child { border-right: 0; }
.summary-strip span { font-size: 12px; color: var(--muted); font-weight: 550; }
.summary-strip strong { font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; }
.cat-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-opt { flex-direction: row; cursor: pointer; }
.cat-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cat-opt span { padding: 8px 13px; border-radius: 99px; border: 1px solid var(--line-2); font-weight: 550; font-size: 13px; background: var(--paper); }
.cat-opt input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 166, 81, .3); }
.steps { margin: 0 0 18px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.role-help { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.role-help p { margin: 0 0 6px; }
.role-help strong { color: var(--text); }
.keybox { display: flex; gap: 8px; align-items: center; background: var(--green-soft); border-radius: 10px; padding: 10px; margin-bottom: 8px; }
.keybox code { background: transparent; flex: 1; font-size: 12px; }

/* Flash & banners */
.flash { margin: 0 32px 4px; padding: 12px 16px; border-radius: 12px; font-weight: 550; font-size: 14px; background: var(--green-soft); color: var(--green-ink); border: 1px solid #bfe8cf; }
.flash-error { background: var(--red-soft); color: #a3221a; border-color: #f6c9c4; }
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--radius); background: var(--amber-soft); color: #7a3606; border: 1px solid #f9dbaf; }
.banner span { flex: 1; }
.banner.info { background: var(--green-soft); color: var(--green-ink); border-color: #bfe8cf; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--red); }
.empty-state { text-align: center; padding: 80px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty-code { font-size: 64px; font-weight: 900; letter-spacing: -.05em; color: var(--green); }

/* ---------- Auth ---------- */
.auth-body { background: var(--paper); }
.auth-wrap { display: grid; grid-template-columns: minmax(320px, 44%) 1fr; min-height: 100vh; }
.auth-side { background: var(--ink); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ''; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 166, 81, .5), transparent 65%); }
.auth-side::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 46px, rgba(255, 255, 255, .025) 46px 47px); }
.auth-brand { display: flex; align-items: center; gap: 12px; font-weight: 900; letter-spacing: .1em; font-size: 18px; position: relative; z-index: 1; }
.auth-tag { position: relative; z-index: 1; }
.auth-tag h2 { font-size: clamp(34px, 4.2vw, 54px); font-weight: 850; letter-spacing: -.04em; line-height: 1.02; }
.auth-tag h2 span { color: var(--green); }
.auth-tag p { color: #a7aba5; font-size: 16px; max-width: 360px; }
.auth-side small { color: #6f736d; position: relative; z-index: 1; }
.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; gap: 14px; }
.auth-main .flash { margin: 0; width: 100%; max-width: 400px; }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 6px; }
.auth-card.wide { max-width: 640px; }
.auth-card h1 { font-size: 30px; font-weight: 800; letter-spacing: -.035em; }
.auth-card .form { margin-top: 18px; }
.checks { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 13px; }
.checks li { display: flex; gap: 6px; align-items: center; }
.checks .ok { color: var(--green-ink); }
.checks .bad { color: var(--red); font-weight: 600; }

/* ---------- POS ---------- */
.pos-body .topbar { display: none; }
.pos-body .content { padding: 0; max-width: none; }
.pos-body .flash { margin: 12px 16px 0; }
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 420px; height: 100vh; }
.pos-catalog { display: flex; flex-direction: column; min-width: 0; padding: 20px 20px 0; gap: 12px; }
.pos-search { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1.5px solid var(--line-2); border-radius: 14px; padding: 0 16px; height: 56px; box-shadow: var(--shadow); }
.pos-search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(0, 166, 81, .16); }
.pos-search input { border: 0; height: 100%; font-size: 16px; padding: 0; box-shadow: none !important; background: transparent; }
.pos-search .ic { color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chip { border: 1px solid var(--line-2); background: var(--paper); border-radius: 99px; padding: 0 14px; height: 34px; font: 600 13px var(--font); cursor: pointer; white-space: nowrap; color: var(--ink-3); }
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pgrid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; align-content: start; padding-bottom: 24px; }
.pcard { display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; font-family: var(--font); color: var(--text); transition: border-color .12s, transform .08s, box-shadow .12s; min-height: 124px; }
.pcard:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.pcard:active { transform: scale(.98); }
.pcard-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pcard-brand { font-size: 11px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .stock-badge { font-size: 10.5px; padding: 1px 6px; min-width: 0; }
.pcard-name { font-weight: 650; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-var { font-size: 12.5px; color: var(--muted); }
.pcard-price { margin-top: auto; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pcard-others { font-size: 11.5px; color: var(--muted); border-top: 1px dashed var(--line-2); padding-top: 6px; margin-top: 2px; line-height: 1.4; }
.pcard-others b { color: var(--ink); font-weight: 700; }
.pcard.out { opacity: 1; }
.pcard.out .pcard-name, .pcard.out .pcard-var, .pcard.out .pcard-price, .pcard.out .pcard-brand { opacity: .5; }
.pcard-others.hot { color: var(--green-ink); font-weight: 600; }
.pcard-others.hot b { color: var(--green-ink); }
.gd-chip { background: var(--ink); color: #fff; padding: 1px 6px; border-radius: 5px; }
.gd-chip b, .pcard-others.hot .gd-chip b { color: var(--green); }
.table th.here, .table td.here { background: var(--green-soft); }
.table td.gd { font-weight: 700; }
.grid-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 60px 0; }

.pos-cart { background: var(--paper); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.cart-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 20px 12px; }
.cart-head .eyebrow { margin: 0; }
.cart-head h2 { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.cart-head-actions { display: flex; gap: 6px; align-items: center; }
.count { background: var(--ink); color: #fff; border-radius: 99px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; font-size: 11px; padding: 0 5px; }
.cust { padding: 0 20px 12px; border-bottom: 1px solid var(--line); }
.cust-row { display: grid; grid-template-columns: auto 1.15fr 1fr; gap: 6px; align-items: center; }
.cust-ic { color: var(--muted); display: grid; place-items: center; width: 22px; }
.cust-row input { height: 38px; font-size: 14px; }
.cust-info { font-size: 12.5px; color: var(--muted); min-height: 0; margin-top: 6px; }
.cust-info:empty { display: none; }
.lines { flex: 1; overflow-y: auto; padding: 6px 12px; }
.lines-empty { text-align: center; color: var(--muted); padding: 50px 30px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lines-empty .ic { opacity: .4; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 8px; border-radius: 10px; border-bottom: 1px solid var(--line); }
.line.flash-in { animation: flashin .6s ease; }
@keyframes flashin { from { background: var(--green-soft); } to { background: transparent; } }
.line-main { display: flex; flex-direction: column; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--font); color: var(--text); min-width: 0; }
.line-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line-meta { font-size: 12px; color: var(--muted); }
.line-meta em { font-style: normal; color: var(--green-ink); font-weight: 600; }
.line-total { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; font-size: 14px; }
.qty { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; }
.qty button { width: 30px; height: 32px; border: 0; background: var(--paper); font-size: 17px; cursor: pointer; color: var(--ink); }
.qty button:hover { background: var(--canvas); }
.qty input { width: 38px; height: 32px; border: 0; border-radius: 0; text-align: center; padding: 0; font-weight: 700; font-size: 14px; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.totals { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; background: #fafbf9; }
.trow { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.trow.total { color: var(--text); font-size: 22px; font-weight: 800; letter-spacing: -.02em; padding-top: 6px; }
.disc-input { display: flex; gap: 4px; }
.disc-input input { width: 90px; height: 32px; text-align: right; font-size: 13.5px; }
.disc-input select { width: 58px; height: 32px; padding: 0 6px; font-size: 13px; }
.cart-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 14px 20px 18px; }
.btn-pay { height: 58px; font-size: 18px; font-weight: 750; border-radius: 14px; }
.btn-pay kbd { border-color: rgba(255, 255, 255, .7); }
.cart-actions .btn-ghost { height: 58px; border-radius: 14px; }
.cart-fab { display: none; }
.cart-close { display: none; }

/* Modals */
.modal { position: fixed; inset: 0; background: rgba(10, 10, 10, .55); display: grid; place-items: center; z-index: 80; padding: 16px; backdrop-filter: blur(2px); animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.modal-box { background: var(--paper); border-radius: 18px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); animation: pop .18s ease; }
@keyframes pop { from { transform: translateY(8px) scale(.98); } }
.narrow-box { max-width: 400px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { font-size: 19px; font-weight: 750; }
.pay-due { background: var(--ink); color: #fff; border-radius: 14px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; }
.pay-due span { color: #a7aba5; font-weight: 550; }
.pay-due strong { font-size: 30px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pay-methods { display: flex; flex-direction: column; gap: 8px; }
.pay-line { display: grid; grid-template-columns: 80px 1fr 1fr; gap: 8px; align-items: center; }
.pay-line label { font-size: 14px; }
.pay-line input[type=number] { height: 46px; font-size: 18px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.pay-ref { height: 46px; font-size: 13px; }
.quick-cash { display: flex; flex-wrap: wrap; gap: 6px; }
.note-field { font-size: 12.5px; }
.note-field input { height: 38px; }
.pay-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-summary div { background: var(--canvas); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.pay-summary span { font-size: 12px; color: var(--muted); font-weight: 600; }
.pay-summary strong { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.done-box { text-align: center; align-items: center; max-width: 440px; }
.done-check { width: 72px; height: 72px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; animation: pop .3s ease; }
.done-box h2 { font-size: 24px; font-weight: 800; }
.done-change { background: var(--canvas); border-radius: 14px; padding: 14px 24px; width: 100%; display: flex; flex-direction: column; }
.done-change span { color: var(--muted); font-weight: 600; font-size: 13px; }
.done-change strong { font-size: 36px; font-weight: 850; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.done-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.held-list { display: flex; flex-direction: column; gap: 8px; }
.held-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos { grid-template-columns: minmax(0, 1fr) 360px; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar.open { transform: none; }
  .sidebar.open + .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 30; }
  .main { margin-left: 0; }
  .icon-btn.menu-btn { display: inline-grid; margin-left: -8px; }
  .cart-head h2 { font-size: 18px; white-space: nowrap; }
  .topbar { padding: 14px 16px 4px; min-height: 60px; }
  .topbar h1 { font-size: 20px; }
  .topbar-actions .btn span { display: none; }
  .content { padding: 8px 16px 32px; gap: 14px; }
  .flash { margin: 0 16px 4px; }
  .grid-main, .grid-main.rev, .grid-3, .grid-2.cards { grid-template-columns: minmax(0, 1fr); }
  .kpi-value { font-size: 22px; }
  .kpi-hero .kpi-value { font-size: 26px; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { min-height: 220px; padding: 28px 24px; }
  .auth-tag h2 { font-size: 32px; }
  .auth-tag p, .auth-side small { display: none; }

  .pos-body .topbar { display: flex; position: fixed; top: 0; left: 0; right: 0; z-index: 20; background: var(--canvas); min-height: 56px; padding: 8px 12px; }
  .pos { grid-template-columns: 1fr; height: auto; min-height: 100vh; padding-top: 56px; }
  .pos-catalog { padding: 10px 12px 90px; }
  .pgrid { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); overflow: visible; }
  .pos-cart { position: fixed; inset: 0; z-index: 50; transform: translateY(100%); transition: transform .25s ease; border: 0; }
  .pos-cart.open { transform: none; }
  .cart-close { display: inline-flex; }
  .cart-fab { display: none; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 45; height: 58px; border: 0; border-radius: 16px; background: var(--ink); color: #fff; font: 600 15px var(--font); align-items: center; justify-content: center; gap: 8px; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); cursor: pointer; }
  .cart-fab.show { display: flex; }
  .cart-fab strong { color: var(--green); font-size: 17px; }
  .pay-line { grid-template-columns: 64px 1fr; }
  .pay-ref { grid-column: 2; height: 38px; }
  .pay-line > span { display: none; }
}
@media (max-width: 560px) {
  .kpis, .kpis.three { grid-template-columns: 1fr 1fr; }
  .kpi-hero { grid-column: 1 / -1; }
  .grid-2 { grid-template-columns: 1fr; }
  .summary-strip > div { min-width: 50%; border-bottom: 1px solid var(--line); }
  .filters label { min-width: 0; flex: 1 1 40%; }
  .done-actions { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr; }
}
@media print {
  .sidebar, .topbar-actions, .menu-btn, .flash, .filters { display: none !important; }
  .main { margin: 0; }
  body { background: #fff; }
  .card, .kpi { box-shadow: none; break-inside: avoid; }
  .kpi-hero { background: #fff; color: #000; border: 2px solid #000; }
  .kpi-hero .kpi-label, .kpi-hero .kpi-sub { color: #444; }
}
