/* HisaaBook — StockPro look (design tokens copied from StockPro ERP). Bootstrap 5.3 underneath. */
:root {
  --primary: #2563EB; --primary-2: #4F46E5; --primary-h: #1D4ED8; --primary-soft: rgba(37,99,235,.10);
  --success: #22C55E; --success-soft: rgba(34,197,94,.13); --success-t: #15803D;
  --warning: #F59E0B; --warning-soft: rgba(245,158,11,.15); --warning-t: #B45309;
  --danger: #EF4444; --danger-soft: rgba(239,68,68,.12); --danger-t: #B91C1C;
  --info: #0EA5E9; --info-soft: rgba(14,165,233,.13); --info-t: #0369A1;
  --violet: #8B5CF6; --violet-soft: rgba(139,92,246,.13);
  --bg: #F8FAFC; --surface: #FFFFFF; --surface-2: #F1F5F9; --surface-3: #E2E8F0;
  --border: #E2E8F0; --border-2: #CBD5E1;
  --text: #0F172A; --text-2: #334155; --muted: #64748B; --muted-2: #94A3B8;
  --glass: rgba(255,255,255,.75);
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 20px -8px rgba(15,23,42,.10);
  --shadow-lg: 0 24px 48px -12px rgba(15,23,42,.28);
  --radius: 16px; --radius-sm: 10px; --radius-lg: 20px;
  --grad: linear-gradient(135deg, #2563EB 0%, #4F46E5 100%);
  --sidebar-w: 264px; --topbar-h: 64px;
  --ease: cubic-bezier(.2,.8,.2,1);

  /* Bootstrap mapped onto the tokens */
  --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-font-size: .875rem; --bs-body-bg: var(--bg); --bs-body-color: var(--text);
  --bs-primary: #2563EB; --bs-primary-rgb: 37,99,235; --bs-link-color: #2563EB; --bs-link-color-rgb: 37,99,235; --bs-link-hover-color: #1D4ED8;
  --bs-border-color: var(--border); --bs-secondary-color: var(--muted); --bs-tertiary-bg: var(--surface-2);
  --bs-border-radius: 10px; --bs-border-radius-sm: 8px; --bs-border-radius-lg: 14px;
}
[data-bs-theme="dark"] {
  --bg: #0F172A; --surface: #1E293B; --surface-2: #172235; --surface-3: #26354D;
  --border: #2B3B55; --border-2: #3C4F6D;
  --text: #E2E8F0; --text-2: #CBD5E1; --muted: #94A3B8; --muted-2: #64748B;
  --glass: rgba(15,23,42,.72);
  --primary-soft: rgba(59,130,246,.18); --success-soft: rgba(34,197,94,.16); --warning-soft: rgba(245,158,11,.16);
  --danger-soft: rgba(239,68,68,.16); --info-soft: rgba(14,165,233,.16); --violet-soft: rgba(139,92,246,.18);
  --success-t: #4ADE80; --warning-t: #FBBF24; --danger-t: #F87171; --info-t: #38BDF8;
  --shadow: 0 1px 2px rgba(0,0,0,.25), 0 8px 24px -10px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 60px -12px rgba(0,0,0,.65);
  --bs-body-bg: var(--bg); --bs-body-color: var(--text); --bs-border-color: var(--border); --bs-secondary-color: var(--muted);
}
body { -webkit-font-smoothing: antialiased; line-height: 1.5; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.text-muted { color: var(--muted) !important; }
.min-w-0 { min-width: 0; }

/* buttons */
.btn { font-weight: 600; border-radius: var(--radius-sm); }
.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: transparent; --bs-btn-hover-bg: var(--primary-h); --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: var(--primary-h); --bs-btn-disabled-bg: #93b4f5; --bs-btn-disabled-border-color: transparent;
  background-image: var(--grad); box-shadow: 0 6px 16px -6px rgba(37,99,235,.55); }
.btn-primary:hover { background-image: none; }
.btn-outline-primary { --bs-btn-color: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary); --bs-btn-hover-border-color: var(--primary); --bs-btn-active-bg: var(--primary); }
.btn-outline-secondary { --bs-btn-color: var(--text-2); --bs-btn-border-color: var(--border-2); --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-color: var(--text); --bs-btn-hover-border-color: var(--border-2); }
.btn-icon { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 11px; border: 0; background: transparent; color: var(--text-2); font-size: 1.1rem; }
.btn-icon:hover { background: var(--surface-2); color: var(--text); }
.btn:focus-visible, .btn-icon:focus-visible, .nav-item:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--primary-soft); }

/* forms */
.form-control, .form-select { border-radius: var(--radius-sm); border-color: var(--border); background-color: var(--surface); color: var(--text); }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.form-label { font-weight: 600; font-size: .8125rem; color: var(--text-2); margin-bottom: .3rem; }

/* cards, tables, badges */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .table-responsive:first-child, .card > .table-responsive:first-child table { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.table { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-hover-bg: var(--surface-2); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .7rem .85rem; border-bottom-color: var(--border); }
.table > thead th { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.table-sm > :not(caption) > * > * { padding: .4rem .5rem; }
.table tbody tr:hover > * { background: var(--surface-2); }
.badge { font-weight: 700; border-radius: 999px; padding: .35em .7em; letter-spacing: .01em; }
.badge.text-bg-success { background: var(--success-soft) !important; color: var(--success-t) !important; }
.badge.text-bg-warning { background: var(--warning-soft) !important; color: var(--warning-t) !important; }
.badge.text-bg-danger { background: var(--danger-soft) !important; color: var(--danger-t) !important; }
.badge.text-bg-info { background: var(--info-soft) !important; color: var(--info-t) !important; }
.badge.text-bg-primary { background: var(--primary-soft) !important; color: var(--primary) !important; }
.badge.text-bg-secondary { background: var(--surface-3) !important; color: var(--text-2) !important; }
.alert { border-radius: var(--radius-sm); border: 1px solid transparent; }
.alert-danger { background: var(--danger-soft); color: var(--danger-t); border-color: transparent; }
.alert-warning { background: var(--warning-soft); color: var(--warning-t); }
.alert-info { background: var(--info-soft); color: var(--info-t); }
.alert-success { background: var(--success-soft); color: var(--success-t); }
.stat { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.text-end, .num { font-variant-numeric: tabular-nums; }

/* logo / avatar */
.logo-mark, .avatar { display: grid; place-items: center; color: #fff; font-weight: 800; background: var(--grad); flex-shrink: 0; }
.logo-mark { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; box-shadow: 0 6px 16px -6px rgba(37,99,235,.6); }
.avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 12.5px; font-weight: 700; }

/* app shell */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--surface) !important; border-right: 1px solid var(--border); display: flex; flex-direction: column; color: var(--text); }
@media (min-width: 992px) {
  /* sticky (not fixed) so long pages and printing lay out normally */
  .sidebar { position: sticky !important; top: 0; height: 100vh; height: 100dvh; flex-shrink: 0; z-index: 60; transition: width .3s var(--ease); }
}
.sb-brand { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: var(--topbar-h); flex-shrink: 0; }
.sb-brand-text { min-width: 0; }
.sb-brand b { font-size: 14.5px; font-weight: 800; letter-spacing: -.02em; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.sb-brand-text span { font-size: 11.5px; color: var(--muted); white-space: nowrap; display: block; }
.sb-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 12px 16px; }
.sb-group { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); padding: 16px 12px 6px; white-space: nowrap; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; color: var(--text-2); font-weight: 500;
  font-size: 13.5px; position: relative; margin: 1px 0; text-decoration: none !important; transition: background .2s, color .2s; }
.nav-item i { color: var(--muted); font-size: 1.05rem; width: 20px; text-align: center; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-item.active i { color: var(--primary); }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.nl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-foot { padding: 12px; border-top: 1px solid var(--border); flex-shrink: 0; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.sb-user .meta { min-width: 0; flex: 1; line-height: 1.25; }
.sb-user .meta b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user .meta span { font-size: 11.5px; color: var(--muted); }
@media (min-width: 992px) {
  body.sb-collapsed { --sidebar-w: 76px; }
  body.sb-collapsed .nl, body.sb-collapsed .sb-brand-text, body.sb-collapsed .sb-user .meta { display: none; }
  body.sb-collapsed .sb-group { font-size: 0; height: 12px; padding: 0; }
  body.sb-collapsed .nav-item { justify-content: center; padding: 0; }
  body.sb-collapsed .sb-user { justify-content: center; background: transparent; }
  body.sb-collapsed .tb-collapse i { transform: rotate(180deg); }
}
@media (max-width: 991.98px) {
  .sidebar { width: 280px; max-height: 100vh; max-height: 100dvh; }
  .tb-collapse { display: none !important; }
}
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; height: var(--topbar-h); display: flex; align-items: center; gap: 8px; padding: 0 20px;
  background: var(--glass); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--border); }
.tb-title { font-weight: 700; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tb-search { flex: 1; max-width: 460px; margin-left: auto; position: relative; }
.tb-search .form-control { height: 40px; padding-left: 38px; padding-right: 34px; background: var(--surface-2); border-color: transparent; }
.tb-search .form-control:focus { background: var(--surface); border-color: var(--primary); }
.tb-search > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; font-size: 11px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border-2); border-radius: 6px; padding: 0 6px; line-height: 18px; background: var(--surface); }
.gs-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: min(70vh, 520px); overflow: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 70; }
.gs-group { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); padding: 10px 10px 4px; }
.gs-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text-2); text-decoration: none !important; }
.gs-item:hover, .gs-item.hl { background: var(--surface-2); color: var(--text); }
.gs-item b { display: block; font-weight: 600; color: var(--text); }
.gs-item span { font-size: 12px; color: var(--muted); }
.tb-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 12px; border: 0; background: transparent; color: var(--text); }
.tb-user:hover { background: var(--surface-2); }
.tb-user-meta { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.tb-user-meta b { font-size: 13px; }
.tb-user-meta span { font-size: 11.5px; color: var(--muted); }
.dropdown-menu { border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; background: var(--surface); }
.dropdown-item { border-radius: 9px; padding: 8px 10px; font-size: 13.5px; color: var(--text-2); display: flex; align-items: center; gap: 10px; }
.dropdown-item i { color: var(--muted); }
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.page { padding: 24px; max-width: 1600px; width: 100%; margin: 0 auto; flex: 1; }
.page h1.h4 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }
.page h2.h6 { font-weight: 700; }
@media (max-width: 575.98px) { .page { padding: 16px 12px; } .topbar { padding: 0 10px; } .page h1.h4 { font-size: 1.25rem; } }
.trial-bar { display: flex; align-items: center; gap: 8px; padding: 8px 20px; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--border); }
.trial-bar.info { background: var(--info-soft); color: var(--info-t); }
.trial-bar.warn { background: var(--warning-soft); color: var(--warning-t); }

/* toasts */
#toastRoot { position: fixed; top: 16px; right: 16px; z-index: 1090; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.hb-toast { pointer-events: auto; position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 12px 16px 14px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg); overflow: hidden; animation: toastIn .4s var(--ease); }
.hb-toast.hide { transform: translateX(calc(100% + 24px)); opacity: 0; transition: transform .4s var(--ease), opacity .3s; }
.hb-toast .t-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--t-soft); color: var(--t); }
.hb-toast.success { --t: var(--success); --t-soft: var(--success-soft); }
.hb-toast.error { --t: var(--danger); --t-soft: var(--danger-soft); }
.hb-toast .t-body { flex: 1; min-width: 0; padding-top: 1px; }
.hb-toast .t-title { font-weight: 700; font-size: 13.5px; color: var(--text); }
.hb-toast .t-msg { font-size: 13px; color: var(--text-2); margin-top: 2px; word-break: break-word; }
.hb-toast .t-x { border: 0; background: transparent; color: var(--muted); padding: 4px; border-radius: 6px; }
.hb-toast .t-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--t); animation: toastBar 6s linear forwards; }
@keyframes toastIn { from { transform: translateX(calc(100% + 24px)); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastBar { from { width: 100%; } to { width: 0; } }

/* BS date picker under each date box */
.bs-pick { display: flex; align-items: center; gap: 4px; margin-top: 6px; flex-wrap: wrap; max-width: 100%; }
.bs-pick .bs-badge { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: var(--primary); background: var(--primary-soft); border-radius: 6px; padding: 3px 6px; flex-shrink: 0; }
.bs-pick select { height: 30px; padding: 0 22px 0 8px; font-size: 12.5px; background-position: right 4px center; min-width: 0; }
.bs-pick select.bs-y { flex: 0 1 70px; min-width: 62px; } .bs-pick select.bs-m { flex: 1 1 84px; min-width: 76px; max-width: 120px; } .bs-pick select.bs-d { flex: 0 1 58px; min-width: 52px; }

/* page chips (filters) */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; font-weight: 600;
  color: var(--text-2); display: inline-flex; align-items: center; text-decoration: none !important; }
.chip:hover { background: var(--surface-2); }
.chip.on { background: var(--primary-soft); border-color: transparent; color: var(--primary); }

/* sign-in / register */
.guest-bg { background: radial-gradient(600px 300px at 100% 0%, rgba(37,99,235,.10), transparent 60%), radial-gradient(500px 300px at 0% 100%, rgba(79,70,229,.10), transparent 60%), var(--bg); }
.brand-name { font-weight: 800; letter-spacing: -.02em; color: var(--text); }

@media print { .sidebar, .topbar, #toastRoot, .trial-bar, .no-print { display: none !important; } .main { margin: 0 !important; } .card { box-shadow: none !important; border: 0 !important; } .print-only { display: block !important; } a { color: inherit !important; text-decoration: none !important; } }
.print-only { display: none; }
.sidebar.offcanvas-lg { --bs-offcanvas-width: 280px; --bs-offcanvas-bg: var(--surface); }

/* ===== Phase 10UI — StockPro look, part 2 ===== */
/* sidebar groups that open and close (StockPro), badges */
.sb-group { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; border-radius: 8px; }
.sb-group i { font-size: .7rem; transition: transform .25s var(--ease); color: var(--muted-2); }
.sb-group:hover { color: var(--text-2); }
.sb-group:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.sb-group[aria-expanded="false"] i { transform: rotate(-90deg); }
.sb-group.static { cursor: default; }
.sb-items[hidden] { display: none; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.sb-user .sb-logout { margin-left: auto; }
.sb-user .sb-logout .btn-icon { width: 34px; height: 34px; color: var(--muted); }
@media (min-width: 992px) {
  body.sb-collapsed .nav-badge, body.sb-collapsed .sb-logout { display: none; }
  body.sb-collapsed .sb-group i { display: none; }
  body.sb-collapsed .sb-items[hidden] { display: block; }
}
/* bell */
.dot-badge { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px;
  font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--surface); line-height: 1; }
.notif-dd { width: 360px; max-width: calc(100vw - 24px); padding: 0; }
.notif-head { display: flex; align-items: center; gap: 6px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.notif-head b { font-size: 14px; margin-right: auto; }
.notif-list { max-height: 380px; overflow: auto; padding: 6px; }
.notif { display: flex; gap: 12px; padding: 10px; border-radius: 12px; color: var(--text-2); text-decoration: none !important; }
.notif:hover { background: var(--surface-2); }
.notif .n-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--tone-soft); color: var(--tone); }
.notif b { display: block; font-size: 13px; color: var(--text); }
.notif span span { font-size: 12px; }
.notif > span > span { font-size: 12px; color: var(--muted); display: block; }
/* AI button (bottom right) */
.ai-fab { position: fixed; right: 22px; bottom: 22px; z-index: 50; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: #fff !important;
  background: var(--grad); box-shadow: 0 12px 28px -8px rgba(79,70,229,.6); font-size: 1.4rem; text-decoration: none !important; transition: transform .2s var(--ease); }
.ai-fab:hover { transform: translateY(-2px) scale(1.04); }
/* Phase 10G — Reports page (StockPro: list left, filters + table right) */
.rpt { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 991px) { .rpt { grid-template-columns: minmax(0, 1fr); } }
.rpt-nav { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; padding: 8px; }
.rpt-nav .sb-group { padding: 10px 10px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.rpt-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-size: 13.5px; }
.rpt-item:hover { background: var(--surface-2); color: var(--text); }
.rpt-item.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.rpt-table thead th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
@media print { .rpt { display: block; } .rpt-nav, #rSelect { display: none !important; } }
/* Phase 10G — Reminders & Calendar (BS month) */
.bs-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bs-cal-h { font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; padding: 2px 0; }
.bs-cal-d { min-height: 78px; border: 1px solid var(--border); border-radius: 8px; padding: 3px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.bs-cal-d.empty { border: 0; }
.bs-cal-d.today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.bs-cal-d .n { font-size: 12px; font-weight: 600; }
.bs-cal-d .ev, .ev-key { font-size: 10.5px; line-height: 1.25; border-radius: 4px; padding: 1px 4px; background: var(--warning-soft); color: var(--warning-t); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-cal-d .ev.chq, .ev-key.chq { background: var(--info-soft); color: var(--info-t); }
.bs-cal-d .ev.more { background: none; color: var(--muted); }
.ev-key { display: inline-block; width: 18px; height: 10px; padding: 0; vertical-align: middle; }
@media (max-width: 575px) { .bs-cal-d { min-height: 54px; } .bs-cal-d .ev { font-size: 9px; } }
/* Phase 10G — quick "+" next to a menu item (StockPro) */
.nav-row { position: relative; }
.nav-add { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); opacity: 0; transition: opacity .15s; text-decoration: none; }
.nav-row:hover .nav-add, .nav-add:focus { opacity: 1; background: var(--primary-soft); color: var(--primary); }
@media (hover: none) { .nav-add { opacity: .7; } }
body.sb-collapsed .nav-add { display: none; }
/* Phase 10G — Settings / Utilities tab strip (StockPro settings tabs) */
.hub-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.hub-tab { white-space: nowrap; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 500; text-decoration: none; }
.hub-tab.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.set-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: thin; }
.set-tab { white-space: nowrap; padding: 10px 14px; color: var(--text-2); font-weight: 500; font-size: 14px; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.set-tab:hover { color: var(--text); }
.set-tab.on { color: var(--primary); border-bottom-color: var(--primary); }
.set-under { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.set-under a { color: var(--text-2); text-decoration: none; }
.set-under a.on, .set-under a:hover { color: var(--primary); }
.hub-card:hover { border-color: var(--primary); }
/* Phase 10G — stamp & signature preview (checker shows see-through parts) */
.seal-box { height: 110px; display: grid; place-items: center; border-radius: 10px; background: repeating-conic-gradient(#f1f5f9 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.seal-box img { max-height: 100px; max-width: 100%; object-fit: contain; }
/* Phase 10E — Kalu panel */
.kalu-fab { border: 0; cursor: pointer; z-index: 1030; }
.kalu { position: fixed; right: 22px; bottom: 90px; z-index: 1060; width: 400px; max-width: calc(100vw - 24px); height: min(640px, calc(100vh - 120px));
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(15,23,42,.45); display: flex; flex-direction: column; overflow: hidden; }
.kalu[hidden] { display: none; }
.kalu-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(79,70,229,.12)); border-bottom: 1px solid var(--border); }
.kalu-head .btn-icon { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; color: var(--text-2); }
.kalu-head .btn-icon.active, .kalu-head .btn-icon[aria-pressed="true"] { color: var(--primary); background: var(--primary-soft); }
.kalu-logo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; flex-shrink: 0; }
.kalu-logo.lg { width: 48px; height: 48px; font-size: 1.3rem; margin-bottom: 10px; }
.kalu-chat { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.kalu-empty { margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; color: var(--text-2); font-size: 14px; }
.kalu-msg { max-width: 88%; padding: 8px 12px; border-radius: 14px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.kalu-msg.me { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.kalu-msg.bot { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.kalu-draft { align-self: stretch; border: 1px solid var(--warning); background: var(--warning-soft); border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.kalu-field { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; }
.kalu-chips { display: flex; gap: 6px; overflow-x: auto; padding: 6px 12px; border-top: 1px solid var(--border); }
.kalu-chips .btn { white-space: nowrap; border-radius: 999px; }
.kalu-listen { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--danger-soft); color: var(--danger); font-weight: 600; font-size: 14px; }
.kalu-listen .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: kaluPulse 1s infinite; }
@keyframes kaluPulse { 50% { opacity: .3; } }
.kalu-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.kalu-form .form-control { border-radius: 999px; }
.kalu-mic, .kalu-send { width: 42px; height: 42px; border-radius: 50%; border: 0; flex-shrink: 0; display: grid; place-items: center; color: #fff; background: var(--grad); }
.kalu-mic { background: var(--surface-2); color: var(--text-2); }
.kalu-mic.rec { background: var(--danger); color: #fff; }
@media (max-width: 575px) {
  .kalu { right: 0; left: 0; bottom: 0; width: 100%; max-width: 100%; height: 100%; height: 100dvh; border-radius: 0; }
  body.kalu-open .kalu-fab { display: none; }
}
/* tones */
.tone-primary { --tone: var(--primary); --tone-soft: var(--primary-soft); }
.tone-success { --tone: var(--success); --tone-soft: var(--success-soft); }
.tone-warning { --tone: var(--warning); --tone-soft: var(--warning-soft); }
.tone-danger { --tone: var(--danger); --tone-soft: var(--danger-soft); }
.tone-info { --tone: var(--info); --tone-soft: var(--info-soft); }
.tone-violet { --tone: var(--violet); --tone-soft: var(--violet-soft); }
/* toasts: warning and info too */
.hb-toast.warning { --t: var(--warning); --t-soft: var(--warning-soft); }
.hb-toast.info { --t: var(--primary); --t-soft: var(--primary-soft); }
/* page head */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; margin: 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.date-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text-2); }
.date-chip.bs { background: var(--primary-soft); color: var(--primary); }
.date-chip.fy { background: var(--violet-soft); color: var(--violet); }
.btn-soft-success { background: var(--success-soft); color: var(--success-t); border: 0; }
.btn-soft-success:hover { background: var(--success); color: #fff; }
.btn-soft-danger { background: var(--danger-soft); color: var(--danger-t); border: 0; }
.btn-soft-danger:hover { background: var(--danger); color: #fff; }
/* dashboard reminders strip */
.rem-card { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--warning); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.rem-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); text-decoration: none !important; max-width: 100%; }
.rem-chip:hover { border-color: var(--border-2); }
.rem-chip b { color: var(--text); }
/* big dashboard tabs */
.big-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.big-tab { height: 44px; border-radius: 999px; border: 1.5px solid var(--border-2); background: var(--surface); font-weight: 700; color: var(--text-2); }
.big-tab:hover { border-color: var(--primary); }
.big-tab[aria-selected="true"] { background: var(--danger-soft); border-color: var(--danger); color: var(--danger-t); }
/* KPI cards */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { position: relative; display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
  overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; min-width: 0; color: var(--text); text-decoration: none !important; }
a.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-2); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--tone-soft); color: var(--tone); flex-shrink: 0; }
.kpi-value { font-size: 23px; font-weight: 800; letter-spacing: -.03em; margin-top: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-hero .kpi { padding: 20px 22px; }
.kpi-hero .kpi::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: var(--tone); opacity: .08; pointer-events: none; }
.kpi-hero .kpi-value { font-size: 28px; }
@media (max-width: 1199.98px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) {
  .kpi-grid { gap: 10px; } .kpi { padding: 12px 14px; } .kpi-hero .kpi { padding: 14px 16px; }
  .kpi-value, .kpi-hero .kpi-value { font-size: 18px; } .kpi-ic { width: 30px; height: 30px; }
  .big-tabs { gap: 6px; } .big-tab { height: 40px; font-size: 12.5px; padding: 0 4px; }
  .page-head h1 { font-size: 21px; } .ai-fab { right: 14px; bottom: 14px; width: 50px; height: 50px; }
}

/* ===== Phase 10UI part 2 — on a phone, list tables become cards (StockPro) ===== */
@media screen and (max-width: 575.98px) {
  table.hb-cards { display: block; }
  table.hb-cards > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.hb-cards > tbody, table.hb-cards > tfoot { display: block; padding: 6px; }
  table.hb-cards > tbody > tr, table.hb-cards > tfoot > tr { display: block; border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; background: var(--surface); }
  table.hb-cards > tfoot > tr { background: var(--surface-2); }
  table.hb-cards > tbody > tr:last-child, table.hb-cards > tfoot > tr:last-child { margin-bottom: 0; }
  table.hb-cards > tbody > tr > td, table.hb-cards > tfoot > tr > td, table.hb-cards > tbody > tr > th, table.hb-cards > tfoot > tr > th {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border: 0 !important; padding: 3px 0 !important; text-align: right; background: transparent !important; min-width: 0; }
  table.hb-cards td[data-label]::before, table.hb-cards th[data-label]::before { content: attr(data-label); flex-shrink: 0; max-width: 45%; color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; }
  table.hb-cards > tbody > tr > :first-child { justify-content: flex-start; text-align: left; font-weight: 600; color: var(--text); }
  table.hb-cards > tbody > tr > :first-child::before { display: none; }
  table.hb-cards td:empty { display: none; }
  table.hb-cards .hb-cv { min-width: 0; overflow-wrap: anywhere; }
  table.hb-cards .hb-cv > form { display: inline-flex; }
  table.hb-cards td[colspan] { justify-content: center; text-align: center; }
  table.hb-cards td.text-end form { justify-content: flex-end; }
  .card > .table-responsive:has(> table.hb-cards) { overflow: visible; }
}
/* Phase 10F: StockPro products / categories */
.kpi-grid.kpi-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1199.98px) { .kpi-grid.kpi-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .kpi-grid.kpi-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
a.kpi { text-decoration: none !important; color: inherit; }
.avatar-sq { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--text-2); }
.img-drop { border: 2px dashed var(--border-2); border-radius: var(--radius); min-height: 200px; display: grid; place-items: center; text-align: center; padding: 16px; cursor: pointer; background: var(--surface-2); position: relative; overflow: hidden; }
.img-drop.over { border-color: var(--primary); background: var(--primary-soft); }
.img-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.form-sec { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 8px 0 0; }
.form-sec::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.cat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); height: 100%; }
.cat-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; background: var(--grad); flex-shrink: 0; }
.cat-stats { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-stats small { display: block; color: var(--muted); font-size: 11.5px; }
.var-total { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.var-total > div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; }
.var-total small { display: block; color: var(--muted); font-size: 11.5px; }
.form-label.req::after { content: " *"; color: var(--danger); }
.kpi-grid.kpi-5 .kpi-value { font-size: 20px; }
/* Phase 10H: company logo box */
.logo-box { width: 72px; height: 72px; border-radius: 16px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 24px; overflow: hidden; flex: 0 0 auto; }
.logo-box img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
/* Phase 10H: Settings sections and option cards (StockPro v113) */
.set-sec { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.set-sec::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.opt-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; height: 100%; cursor: pointer; background: var(--surface); }
.opt-card .form-check-input { margin-top: 3px; flex: 0 0 auto; }
.opt-card span { display: flex; flex-direction: column; }
.opt-card small { color: var(--text-2); }
.chip-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 500; }
.chip-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.chip-btn:disabled { opacity: .45; }
/* Phase 10H: confirmation letter format page */
.lf-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; }
.lf-tpls { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.lf-tpl { border: 2px solid var(--border); border-radius: 10px; background: var(--surface); padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.lf-tpl.on { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.lf-tpl small { color: var(--text-2); line-height: 1.25; }
.lf-tpl:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.lf-th { display: block; height: 118px; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; background: #fff; position: relative; }
.lf-th iframe, .lf-page iframe { position: absolute; top: 0; left: 0; width: 794px; height: 1123px; border: 0; transform-origin: 0 0; pointer-events: none; background: #fff; }
.lf-right { position: sticky; top: 70px; align-self: start; }
.lf-page { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
@media (max-width: 900px) { .lf-wrap { grid-template-columns: 1fr; } .lf-tpls { grid-template-columns: repeat(3, minmax(0, 1fr)); } .lf-right { position: static; } }
@media (max-width: 480px) { .lf-tpls { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Phase 10I: edit / delete icons on list rows */
.row-acts { display: inline-flex; gap: 2px; white-space: nowrap; }
.row-acts .btn-icon { width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--text-2); }
.row-acts .btn-icon:hover { background: var(--surface-2, rgba(0,0,0,.05)); color: var(--primary); }
.row-acts .btn-icon.text-danger:hover { color: #dc2626 !important; }
.row-acts .disabled-like { opacity: .35; cursor: not-allowed; }
/* Phase 10J: StockPro dashboard */
.fcy-chip { display: inline-flex; gap: 8px; align-items: center; padding: 8px 16px; border-radius: 12px; font-size: 14px; text-decoration: none !important; border: 1.5px solid #FCD34D; background: var(--surface); color: var(--text) !important; }
.fcy-chip i { color: var(--warning-t); }
.fcy-chip b { color: #9A3412; }
.fcy-chip.ok { background: var(--success-soft); color: var(--success-t) !important; border-color: #FCD34D; }
[data-bs-theme=dark] .fcy-chip b { color: var(--warning-t); }
.tax-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.tax-tile { display: block; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface); color: var(--text) !important; text-decoration: none !important; }
.tax-tile:hover { border-color: var(--primary); }
.tax-tile.is-late { border-left: 4px solid var(--danger); }
.tt-label { font-size: 13px; color: var(--text-2); font-weight: 600; }
.tt-value { font-size: 1.2rem; font-weight: 800; margin: 4px 0; line-height: 1.25; }
.tt-sub { font-size: 12.5px; color: var(--text-2); }
.tax-tiles { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important; }
@media (min-width: 1200px) { .tax-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; } }
.tax-tile { padding: 14px 16px !important; }
.dash-head { align-items: flex-start; }
.dash-head h1 { font-size: 30px; }
.dash-actions .btn { border-radius: 10px; padding: 7px 13px; font-weight: 600; }
.btn-soft-primary { background: var(--primary-soft); color: var(--primary); border: 0; font-weight: 600; }
.btn-soft-primary:hover { background: var(--primary); color: #fff; }
.rem-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; background: var(--warning-soft); color: var(--warning-t); }
.rem-pill.late { background: var(--danger-soft); color: var(--danger-t); }
.wide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 6px; }
@media (min-width: 992px) { .wide-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.wide-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); color: var(--text) !important; text-decoration: none !important; }
.wc-label { font-size: 14px; color: var(--text-2); font-weight: 600; }
.wc-value { font-size: 1.75rem; font-weight: 800; margin: 4px 0; letter-spacing: -.02em; }
.wc-sub { font-size: 13px; color: var(--text-2); }
.tx-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.tx-search { flex: 1 1 320px; }
.tx-search .input-group-text, .tx-search .form-control { background: var(--surface); height: 46px; }
.tx-search .input-group-text { border-right: 0; } .tx-search .form-control { border-left: 0; }
.chip-btn.chip-lg { padding: 8px 18px; font-size: 14px; font-weight: 600; }
.tx-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); cursor: pointer; }
.tx-card:hover, .tx-card:focus { border-color: var(--primary); outline: 0; }
.tx-top { display: flex; justify-content: space-between; gap: 12px; }
.tx-type { font-size: 18px; font-weight: 800; }
.tx-party { display: block; color: var(--text-2) !important; font-weight: 600; margin: 4px 0 8px; text-decoration: none !important; }
.tx-no { font-weight: 800; }
.tx-date { color: var(--text-2); font-size: 14px; margin-top: 4px; white-space: nowrap; }
.tx-pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.tx-pill.ok { background: var(--success-soft); color: var(--success-t); }
.tx-pill.warn { background: var(--warning-soft); color: var(--warning-t); }
.tx-pill.bad { background: var(--danger-soft); color: var(--danger-t); }
.tx-pill.off { background: var(--surface-2); color: var(--text-2); }
.tx-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 14px; }
.tx-k { font-size: 13px; color: var(--text-2); font-weight: 600; }
.tx-v { font-size: 17px; font-weight: 800; }
.tx-ic { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--text-2) !important; font-size: 18px; }
.tx-ic:hover { background: var(--surface-2); }
@media (max-width: 575.98px) { .tx-top { flex-direction: column; } .tx-top .text-end { text-align: left !important; } .tx-type { font-size: 16px; } }
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dash-grid > .span-2 { grid-column: span 2; }
@media (max-width: 991.98px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } .dash-grid > .span-2 { grid-column: auto; } }
.chart-box { position: relative; height: 240px; }
.hbar { margin-bottom: 10px; }
.hbar-track { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.hbar-fill { height: 100%; border-radius: 999px; background: var(--primary); }
.min-w-0 { min-width: 0; }
.tx-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 1.5rem; }
.chip-btn.active, .chip-btn.active:hover:not(:disabled) { background: var(--primary); border-color: var(--primary); color: #fff; }
.pt-row { position: relative; border-bottom: 1px solid var(--border); overflow: hidden; }
.pt-row:last-of-type { border-bottom: 0; }
.pt-under { position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; padding-left: 18px; background: var(--success); color: #fff; font-weight: 700; }
.pt-face { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); transition: transform .18s ease; touch-action: pan-y; user-select: none; }
.pt-row.armed .pt-under { background: var(--success-t); }
.pt-call { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--success); color: #fff !important; text-decoration: none !important; }
.pt-call.off { background: var(--surface-2); color: var(--text-2) !important; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.tax-tile.is-late:hover { border-left-color: var(--danger); }
/* Phase 10J: phone layout like Vyapar Android — bottom bar, quick links, "Add New Sale", simple cards */
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035; display: flex; background: var(--surface); border-top: 1px solid var(--border);
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(15,23,42,.06); }
.bnav > a, .bnav > button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border: 0; background: none;
  color: var(--text-2) !important; font-size: 11.5px; font-weight: 600; text-decoration: none !important; }
.bnav i { font-size: 20px; line-height: 1; }
.bnav .on { color: var(--primary) !important; }
.sale-fab { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 1034; display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 22px; border-radius: 999px; background: #E11D48; color: #fff !important; font-weight: 700; text-decoration: none !important; box-shadow: 0 8px 20px rgba(225,29,72,.35); white-space: nowrap; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 6px; margin-bottom: 14px; }
.q-item { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--text) !important; text-decoration: none !important; text-align: center; }
.q-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; }
.q-blue { background: var(--primary-soft); color: var(--primary); } .q-green { background: var(--success-soft); color: var(--success-t); }
.q-red { background: var(--danger-soft); color: var(--danger-t); } .q-amber { background: var(--warning-soft); color: var(--warning-t); }
.q-violet { background: var(--violet-soft); color: var(--violet); } .q-grey { background: var(--surface-2); color: var(--text-2); }
@media (max-width: 767.98px) {
  body:has(.bnav) .page { padding-bottom: 170px !important; }
  body:has(.bnav) .ai-fab { bottom: calc(76px + env(safe-area-inset-bottom)); right: 12px; width: 46px; height: 46px; border-radius: 16px; }
  body:has(.bnav) .kalu { bottom: calc(130px + env(safe-area-inset-bottom)); top: auto; height: calc(100dvh - 200px - env(safe-area-inset-bottom)); max-height: 560px; right: 12px; }
  .dash-head { margin-bottom: 12px; } .dash-head h1 { font-size: 22px; }
  .dash-head .date-chip { height: 24px; font-size: 11.5px; }
  #fcy-chips { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .fcy-chip { flex: 0 0 auto; font-size: 13px; padding: 6px 12px; }
  .rem-card { padding: 10px 12px; } .rem-card .d-flex.flex-wrap.gap-2:last-child { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; }
  .rem-chip { flex: 0 0 auto; max-width: 85%; }
  .big-tabs { gap: 6px; } .big-tab { height: 38px; font-size: 13.5px; }
  .ph-more { display: none; } .more-open .ph-more { display: block; }
  #tab-overview:not(.more-open) #kpi-12 > :nth-child(n+5) { display: none; }
  #overview .kpi-sub { display: none; }
  .wide-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; } .wc-value { font-size: 1.4rem; }
  .tax-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; } .tax-tile { padding: 10px 12px !important; } .tt-value { font-size: 1rem; }
  .tx-tools { gap: 8px; } .tx-tools > .d-flex { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .chip-btn.chip-lg { padding: 6px 14px; font-size: 13px; flex: 0 0 auto; }
  .tx-search .input-group-text, .tx-search .form-control { height: 42px; }
  .tx-list { gap: 10px; }
  .tx-card { padding: 12px 14px; border-radius: 14px; }
  .tx-top { flex-direction: row !important; } .tx-top .text-end { text-align: right !important; }
  .tx-type { font-size: 12px; font-weight: 600; color: var(--text-2); order: 2; }
  .tx-party { font-size: 16px; font-weight: 800; color: var(--text) !important; margin: 0 0 2px; }
  .tx-top .min-w-0 { display: flex; flex-direction: column; } .tx-top .min-w-0 > :first-child { order: 2; } .tx-top .min-w-0 > :last-child { order: 3; margin-top: 4px; }
  .tx-no { font-size: 12px; color: var(--text-2); font-weight: 700; } .tx-date { font-size: 12px; }
  .tx-bottom { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); } .tx-bottom .gap-5 { gap: 1.5rem !important; }
  .tx-k { font-size: 11.5px; } .tx-v { font-size: 15px; }
  .tx-pill { font-size: 10.5px; padding: 2px 8px; }
}
@media (max-width: 767.98px) { #tab-overview:not([hidden]) { display: flex; flex-direction: column; } #tab-overview > #overview { order: -1; } }
.dash-co { font-size: 14px; font-weight: 600; color: var(--text-2); margin: 2px 0 0; }
@media (max-width: 767.98px) {
  body[data-dash-tab="b-tx"] .ph-top, body[data-dash-tab="b-party"] .ph-top { display: none !important; }
  #dash-tabs #b-overview { display: none; }
  #dash-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-dash-tab="b-overview"] #dash-tabs { display: none; }
}
@media (max-width: 767.98px) {
  #dash-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body[data-dash-tab="b-rem"] .ph-top { display: none !important; }
}
.rem-row.is-late { border-left: 4px solid var(--danger); }
/* Phase 10J: money lines (📷 · account ▾ · amount · ✕), same on bills, Payment-In / Out and expenses */
.pl { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; }
.pl-title { font-weight: 700; margin-bottom: 8px; }
.pl-line { padding: 8px 0; border-bottom: 1px solid var(--border); }
.pl-main { display: flex; align-items: center; gap: 8px; }
.pl-cam { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px; height: 40px; min-width: 44px; justify-content: center; padding: 0 8px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface-2); cursor: pointer; margin: 0; font-size: 16px; }
.pl-cam.has { border-color: var(--text); background: var(--surface); }
.pl-cnt { font-size: 14px; }
.pl-acc { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; font-weight: 600; padding: 6px 2px; color: var(--text); appearance: auto; }
.pl-acc:focus { outline: 2px solid var(--primary); border-radius: 8px; }
.pl-amt { flex: 0 0 132px; width: 132px; text-align: right; font-size: 17px; font-weight: 600; border: 1px solid var(--border); border-radius: 12px; padding: 7px 12px; background: var(--surface-2); color: var(--text); }
.pl-amt:focus { outline: 2px solid var(--primary); background: var(--surface); }
.pl-x { flex: 0 0 auto; border: 0; background: none; font-size: 20px; color: var(--text-2); width: 32px; }
.pl-sub { padding: 6px 0 2px 56px; color: var(--text-2); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pl-sub[hidden] { display: none; }
.pl-fx { margin-top: 6px; border: 1.5px dashed #F2A7A7; border-radius: 12px; padding: 6px 10px 6px 56px; }
.pl-in { border: 1px solid var(--border); border-radius: 8px; padding: 3px 8px; background: var(--surface); color: var(--text); width: auto; }
select.pl-in { padding-right: 22px; }
.pl-link, .pl-add { border: 0; background: none; padding: 0; color: var(--text-2); font-size: 14px; }
.pl-add { display: block; margin: 10px 0; font-size: 16px; font-weight: 600; color: var(--text); }
.pl-sum { display: flex; justify-content: space-between; gap: 8px; background: var(--surface-2); border-radius: 12px; padding: 10px 14px; font-size: 16px; }
.pl-sum-r { font-weight: 600; }
@media (max-width: 575.98px) { .pl { padding: 12px; } .pl-amt { flex-basis: 112px; width: 112px; } .pl-sub, .pl-fx { padding-left: 8px; } }
/* Phase 10J: "Date (BS)" box + BS calendar (his Payment-In reference) */
.bsbox-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.bsbox { position: relative; display: flex; align-items: center; gap: 10px; border: 1px solid #C9D2DE; border-radius: 10px; padding: 4px 6px 4px 12px; background: var(--surface); min-height: 50px; }
.bsbox:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.bsbox-l { display: flex; flex-direction: column; line-height: 1.2; }
.bsbox-lab { font-size: 10.5px; font-weight: 600; color: var(--text-2); }
.bsbox-tm { font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.bsbox-r { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.bsbox-in { border: 0; background: transparent; font-weight: 700; font-size: 15.5px; width: 104px; text-align: right; color: var(--text); padding: 0; }
.bsbox-in:focus { outline: 0; }
.bsbox-ad { font-size: 10.5px; color: var(--text-2); white-space: nowrap; }
.bsbox-cal { border: 0; background: var(--surface-2); border-radius: 8px; width: 32px; height: 32px; font-size: 15px; }
.bscal { position: absolute; right: 0; top: calc(100% + 6px); z-index: 1060; width: 300px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 30px rgba(15,23,42,.18); padding: 12px; }
.bscal-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.bscal-hd button, .bscal-ft button { border: 0; background: none; font-size: 18px; padding: 2px 10px; color: var(--text); }
.bscal-ft { display: flex; justify-content: space-between; margin-top: 6px; } .bscal-ft button { font-size: 13px; font-weight: 700; color: var(--primary); }
.bscal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.bscal-g .w { font-size: 10.5px; color: var(--text-2); padding: 2px 0; }
.bscal-g button { border: 0; background: none; border-radius: 8px; padding: 4px 0; font-size: 13px; color: var(--text); line-height: 1.1; }
.bscal-g button small { display: block; font-size: 9px; color: var(--text-2); }
.bscal-g button:hover { background: var(--surface-2); } .bscal-g button.sel { background: var(--primary); color: #fff; } .bscal-g button.sel small { color: #DBEAFE; }
.bscal-g button:disabled { opacity: .3; }

/* Phase 10J: one-screen forms (his "ek hi screen page me sab aa jaye") */
.os { display: flex; flex-direction: column; gap: 10px; height: calc(100dvh - var(--os-top, 120px) - 12px); min-height: 560px; }
.os-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.os-head { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.os-f { position: relative; border: 1px solid #C9D2DE; border-radius: 10px; background: var(--surface); min-height: 50px; min-width: 0; }
.os-f > label { position: absolute; top: 3px; left: 12px; font-size: 10.5px; font-weight: 600; color: var(--text-2); margin: 0; pointer-events: none; z-index: 1; }
.os-f > .form-control, .os-f > .form-select { border: 0; background-color: transparent; padding: 17px 12px 5px; font-size: 15px; font-weight: 500; height: 48px; box-shadow: none; }
.os-f:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.os-f .os-plus { position: absolute; right: 8px; top: 9px; width: 30px; height: 30px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; text-decoration: none !important; z-index: 2; }
.os-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.os-chip { background: var(--surface-2); border-radius: 8px; padding: 5px 10px; font-size: 12.5px; white-space: nowrap; }
.os-chip b { font-size: 13.5px; }
.os-mid { flex: 1 1 auto; min-height: 0; overflow: auto; }
.os-grid2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; }
.os-grid3 { display: grid; grid-template-columns: 1.15fr 1fr .85fr; gap: 10px; }
.os-h { font-weight: 700; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.os-sr { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; gap: 8px; }
.os-sr input { max-width: 130px; text-align: right; border: 0; border-bottom: 1px dashed #C9D2DE; border-radius: 0; background: transparent; padding: 2px 0; }
.os-tot { background: var(--primary); color: #fff; border-radius: 10px; padding: 10px 14px; display: flex; justify-content: space-between; font-size: 16.5px; font-weight: 700; margin-top: 6px; }
.os-foot { display: flex; gap: 0; position: sticky; bottom: 0; z-index: 20; margin: 0 calc(-1 * var(--page-px, 0px)); border-top: 1px solid var(--border); background: var(--surface); border-radius: 12px; overflow: hidden; }
.os-foot > * { flex: 1; border: 0; padding: 13px; font-weight: 700; background: var(--surface); color: var(--text); text-align: center; text-decoration: none !important; }
.os-foot .os-save { background: linear-gradient(90deg, #2563EB, #4F46E5); color: #fff; }
.os-foot .os-more { flex: 0 0 50px; }
.os .pl { margin: 0; padding: 12px 14px; border-radius: 12px; }
.os .pl-line { padding: 6px 0; }
.os .pl-cam { height: 34px; min-width: 38px; }
.os .pl-amt { padding: 5px 10px; font-size: 15px; flex-basis: 124px; width: 124px; }
.os .pl-add { margin: 6px 0; font-size: 14px; color: var(--primary); }
.os .pl-sum { font-size: 14px; padding: 7px 10px; }
@media (max-width: 991.98px) { .os-grid2, .os-grid3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767.98px) {
  .os { height: auto; min-height: 0; }
  .os-head { gap: 8px; }
  .os-head > * { flex: 1 1 100% !important; width: auto !important; order: 3; }
  .os-head > .os-no { flex: 1 1 30% !important; order: 0; }
  .os-head > .bsbox-wrap { flex: 1 1 55% !important; order: 1; }
  .os-head > .os-party { order: 2; }
  .os-title { display: none !important; }
  .os-card { padding: 10px; }
  .os-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .os-chip { flex: 0 0 auto; }
  .os-help { display: none; }
  .bsbox { padding-left: 8px; gap: 6px; } .bsbox-l .bsbox-lab { font-size: 10px; } .bsbox-in { width: 96px; font-size: 15px; } .bsbox-cal { width: 28px; height: 28px; }
  .os-f > .form-control, .os-f > .form-select { font-size: 15px; }
  .os-no .form-control { font-size: 13px; padding-left: 10px; padding-right: 4px; }
  .pl-fx .pl-in { width: 78px; } .pl-fx { flex-wrap: nowrap; gap: 4px; font-size: 13px; }
  #psum-fx { display: none !important; } .os-grid2 > .os-card .os-h { display: none; }
  body:has(.os-foot) .ai-fab { bottom: 128px !important; }
  .os-chips { margin-top: 6px; padding-bottom: 0; }
  .os-foot { position: fixed; left: 0; right: 0; bottom: 0; border-radius: 0; margin: 0; z-index: 1040; }
  body:has(.os-foot) .bnav, body:has(.os-foot) .sale-fab { display: none !important; }
  body:has(.os-foot) .page { padding-bottom: 80px !important; }
  body:has(.os-foot) .ai-fab { bottom: 72px; }
}
.os-chip:empty { display: none; }
.os-mid { min-height: 150px; }
.os-summary table td { padding: 3px 0; vertical-align: middle; }
.os-summary .form-control-sm { height: 28px; padding: 2px 8px; }
.os-mini { width: 64px !important; } .os-mini2 { width: 110px !important; }
.os-summary .os-tot { margin-top: 4px; padding: 8px 12px; }
#bill-form .os-head .bsbox-wrap { flex: 0 0 auto; }
#bill-form #lines td, #bill-form #lines th { padding: 4px 6px; }
#bill-form #lines thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.os > * { flex-shrink: 0; }
.os > .os-mid { flex-shrink: 1; }
.os > .os-spacer { flex: 1 1 auto; min-height: 0; }
.pl-ic { flex: 0 0 auto; font-size: 15px; margin-right: -4px; }
/* Phase 10J: Items box like his photo */
.it-soft { background: var(--primary-soft); color: var(--primary); border: 0; font-weight: 600; border-radius: 10px; }
.it-soft:hover { background: var(--primary); color: #fff; }
.it-search { position: relative; display: flex; align-items: center; gap: 10px; border: 1px solid #C9D2DE; border-radius: 10px; padding: 0 14px; background: var(--surface); min-height: 44px; }
.it-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.it-search > i { color: var(--text-2); }
.it-search input { flex: 1; border: 0; background: transparent; font-size: 14.5px; color: var(--text); padding: 10px 0; min-width: 0; }
.it-search input:focus { outline: 0; }
.it-sug { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 1050; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 28px rgba(15,23,42,.15); overflow-x: hidden; overflow-y: auto; max-height: min(360px, 55vh); }
.it-open { border: 0; background: transparent; color: var(--text); padding: 0 6px; font-size: 13px; }
.it-sug > div { padding: 8px 14px; cursor: pointer; display: flex; flex-direction: column; }
.it-sug > div small { color: var(--text-2); }
.it-sug > div:hover, .it-sug > div.on { background: var(--primary-soft); }
.it-panel { border: 1px dashed #C9D2DE; border-radius: 10px; padding: 10px; margin-bottom: 6px; background: var(--surface-2); }
.it-table { border: 1px solid var(--border); border-radius: 12px; overflow: auto; min-height: 0; }
#lines thead th { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); font-weight: 600; background: var(--surface-2); padding: 9px 12px; border-bottom: 1px solid var(--border); }
#lines td { padding: 10px 12px !important; border-bottom: 1px solid var(--border); vertical-align: middle; }
#lines tbody tr:last-child td { border-bottom: 0; }
.it-name { border: 0; background: transparent; font-weight: 700; font-size: 14.5px; padding: 0 18px 0 0; max-width: 100%; color: var(--text); appearance: auto; }
.it-name:focus { outline: 2px solid var(--primary); border-radius: 6px; }
.it-sub { font-size: 12px; color: var(--text-2); margin-top: 1px; }
.it-sub:empty { display: none; }
.it-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.it-chip { display: inline-flex; align-items: center; gap: 4px; border: 1.5px dashed #93C5FD; background: transparent; border-radius: 8px; padding: 2px 10px; font-size: 12px; font-weight: 600; color: #1E3A8A; margin: 0; }
.it-chip.it-disc { border-color: #CBD5E1; color: var(--text-2); font-weight: 500; }
.it-chip.it-disc input { width: 44px; border: 0; border-bottom: 1px solid #CBD5E1; background: transparent; text-align: right; font-size: 12px; padding: 0; color: var(--text); }
tr:has(.item option:checked[value=""]) .it-chips, tr:not(:has(.item option:checked)) .it-chips { display: none; }
.it-more { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.it-more > .d-none { display: none !important; }
.it-more > * { width: auto; max-width: 260px; }
.it-in { width: 100%; max-width: 110px; margin-left: auto; display: block; text-align: right; border: 1px solid #C9D2DE; border-radius: 10px; padding: 7px 12px; background: var(--surface); color: var(--text); font-size: 14.5px; }
.it-in:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.it-unit { border: 0; background: transparent; color: var(--text); padding: 0; font-size: 14px; appearance: auto; }
#lines .remove i { font-size: 16px; }
@media (max-width: 767.98px) {
  #lines thead { display: none; }
  #lines, #lines tbody, #lines tr { display: block; }
  #lines tr { position: relative; padding: 10px 10px 8px 34px; border-bottom: 1px solid var(--border); }
  #lines td { display: inline-block; border: 0 !important; padding: 2px 4px !important; }
  #lines td.it-no { position: absolute; left: 8px; top: 10px; }
  #lines td.it-prod { display: block; padding-right: 30px !important; }
  #lines td:last-child { position: absolute; right: 6px; top: 8px; }
  #lines td.amt { float: right; padding-top: 10px !important; }
  .it-in { max-width: 86px; padding: 5px 8px; }
}
.os-grid3 > div:first-child { position: relative; }
.pay-rem { position: absolute; top: 10px; right: 14px; }
.it-card { min-height: 230px; }
#bill-form .os-title { flex-wrap: wrap; }
@media (max-width: 767.98px) { .pay-rem { position: static; margin-top: 6px; } }
@media (max-width: 767.98px) {
  #bill-form .os-title { display: flex !important; margin-bottom: 6px !important; }
  #bill-form .os-title > h1, #bill-form .os-title > .btn-light { display: none; }
  #bill-form .os-title .os-chips { flex-wrap: nowrap; overflow-x: auto; }
  .it-card #scan-msg { display: none; }
  .it-card #add-line, #it-count { white-space: nowrap; }
  #scan-cam { padding: 0 10px; } #scan-cam i + * { display: none; }
}
/* Phase 10J: roll-wise entry pop-up + Bhansar card (his photos) */
.rm-u { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 5px 16px; font-weight: 700; font-size: 13px; }
.rm-u.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.rm-roll { display: inline-flex; align-items: center; gap: 2px; background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 2px 4px 2px 10px; margin: 2px 4px 2px 0; font-weight: 600; }
.rm-roll button { border: 0; background: none; color: inherit; font-size: 15px; line-height: 1; padding: 0 4px; }
.rm-sum { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; }
.rm-sum > div { display: flex; justify-content: space-between; padding: 3px 0; font-size: 14px; }
.rm-sum .rm-bq { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 7px; font-size: 15.5px; }
.bh { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.bh-on { display: flex; gap: 10px; align-items: flex-start; margin: 0; cursor: pointer; }
.bh-on input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary); }
.bh-on span { display: flex; flex-direction: column; } .bh-on small { color: var(--text-2); font-size: 11.5px; }
.bh.off .bh-body { display: none; }
.bh-r { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 13px; }
.bh-r input, .bh-r select { width: 130px; border: 1px solid #C9D2DE; border-radius: 9px; padding: 5px 10px; text-align: right; background: var(--surface); color: var(--text); }
.bh-r select { text-align: left; }
.bh-sum { margin-top: 8px; font-size: 13px; } .bh-sum > div { display: flex; justify-content: space-between; padding: 2px 0; }
.bh-pay { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 5px !important; font-size: 14px; }
.bh-note { font-size: 11px; color: var(--text-2); margin-top: 4px; }
.os-grid3 > .os-card:last-child { overflow: auto; }
.cb-v { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--border); border-radius: 10px; padding: 6px 8px; background: var(--surface); min-width: 110px; margin: 0; font-size: 12.5px; font-weight: 600; }
.cb-v input { border: 1px solid #C9D2DE; border-radius: 7px; padding: 3px 8px; text-align: right; width: 100%; }
.cb-v small { color: var(--text-2); font-weight: 400; }
.pr-grp { border-bottom: 1px solid var(--border); }
.it-ru { max-width: 120px; margin: 4px 0 0 auto; border-radius: 9px; font-size: 12.5px; }
/* Phase 10J: search list with variants + colour pop-up (his photos 2, 3) */
.it-sug .sg { flex-direction: row !important; align-items: center; gap: 12px; padding: 10px 14px !important; }
.sg-av { flex: 0 0 40px; height: 40px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--text-2); }
.sg-m { flex: 1; min-width: 0; display: flex; flex-direction: column; } .sg-m small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-v { display: inline-block; background: #EDE9FE; color: #5B21B6; border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 600; margin-left: 4px; }
.sg-r { text-align: right; display: flex; flex-direction: column; white-space: nowrap; }
.cm-list { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cm-row { display: grid; grid-template-columns: 1.4fr .9fr 1fr 1fr; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.cm-row:last-child { border-bottom: 0; }
.cm-head { background: var(--surface-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); font-weight: 600; padding: 7px 14px; }
.cm-n { display: flex; flex-direction: column; } .cm-n small { color: var(--text-2); font-size: 11.5px; }
.cm-s { font-size: 13.5px; }
.cm-qw { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cm-q, .cm-r { width: 100%; max-width: 120px; border: 1px solid #C9D2DE; border-radius: 10px; padding: 7px 12px; text-align: right; background: var(--surface); color: var(--text); }
.cm-q[readonly] { background: var(--surface-2); }
.cm-rw { text-align: right; } .cm-rw .cm-r { margin-left: auto; }
.cm-more { grid-column: 1 / -1; }
.cm-tot { display: flex; justify-content: space-between; background: var(--surface-2); border-radius: 12px; padding: 12px 16px; font-size: 15px; }
@media (max-width: 575.98px) { .cm-row { grid-template-columns: 1fr 1fr; } .cm-head { display: none; } }
/* Phase 10J part 9 (his photos 1–2): colour box → Roll-wise entry per colour */
.rm-dlg { max-width: 680px; }
.rm-split { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto; gap: 8px; align-items: center; }
@media (max-width: 575.98px) { .rm-split { grid-template-columns: 1fr auto 1fr; } }
.rm-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; max-height: 300px; overflow: auto; }
.rm-pick { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; margin: 0; cursor: pointer; font-size: 13px; }
.rm-pick b { margin-left: auto; } .rm-pick input { accent-color: var(--primary); }
.rm-pick:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.cm-rolls.on { background: var(--primary); color: #fff; border-style: solid; border-color: var(--primary); }
/* Phase 10J part 9 fixes: phone line amount on its own row · PC items box shows more lines · Bhansar sums on one line */
@media (max-width: 767.98px) { #lines td.amt { display: block; float: none; text-align: right; padding: 4px 4px 0 !important; } }
@media (min-width: 768px) { .it-card { min-height: 340px; } }
.bh-sum > div { gap: 8px; align-items: baseline; } .bh-sum b { white-space: nowrap; }
/* Phase 10J (his option B): Bhansar — small card + pop-up */
.bh-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bh-top .bh-on b { font-size: 14.5px; }
.bh-edit { border: 0; background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 12.5px; }
.bh-hint { font-size: 12px; color: var(--text-2); margin-top: 6px; } .bh:not(.off) .bh-hint { display: none; }
.bh-meta { font-size: 12px; color: var(--text-2); margin: 6px 0 4px; } .bh-meta:empty { display: none; }
.bh-paybar { display: flex; justify-content: space-between; background: var(--primary); color: #fff; border-radius: 10px; padding: 8px 12px; margin-top: 6px; font-weight: 700; font-size: 14px; }
.bh-dlg { max-width: 640px; }
.bh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 575.98px) { .bh-grid { grid-template-columns: 1fr; } }
.bh-f { display: flex; flex-direction: column; gap: 3px; }
.bh-f label { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.bh-f input, .bh-f select { border: 1px solid #C9D2DE; border-radius: 10px; padding: 8px 12px; text-align: right; background: var(--surface); color: var(--text); font-size: 14.5px; }
.bh-f select, .bh-f input.text-start { text-align: left; }
.bh-f .bh-ro { background: var(--surface-2); color: var(--text-2); }
.bh-sum-lg { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; margin-top: 14px; font-size: 14px; }
.bh-sum-lg .bh-pay { font-size: 15.5px; padding-top: 8px !important; }
.bh-file { display: flex; align-items: center; gap: 6px; margin-top: 12px; border: 1.5px dashed #C9D2DE; border-radius: 10px; padding: 9px 12px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.bh-file:hover { border-color: var(--primary); color: var(--primary); }
/* Phase 10J (his OK): phone items — short list + bottom sheet; PC keeps the table */
.it-list, .it-list-add, .it-sheet-bg, .it-sheet-ft { display: none; }
@media (max-width: 767.98px) {
  #bill-form .it-table { border: 0; overflow: visible; min-height: 0; flex: 0 0 auto !important; }
  #bill-form #lines tbody tr:not(.it-edit) { display: none; }
  .it-card { min-height: 0; }
  .it-list { display: block; margin-top: 4px; }
  .il-g { border-top: 1px solid var(--border); } .il-g:first-child { border-top: 0; }
  .il { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; border: 0; background: none; padding: 10px 2px; text-align: left; color: var(--text); }
  .il-t { display: flex; flex-direction: column; min-width: 0; } .il-t b { font-size: 14.5px; } .il-t small { color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
  .il-a { font-weight: 700; white-space: nowrap; }
  .il-kids { padding: 0 0 8px 12px; }
  .il-k { display: flex; width: 100%; justify-content: space-between; border: 0; background: var(--surface-2); border-radius: 8px; padding: 7px 10px; margin-top: 4px; font-size: 13px; color: var(--text); }
  .il-empty { color: var(--text-2); font-size: 13px; padding: 10px 2px; }
  .it-list-add { display: flex; gap: 8px; margin-top: 6px; }
  .it-la { flex: 1; border: 1.5px dashed #6366F1; background: var(--primary-soft); color: var(--primary); border-radius: 10px; padding: 9px; font-weight: 700; font-size: 13.5px; }
  .it-la-cam { flex: 0 0 64px; }
  body.it-sheet-on .it-sheet-bg { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1060; }
  body.it-sheet-on { overflow: hidden; }
  #lines tbody tr.it-edit { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1061; background: var(--surface); border-radius: 20px 20px 0 0;
    padding: 38px 16px 84px 16px !important; max-height: 85vh; overflow: auto; box-shadow: 0 -10px 30px rgba(15,23,42,.2); }
  #lines tbody tr.it-edit::before { content: 'Edit item'; position: absolute; top: 12px; left: 16px; font-size: 12px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
  #lines tbody tr.it-edit::after { content: ''; position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: #CBD5E1; }
  #lines tr.it-edit td.it-no, #lines tr.it-edit td:last-child { display: none; }
  #lines tr.it-edit td.it-prod { padding-right: 0 !important; }
  #lines tr.it-edit td:has(.qty), #lines tr.it-edit td:has(.unit), #lines tr.it-edit td:has(.rate) { display: inline-flex; flex-direction: column; vertical-align: top; margin-top: 8px; }
  #lines tr.it-edit td:has(.qty)::before { content: 'Qty'; } #lines tr.it-edit td:has(.unit)::before { content: 'Unit'; } #lines tr.it-edit td:has(.rate)::before { content: 'Rate'; }
  #lines tr.it-edit td:has(.qty)::before, #lines tr.it-edit td:has(.unit)::before, #lines tr.it-edit td:has(.rate)::before { font-size: 11px; font-weight: 600; color: var(--text-2); margin-bottom: 3px; }
  #lines tr.it-edit .it-in { max-width: 120px; padding: 8px 10px; }
  #lines tr.it-edit td.amt { font-size: 16px; padding-top: 10px !important; }
  #lines tr.it-edit td.amt::before { content: 'Amount  '; font-size: 12px; font-weight: 600; color: var(--text-2); white-space: pre; }
  body.it-sheet-on .it-sheet-ft { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1062; background: var(--surface); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
  body.it-sheet-on .ai-fab, body.it-sheet-on .os-foot { visibility: hidden; }
}
@media (max-width: 767.98px) {
  #lines tbody tr.it-edit td { background: transparent !important; box-shadow: none !important; }
  #lines tr.it-edit td:has(.qty), #lines tr.it-edit td:has(.unit), #lines tr.it-edit td:has(.rate) { width: 31%; margin-right: 1%; }
  #lines tr.it-edit .it-in { max-width: none; width: 100%; }
  #lines tr.it-edit .it-unit { border: 1px solid #C9D2DE; border-radius: 10px; padding: 8px 6px; background: var(--surface); width: 100%; }
}
/* Phase 10J: short chip for a purchase fabric line (colour · rolls · m) — the colour and lengths boxes live in Roll-wise entry */
#lines .it-more .colour, #lines .it-more .lengths { display: none !important; }
.it-rolls.on { background: var(--primary-soft); border-style: solid; }
/* Phase 10J: phone — currency / rate / supplier bill no. in a sheet; PC unchanged */
.hd-more, .hd-x-h, .hd-x-done, .hd-x-bg { display: none; }
.hd-x { display: contents; }
@media (max-width: 767.98px) {
  .hd-more { display: flex; width: 100%; justify-content: space-between; align-items: center; border: 1px dashed #C9D2DE; background: var(--surface-2); border-radius: 10px; padding: 9px 12px; font-size: 13.5px; color: var(--text); text-align: left; }
  .hd-more i { color: var(--primary); }
  .hd-x { display: none; }
  body.hd-sheet-on .hd-x { display: flex; flex-direction: column; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1061; background: var(--surface); border-radius: 20px 20px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(15,23,42,.2); }
  body.hd-sheet-on .hd-x > .os-f { flex: 0 0 auto !important; width: 100% !important; }
  body.hd-sheet-on .hd-x-h { display: block; font-weight: 700; font-size: 15px; }
  body.hd-sheet-on .hd-x-done { display: block; }
  body.hd-sheet-on .hd-x-bg { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1060; }
  body.hd-sheet-on { overflow: hidden; } body.hd-sheet-on .os-foot, body.hd-sheet-on .ai-fab { visibility: hidden; }
}
/* Phase 10J: phone expense lines — expense + amount on one row, details under it (no side scroll) */
@media (max-width: 767.98px) {
  #elines thead { display: none; }
  #elines, #elines tbody { display: block; }
  #elines tr { display: grid; grid-template-columns: 1.5fr 1fr; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
  #elines td { display: block; padding: 0 !important; border: 0 !important; }
  #elines td:nth-child(3) { grid-column: 1 / -1; }
  #elines td:nth-child(3) input::placeholder { color: var(--text-2); }
}
/* Phase 10J: expense — quick add chips, Add line, "for month" chips */
.ex-quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px 8px; border-bottom: 1px solid var(--border); }
.ex-ql { font-size: 11.5px; font-weight: 700; color: var(--text-2); margin-right: 2px; }
.ex-q { border: 1px solid #C9D2DE; background: var(--surface); border-radius: 999px; padding: 3px 11px; font-size: 12.5px; color: var(--text); }
.ex-q.mo { background: var(--primary-soft); border-color: #C7D2FE; color: var(--primary); font-weight: 600; }
.ex-q:hover { border-color: var(--primary); }
.ex-add { display: block; width: calc(100% - 20px); margin: 8px 10px 10px; border: 1.5px dashed #6366F1; background: var(--primary-soft); color: var(--primary); border-radius: 10px; padding: 7px; font-weight: 700; font-size: 13px; }
.em-months { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; align-items: center; }
.em-l { font-size: 11px; font-weight: 700; color: var(--text-2); margin-right: 2px; }
.em-m { border: 0; border-radius: 7px; padding: 2px 8px; font-size: 11.5px; font-weight: 700; }
.em-m.pd { background: #DCFCE7; color: #166534; } .em-m.pt { background: #FEF3C7; color: #92400E; } .em-m.du { background: #FEE2E2; color: #991B1B; }
.em-m.fu { background: var(--surface-2); color: var(--text-2); } .em-m.pk { background: var(--primary); color: #fff; }
/* Phase 10J: Monthly expenses screen */
.mx-sum { display: flex; flex-wrap: wrap; gap: 10px; }
.mx-k { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; min-width: 180px; }
.mx-k span { font-size: 12px; color: var(--text-2); } .mx-k b { font-size: 17px; }
.mx-tbl th { font-size: 11.5px; color: var(--text-2); white-space: nowrap; } .mx-tbl th.mx-now { color: var(--primary); }
.mx-m { display: inline-block; border-radius: 8px; padding: 3px 8px; font-size: 11.5px; font-weight: 700; min-width: 58px; text-align: center; text-decoration: none; white-space: nowrap; }
.mx-m.paid { background: #DCFCE7; color: #166534; } .mx-m.part { background: #FEF3C7; color: #92400E; }
.mx-m.due { background: #FEE2E2; color: #991B1B; } a.mx-m.due:hover, a.mx-m.part:hover { outline: 2px solid currentColor; }
.mx-m.future, .mx-m.na { background: var(--surface-2); color: var(--text-2); font-weight: 600; }
@media (max-width: 767.98px) { #elines td { background: transparent !important; box-shadow: none !important; } }
/* Phase 10J: kista (EMI) */
.k-rem { background: #FFF7ED; border: 1px solid #FDBA74; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; }
.k-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.k-card { padding: 14px; text-decoration: none; color: var(--text); } .k-card:hover { border-color: var(--primary); }
.k-tag { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.k-tag.late { background: #FEE2E2; color: #991B1B; } .k-tag.soon { background: #FEF3C7; color: #92400E; } .k-tag.ok { background: #DCFCE7; color: #166534; }
.k-bar { height: 7px; background: var(--surface-2); border-radius: 9px; margin: 10px 0 5px; overflow: hidden; } .k-bar i { display: block; height: 100%; background: var(--primary); border-radius: 9px; }
.k-calc { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; font-size: 13px; } .k-calc:empty { display: none; }
.k-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; } .k-facts span { display: block; font-size: 12px; color: var(--text-2); } .k-facts b { font-size: 14.5px; }
.mx-m.k-next { background: #FEF3C7; color: #92400E; outline: 1.5px solid #F59E0B; }
/* Phase 10J: a pop-up opened from a line's bottom sheet (Rolls, colour box) must sit above the sheet */
body.it-sheet-on .modal, body.hd-sheet-on .modal { z-index: 1075; }
body.it-sheet-on .modal-backdrop, body.hd-sheet-on .modal-backdrop { z-index: 1070; }
/* Phase 11: container tracking */
.tr-head { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.tr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
@media (max-width: 575.98px) { .tr-list { grid-template-columns: 1fr; } }
.tr-card { padding: 14px; color: var(--text); text-decoration: none; } .tr-card:hover { border-color: var(--primary); } .tr-card.tr-done { opacity: .7; }
.tr-steps { display: flex; gap: 3px; margin: 10px 0 6px; } .tr-steps i { flex: 1; height: 7px; border-radius: 5px; background: var(--surface-2); }
.tr-steps i.d { background: var(--primary); } .tr-steps i.c { background: #F59E0B; }
.tl { position: relative; padding-left: 26px; list-style: none; margin: 4px 0 8px; } .tl:before { content: ''; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.tl li { position: relative; padding: 4px 0 9px; } .tl li:before { content: ''; position: absolute; left: -22px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: #CBD5E1; box-shadow: 0 0 0 3px var(--surface); }
.tl li.d:before { background: var(--primary); } .tl li.c:before { background: #F59E0B; box-shadow: 0 0 0 3px #FEF3C7; }
.tl li b { font-size: 13.5px; } .tl .tl-note { font-size: 12.5px; color: var(--text-2); }
.tl-doc { display: inline-block; background: var(--surface-2); border-radius: 7px; padding: 1px 8px; font-size: 11.5px; margin: 3px 4px 0 0; text-decoration: none; color: var(--text); }
/* Phase 11: supplier claims */
.k-tag.blue { background: #E0E7FF; color: #3730A3; }
.cl-tbl tr.cl-on td { background: #FFFBEB; }
/* Phase 12: party rate hints under a bill line */
.it-hint { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; } .it-hint:empty { display: none; }
.it-hint span { font-size: 11.5px; border-radius: 7px; padding: 1px 7px; }
.ih-last { background: #DCFCE7; color: #166534; } .ih-list { background: #E0E7FF; color: #3730A3; } .ih-warn { background: #FEF3C7; color: #92400E; }
.ih-hist { border: 0; background: var(--surface-2); border-radius: 7px; padding: 0 6px; font-size: 12px; }
/* Phase 12: cash flow plan */
.cf-bars { display: flex; gap: 6px; align-items: stretch; overflow-x: auto; padding-bottom: 4px; }
.cf-col { flex: 1 0 70px; display: flex; flex-direction: column; align-items: center; color: inherit; border-radius: 10px; padding: 6px 2px; }
.cf-col.on { background: var(--surface-2, #f1f5f9); outline: 1px solid #c7d2fe; }
.cf-pair { height: 150px; display: flex; align-items: flex-end; gap: 4px; }
.cf-pair span { width: 18px; border-radius: 5px 5px 0 0; min-height: 2px; }
.cf-in { background: #22c55e; } .cf-out { background: #f87171; }
.cf-lbl { font-size: 11.5px; color: #64748b; margin-top: 4px; text-align: center; white-space: nowrap; }
.cf-bal { font-size: 12.5px; font-weight: 700; }
.cf-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
/* Phase 12: business type cards */
.biz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.biz-opt { position: relative; display: flex; flex-direction: column; border: 2px solid var(--bs-border-color); border-radius: 14px; padding: 12px; cursor: pointer; margin: 0; }
.biz-opt:has(input[type=checkbox]:checked) { border-color: #4f46e5; background: #eef2ff; }
.biz-opt input[type=checkbox] { position: absolute; right: 10px; top: 10px; }
.biz-opt.biz-other { border-style: dashed; cursor: default; }
.biz-ic { font-size: 24px; } .biz-opt b { margin: 4px 0 2px; font-size: 14px; } .biz-about { font-size: 12px; color: var(--bs-secondary-color); line-height: 1.4; }
[data-bs-theme=dark] .biz-opt:has(input[type=checkbox]:checked) { background: rgba(79, 70, 229, .18); }
.cf-kpi .fs-5 { white-space: nowrap; } @media (max-width: 575px) { .cf-kpi .fs-5 { font-size: 1rem !important; } }
/* StockPro dashboard: RMB to pay / bank margin pop (hides after 5 s), ≈ Rs on chips */
#fx-pop { transition: opacity .4s ease, transform .4s ease; } #fx-pop.fx-out { opacity: 0; transform: translateY(-6px); }
.fcy-npr { margin-left: 4px; font-weight: 500; }
.wc-list { border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 6px; }
.wc-li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text); } .wc-li + .wc-li { margin-top: 4px; }
.wc-li b { white-space: nowrap; }
.fx-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; color: var(--text) !important; text-decoration: none !important; }
/* StockPro reminders: Agenda */
.rem-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); }
.rem-tab { padding: 8px 2px; font-weight: 600; color: var(--text-2); text-decoration: none !important; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.rem-tab.on { color: var(--bs-primary, #4f46e5); border-bottom-color: currentColor; }
.ag-head { font-size: 13px; color: var(--text-2); margin: 14px 0 6px; }
.ag-pill { border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; margin-right: 6px; background: var(--surface-2); }
.ag-pill.late { background: #fde2e2; color: #b91c1c; } .ag-pill.tod { background: #fdf0d9; color: #92400e; }
.ag-item { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.ag-item.is-late { border-left: 4px solid #f59e0b; background: linear-gradient(90deg, rgba(254, 226, 226, .55), var(--surface) 40%); }
.ag-item.is-chq, .ag-item.is-today { border-left: 4px solid #22c55e; }
.ag-ic { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; background: #fde7d7; color: #c2410c; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.ag-ic.chq { background: #dcfce7; color: #15803d; }
.ag-body { flex: 1; min-width: 0; } .ag-name { font-size: 15px; }
.ag-tag { border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.ag-tag.promise { background: #fdecd9; color: #9a3412; } .ag-tag.chq { background: #dcfce7; color: #166534; }
.ag-amt { font-weight: 800; font-size: 15px; white-space: nowrap; }
.ag-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 330px; }
.ag-wa { background: #4ade80; color: #fff !important; border-color: #4ade80; } .ag-pi { background: #e7f6ec; color: #15803d !important; border: 1px solid #c8ebd3; }
.ag-done { background: #e0e7ff; color: #3730a3 !important; border: 1px solid #e0e7ff; }
[data-bs-theme=dark] .ag-item.is-late { background: linear-gradient(90deg, rgba(127, 29, 29, .35), var(--surface) 40%); }
@media (max-width: 767.98px) { .ag-item { flex-wrap: wrap; } .ag-body { flex-basis: calc(100% - 54px); } .ag-amt { order: 2; width: 100%; padding-left: 54px; } .ag-acts { order: 3; max-width: none; width: 100%; justify-content: flex-start; } }
/* StockPro look: empty page with icon + 3 feature cards; Loan Accounts cards */
.empty-hero { text-align: center; padding: 40px 20px; align-items: center; }
.empty-hero > p { max-width: 520px; margin: 0 auto; }
.eh-ic { width: 96px; height: 96px; border-radius: 24px; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; font-size: 40px; color: var(--primary); background: linear-gradient(135deg, #eef2ff, #fdf6e9); }
.eh-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; width: 100%; max-width: 880px; margin: 28px auto 0; text-align: left; }
.eh-f { border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.eh-f i { color: var(--primary); font-size: 18px; } .eh-f span { color: var(--text-2); font-size: 13px; }
.ln-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.ln-card { padding: 16px 18px; } .ln-card.is-closed { opacity: .7; }
.ln-ic { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; background: #fde7e7; color: #b91c1c; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.ln-ic.given { background: #dcfce7; color: #15803d; }
.ln-st { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 10px; background: #dcfce7; color: #15803d; white-space: nowrap; } .ln-st.closed { background: var(--surface-2); color: var(--text-2); }
.ln-out { font-size: 24px; font-weight: 800; color: #b91c1c; }
.ln-tiles, .ec-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.ln-tiles > div, .ec-out > div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.ln-tiles span, .ec-out span { display: block; font-size: 12px; color: var(--text-2); font-weight: 600; } .ln-tiles b, .ec-out b { font-size: 14px; }
/* StockPro rule: "+ New / + Add" sits top-right of the page and opens a pop-up; same button look everywhere */
.page-head .btn-primary, .page-actions .btn-primary, .btn-primary[data-bs-toggle="modal"], .btn-primary[id$="New-btn"] {
  border-radius: 10px; font-weight: 600; padding: .5rem 1.05rem; box-shadow: 0 8px 18px -6px rgba(37, 99, 235, .55); }
.page-head .btn-outline-secondary, .page-actions .btn-outline-secondary { border-radius: 10px; font-weight: 600; padding: .5rem 1.05rem; background: var(--surface); }
/* Phase 13A: readymade sizes on the product form */
.sz-box { border: 1px dashed var(--border); border-radius: 12px; padding: 10px 12px; }
.sz-grid input { min-width: 54px; } .sz-packs { display: grid; gap: 8px; }
#pColTable.sz-on .c-open { display: none; }
.sz-bill .sz-q { width: 58px; text-align: center; border: 1px solid var(--border); border-radius: 8px; padding: 4px; background: var(--surface); }
.sz-bill .sz-add { margin: 0 2px; }
/* Phase 13B: dealer orders */
.do-tag { border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 700; display: inline-block; }
.do-list { font-size: 13.5px; }
.do-tag.t1 { background: #e0e7ff; color: #3730a3; } .do-tag.t2 { background: #fef3c7; color: #92400e; } .do-tag.t3 { background: #dcfce7; color: #166534; }
/* Phase 13C: shop counter */
.pos-wrap { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 991.98px) { .pos-wrap { grid-template-columns: 1fr; } }
.pos-search { position: relative; } .pos-search > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--text-2); }
.pos-search input { padding-left: 46px; border-radius: 12px; }
.pos-drop { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.12); max-height: 320px; overflow: auto; }
.pos-opt { display: flex; gap: 8px; width: 100%; border: 0; background: none; text-align: left; padding: 9px 12px; font-size: 14px; }
.pos-opt.on, .pos-opt:hover { background: var(--surface-2); }
.pos-cart input { width: 60px; text-align: center; border: 1px solid var(--border); border-radius: 8px; padding: 4px; background: var(--surface); }
.pos-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pos-tiles > div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; font-size: 12.5px; } .pos-tiles span { display: block; color: var(--text-2); }
.pos-sum > div { display: flex; justify-content: space-between; } .pos-big { font-size: 30px; font-weight: 800; }
.pos-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pos-modes button { border: 2px solid var(--border); border-radius: 12px; padding: 10px 6px; font-weight: 700; background: var(--surface); }
.pos-modes button.on { border-color: #4f46e5; background: #eef2ff; color: #3730a3; }
#pos-pay { padding: 14px; font-size: 17px; }
@media (max-width: 575.98px) { .pos-cart th:nth-child(3), .pos-cart td:nth-child(3) { display: none; } .pos-cart td, .pos-cart th { padding: 6px 4px; font-size: 13px; } .pos-cart input { width: 46px; } }
#lines tbody tr.it-hl > td { background: #EEF2FF; transition: background .3s; }
#lines .it-ed { color: var(--bs-primary, #2563EB); }
/* Dec 1 (his photo 2): Party Details pop-up */
.pc-pop { border-radius: 20px; overflow: hidden; }
.pc-head { border-bottom: 1px solid var(--border, #E2E8F0); padding: 16px 22px; }
.pc-ic { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; color: #475569; text-decoration: none; font-size: 17px; }
.pc-ic:hover { background: #F1F5F9; }
.pc-body { background: #F4F6FA; padding: 18px 22px; max-height: 62vh; overflow: auto; }
.pc-card { background: #fff; border-radius: 14px; box-shadow: 0 1px 3px rgba(15,23,42,.08); overflow: hidden; }
.pc-acts { display: flex; border-top: 1px solid #EEF2F7; }
.pc-acts a { flex: 1 1 0; text-align: center; padding: 12px 6px; font-weight: 600; font-size: 14px; color: #3B5BDB; text-decoration: none; border-left: 1px solid #EEF2F7; background: #F8FAFC; }
.pc-acts a:first-child { border-left: 0; }
.pc-acts a.pc-call { background: #5CC16B; color: #fff; }
.pc-acts a.pc-call.off { background: #E2E8F0; color: #475569; }
.pc-chip { border: 1px solid #E2E8F0; background: #fff; border-radius: 999px; padding: 5px 13px; font-size: 13px; font-weight: 600; color: #334155; }
.pc-chip.on { background: #3563E9; border-color: #3563E9; color: #fff; }
.pc-tx { background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(15,23,42,.08); }
.pc-st { display: inline-block; margin-top: 4px; padding: 2px 9px; border-radius: 7px; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.pc-st.ok { background: #DCFCE7; color: #15803D; } .pc-st.warn { background: #FEF3C7; color: #B45309; } .pc-st.bad { background: #FEE2E2; color: #B91C1C; } .pc-st.info { background: #E0E7FF; color: #3730A3; }
.pc-tools a, .pc-tools button { border: 0; background: none; color: #475569; padding: 4px 6px; border-radius: 8px; text-decoration: none; font-size: 15px; }
.pc-tools a:hover, .pc-tools button:hover { background: #F1F5F9; }
.pc-tools .text-danger { color: #DC2626 !important; }
.pc-foot { display: flex; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--border, #E2E8F0); flex-wrap: nowrap; }
.pc-pay, .pc-add { flex: 1 1 0; text-align: center; padding: 12px; border-radius: 999px; font-weight: 700; color: #fff; text-decoration: none; }
.pc-pay { background: #3563E9; } .pc-add { background: #E2504C; }
.pc-pay:hover, .pc-add:hover { color: #fff; filter: brightness(.95); }
.pc-bell { flex: 0 0 48px; height: 48px; border-radius: 50%; border: 2px solid #3563E9; background: #fff; color: #3563E9; font-size: 18px; }
@media (max-width: 575.98px) { .pc-acts a { font-size: 12px; padding: 10px 4px; } .pc-body { max-height: none; padding: 14px; } .pc-foot { gap: 8px; padding: 10px 14px; } }
.pc-pay, .pc-add { white-space: nowrap; }
@media (max-width: 575.98px) { .pc-pay, .pc-add { font-size: 14px; padding: 11px 8px; } }
.pc-tx[data-href] { cursor: pointer; } .pc-tx[data-href]:hover { outline: 1.5px solid #3563E9; }
/* Dec 1 (his photo 2): record details pop-up */
.rv-dialog { max-width: 620px; }
.rv-pop { border-radius: 20px; overflow: hidden; }
.rv-head { padding: 16px 22px; border-bottom: 1px solid #E2E8F0; }
.rv-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid #E2E8F0; background: #F8FAFC; }
.rv-strip > div { padding: 12px 16px; border-left: 1px solid #E2E8F0; } .rv-strip > div:first-child { border-left: 0; }
.rv-k { font-size: 12px; color: #64748B; font-weight: 600; } .rv-v { font-weight: 700; } .rv-s { font-size: 12px; color: #64748B; }
.rv-body { background: #F4F6FA; padding: 14px 16px; }
.rv-box { background: #fff; border-radius: 14px; padding: 12px 14px; }
.rv-fs { border: 1px solid #CBD5E1; border-radius: 12px; padding: 4px 12px 8px; font-size: 17px; }
.rv-fs legend { float: none; width: auto; font-size: 12px; font-weight: 600; color: #334155; padding: 0 4px; margin: 0; }
.rv-money { background: #EEF2F7; border-radius: 14px; padding: 12px 14px; }
.rv-link { border: 0; background: #fff; color: #3B5BDB; font-weight: 600; font-size: 13px; border-radius: 999px; padding: 4px 12px; margin-left: 6px; box-shadow: 0 1px 2px rgba(15,23,42,.08); }
.rv-line { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #E2E8F0; }
.rv-line:last-of-type { border-bottom: 0; }
.rv-ic { width: 36px; height: 36px; border-radius: 10px; background: #FFF4E5; color: #C2410C; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; }
.rv-th { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: #F1F5F9; flex: 0 0 44px; }
.rv-th img { width: 100%; height: 100%; object-fit: cover; }
.rv-foot { display: flex; border-top: 1px solid #E2E8F0; }
.rv-b { flex: 1 1 0; text-align: center; padding: 14px 8px; font-weight: 700; color: #334155; background: #fff; border: 0; text-decoration: none; }
.rv-b:hover { background: #F8FAFC; color: #0F172A; }
.rv-b.rv-edit { background: linear-gradient(90deg, #3563E9, #5B4FE0); color: #fff; }
.rv-b.off { opacity: .45; cursor: not-allowed; }
.rv-msg { background: #F1F5F9; border-radius: 12px; padding: 14px 16px; white-space: pre-wrap; font-size: 14px; }
.pc-fcy { background: #FFF7E0; border: 1px solid #F5D98B; border-radius: 12px; padding: 9px 14px; color: #7C4A03; }
/* Dec 1 (his StockPro Cheques & Bank photos) */
.cq-top { border-radius: 12px; font-weight: 600; padding: 8px 16px; background: #fff; }
.cq-in { background: #DCFCE7 !important; color: #15803D !important; border: 1px solid #BBF7D0 !important; }
.cq-out { background: #FEE2E2 !important; color: #B91C1C !important; border: 1px solid #FECACA !important; }
.cq-tabs { display: flex; gap: 28px; border-bottom: 1px solid #E2E8F0; }
.cq-tabs a { padding: 10px 2px; color: #64748B; font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cq-tabs a.on { color: #2563EB; border-bottom-color: #2563EB; }
.cq-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 991.98px) { .cq-kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575.98px) { .cq-kpis { grid-template-columns: repeat(2, 1fr); } .cq-tabs { gap: 14px; overflow-x: auto; white-space: nowrap; } }
.cq-kpi { background: #fff; border: 1px solid #E2E8F0; border-radius: 14px; padding: 14px 16px; }
.cq-kpi .k { font-size: 13px; color: #475569; } .cq-kpi .v { font-size: 20px; font-weight: 800; margin-top: 4px; }
.cq-search { position: relative; flex: 0 1 380px; } .cq-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94A3B8; }
.cq-search input { padding-left: 34px; border-radius: 10px; }
.cq-table thead th { background: #F8FAFC; font-size: 12px; letter-spacing: .04em; color: #475569; text-transform: uppercase; }
.cq-ph { width: 40px; height: 48px; border-radius: 8px; background: #F1F5F9; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; color: #64748B; }
.cq-ph img { width: 100%; height: 100%; object-fit: cover; }
.cq-st { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.cq-pend { background: #FEF3E2; color: #B45309; } .cq-ok { background: #DCFCE7; color: #15803D; } .cq-bad { background: #FEE2E2; color: #B91C1C; } .cq-grey { background: #F1F5F9; color: #475569; }
.cq-b { border: 1px solid #E2E8F0; background: #fff; border-radius: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 9px; white-space: nowrap; color: #1E293B; }
.cq-b:hover { background: #F8FAFC; } .cq-b.cq-clr { background: #E0E7FF; color: #3730A3; border-color: #C7D2FE; } .cq-b.cq-bnc { color: #B91C1C; }
.cq-eye { color: #64748B; padding: 4px 6px; }
.cq-pop { border-radius: 18px; } .cq-pop .modal-footer { background: #F8FAFC; }
.cq-info { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cq-info > div { background: #F1F5F9; border-radius: 10px; padding: 8px 10px; min-width: 0; }
.cq-info .k { font-size: 12px; color: #64748B; } .cq-info .v { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 575.98px) { .cq-info { grid-template-columns: repeat(2, 1fr); } }
.cq-lines { border: 1px solid #E2E8F0; border-radius: 12px; overflow: hidden; }
.cq-lines thead th { background: #F8FAFC; font-size: 12px; text-transform: uppercase; color: #475569; }
/* Dec 1 (his photo): dashboard header in one row, party bar in one row */
@media (min-width: 992px) { .dash-head h1 { font-size: 27px; white-space: nowrap; } .dash-head .date-chip { white-space: nowrap; } .dash-actions .btn { font-size: 14px; padding: 7px 12px; white-space: nowrap; } }
.pt-search { position: relative; min-width: 220px; } .pt-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #94A3B8; }
.pt-search input { padding-left: 38px; border-radius: 10px; height: 40px; }
.pt-bar .form-select { border-radius: 10px; height: 40px; min-width: 160px; }
/* Dec 1 (his StockPro Party To Party Transfer photos) */
.ptx-dialog { max-width: 640px; } .ptx-pop { border-radius: 20px; }
.ptx-card { border: 1px solid #E2E8F0; border-radius: 14px; padding: 14px 16px; background: #fff; }
.ptx-seg { display: inline-flex; background: #F1F5F9; border-radius: 12px; padding: 4px; gap: 2px; }
.ptx-seg button { border: 0; background: none; border-radius: 9px; padding: 7px 16px; font-weight: 600; color: #475569; }
.ptx-type.on { background: #3563E9; color: #fff; }
.ptx-side { border-radius: 999px; } .ptx-side button { border-radius: 999px; }
.ptx-s.on[data-s="received"] { background: #4CAF50; color: #fff; } .ptx-s.on[data-s="paid"] { background: #E26A3B; color: #fff; }
.ptx-mirror { border: 1px solid #E2E8F0; border-radius: 12px; padding: 6px 12px; }
.ptx-fcy { background: #F5F7FB; border: 1px solid #E2E8F0; border-radius: 12px; padding: 12px 14px; }
.ptx-b { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.ptx-b.paid { background: #FEE2E2; color: #B91C1C; } .ptx-b.recv { background: #DCFCE7; color: #15803D; }
.ptx-kind { background: #EAF2FF; color: #334155; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.ptx-table thead th { background: #F8FAFC; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #475569; }
/* Dec 1 (his rule): one small BS date box in the whole ERP */
.bsbox-sm { display: inline-flex; width: auto; max-width: min(260px, 100%); min-width: 0; min-height: 40px; padding: 2px 4px 2px 10px; gap: 8px; vertical-align: middle; }
.bsbox-sm .bsbox-lab { font-size: 10px; font-weight: 800; letter-spacing: .06em; color: var(--primary); background: var(--primary-soft); border-radius: 6px; padding: 2px 6px; }
.bsbox-sm .bsbox-in { font-size: 14.5px; width: 96px; min-width: 0; max-width: 100%; }
.bsbox-sm .bsbox-r { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.bsbox-sm .bsbox-ad { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.bsbox-sm .bsbox-cal, .bsbox-sm .bsbox-l { flex-shrink: 0; }
.bsbox-sm .bsbox-cal { width: 30px; height: 30px; font-size: 14px; }
.bsbox-bad { border-color: #DC2626 !important; box-shadow: 0 0 0 3px rgba(220,38,38,.15); }
.bsbox .bscal { z-index: 1080; }
.bsbox-sm .bscal { left: 0; right: auto; }

/* Phase 14: production lot step bar (Planned → Cutting → Stitching → Finishing → Ready) */
.fx-steps { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; }
.fx-steps form { margin: 0; display: flex; }
.fx-step { display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 6px 10px; border: 1px solid var(--border, #E2E8F0); border-radius: 10px;
    background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 600; white-space: nowrap; text-align: center; }
button.fx-step { cursor: pointer; }
button.fx-step:hover { border-color: var(--primary); color: var(--primary); }
.fx-step.done { background: #ECFDF5; border-color: #A7F3D0; color: #047857; }
.fx-step.now { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, .25); }
@media (max-width: 575.98px) { .fx-step { font-size: 12px; padding: 6px 8px; min-height: 34px; } }

/* Phase 15A: "New import purchase" pop-up (his StockPro photos) */
.imp-dialog { max-width: 1320px; }
.imp-pop .modal-body { background: var(--bg, #F6F8FB); }
.imp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.imp-side { position: sticky; top: 0; }
.imp-main, .imp-side { min-width: 0; }
@media (max-width: 767.98px) {
    .imp-t thead { display: none; } .imp-t, .imp-t tbody, .imp-t tfoot { display: block; width: 100%; }
    .imp-t tr.imp-l { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 36px; gap: 6px 8px; padding: 10px 10px 6px; border-top: 1px solid var(--border, #E2E8F0); }
    .imp-t tr.imp-l > td { display: block; border: 0; padding: 0; }
    .imp-t tr.imp-l > td:first-child { display: none; } .imp-t tr.imp-l > td.imp-dc { grid-column: 1 / 4; } .imp-t tr.imp-l > td:last-child { grid-column: 4; grid-row: 1; }
    .imp-t tr.imp-l > td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: var(--text-2); font-weight: 600; text-align: left; }
    .imp-t tr.imp-sub { display: block; } .imp-t tr.imp-sub > td { display: block; border: 0; padding: 0 10px 10px; } .imp-t tr.imp-sub > td:first-child { display: none; }
    .imp-t tfoot tr { display: flex; justify-content: space-between; padding: 8px 10px; } .imp-t tfoot td:empty { display: none; } .imp-t tfoot td { border: 0; padding: 0; }
    .imp-tw { overflow: visible; }
}
@media (max-width: 575.98px) { .imp-crh, .imp-cr { grid-template-columns: minmax(0, 1fr) 64px 86px 28px !important; } .imp-cr .imp-rwb { grid-column: 1 / -1; } .imp-card { padding: 14px; } .imp-t .imp-sub td:first-child { display: none; } }
@media (max-width: 991.98px) { .imp-grid { grid-template-columns: 1fr; } .imp-side { position: static; } }
.imp-card { background: var(--surface); border: 1px solid var(--border, #E2E8F0); border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.imp-h { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.imp-paste { font-size: 12.5px; font-weight: 600; }
.imp-bank { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--primary-soft); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.imp-kgt { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border, #E2E8F0); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.imp-tw { border: 1px solid var(--border, #E2E8F0); border-radius: 12px; }
.imp-t thead th { background: var(--surface-2); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; }
.imp-t .imp-sub td { border-top: 0; padding-top: 0; }
.imp-rp { border: 1px dashed #BFD0EA; border-radius: 12px; background: color-mix(in srgb, var(--primary) 4%, transparent); padding: 10px 12px; }
.imp-crh, .imp-cr { display: grid; grid-template-columns: minmax(110px, 1.4fr) 80px 100px 30px auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.imp-cr input { min-width: 0; width: 100%; }
.imp-rwb { border: 1px dashed var(--primary); color: var(--primary); background: var(--surface); border-radius: 8px; font-size: 12px; font-weight: 600; padding: 4px 8px; white-space: nowrap; justify-self: start; }
.imp-rwb.on { border-style: solid; background: var(--primary-soft); }
.imp-ch { border: 1px dashed var(--border, #E2E8F0); border-radius: 12px; padding: 12px; }
.imp-dl { margin: 0; }
.imp-dl > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; font-size: 13.5px; }
.imp-dl > div.sep { border-top: 1px solid var(--border, #E2E8F0); margin-top: 4px; padding-top: 10px; }
.imp-dl dt { font-weight: 500; color: var(--text-2); }
.imp-dl dd { margin: 0; font-weight: 700; text-align: right; }
.imp-dl dd input { width: 120px; }
.imp-big { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; padding: 18px; border-radius: 14px; color: #fff;
    background: linear-gradient(135deg, #2563EB, #4F46E5 60%, #6D28D9); box-shadow: 0 8px 22px rgba(79, 70, 229, .3); }
.imp-big span { font-size: 13px; font-weight: 600; opacity: .9; }
.imp-big b { font-size: 22px; text-align: right; }
.imp-rw { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; z-index: 20; border-radius: inherit; padding: 12px; }
.imp-rw-box { background: var(--surface); border-radius: 18px; padding: 20px; width: min(640px, 100%); max-height: 100%; overflow: auto; box-shadow: 0 20px 50px rgba(15, 23, 42, .3); }
.imp-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.imp-chip button { border: 0; background: transparent; color: inherit; padding: 0; font-weight: 700; }
.rw-dl { background: var(--surface-2); border-radius: 12px; padding: 6px 14px; }
.imp-st { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.imp-st.ok { background: #ECFDF5; color: #047857; }
.imp-open { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.imp-open:hover { background: var(--primary); color: #fff; }
.it-sug .sg.on, .it-sug > div:hover { background: var(--primary-soft); }
/* the small BS date box sits under its label, like every other box */
.form-label ~ .bsbox-sm { display: flex; width: fit-content; max-width: 100%; }
.imp-main .it-search { min-width: 0; } .imp-main .it-search input { min-width: 0; flex: 1; }

/* Phase 15B: Import landing as a StockPro pop-up */
.lp-back { position: fixed; inset: 0; z-index: 1040; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.lp-dlg { background: var(--surface); width: min(1180px, 100%); max-height: calc(100vh - 32px); border-radius: 20px; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(15, 23, 42, .3); overflow: hidden; }
.lp-head { padding: 18px 22px; border-bottom: 1px solid var(--border, #E2E8F0); }
.lp-body { padding: 18px 22px 0; overflow-y: auto; flex: 1; }
.lp-foot { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; padding: 12px 0 16px; margin-top: 16px; background: var(--surface); border-top: 1px solid var(--border, #E2E8F0); z-index: 2; }
.lp-draft { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.lp-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lp-steps li { display: flex; align-items: center; gap: 6px; }
.lp-steps li + li::before { content: ''; width: 22px; height: 1px; background: var(--border, #CBD5E1); }
.lp-step { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border, #E2E8F0); border-radius: 999px; padding: 5px 14px 5px 6px; font-size: 13.5px; font-weight: 600; color: var(--text-2); text-decoration: none; background: var(--surface); }
.lp-n { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface-2); font-size: 12px; }
.lp-step.on { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.lp-step.on .lp-n { background: var(--primary); color: #fff; }
.lp-step.done { color: var(--text); } .lp-step.done .lp-n { background: #16A34A; color: #fff; }
.lp-body .card { border-radius: 16px; }
.lp-card { border: 1px solid var(--border, #E2E8F0); border-radius: 14px; padding: 14px; }
.lp-add { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.lp-decl { background: var(--primary-soft); border-radius: 10px; padding: 8px 12px; }
@media (max-width: 575.98px) { .lp-back { padding: 0; } .lp-dlg { max-height: 100vh; height: 100%; border-radius: 0; } .lp-steps li + li::before { display: none; } }
.lp-foot .btn { white-space: nowrap; } @media (max-width: 575.98px) { .lp-foot { gap: 6px; } .lp-foot .btn { padding: 6px 10px; font-size: 14px; } .lp-head h1 { font-size: 17px; } }

/* Phase 18 (his StockPro photos, Dec 2): import view pop-up, landing steps, pay-supplier pop-up */
.iv-tip { background: var(--primary-soft); color: var(--text); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.iv-tip .bi { color: var(--primary); margin-right: 4px; }
.iv-pay th { font-size: 12.5px; color: var(--text-2); font-weight: 600; white-space: nowrap; }
.iv-mode { display: inline-block; background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 1px 9px; font-weight: 600; font-size: 12.5px; }
.iv-held { color: #B45309; font-weight: 600; }
.iv-strip { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 8px; border-top: 1px dashed var(--border, #E2E8F0); color: var(--text-2); }
.iv-strip b { color: var(--text); }
.shp-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; gap: 0; overflow-x: auto; }
.shp-steps li { flex: 1 1 0; min-width: 92px; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; font-size: 12.5px; color: var(--text-2); padding: 0 4px; }
.shp-steps li::before { content: ''; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--border, #E2E8F0); z-index: 0; }
.shp-steps li:first-child::before { display: none; }
.shp-steps li.d::before, .shp-steps li.c::before { background: var(--primary); }
.shp-n { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--border, #CBD5E1); font-weight: 700; font-size: 12.5px; position: relative; z-index: 1; margin-bottom: 4px; }
.shp-steps li.d .shp-n { background: var(--primary); border-color: var(--primary); color: #fff; }
.shp-steps li.c .shp-n { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.shp-steps li.c .shp-l { color: var(--primary); font-weight: 700; }
.shp-d { font-size: 11.5px; color: var(--text-3, #94A3B8); }
.iv-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.iv-tiles > div { border: 1px solid var(--border, #E2E8F0); border-radius: 12px; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.iv-tiles > div.hl { background: var(--primary-soft); border-color: transparent; }
.iv-tiles span { font-size: 12.5px; color: var(--text-2); }
.iv-tiles b { font-size: 15px; }
@media (max-width: 767.98px) { .iv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.iv-items thead th { font-size: 12.5px; color: var(--text-2); }
.iv-items tfoot td { border-top: 2px solid var(--border, #CBD5E1); }
.iv-paper { display: grid; grid-template-columns: minmax(140px, 220px) 1fr auto; gap: 8px; }
@media (max-width: 575.98px) { .iv-paper { grid-template-columns: 1fr; } }
.lw-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 991.98px) { .lw-grid { grid-template-columns: minmax(0, 1fr); } }
.lw-sub { background: var(--surface-2, #F8FAFC); border: 1px dashed var(--border, #CBD5E1); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.lw-sum { background: var(--surface-2, #F1F5F9); border-radius: 12px; padding: 10px 14px; }
.lw-sum > div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 14px; }
.lw-sum > #lw-parts { display: block; padding: 0; }
#lw-parts > div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 14px; }
#lw-parts > div > span:last-child { font-weight: 600; text-align: right; white-space: nowrap; }
.lw-sum > div.tot { border-top: 1px solid var(--border, #CBD5E1); margin-top: 4px; padding-top: 8px; font-size: 15.5px; font-weight: 600; }
.lw-sum > div > span:last-child { font-weight: 600; text-align: right; white-space: nowrap; }
.lw-who { background: var(--primary-soft); border-radius: 12px; padding: 8px 10px; margin: 4px 0 10px; }
.lw-who .lbl { font-size: 13px; font-weight: 600; } .lw-who .lbl small { font-weight: 400; color: var(--text-2); }
.lw-t th { font-size: 12px; text-transform: uppercase; letter-spacing: .02em; color: var(--text-2); font-weight: 600; white-space: nowrap; }
.lw-t td input { min-width: 70px; }
.lw-t .yc { background: var(--primary-soft); }
.lw-note { font-size: 12.5px; color: var(--text-2); }
.lw-cost td.pu { color: var(--primary); font-weight: 600; }
.lw-np { border: 1px solid var(--border, #E2E8F0); border-radius: 14px; padding: 12px 14px; margin-top: 14px; }
.ps-dlg { width: min(940px, 100%); }
@media (max-width: 575.98px) { .lp-foot { flex-wrap: wrap; } .lp-foot .ms-auto { flex-basis: 100%; height: 0; margin: 0 !important; } .lp-foot .btn-primary { flex: 1 1 auto; } }
.ps-box { background: var(--surface-2, #F1F5F9); border: 1px solid var(--border, #E2E8F0); border-radius: 14px; padding: 12px 14px; }
.ps-sum > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; }
.ps-sum > div > span:last-child { font-weight: 700; white-space: nowrap; }
.ps-sum > div.tot { border-top: 1px solid var(--border, #CBD5E1); margin-top: 4px; padding-top: 8px; font-size: 16px; }
.ps-sum .ps-n { font-size: 12.5px; color: var(--text-2); }
/* Phase 15C: margin chips, stamp & signature */
.imp-kpi { display: inline-flex; flex-direction: column; gap: 2px; border: 1px solid var(--border, #E2E8F0); background: var(--surface); border-radius: 14px; padding: 10px 16px; font-size: 12.5px; color: var(--text-2); text-decoration: none; min-width: 170px; }
.imp-kpi b { font-size: 17px; color: var(--text); } .imp-kpi.on, .imp-kpi:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.imp-co { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border-radius: 12px; padding: 12px; font-size: 13px; }
.imp-img { height: 110px; border: 1px dashed var(--border, #CBD5E1); border-radius: 12px; display: grid; place-items: center; overflow: hidden; } .imp-img img { max-width: 100%; max-height: 100px; object-fit: contain; }
.imp-pd summary { cursor: pointer; }
/* Dec 2: New reminder pop-up (StockPro) */
.rem-seg { display: flex; gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 4px; }
.rem-sg { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 7px 10px; font-weight: 600; font-size: 13.5px; color: var(--text-2); }
.rem-sg.on { background: var(--surface); color: var(--primary); box-shadow: 0 1px 4px rgba(15, 23, 42, .12); }
.rem-chip { border: 1px solid var(--border, #E2E8F0); background: var(--surface); border-radius: 999px; padding: 5px 14px; font-size: 13.5px; font-weight: 600; }
.rem-chip.on, .rem-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* ═══ Dec 2 (his ask): Liquid glass + mouse motion — html.lg-on (user menu → Liquid glass on / off) ═══ */
html.lg-on body { background:
    radial-gradient(900px 600px at 8% -10%, rgba(99, 102, 241, .16), transparent 60%),
    radial-gradient(800px 600px at 105% 10%, rgba(14, 165, 233, .14), transparent 60%),
    radial-gradient(900px 700px at 50% 115%, rgba(168, 85, 247, .12), transparent 60%), var(--bg); background-attachment: fixed; }
html.lg-on .topbar { background: rgba(255, 255, 255, .62) !important; backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border-bottom: 1px solid rgba(255, 255, 255, .7); }
html.lg-on .sidebar { background: rgba(255, 255, 255, .58) !important; backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%); border-right: 1px solid rgba(255, 255, 255, .7); }
html.lg-on .card, html.lg-on .imp-card, html.lg-on .lp-card, html.lg-on .imp-kpi {
    background: linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .62)); border: 1px solid rgba(255, 255, 255, .75);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06), inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(15, 23, 42, .03); }
html.lg-on .modal-content, html.lg-on .lp-dlg, html.lg-on .dropdown-menu { background: rgba(255, 255, 255, .82); backdrop-filter: blur(26px) saturate(190%); -webkit-backdrop-filter: blur(26px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 30px 70px rgba(15, 23, 42, .22), inset 0 1px 0 rgba(255, 255, 255, .95); }
html.lg-on .modal-backdrop.show { opacity: 1; background: rgba(15, 23, 42, .28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
html.lg-on .lp-back { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); background: rgba(15, 23, 42, .28); }
html.lg-on .bnav { background: rgba(255, 255, 255, .7) !important; backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); }
html.lg-on .btn-primary { background: linear-gradient(180deg, #4F8BFF, #2563EB 55%, #4338CA); border-color: rgba(255, 255, 255, .25);
    box-shadow: 0 6px 18px rgba(37, 99, 235, .32), inset 0 1px 0 rgba(255, 255, 255, .45); }
html.lg-on .btn-light, html.lg-on .it-soft, html.lg-on .lp-add { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9); }
/* the shine that follows the mouse */
html.lg-on :is(.card, .imp-card, .lp-card, .imp-kpi, .btn, .nav-item, .chip, .ag-item, .rem-chip, .lp-step, .rem-tab, .hub-tab, .set-tab, .dropdown-item) { position: relative; }
.lg-shine { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s ease; z-index: 1;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(37, 99, 235, .10), rgba(37, 99, 235, .04) 35%, transparent 65%); }
.btn .lg-shine, .nav-item.active .lg-shine { background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .45), transparent 70%); }
.btn-light .lg-shine, .btn-outline-secondary .lg-shine, .it-soft .lg-shine, .lp-add .lg-shine { background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(37, 99, 235, .14), transparent 70%); }
html.lg-on .lg-hot > .lg-shine { opacity: 1; }
html:not(.lg-on) .lg-shine { display: none; }
html.lg-on .card, html.lg-on .imp-kpi, html.lg-on .ag-item, html.lg-on .btn { transition: transform .2s ease, box-shadow .2s ease; }
html.lg-on .imp-kpi.lg-hot, html.lg-on .ag-item.lg-hot, html.lg-on a.card.lg-hot { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(15, 23, 42, .10), inset 0 1px 0 rgba(255, 255, 255, .95); }
html.lg-on .btn.lg-hot { transform: translateY(-1px); }
/* dark mode glass */
html.lg-on[data-bs-theme="dark"] .topbar, html.lg-on[data-bs-theme="dark"] .sidebar, html.lg-on[data-bs-theme="dark"] .bnav { background: rgba(15, 23, 42, .6) !important; border-color: rgba(255, 255, 255, .08); }
html.lg-on[data-bs-theme="dark"] .card, html.lg-on[data-bs-theme="dark"] .imp-card, html.lg-on[data-bs-theme="dark"] .lp-card, html.lg-on[data-bs-theme="dark"] .imp-kpi {
    background: linear-gradient(145deg, rgba(30, 41, 59, .82), rgba(30, 41, 59, .58)); border-color: rgba(255, 255, 255, .08); box-shadow: 0 10px 30px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .06); }
html.lg-on[data-bs-theme="dark"] .modal-content, html.lg-on[data-bs-theme="dark"] .lp-dlg, html.lg-on[data-bs-theme="dark"] .dropdown-menu { background: rgba(30, 41, 59, .85); border-color: rgba(255, 255, 255, .08); }
html.lg-on[data-bs-theme="dark"] .lg-shine { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(147, 197, 253, .12), transparent 65%); }
@media (prefers-reduced-motion: reduce) { html.lg-on .card, html.lg-on .btn, html.lg-on .imp-kpi { transition: none; transform: none !important; } }
@media print { .lg-shine { display: none !important; } html.lg-on body { background: #fff; } }
.imp-kpi:hover { text-decoration: none; }

/* ═══ Dec 2 (his ask, StockPro feel): hover — lines change colour, cards and buttons lift; item lists follow the mouse ═══ */
@media (hover: hover) {
    .table > tbody > tr { transition: background-color .15s ease; }
    .table > tbody > tr:hover > * { background-color: color-mix(in srgb, var(--primary) 6%, var(--surface)) !important; }
    .table > tbody > tr:hover > :first-child { box-shadow: inset 3px 0 0 var(--primary); }
    .btn { transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, filter .15s ease; }
    .btn:not(:disabled):not(.disabled):hover { transform: translateY(-1px); }
    .btn-primary:not(:disabled):hover, .btn-success:not(:disabled):hover, .btn-danger:not(:disabled):hover { filter: brightness(1.06); box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 30%, transparent); }
    .btn-light:not(:disabled):hover, .btn-outline-secondary:not(:disabled):hover { box-shadow: 0 4px 12px rgba(15, 23, 42, .08); }
    a.card, .card[data-view], .imp-kpi, .ag-item, .list-group-item-action, .pc-card, .rem-chip, .lp-step, .chip, .dash-card, .stat-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
    a.card:hover, .card[data-view]:hover, .imp-kpi:hover, .ag-item:hover, .pc-card:hover, .dash-card:hover, .stat-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15, 23, 42, .10); border-color: color-mix(in srgb, var(--primary) 35%, var(--border, #E2E8F0)); }
    .list-group-item-action:hover { background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
    .nav-item { transition: background-color .15s ease, transform .15s ease; } .nav-item:hover { transform: translateX(2px); }
    .dropdown-item { transition: background-color .12s ease, padding-left .12s ease; } .dropdown-item:hover { background: var(--primary-soft); color: var(--primary); padding-left: 1.25rem; }
}
.btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
/* item / party lists: the line under the mouse (or the arrow keys) lights up */
.it-sug .sg, .it-sug > div[data-i] { transition: background-color .12s ease, box-shadow .12s ease; }
.it-sug .sg.on, .it-sug .sg:hover, .it-sug > div[data-i]:hover { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.it-sug .sg.on .sg-av, .it-sug .sg:hover .sg-av { background: var(--primary); color: #fff; border-color: var(--primary); }
/* mouse wheel on a number box: a small pulse so you see it changed */
@keyframes wheelBump { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 40%, transparent); } 100% { box-shadow: 0 0 0 6px transparent; } }
.wheel-bump { animation: wheelBump .35s ease-out; }
@media (prefers-reduced-motion: reduce) { .btn, .card, .imp-kpi, .ag-item, .nav-item { transition: none !important; transform: none !important; } }

/* Dec 3 2026: company switcher pill + list (Bibek's reference) */
.co-pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 11px; border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--border)); background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 13.5px; max-width: 260px; }
.co-pill:hover { background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
.co-pill-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-pill-chev { font-size: 11px; transition: transform .15s ease; }
.co-pill[aria-expanded="true"] .co-pill-chev { transform: rotate(180deg); }
@media (max-width: 575.98px) { .co-pill { width: 38px; padding: 0; justify-content: center; border-radius: 10px; } }
.co-dd { width: 300px; padding: 6px; }
.co-dd-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 8px; font-size: 14.5px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.co-dd-count { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.co-dd-list { max-height: 320px; overflow-y: auto; }
.co-dd-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; color: var(--text); }
.co-dd-item:hover { background: var(--surface-2); }
.co-dd-item.on { background: var(--primary-soft); }
.co-av { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; font-size: 12px; font-weight: 800;
    color: var(--co); background: color-mix(in srgb, var(--co) 14%, var(--surface)); }
.co-dd-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.co-dd-txt b { font-size: 13.5px; overflow-wrap: anywhere; }
.co-dd-txt small { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.co-dd-tick { color: var(--primary); font-size: 16px; }
.co-dd-foot { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; }
.co-dd-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text-2); text-decoration: none; font-size: 13.5px; }
.co-dd-link:hover { background: var(--surface-2); color: var(--text); }
.co-dd-link i { color: var(--muted); width: 16px; text-align: center; }
.dropdown-menu.co-dd, html.lg-on .dropdown-menu.co-dd { background: var(--surface) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: 0 18px 40px -12px rgba(15,23,42,.28); }

/* Dec 3 2026: dashboard lower cards like Bibek's StockPro photos */
.dw-card { border-radius: 18px; }
.dw-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px 14px; flex-wrap: wrap; }
.dw-toggle { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; padding: 6px 13px; font-size: 13px; font-weight: 600; }
.dw-toggle:hover { background: var(--surface-2); }
.dw-toggle[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.dw-table thead th { background: var(--surface-2); color: var(--muted); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; padding: 12px 14px; border-bottom: 0; }
.dw-table td { padding: 12px 14px; font-size: 13.5px; border-color: var(--border); }
.dw-table td:first-child, .dw-table th:first-child { padding-left: 20px; }
.dw-table td:last-child, .dw-table th:last-child { padding-right: 20px; }
.dw-party { min-width: 180px; color: var(--text-2); }
.dw-inv { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.dw-inv b { display: block; font-size: 14px; white-space: nowrap; } .dw-inv small { display: block; color: var(--muted); font-size: 12px; }
.dw-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; font-size: 14px; }
.dw-ic.in { background: color-mix(in srgb, var(--success, #16a34a) 13%, var(--surface)); color: var(--success, #16a34a); }
.dw-ic.out { background: color-mix(in srgb, #f59e0b 16%, var(--surface)); color: #d97706; }
#stock-moves .dw-ic.out { background: color-mix(in srgb, var(--danger, #dc2626) 12%, var(--surface)); color: var(--danger, #dc2626); }
.dw-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.dw-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dw-pill.ok { background: color-mix(in srgb, #16a34a 13%, var(--surface)); color: #15803d; }
.dw-pill.part { background: color-mix(in srgb, #f59e0b 16%, var(--surface)); color: #b45309; }
.dw-pill.due { background: color-mix(in srgb, #dc2626 12%, var(--surface)); color: #b91c1c; }
.dw-move { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.dw-move:last-child { border-bottom: 0; }
.dw-rank { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; font-size: 13.5px; }
.dw-no { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; font-size: 12px; font-weight: 800; background: var(--surface-2); color: var(--text-2); }
.dw-no.r1 { background: #fef3c7; color: #b45309; } .dw-no.r2 { background: #e2e8f0; color: #475569; } .dw-no.r3 { background: #ffedd5; color: #c2410c; }
.dw-empty { min-height: 120px; display: grid; place-items: center; color: var(--muted); font-size: 13.5px; }

/* Dec 3 2026: Low stock alert like StockPro */
.dw-ic.low { background: color-mix(in srgb, #f59e0b 16%, var(--surface)); color: #d97706; }
.dw-ic.zero { background: color-mix(in srgb, #dc2626 12%, var(--surface)); color: #dc2626; }
.dw-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 7px; }
.dw-bar > span { display: block; height: 100%; border-radius: inherit; }
.dw-bar.low > span { background: #f59e0b; } .dw-bar.zero > span { background: #dc2626; }
.dw-reorder { display: inline-block; margin-top: 4px; padding: 2px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 600; text-decoration: none; background: var(--primary-soft); color: var(--primary); }
.dw-reorder:hover { background: var(--primary); color: #fff; }
.dw-empty-ok { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 28px 16px; color: var(--muted); font-size: 13px; }
.dw-empty-ok b { color: var(--text); font-size: 15px; }
.dw-ok-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 8px; font-size: 22px; background: color-mix(in srgb, #16a34a 13%, var(--surface)); color: #16a34a; }
/* Dec 3 2026: item picker with stock (every "Select item" box) */
.ip-wrap { position: relative; }
.ip-hidden { position: absolute !important; left: 0; bottom: 0; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.ip-list .sg { flex-direction: row !important; align-items: center; gap: 12px; padding: 9px 14px !important; }
.ip-list .sg-av { flex-basis: 34px; height: 34px; }
.ip-list .sg-r b { font-size: 13px; } .ip-list .sg-r small { color: var(--muted); font-size: 11px; }
.ip-list .sg.on { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.ip-input { cursor: pointer; }

/* Phase 21: item list extras + scan */
.ip-wrap .ip-input { padding-right: 38px; }
.ip-cam { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); width: 30px; height: 30px; border-radius: 8px; z-index: 2; }
.ip-cam:hover { background: var(--surface-2); color: var(--primary); }
.ip-wrap:has(.form-control-sm) .ip-cam { width: 26px; height: 26px; }
.ip-tag { display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 0 7px; margin-left: 4px; vertical-align: 1px; }
.ip-list .ip-x, .it-sug .ip-x { font-size: 11.5px; color: var(--text-2) !important; }
.scan-ov { position: fixed; inset: 0; z-index: 2000; background: rgba(15,23,42,.72); display: grid; place-items: center; padding: 16px; }
.scan-box { position: relative; width: min(420px, 100%); background: #000; border-radius: 16px; overflow: hidden; text-align: center; color: #fff; }
.scan-box video { width: 100%; display: block; max-height: 60vh; object-fit: cover; }
.scan-box p { margin: 8px 0 4px; font-size: 13px; } .scan-box .btn { margin: 0 0 12px; }
.scan-line { position: absolute; left: 10%; right: 10%; top: 40%; height: 2px; background: #ef4444; box-shadow: 0 0 12px #ef4444; animation: scanmove 1.6s ease-in-out infinite alternate; }
@keyframes scanmove { from { top: 22%; } to { top: 62%; } }
