
:root{
  --primary:#2563eb;--primary-dark:#1d4ed8;--sidebar:#101c2e;--sidebar-2:#17263a;--bg:#f6f8fb;--card:#fff;--text:#172033;--muted:#667085;--line:#e4e9f1;--soft:#f8fafc;
  --green:#16a34a;--red:#dc2626;--amber:#d97706;--purple:#7c3aed;--cyan:#0891b2;--shadow:0 1px 2px rgba(16,24,40,.04),0 5px 18px rgba(16,24,40,.035);
  --sidebar-width:214px;--radius:9px;--topbar-height:52px;
}

/* v4.1.3 — shared courier COD and carry-forward settlement presentation */
.courier-company-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:14px 0}
.courier-company-cod-card{border:1px solid #dce8df;border-top:4px solid #16826f;border-radius:14px;background:#fff;padding:14px;box-shadow:0 7px 20px rgba(25,59,45,.05)}
.courier-company-cod-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:12px}.courier-company-cod-head span{font-size:16px;font-weight:800;color:#17211d}.courier-company-cod-head small{color:#66756d;font-size:11px;text-align:right}
.courier-company-cod-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.courier-company-cod-values>div{min-width:0;border:1px solid #edf2ee;border-radius:9px;padding:8px;background:#fbfdfb}.courier-company-cod-values small{display:block;color:#748179;font-size:10px;line-height:1.2}.courier-company-cod-values b{display:block;margin-top:4px;color:#17211d;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.settlement-carry-forward{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(180px,.7fr) minmax(220px,1.3fr);gap:12px;align-items:end;margin-top:12px;padding:12px;border:1px solid #dce8df;border-radius:12px;background:#f8fcf9}.settlement-carry-forward .field-hint{grid-column:1/-1;margin:0;color:#66756d;font-size:12px;line-height:1.4}
@media(max-width:900px){.courier-company-summary-grid{grid-template-columns:1fr}.courier-company-cod-values{grid-template-columns:repeat(2,minmax(0,1fr))}.settlement-carry-forward{grid-template-columns:1fr 1fr}.settlement-carry-forward .field:last-of-type{grid-column:1/-1}}
@media(max-width:560px){.courier-company-summary-grid{gap:10px;margin:10px 0}.courier-company-cod-card{padding:10px;border-radius:11px}.courier-company-cod-head{margin-bottom:9px}.courier-company-cod-head span{font-size:14px}.courier-company-cod-head small{font-size:9px}.courier-company-cod-values{gap:5px}.courier-company-cod-values>div{padding:6px;border-radius:7px}.courier-company-cod-values small{font-size:8px}.courier-company-cod-values b{font-size:11px}.settlement-carry-forward{grid-template-columns:1fr;padding:9px;gap:8px}.settlement-carry-forward .field:last-of-type{grid-column:auto}.settlement-carry-forward .field-hint{font-size:10px}}
:root[data-theme="dark"]{--bg:#0b1220;--card:#111c2e;--text:#e5edf9;--muted:#96a4b8;--line:#26354a;--soft:#172338;--shadow:0 8px 24px rgba(0,0,0,.18)}
*{box-sizing:border-box}html{font-size:13px}html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--text)}body{font-size:12.5px;line-height:1.45}button,input,select,textarea{font:inherit}.hidden{display:none!important}button{cursor:pointer}.global-search-hidden{display:none!important}
/* Auth */
.auth-screen{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at top left,#1e3a5f,#0f172a 58%)}.auth-card{width:min(420px,100%);background:#fff;padding:26px;border-radius:14px;box-shadow:0 24px 70px rgba(0,0,0,.3)}.auth-card.wide{width:min(650px,100%)}.auth-card h1{margin:10px 0 4px;font-size:22px}.auth-card p{margin:0 0 16px;color:#667085}.auth-card label,.field{display:grid;gap:5px;margin:9px 0;font-size:11.5px;font-weight:650}.logo-mark{width:48px;height:48px;border-radius:10px;background:linear-gradient(135deg,#0ea5e9,#2563eb);display:grid;place-items:center;color:#fff;font-weight:850;font-size:15px;box-shadow:0 8px 22px #2563eb40}.logo-mark.small{width:34px;height:34px;border-radius:8px;font-size:11px;flex:none}
/* Inputs and buttons */
input,select,textarea{width:100%;min-height:34px;padding:7px 9px;border:1px solid var(--line);border-radius:7px;background:var(--card);color:var(--text);transition:.15s}textarea{min-height:66px;resize:vertical}input:focus,select:focus,textarea:focus{outline:0;border-color:#7aa7f8;box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.btn{min-height:33px;border:1px solid transparent;border-radius:7px;padding:6px 11px;font-size:11.5px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:6px;transition:.15s;white-space:nowrap}.btn:hover{transform:translateY(-1px);box-shadow:0 3px 10px rgba(15,23,42,.08)}.btn:disabled{opacity:.55;cursor:not-allowed;transform:none}.btn.primary{background:var(--primary);border-color:var(--primary);color:#fff}.btn.primary:hover{background:var(--primary-dark)}.btn.secondary{background:#334155;border-color:#334155;color:#fff}.btn.success{background:#0f9f6e;color:#fff}.btn.warning{background:#d97706;color:#fff}.btn.ghost{background:var(--card);border-color:var(--line);color:var(--text)}.btn.danger{background:#dc2626;color:#fff}.btn.danger-outline{background:transparent;border-color:#475569;color:#cbd5e1}.btn.sm{min-height:27px;padding:4px 8px;font-size:10.5px;border-radius:6px}.btn.full{width:100%}.actions,.button-row,.top-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.icon-btn{width:32px;height:32px;padding:0;display:inline-grid;place-items:center;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--text);font-size:15px}.icon-btn:hover{background:var(--soft);border-color:var(--line)}
/* Shell/sidebar */
.app-shell{display:grid;grid-template-columns:var(--sidebar-width) minmax(0,1fr);min-height:100vh;transition:grid-template-columns .2s}.sidebar{height:100dvh;position:sticky;top:0;background:linear-gradient(180deg,var(--sidebar),#0d1726);color:#e6edf7;padding:10px 8px;display:flex;flex-direction:column;z-index:40;overflow:hidden}.sidebar-head{display:flex;align-items:center;gap:9px;padding:5px 7px 12px;border-bottom:1px solid rgba(255,255,255,.07)}.sidebar-brand-copy{min-width:0}.sidebar-head strong{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-head small{display:block;color:#9aabc1;font-size:9px;margin-top:1px}.sidebar-version{display:block;color:#64748b;font-size:9px;margin-top:1px}#navMenu{flex:1;min-height:0;overflow:auto;padding:8px 0}.nav-group{margin-bottom:3px}.nav-group-title{width:100%;height:27px;border:0;background:transparent;color:#70819a;padding:3px 9px;font-size:9px;font-weight:750;text-transform:uppercase;letter-spacing:.08em;display:flex;align-items:center;justify-content:space-between}.nav-chevron{transition:.15s}.nav-group.collapsed .nav-chevron{transform:rotate(-90deg)}.nav-group.collapsed .nav-group-items{display:none}.nav-btn{width:100%;height:36px;border:0;background:transparent;color:#c8d3e1;display:flex;align-items:center;gap:9px;text-align:left;padding:0 9px;border-radius:7px;margin:2px 0;font-size:11.5px}.nav-btn:hover{background:rgba(255,255,255,.06);color:#fff}.nav-btn.active{background:#204a7b;color:#fff;box-shadow:inset 3px 0 #38bdf8}.nav-icon{width:20px;text-align:center;font-size:13px}.sidebar-foot{padding:9px 5px 4px;border-top:1px solid rgba(255,255,255,.08)}.sidebar-foot>small{display:block;color:#8fa0b7;font-size:9.5px;margin:0 4px 7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-collapse-btn{width:100%;height:32px;border:0;background:transparent;color:#b8c5d5;display:flex;align-items:center;gap:9px;padding:0 8px;border-radius:7px;font-size:11px;margin-bottom:5px}.sidebar-collapse-btn:hover{background:rgba(255,255,255,.06)}body.sidebar-collapsed .app-shell{grid-template-columns:64px minmax(0,1fr)}body.sidebar-collapsed .sidebar{padding-left:7px;padding-right:7px}body.sidebar-collapsed .sidebar-brand-copy,body.sidebar-collapsed .nav-label,body.sidebar-collapsed .nav-group-title span:first-child,body.sidebar-collapsed .collapse-label,body.sidebar-collapsed .sidebar-foot>small,body.sidebar-collapsed #logoutBtn{display:none}body.sidebar-collapsed .sidebar-head{justify-content:center;padding-left:0;padding-right:0}body.sidebar-collapsed .nav-btn{justify-content:center;padding:0}body.sidebar-collapsed .nav-icon{width:auto}body.sidebar-collapsed .nav-group-title{justify-content:center;height:14px;padding:0}body.sidebar-collapsed .nav-chevron{display:none}body.sidebar-collapsed .sidebar-collapse-btn{justify-content:center}
/* Main/topbar */
.main{min-width:0;padding:0 16px 22px}.topbar{height:var(--topbar-height);margin:0 -16px 12px;padding:0 16px;background:var(--card);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px;position:sticky;top:0;z-index:25}.topbar-left{display:flex;align-items:center;gap:9px;min-width:0}.page-heading{min-width:0}.page-heading h2{margin:0;font-size:18px;line-height:1.15}.breadcrumb{display:flex;gap:5px;color:var(--muted);font-size:9px;margin-top:2px}.page-heading>#pageSubtitle{display:none}.top-actions{margin-left:auto;flex-wrap:nowrap}.global-search{height:32px;width:210px;border:1px solid var(--line);border-radius:7px;background:var(--soft);display:flex;align-items:center;gap:6px;padding:0 8px;color:var(--muted)}.global-search input{min-height:0;height:28px;padding:0;border:0;background:transparent;box-shadow:none;font-size:10.5px}.global-search kbd{font-size:8px;color:var(--muted);white-space:nowrap}.profile-chip{display:flex;align-items:center;gap:7px;padding-left:7px;border-left:1px solid var(--line);min-width:120px}.profile-chip strong{display:block;font-size:10.5px;max-width:110px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile-chip small{display:block;font-size:9px;color:var(--muted)}.profile-avatar{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#dbeafe;color:#1e3a8a;border:1px solid #bfdbfe;font-size:9px;font-weight:800}.notification-btn{position:relative}.notification-dot{position:absolute;right:5px;top:4px;width:5px;height:5px;border-radius:50%;background:#ef4444;border:1px solid var(--card)}.status-badge,.badge{display:inline-flex;align-items:center;padding:2px 7px;border-radius:999px;font-size:9px;font-weight:750}.status-badge{background:#dcfce7;color:#166534}.status-badge.offline{background:#fee2e2;color:#991b1b}.desktop-sidebar-toggle{display:grid}.app-footer{display:flex;justify-content:space-between;color:var(--muted);font-size:9px;padding:14px 4px 0}
/* Cards/panels */
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:9px}.card,.panel,.kpi-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.card{padding:12px}.card .label{font-size:10px;color:var(--muted)}.card .value{font-size:18px;font-weight:800;margin-top:5px}.card .hint{font-size:9px;color:var(--muted);margin-top:4px}.panel{padding:12px;margin-top:10px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:9px}.panel-head h3{margin:0;font-size:13px}.panel-head small{color:var(--muted);font-size:9.5px}.kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}.kpi-card{min-height:98px;padding:12px;display:flex;justify-content:space-between;gap:10px}.kpi-copy{min-width:0}.kpi-label{display:block;color:#475467;font-size:10px;font-weight:650}.kpi-value{display:block;font-size:17px;line-height:1.2;margin-top:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kpi-meta{display:flex;align-items:center;gap:5px;margin-top:7px;font-size:8.5px;color:var(--muted)}.kpi-delta{font-weight:750}.kpi-delta.up{color:#16a34a}.kpi-delta.down{color:#dc2626}.kpi-icon{width:30px;height:30px;border-radius:7px;display:grid;place-items:center;font-size:13px;flex:none}.kpi-icon.blue{background:#eff6ff;color:#2563eb}.kpi-icon.green{background:#ecfdf3;color:#16a34a}.kpi-icon.red{background:#fef2f2;color:#dc2626}.kpi-icon.amber{background:#fffbeb;color:#d97706}
/* Dashboard */
.dashboard-toolbar,.page-toolbar{background:transparent;display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-bottom:10px}.dashboard-title-copy h3,.page-toolbar h3{margin:0;font-size:15px}.dashboard-title-copy p,.page-toolbar p{margin:2px 0 0;color:var(--muted);font-size:9.5px}.dashboard-toolbar-actions,.page-toolbar-actions{display:flex;align-items:flex-end;gap:7px;flex-wrap:wrap}.period-filter,.period-custom,.report-controls{display:flex;align-items:flex-end;gap:7px;flex-wrap:wrap}.compact-field{min-width:135px;margin:0}.compact-field label{font-size:9px}.period-label{display:inline-flex;align-items:center;height:34px;padding:0 9px;border-radius:7px;background:var(--soft);border:1px solid var(--line);color:var(--muted);font-size:9px;font-weight:650}.dashboard-charts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:10px}.chart-panel{margin-top:0;padding:11px;min-width:0}.chart-panel.chart-wide{grid-column:span 2}.chart-box{height:205px;position:relative}.chart-empty{height:100%;display:grid;place-items:center;align-content:center;color:var(--muted);text-align:center}.chart-empty span{font-size:22px}.chart-empty p{font-size:9px}.dashboard-table-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.dashboard-table-grid>.panel:last-child{grid-column:span 2}.dashboard-table{border-radius:7px}.cash-bank-summary{padding:10px 12px}.cash-bank-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0}.cash-bank-grid>div{padding:5px 11px;border-right:1px solid var(--line)}.cash-bank-grid>div:last-child{border:0}.cash-bank-grid span{display:block;color:var(--muted);font-size:9px}.cash-bank-grid strong{display:block;margin-top:7px;font-size:13px}.accent-value{color:var(--primary)}
/* Tables */
.table-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:9px}.table-filters,.search-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.table-filters input,.table-filters select,.search-row input,.search-row select,.table-toolbar>input{width:auto;min-width:135px}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:8px;background:var(--card)}.table{width:100%;border-collapse:collapse;min-width:850px;background:var(--card)}.table.compact{min-width:620px}.table th,.table td{padding:6px 7px;border-bottom:1px solid var(--line);text-align:left;font-size:10px;vertical-align:top;line-height:1.35}.table th{position:sticky;top:0;z-index:2;background:var(--soft);color:#475467;font-size:9px;text-transform:none;font-weight:750;white-space:nowrap}.table tbody tr:hover td{background:rgba(37,99,235,.025)}.table tbody tr:last-child td{border-bottom:0}.table td .actions{gap:4px;flex-wrap:nowrap}.empty-cell{text-align:center!important;padding:24px!important;color:var(--muted)}.badge.red{background:#fee2e2;color:#b42318}.badge.green{background:#dcfce7;color:#15803d}.badge.amber{background:#fef3c7;color:#b45309}.badge.blue{background:#dbeafe;color:#1d4ed8}.badge.gray{background:#f1f5f9;color:#475569}
/* Forms/modal */
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.form-section{padding:9px 0 11px;border-bottom:1px solid var(--line)}.form-section h4{margin:0 0 7px;font-size:12px}.modal{position:fixed;inset:0;background:rgba(15,23,42,.58);display:grid;place-items:center;padding:14px;z-index:100;backdrop-filter:blur(2px)}.modal-panel{width:min(1120px,100%);max-height:94vh;overflow:auto;background:var(--card);border-radius:11px;padding:14px;box-shadow:0 24px 70px rgba(0,0,0,.28)}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;position:sticky;top:-14px;background:var(--card);padding:4px 0 9px;z-index:5;border-bottom:1px solid var(--line)}.modal-head h3{margin:0;font-size:14px}.line-row{display:grid;grid-template-columns:1.05fr 1.5fr .48fr .7fr .7fr auto;gap:6px;align-items:end;margin:6px 0;padding:7px;border:1px solid var(--line);border-radius:8px;background:var(--soft)}.calc-box{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:7px;margin:10px 0}.calc-item{padding:8px;background:var(--soft);border:1px solid var(--line);border-radius:7px}.calc-item small{display:block;color:var(--muted);font-size:9px}.calc-item b{font-size:14px}.notice{padding:9px 11px;border-radius:7px;background:#eff6ff;color:#1e40af;margin:9px 0;font-size:10.5px}.notice.success{background:#ecfdf3;color:#067647}.notice.error{background:#fef3f2;color:#b42318}.sub-panel{margin:10px 0;padding:10px;background:var(--soft)}.check-field label{display:flex;align-items:center;gap:7px}.check-field input{width:auto;min-height:auto}
/* POS/products */
.pos-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(290px,.75fr);gap:10px}.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:8px}.product-tile{border:1px solid var(--line);background:var(--card);border-radius:8px;padding:10px;text-align:left}.product-tile strong{display:block;font-size:11px}.product-tile small{display:block;color:var(--muted);font-size:9px;margin-top:3px}.product-tile .price{font-weight:800;color:var(--primary);margin-top:6px}.cart{position:sticky;top:62px}.cart-line{display:grid;grid-template-columns:1fr auto auto;gap:7px;align-items:center;padding:7px 0;border-bottom:1px solid var(--line)}.cart-line input{width:58px;min-height:29px;padding:4px}
/* Reports */
.report-controls{background:var(--soft);border:1px solid var(--line);border-radius:8px;padding:9px}.report-document{background:var(--card);border:1px solid var(--line);border-radius:9px;padding:18px;color:var(--text);box-shadow:var(--shadow)}.report-header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;border-bottom:2px solid var(--primary);padding-bottom:11px;margin-bottom:13px}.report-header h1{margin:0;color:var(--primary);font-size:20px}.report-header h2{margin:0 0 5px;font-size:15px}.report-header p{margin:3px 0;color:var(--muted);font-size:9px}.report-title-block{text-align:right}.report-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:7px;margin-bottom:12px}.report-metric{border:1px solid var(--line);border-radius:7px;padding:9px;background:var(--soft)}.report-metric small,.report-metric span{display:block;color:var(--muted);font-size:8.5px}.report-metric strong{display:block;font-size:14px;margin:4px 0}.report-chart-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}.report-chart-card{height:210px;border:1px solid var(--line);border-radius:8px;padding:9px}.report-chart-card h3{margin:0 0 5px;font-size:10px}.report-chart-card canvas{max-height:170px}.report-section{margin:13px 0;page-break-inside:avoid}.report-section h3{margin:0 0 6px;color:#1f3d66;font-size:11px}.report-table-wrap{width:100%;overflow:auto}.report-table{width:100%;border-collapse:collapse;font-size:9.5px}.report-table th{background:var(--soft);position:sticky;top:0}.report-table th,.report-table td{border:1px solid var(--line);padding:5px;text-align:left;vertical-align:top}.report-empty{text-align:center!important;color:var(--muted);padding:20px!important}.report-footer{display:flex;justify-content:space-between;gap:16px;border-top:1px solid var(--line);margin-top:14px;padding-top:8px;color:var(--muted);font-size:8.5px}
/* Import/errors/skeleton */
.import-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.import-card{text-align:center;padding:25px}.import-card h3{font-size:14px}.import-card p{color:var(--muted);max-width:420px;margin:0 auto 14px}.import-icon{width:45px;height:45px;border-radius:10px;background:#eff6ff;color:#2563eb;display:grid;place-items:center;margin:0 auto 10px;font-size:22px}.empty{padding:24px;text-align:center;color:var(--muted)}.error-state{min-height:420px;display:grid;place-items:center;align-content:center;text-align:center;color:var(--muted)}.error-state h3{color:var(--text);margin:8px}.error-icon{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#fef2f2;color:#dc2626;font-size:22px;font-weight:800}.skeleton-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:9px}.skeleton-card,.skeleton-panel{background:linear-gradient(90deg,var(--soft),var(--card),var(--soft));background-size:200% 100%;animation:pulse 1.3s infinite;border:1px solid var(--line);border-radius:9px}.skeleton-card{height:96px}.skeleton-panel{height:320px;margin-top:10px}@keyframes pulse{to{background-position:-200% 0}}
/* Toast/scanner/print */
.toast-root{position:fixed;right:14px;top:14px;z-index:200;display:grid;gap:7px}.toast{background:#172033;color:#fff;padding:9px 12px;border-radius:7px;box-shadow:0 10px 30px rgba(0,0,0,.2);max-width:340px;font-size:10.5px}.toast.success{background:#067647}.toast.error{background:#b42318}.scanner-panel{width:min(600px,100%)}#scannerVideo{width:100%;max-height:65vh;background:#111;border-radius:8px}.mobile-only{display:none}.admin-create-box{margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}#adminCreatePanel{margin-top:7px;padding:10px;border:1px solid var(--line);border-radius:8px;background:#f8fafc}html.modal-open,body.modal-open{overflow:hidden!important;height:100%!important}.modal-panel{-webkit-overflow-scrolling:touch}
/* Existing invoice/receipt */
.receipt{font-family:monospace;color:#000;background:#fff}.receipt h2,.receipt p{text-align:center}.receipt table{width:100%;border-collapse:collapse}.receipt td,.receipt th{padding:4px;border-bottom:1px dashed #999;font-size:11px}.invoice-a4{color:#000;background:#fff}.invoice-a4 table{width:100%;border-collapse:collapse}.invoice-a4 th,.invoice-a4 td{border:1px solid #ccc;padding:7px}
@media(max-width:1300px){.kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.dashboard-charts{grid-template-columns:repeat(3,minmax(0,1fr))}.cash-bank-grid{grid-template-columns:repeat(3,1fr);row-gap:8px}.cash-bank-grid>div:nth-child(3n){border-right:0}}
@media(max-width:1050px){.global-search{display:none}.profile-chip{min-width:auto}.profile-chip>div:last-child{display:none}.kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.dashboard-charts{grid-template-columns:repeat(2,minmax(0,1fr))}.chart-panel.chart-wide{grid-column:span 2}.dashboard-table-grid{grid-template-columns:1fr}.dashboard-table-grid>.panel:last-child{grid-column:auto}.grid4{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.mobile-only{display:inline-grid}.desktop-sidebar-toggle{display:none}.app-shell{grid-template-columns:1fr}.sidebar{position:fixed;left:-230px;width:214px;transition:.2s}.sidebar.open{left:0}.main{padding:0 10px 18px}.topbar{margin:0 -10px 10px;padding:0 10px}.top-actions .status-badge,.top-actions #installBtn{display:none}.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.grid2,.grid3,.grid4,.pos-layout{grid-template-columns:1fr}.line-row{grid-template-columns:1fr 1fr}.cart{position:static}.report-chart-grid{grid-template-columns:1fr}.report-chart-card{height:190px}.dashboard-toolbar,.page-toolbar{align-items:flex-start;flex-direction:column}.dashboard-toolbar-actions,.page-toolbar-actions{width:100%}.period-filter{width:100%}.compact-field{flex:1;min-width:130px}.import-grid{grid-template-columns:1fr}.modal{padding:0}.modal-panel{width:100%;height:100dvh;max-height:100dvh;border-radius:0;padding:12px 12px 90px}.modal-head{top:-12px}.mobile-form-actions{position:sticky;bottom:-90px;margin:12px -12px -90px;padding:10px 12px 18px;background:var(--card);border-top:1px solid var(--line)}}
@media(max-width:620px){.topbar{height:auto;min-height:52px;padding-top:6px;padding-bottom:6px}.top-actions{gap:3px}.top-actions #quickSaleBtn{padding:5px 8px}.page-heading h2{font-size:15px}.breadcrumb{display:none}.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.kpi-card{min-height:88px;padding:9px}.kpi-value{font-size:14px}.dashboard-charts{grid-template-columns:1fr}.chart-panel.chart-wide{grid-column:auto}.chart-box{height:190px}.cash-bank-grid{grid-template-columns:repeat(2,1fr)}.cash-bank-grid>div:nth-child(odd){border-right:1px solid var(--line)}.cash-bank-grid>div:nth-child(even){border-right:0}.table-filters,.table-toolbar,.search-row{align-items:stretch}.table-filters input,.table-filters select,.search-row input,.search-row select,.table-toolbar>input{width:100%;min-width:0}.table-toolbar>.actions{width:100%}.table-toolbar>.actions .btn{flex:1}.report-controls{display:grid;grid-template-columns:1fr}.report-controls .btn{width:100%}.report-metrics{grid-template-columns:repeat(2,1fr)}.app-footer{flex-direction:column;gap:3px}}
@media print{@page{size:A4 landscape;margin:10mm}body *{visibility:hidden!important}.print-area,.print-area *{visibility:visible!important}.print-area{position:absolute;left:0;top:0;width:100%;padding:0}.no-print{display:none!important}#professionalReport{border:0;box-shadow:none}.report-chart-grid{grid-template-columns:repeat(3,1fr)}.report-chart-card{height:170px}.report-metrics{grid-template-columns:repeat(4,1fr)}.report-section{break-inside:avoid}}


/* v2.6.0 Courier COD settlement and reconciliation */
.courier-blue-toolbar{border-left:4px solid #1d4ed8;background:linear-gradient(90deg,#eff6ff,#fff)}
.courier-blue-toolbar h3{color:#0b3b78}
.courier-kpis .kpi-card{border-top:3px solid #2563eb}
.courier-chart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:12px}
.courier-settlement-form .settlement-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:14px}
.settlement-summary-panel{position:sticky;top:0;align-self:start;background:#eff6ff;border:1px solid #bfdbfe;border-radius:10px;padding:14px}
.settlement-summary-panel h4{margin-top:0;color:#0b3b78}
.settlement-summary-item{display:flex;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid #dbeafe}
.settlement-summary-item small{color:#475569}.settlement-summary-item b{color:#0b3b78}
.tracking-toolbar{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap}
.tracking-toolbar .field{min-width:190px;flex:1}
.settlement-tracking-table input,.settlement-tracking-table select{min-width:105px;height:30px;font-size:11px}
.settlement-tracking-table .csr-tracking{min-width:145px}
.unmatched-row{background:#fff7ed}
.attachment-list{display:grid;gap:8px;margin-top:10px}
.attachment-row{display:grid;grid-template-columns:minmax(150px,1fr) minmax(150px,1fr) auto;gap:10px;align-items:center;border:1px solid #dbeafe;border-radius:8px;padding:8px;background:#f8fbff}
.attachment-row small{display:block;color:#64748b}
.tracking-checkbox-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.tracking-checkbox-grid label{display:flex;align-items:center;gap:7px;border:1px solid var(--line);padding:8px;border-radius:7px}
.courier-report-document,.courier-document{background:#fff;color:#0f172a}
.courier-doc-header{background:#0b3b78;color:#fff;border-radius:8px;padding:16px;display:flex;justify-content:space-between;gap:20px;margin-bottom:14px}
.courier-doc-header h1,.courier-doc-header h2{margin:0 0 5px}.courier-doc-header p{margin:3px 0;font-size:11px}
.courier-document>section{margin:14px 0}.courier-document>section>h3{background:#dbeafe;color:#0b3b78;padding:8px 10px;border-radius:6px;margin-bottom:7px}
.courier-document footer{display:flex;justify-content:space-between;border-top:1px solid #94a3b8;padding-top:9px;font-size:10px;color:#475569}
.badge.blue{background:#dbeafe;color:#1e40af}
@media(max-width:1100px){
  .courier-settlement-form .settlement-layout{grid-template-columns:1fr}
  .settlement-summary-panel{position:static}
}
@media(max-width:800px){
  .courier-chart-grid{grid-template-columns:1fr}
  .tracking-checkbox-grid{grid-template-columns:1fr}
  .attachment-row{grid-template-columns:1fr}
}
@media print{
  .courier-document{font-size:10px}
  .courier-doc-header{background:#0b3b78!important;color:#fff!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* v2.6.3 automatic settlement payment */
.notice.warning{background:#fff7ed;border-color:#fdba74;color:#9a3412}


/* v2.6.4 courier order cost sync */
.courier-kpis-dense{grid-template-columns:repeat(auto-fit,minmax(185px,1fr))}
.courier-kpis-dense .kpi-card{min-height:105px}
.panel-head small{display:block;color:var(--muted);margin-top:3px}
@media(max-width:700px){
  .courier-kpis-dense{grid-template-columns:1fr 1fr}
}
@media(max-width:430px){
  .courier-kpis-dense{grid-template-columns:1fr}
}


/* v2.6.5 dedicated TCS settlement register */
.tcs-payment-kpis{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
.tcs-settlement-register th{white-space:nowrap}
.tcs-settlement-register td{vertical-align:middle}
.tcs-settlement-view .compact-summary-cards{margin-bottom:12px}
@media(max-width:700px){
  .tcs-payment-kpis{grid-template-columns:1fr 1fr}
}
@media(max-width:430px){
  .tcs-payment-kpis{grid-template-columns:1fr}
}


/* v2.6.7 mobile camera, dashboard width and PWA print fixes */
html,body,#appScreen,.app-shell,.main,#content{width:100%;max-width:100%;min-width:0}
body{overflow-x:hidden}
#content,.panel,.card,.kpi-card,.chart-panel,.dashboard-table-grid,.dashboard-charts{min-width:0;max-width:100%}
canvas,video,img{max-width:100%}
.table-wrap{width:100%;max-width:100%;min-width:0;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.dashboard-table-grid>.panel{min-width:0;overflow:hidden}
.dashboard-table{width:100%;max-width:100%}
#scannerVideo{width:100%;height:min(52vh,430px);object-fit:cover;background:#111;border-radius:10px}
#scannerStatus{overflow-wrap:anywhere;word-break:break-word}
#erpPrintFrame{display:block}

@media(max-width:900px){
  body.sidebar-collapsed .app-shell,.app-shell{display:block;width:100%;max-width:100%}
  .main{width:100%;max-width:100%;min-width:0;overflow:hidden}
  #content{width:100%;max-width:100%;overflow:hidden}
  .dashboard-table-grid{display:block;width:100%}
  .dashboard-table-grid>.panel{width:100%;margin-top:10px}
  .dashboard-charts,.courier-chart-grid{width:100%;max-width:100%}
  .chart-panel,.chart-box{width:100%;max-width:100%}
  .table{width:max-content;min-width:100%}
}
@media(max-width:620px){
  .main{padding-left:8px;padding-right:8px}
  .topbar{margin-left:-8px;margin-right:-8px;padding-left:8px;padding-right:8px;width:calc(100% + 16px)}
  .topbar-left{flex:1;min-width:0}
  .top-actions{flex:none;max-width:64%}
  .top-actions .icon-btn{width:29px;height:29px}
  .dashboard-table .table{min-width:720px}
  .dashboard-table-grid>.panel{overflow:hidden}
  .panel{padding:10px}
  .chart-box{height:180px}
  .modal-panel{overflow-x:hidden}
}


/* v2.6.8 barcode matching, scan feedback, mobile viewport and print */
html,body{width:100%;max-width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%}
input,select,textarea{font-size:16px}
#appScreen,.app-shell,.main,#content{width:100%;max-width:100%;min-width:0}
.kpi-grid,.cards,.dashboard-charts,.dashboard-table-grid{width:100%;max-width:100%;min-width:0}
.kpi-card,.card,.panel,.chart-panel{min-width:0;max-width:100%;overflow:hidden}
.kpi-copy,.kpi-label,.kpi-meta{min-width:0;overflow-wrap:anywhere}
.kpi-value{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.table-wrap{max-width:100%;overflow-x:auto}
#scannerModal .modal-panel{max-width:100vw}
#scannerVideo{width:100%;height:min(55vh,460px);object-fit:cover}
#scannerStatus{font-size:15px;line-height:1.45;overflow-wrap:anywhere}

@media(max-width:620px){
  .main{width:100%;max-width:100%;padding-left:8px;padding-right:8px}
  #content{width:100%;max-width:100%;overflow:hidden}
  .kpi-grid,.cards{grid-template-columns:1fr!important}
  .kpi-card{width:100%;min-height:92px}
  .dashboard-charts,.dashboard-table-grid{display:block;width:100%}
  .dashboard-charts>.chart-panel,.dashboard-table-grid>.panel{width:100%;margin-bottom:10px}
  .dashboard-table .table{min-width:680px}
  .page-toolbar,.dashboard-toolbar{width:100%;max-width:100%}
  .page-toolbar-actions,.dashboard-toolbar-actions{display:grid;grid-template-columns:1fr;width:100%}
  .page-toolbar-actions .btn,.dashboard-toolbar-actions .btn{width:100%}
  .modal-panel{width:100vw;max-width:100vw}
  .product-grid{grid-template-columns:1fr}
}


/* v2.6.9 professional POS and continuous compact camera */
.pos-page{display:grid;gap:14px;width:100%;min-width:0}
.pos-header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 20px;border:1px solid var(--border);border-radius:16px;background:linear-gradient(135deg,#0f172a,#1d4ed8);color:#fff;box-shadow:var(--shadow)}
.pos-header h3{margin:0 0 5px;font-size:22px}.pos-header p{margin:0;opacity:.82}.pos-header-actions{display:flex;gap:8px;flex:none}
.pos-scanner-panel{display:grid;grid-template-columns:minmax(260px,420px) 1fr;gap:14px;align-items:center;padding:12px;border:1px solid #bfdbfe;border-radius:16px;background:#eff6ff;box-shadow:var(--shadow)}
.pos-scanner-preview{position:relative;height:180px;border-radius:13px;overflow:hidden;background:#05070b}
.pos-scanner-preview video{width:100%;height:100%;object-fit:cover;display:block}
.pos-scan-line{position:absolute;left:10%;right:10%;top:50%;height:2px;background:#22c55e;box-shadow:0 0 12px #22c55e;animation:posScanLine 2s ease-in-out infinite}
.pos-scan-corners{position:absolute;inset:18px;border:2px solid rgba(255,255,255,.82);border-left-color:#22c55e;border-right-color:#22c55e;border-radius:10px}
@keyframes posScanLine{0%,100%{transform:translateY(-48px)}50%{transform:translateY(48px)}}
.pos-scanner-info{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px}.pos-scanner-info strong,.pos-scanner-info span{display:block}.pos-scanner-info strong{font-size:17px;margin-bottom:7px}.pos-scanner-info span{color:var(--muted);line-height:1.45}
.pos-cart-panel,.pos-catalog-panel{padding:16px}
.pos-cart-panel .panel-head{align-items:flex-start}.pos-cart-list{display:grid;gap:8px}
.pos-cart-line{display:grid;grid-template-columns:34px minmax(150px,1fr) 126px 110px 34px;gap:10px;align-items:center;padding:10px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.pos-cart-index{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#dbeafe;color:#1d4ed8;font-weight:800}
.pos-cart-product strong,.pos-cart-product small{display:block}.pos-cart-product small{color:var(--muted);margin-top:3px}
.pos-quantity-control{display:grid;grid-template-columns:34px 48px 34px;align-items:center}
.pos-quantity-control button,.pos-quantity-control input{height:34px;border:1px solid var(--border);background:var(--surface);text-align:center}
.pos-quantity-control button{cursor:pointer;font-weight:800}.pos-quantity-control button:first-child{border-radius:8px 0 0 8px}.pos-quantity-control button:last-child{border-radius:0 8px 8px 0}
.pos-line-total{text-align:right}.pos-cart-summary{display:flex;justify-content:space-between;align-items:center;margin-top:12px;padding:13px 15px;border-radius:12px;background:#eff6ff;color:#0f172a}.pos-cart-summary strong{font-size:20px;color:#1d4ed8}
.pos-checkout-actions{margin-top:12px}.pos-empty-cart{display:grid;place-items:center;gap:4px;min-height:120px;border:1px dashed #cbd5e1;border-radius:12px;color:var(--muted)}.pos-empty-cart span{font-size:24px}.pos-empty-cart strong{color:var(--text)}
.pos-catalog-head{align-items:flex-end}.pos-search-tools{display:flex;gap:8px;min-width:min(620px,60%)}.pos-search-tools input{min-width:0;flex:1}
.pos-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin-top:12px}
.pos-product-card{display:flex;flex-direction:column;min-width:0;padding:9px;border:1px solid var(--border);border-radius:13px;background:var(--surface);text-align:left;cursor:pointer;transition:.18s ease;overflow:hidden}
.pos-product-card:hover{transform:translateY(-2px);border-color:#93c5fd;box-shadow:0 8px 20px rgba(37,99,235,.12)}
.pos-product-image{display:grid;place-items:center;width:100%;aspect-ratio:1.3/1;border-radius:10px;background:linear-gradient(135deg,#eff6ff,#dbeafe);color:#1d4ed8;font-size:23px;font-weight:800;overflow:hidden}
.pos-product-image img{width:100%;height:100%;object-fit:cover}
.pos-product-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:36px;margin-top:8px;font-weight:750;line-height:1.25}
.pos-product-meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:4px;color:var(--muted);font-size:11px}.pos-product-card>strong{margin-top:6px;color:#1d4ed8;font-size:15px}

@media(max-width:760px){
  .pos-header{align-items:flex-start;padding:14px}.pos-header h3{font-size:19px}.pos-header p{font-size:12px}.pos-header-actions{width:100%;margin-top:10px}.pos-header{display:block}.pos-header-actions .btn{width:100%}
  .pos-scanner-panel{grid-template-columns:1fr;padding:8px}.pos-scanner-preview{height:150px}.pos-scanner-info{padding:5px 4px}.pos-scanner-info strong{font-size:15px}
  .pos-cart-panel,.pos-catalog-panel{padding:10px}
  .pos-cart-line{grid-template-columns:28px minmax(0,1fr) 104px 30px;gap:7px;padding:8px}.pos-line-total{grid-column:2/4;text-align:left;color:#1d4ed8}.pos-cart-index{width:27px;height:27px}.pos-quantity-control{grid-template-columns:29px 42px 29px}.pos-quantity-control button,.pos-quantity-control input{height:31px}
  .pos-cart-summary{padding:10px;font-size:13px}.pos-cart-summary strong{font-size:16px}
  .pos-catalog-head{display:block}.pos-search-tools{display:grid;grid-template-columns:1fr;min-width:0;width:100%;margin-top:10px}
  .pos-product-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
  .pos-product-card{padding:6px;border-radius:10px}.pos-product-image{border-radius:8px;font-size:18px}.pos-product-name{min-height:31px;font-size:11px}.pos-product-meta{font-size:9px}.pos-product-card>strong{font-size:12px}
}
@media(max-width:360px){
  .pos-product-grid{gap:5px}.pos-product-card{padding:5px}.pos-product-name{font-size:10px}.pos-product-card>strong{font-size:11px}
}


/* v2.7.0 Product and Purchase live barcode scanning */
.input-action-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
.modal-live-scanner{display:grid;grid-template-columns:minmax(230px,360px) minmax(180px,1fr);gap:12px;align-items:center;margin:12px 0;padding:10px;border:1px solid #bfdbfe;border-radius:14px;background:#eff6ff}
.modal-live-preview{position:relative;height:145px;border-radius:11px;overflow:hidden;background:#05070b}
.modal-live-preview video{width:100%;height:100%;object-fit:cover;display:block}
.modal-scan-line{position:absolute;left:10%;right:10%;top:50%;height:2px;background:#22c55e;box-shadow:0 0 10px #22c55e;animation:modalScanMove 1.8s ease-in-out infinite}
.modal-scan-frame{position:absolute;inset:15px;border:2px solid rgba(255,255,255,.78);border-left-color:#22c55e;border-right-color:#22c55e;border-radius:9px}
@keyframes modalScanMove{0%,100%{transform:translateY(-36px)}50%{transform:translateY(36px)}}
.modal-live-info{display:flex;justify-content:space-between;align-items:center;gap:10px}
.modal-live-info strong,.modal-live-info span{display:block}.modal-live-info strong{margin-bottom:6px}.modal-live-info span{color:var(--muted);line-height:1.45}
.purchase-scan-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;padding:11px 13px;border:1px solid #dbeafe;border-radius:12px;background:#f8fbff}
.purchase-scan-toolbar strong,.purchase-scan-toolbar small{display:block}.purchase-scan-toolbar small{margin-top:3px;color:var(--muted)}
@media(max-width:700px){
  .input-action-row{grid-template-columns:1fr}.input-action-row .btn{width:100%}
  .modal-live-scanner{grid-template-columns:1fr;padding:8px}.modal-live-preview{height:135px}
  .modal-live-info{align-items:flex-start}.purchase-scan-toolbar{display:block}.purchase-scan-toolbar .btn{width:100%;margin-top:9px}
}


/* v2.7.1 fast tuned scanner */
#posScannerVideo,.modal-live-preview video,#scannerVideo{
  transform:translateZ(0);
  backface-visibility:hidden;
  will-change:auto;
  image-rendering:auto;
}
.pos-scanner-preview,.modal-live-preview{
  contain:layout paint;
}
.pos-scan-line,.modal-scan-line{
  animation-duration:1.35s;
}

/* v2.8.0 Universal Business ERP */
.module-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px}
.module-check{display:flex;align-items:center;gap:8px;padding:9px 10px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}
.assigned-modules{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:8px}.assigned-modules span{padding:6px 9px;border-radius:999px;background:#e0edff;color:#174ea6;text-transform:capitalize;font-size:12px}
.subscription-lock-banner{position:fixed;left:50%;bottom:14px;transform:translateX(-50%);z-index:9999;display:flex;gap:12px;align-items:center;width:min(760px,calc(100% - 24px));padding:12px 16px;border:1px solid #f59e0b;border-radius:13px;background:#fff7ed;color:#9a3412;box-shadow:0 14px 35px rgba(15,23,42,.2)}
.sale-success-panel{text-align:center;padding:18px}.sale-success-icon{display:grid;place-items:center;width:62px;height:62px;margin:0 auto 10px;border-radius:50%;background:#dcfce7;color:#15803d;font-size:30px;font-weight:900}.sale-success-panel .actions{justify-content:center}
@media(max-width:620px){.subscription-lock-banner{display:block}.module-grid{grid-template-columns:1fr 1fr}}


/* v2.8.1 final retail sale, scanner sound and swipe sidebar */
html,body{min-height:100%;min-height:100dvh}
.app-shell{min-height:100vh;min-height:100dvh}
.main{min-height:100vh;min-height:100dvh}
.sidebar-backdrop{display:none}
body.sidebar-mobile-open{overflow:hidden;touch-action:none}

.retail-sale-form .form-section{margin-bottom:12px}
.retail-sale-form .retail-customer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.retail-sale-form .retail-payment-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.retail-sale-form .calc-box{grid-template-columns:repeat(5,minmax(0,1fr))}
.retail-sale-form .line-row{grid-template-columns:minmax(170px,1.35fr) minmax(140px,1fr) 74px 100px 100px 38px}

@media(max-width:900px){
  .sidebar{
    left:0!important;
    width:min(82vw,280px)!important;
    transform:translateX(-105%);
    transition:transform .22s ease!important;
    will-change:transform;
    box-shadow:16px 0 40px rgba(15,23,42,.26);
  }
  .sidebar.open{transform:translateX(0)}
  .sidebar-backdrop{
    display:block;
    position:fixed;
    inset:0;
    z-index:35;
    background:rgba(15,23,42,.42);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .2s ease,visibility .2s ease;
    backdrop-filter:blur(1px);
  }
  .sidebar-backdrop.open{opacity:1;visibility:visible;pointer-events:auto}
  .sidebar{height:100vh;height:100dvh}
  #navMenu{overscroll-behavior:contain}
}
@media(max-width:700px){
  .retail-sale-form .retail-customer-grid{grid-template-columns:1fr 1fr}
  .retail-sale-form .retail-payment-grid{grid-template-columns:1fr 1fr}
  .retail-sale-form .calc-box{grid-template-columns:repeat(2,minmax(0,1fr))}
  .retail-sale-form .line-row{grid-template-columns:minmax(0,1fr) 72px}
  .retail-sale-form .line-row .field:nth-child(2),
  .retail-sale-form .line-row .field:nth-child(4),
  .retail-sale-form .line-row .field:nth-child(5){grid-column:1/-1}
}
@media(max-width:430px){
  .retail-sale-form .retail-customer-grid,
  .retail-sale-form .retail-payment-grid{grid-template-columns:1fr}
}

/* v2.8.2 */
@media(min-width:901px){
 html,body{height:100%;overflow:hidden}
 .app-shell{height:100vh;height:100dvh;min-height:0}
 .sidebar{position:fixed!important;left:0;top:0;bottom:0;height:100vh!important;height:100dvh!important;overflow:hidden!important;z-index:40}
 .sidebar-inner,.sidebar-content{height:100%;min-height:0}
 #navMenu{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}
 .main{margin-left:var(--sidebar-width,260px);height:100vh;height:100dvh;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
}

/* v2.8.3 product categories */
.link-button{border:0;background:none;color:var(--primary);padding:5px 0;cursor:pointer;font:inherit;font-weight:700}
.link-button:hover{text-decoration:underline}


/* v2.8.4 desktop layout correction */
@media(min-width:901px){
  html,body{height:100%;overflow:hidden}
  .app-shell{
    display:block!important;
    width:100%!important;
    height:100vh!important;
    height:100dvh!important;
    min-height:0!important;
  }
  .sidebar{
    position:fixed!important;
    left:0!important;
    top:0!important;
    bottom:0!important;
    width:var(--sidebar-width)!important;
    height:100vh!important;
    height:100dvh!important;
    overflow:hidden!important;
  }
  .main{
    margin-left:var(--sidebar-width)!important;
    width:calc(100% - var(--sidebar-width))!important;
    max-width:none!important;
    height:100vh!important;
    height:100dvh!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
  body.sidebar-collapsed .sidebar{width:68px!important}
  body.sidebar-collapsed .main{
    margin-left:68px!important;
    width:calc(100% - 68px)!important;
  }
  #content,.page-toolbar,.cards,.panel,.dashboard-charts,.dashboard-table-grid{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
}



/* v2.8.5 protected main account, professional settings and category home */
.protected-main-row{background:linear-gradient(90deg,#eff6ff,#fff)}
.protected-badge{display:inline-flex;margin-left:7px;padding:2px 7px;border-radius:999px;background:#dbeafe;color:#1d4ed8;font-size:10px;font-weight:800}
.btn:disabled{opacity:.55;cursor:not-allowed;pointer-events:none}
.settings-page{display:grid;gap:14px}
.settings-hero{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:20px;border-radius:16px;background:linear-gradient(135deg,#0f172a,#1d4ed8);color:#fff}
.settings-hero h3{margin:0 0 5px;font-size:23px}.settings-hero p{margin:0;opacity:.8}
.settings-license{display:flex;gap:8px;align-items:center}.settings-license span,.settings-license b{padding:7px 10px;border-radius:999px;background:rgba(255,255,255,.14);font-size:11px}
.settings-card{padding:17px;border:1px solid var(--line);border-radius:14px;background:var(--card);box-shadow:var(--shadow)}
.settings-card-head{display:flex;gap:11px;align-items:flex-start;margin-bottom:14px}.settings-card-head h4{margin:0 0 3px;font-size:16px}.settings-card-head p{margin:0;color:var(--muted);font-size:11px}
.settings-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#eff6ff;font-size:18px}
.settings-note,.readonly-setting small{display:block;color:var(--muted);margin-top:7px}
.readonly-setting{padding:10px 11px;border:1px solid var(--line);border-radius:9px;background:var(--soft)}
.category-chip-manager{display:grid;gap:12px}
.category-chip-list{display:flex;flex-wrap:wrap;gap:8px;min-height:42px;padding:12px;border:1px solid var(--line);border-radius:11px;background:var(--soft)}
.category-chip{display:inline-flex;align-items:center;gap:7px;padding:7px 9px;border-radius:999px;background:#fff;border:1px solid #dbe3ef;font-size:11px;font-weight:700}
.category-chip button{display:grid;place-items:center;width:18px;height:18px;border:0;border-radius:50%;background:#fee2e2;color:#b91c1c;padding:0}
.category-add-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.settings-save-bar{position:sticky;bottom:8px;z-index:5;display:flex;justify-content:flex-end;padding:10px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.94);backdrop-filter:blur(8px)}
.category-home{display:grid;gap:14px}
.category-hero{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px;border-radius:15px;background:linear-gradient(135deg,#f8fafc,#e0edff);border:1px solid #cfe0ff}
.category-hero h3{margin:0 0 4px;font-size:22px}.category-hero p{margin:0;color:var(--muted)}
.category-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.category-summary-card{padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--card)}
.category-summary-card small{display:block;color:var(--muted)}.category-summary-card b{display:block;margin-top:4px;font-size:22px}
.category-empty-state{display:grid;place-items:center;text-align:center;min-height:320px;padding:24px}.category-empty-icon{font-size:42px}.category-empty-state h4{margin:8px 0 3px;font-size:18px}.category-empty-state p{max-width:520px;color:var(--muted)}
@media(max-width:700px){
  .settings-hero,.category-hero{display:block}.settings-license{margin-top:12px;flex-wrap:wrap}
  .category-summary-grid{grid-template-columns:1fr}.category-add-row{grid-template-columns:1fr}.settings-save-bar .btn{width:100%}
}


/* v2.8.6 professional accounts and ledger */
.accounts-page{display:grid;gap:14px}
.accounts-hero{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px;border-radius:15px;background:linear-gradient(135deg,#0f172a,#1e40af);color:#fff}
.accounts-hero h3{margin:0 0 4px;font-size:22px}.accounts-hero p{margin:0;opacity:.8}
.accounts-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.accounts-summary-grid article{padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--card)}
.accounts-summary-grid small,.accounts-summary-grid span{display:block;color:var(--muted)}.accounts-summary-grid b{display:block;margin:5px 0;font-size:20px}
.account-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px}
.account-pro-card{padding:15px;border:1px solid var(--line);border-radius:14px;background:var(--card);box-shadow:var(--shadow)}
.account-pro-card.inactive{opacity:.65}
.account-pro-head{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:10px;align-items:center}
.account-pro-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#eff6ff;font-size:20px}
.account-pro-head h4{margin:0;font-size:15px}.account-pro-head span{color:var(--muted);font-size:10px}
.account-pro-balance{margin:14px 0;padding:12px;border-radius:11px;background:linear-gradient(135deg,#f8fafc,#eef4ff)}
.account-pro-balance small{display:block;color:var(--muted)}.account-pro-balance b{display:block;margin-top:4px;font-size:23px}
.account-pro-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.account-pro-stats div{padding:9px;border:1px solid var(--line);border-radius:9px}
.account-pro-stats span{display:block;color:var(--muted);font-size:9px}.account-pro-stats b{display:block;margin-top:3px;font-size:12px}
.account-pro-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:12px}
.ledger-account-head{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:15px;border-radius:13px;background:linear-gradient(135deg,#0f172a,#1d4ed8);color:#fff}
.ledger-account-head h3{margin:2px 0}.ledger-account-head span,.ledger-account-head small{opacity:.8}.ledger-current-balance{text-align:right}.ledger-current-balance small,.ledger-current-balance b{display:block}.ledger-current-balance b{font-size:24px}
.ledger-summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:12px 0}.ledger-summary-grid div{padding:11px;border:1px solid var(--line);border-radius:10px}.ledger-summary-grid small{display:block;color:var(--muted)}.ledger-summary-grid b{display:block;margin-top:4px;font-size:16px}
.ledger-in{color:#15803d;font-weight:700}.ledger-out{color:#b91c1c;font-weight:700}
@media(max-width:760px){
  .accounts-hero{display:block}.accounts-hero .btn{width:100%;margin-top:10px}
  .accounts-summary-grid{grid-template-columns:1fr 1fr}.account-card-grid{grid-template-columns:1fr}
  .ledger-account-head{display:block}.ledger-current-balance{text-align:left;margin-top:12px}.ledger-summary-grid{grid-template-columns:1fr}
}


/* v2.8.7 professional sign-in only */
body.logged-out{overflow:hidden!important;background:#071226!important}
body.logged-out #appShell,
body.logged-out #sidebar,
body.logged-out #sidebarBackdrop,
body.logged-out .topbar,
body.logged-out footer{display:none!important}
.signin-only-screen{
  min-height:100vh;min-height:100dvh;padding:24px;
  background:radial-gradient(circle at 15% 15%,rgba(37,99,235,.36),transparent 33%),radial-gradient(circle at 88% 82%,rgba(14,165,233,.18),transparent 28%),linear-gradient(145deg,#071226,#0f2342 58%,#091426)
}
.signin-shell{
  display:grid;grid-template-columns:minmax(320px,1.2fr) minmax(360px,500px);
  width:min(1120px,100%);min-height:min(720px,calc(100dvh - 48px));margin:0 auto;
  overflow:hidden;border:1px solid rgba(255,255,255,.12);border-radius:26px;background:rgba(255,255,255,.07);
  box-shadow:0 30px 90px rgba(0,0,0,.34);backdrop-filter:blur(14px)
}
.signin-brand-panel{position:relative;display:flex;flex-direction:column;justify-content:center;gap:24px;padding:56px;color:#fff;overflow:hidden}
.signin-brand-panel:after{content:"";position:absolute;width:360px;height:360px;right:-140px;bottom:-150px;border-radius:50%;background:linear-gradient(135deg,rgba(59,130,246,.42),rgba(14,165,233,.06))}
.signin-brand-mark,.signin-mobile-logo{display:grid;place-items:center;width:72px;height:72px;border-radius:20px;background:linear-gradient(135deg,#0ea5e9,#2563eb);box-shadow:0 18px 38px rgba(37,99,235,.38);color:#fff;font-size:25px;font-weight:900}
.signin-brand-panel h1{margin:8px 0;font-size:44px;line-height:1.05}.signin-brand-panel p{max-width:530px;margin:0;color:#cbd5e1;font-size:16px;line-height:1.65}
.signin-kicker{display:block;color:#60a5fa;font-size:10px;font-weight:900;letter-spacing:.15em}.signin-benefits{display:grid;gap:12px;color:#dbeafe;font-size:13px}
.signin-card{display:flex;flex-direction:column;justify-content:center;padding:46px;background:#fff;color:#0f172a}.signin-mobile-logo{display:none;margin-bottom:20px}
.signin-card h2{margin:7px 0 6px;font-size:29px}.signin-card>p{margin:0 0 24px;color:#64748b;line-height:1.55}
.signin-card label{display:grid;gap:7px;margin-bottom:15px;font-size:12px;font-weight:800}.signin-card input{height:50px;border-radius:11px;font-size:14px}
.password-field-wrap{position:relative}.password-field-wrap input{width:100%;padding-right:66px}.password-toggle{position:absolute;right:8px;top:50%;transform:translateY(-50%);border:0;background:#eef4ff;color:#1d4ed8;padding:7px 10px;border-radius:8px;font-weight:800;cursor:pointer}
.signin-button{min-height:52px;margin-top:3px;font-size:15px}.signin-contact-box{display:grid;gap:6px;margin-top:20px;padding:14px;border:1px solid #dbeafe;border-radius:12px;background:#f8fbff}
.signin-contact-box b{font-size:13px}.signin-contact-box span{color:#64748b;font-size:11px;line-height:1.5}.whatsapp-contact-button{display:flex;justify-content:center;align-items:center;min-height:42px;margin-top:5px;border-radius:9px;background:#128c4a;color:#fff;text-decoration:none;font-size:12px;font-weight:900}
.whatsapp-contact-button:hover{background:#0e733c;color:#fff}.signin-security-note{margin-top:14px;text-align:center;color:#94a3b8;font-size:10px}
@media(max-width:820px){.signin-only-screen{padding:16px;overflow-y:auto}.signin-shell{display:block;min-height:0;max-width:560px;background:transparent;border:0;box-shadow:none}.signin-brand-panel{display:none}.signin-card{padding:32px 24px;border-radius:22px;box-shadow:0 22px 70px rgba(0,0,0,.32)}.signin-mobile-logo{display:grid}}
@media(max-width:430px){.signin-only-screen{display:flex;align-items:center;padding:14px}.signin-card{padding:26px 20px}.signin-card h2{font-size:25px}}


/* ==========================================================
   TajirNova 3.0 — Professional UI / UX Design System
   ========================================================== */
:root{
  --primary:#4f46e5;
  --primary-dark:#3730a3;
  --primary-soft:#eef2ff;
  --accent:#06b6d4;
  --accent-soft:#ecfeff;
  --sidebar:#0b1220;
  --sidebar-2:#111c32;
  --sidebar-text:#dbe7f7;
  --bg:#f3f6fb;
  --card:#ffffff;
  --surface:#ffffff;
  --text:#101828;
  --muted:#667085;
  --line:#e4e9f2;
  --border:#e4e9f2;
  --soft:#f7f9fc;
  --green:#079455;
  --red:#d92d20;
  --amber:#dc6803;
  --purple:#7f56d9;
  --cyan:#0891b2;
  --shadow:0 1px 2px rgba(16,24,40,.03),0 10px 30px rgba(16,24,40,.055);
  --shadow-lg:0 20px 60px rgba(16,24,40,.13);
  --sidebar-width:252px;
  --radius:16px;
  --topbar-height:72px;
}
:root[data-theme="dark"]{
  --bg:#070d18;
  --card:#0f1929;
  --surface:#0f1929;
  --text:#eef4ff;
  --muted:#98a7bc;
  --line:#233149;
  --border:#233149;
  --soft:#142136;
  --primary-soft:#1d234c;
  --accent-soft:#0d3039;
  --shadow:0 12px 34px rgba(0,0,0,.22);
}
html{font-size:14px;scroll-behavior:smooth}
body{
  font-size:13px;
  line-height:1.5;
  letter-spacing:.002em;
  background:
    radial-gradient(circle at 85% 0,rgba(79,70,229,.055),transparent 25%),
    var(--bg);
}
button,input,select,textarea{font-family:inherit}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{
  outline:3px solid rgba(79,70,229,.22)!important;
  outline-offset:2px;
}
::selection{background:rgba(79,70,229,.2);color:var(--text)}
*{scrollbar-width:thin;scrollbar-color:#bcc7d8 transparent}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-thumb{background:#bdc7d6;border-radius:999px}
::-webkit-scrollbar-track{background:transparent}

/* App frame */
.app-shell{background:var(--bg)}
.main{
  padding:0 24px 30px!important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.3),transparent 180px),
    var(--bg);
}
#content{min-height:calc(100dvh - 128px);padding-bottom:12px}
#content.tn-page-enter{animation:tnPageEnter .24s ease both}
@keyframes tnPageEnter{from{opacity:.2;transform:translateY(5px)}to{opacity:1;transform:none}}

/* Sidebar */
.sidebar{
  width:var(--sidebar-width)!important;
  background:
    radial-gradient(circle at 10% 0,rgba(79,70,229,.28),transparent 30%),
    linear-gradient(180deg,#0b1220 0%,#101a2d 58%,#0b1220 100%)!important;
  border-right:1px solid rgba(255,255,255,.07);
  color:var(--sidebar-text);
  box-shadow:18px 0 45px rgba(15,23,42,.08);
}
.sidebar-head{
  min-height:82px;
  padding:15px 14px!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
  gap:11px!important;
}
.logo-mark{
  border-radius:14px!important;
  background:linear-gradient(135deg,#22d3ee,#4f46e5 68%,#7c3aed)!important;
  box-shadow:0 12px 28px rgba(79,70,229,.38)!important;
  letter-spacing:-.04em;
}
.logo-mark.small{width:44px!important;height:44px!important;font-size:14px!important}
.sidebar-brand-copy{min-width:0;line-height:1.2}
.sidebar-product-name{display:block;color:#fff;font-size:14px;font-weight:850;letter-spacing:-.02em}
.sidebar-brand-copy small{
  display:block!important;
  margin-top:4px;
  color:#cbd7e9!important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:10px!important;
}
.sidebar-brand-copy #sidebarBusinessType{display:block;margin-top:2px;color:#7f91aa;font-size:9px}
.sidebar-version{
  display:inline-flex!important;
  margin-top:7px;
  padding:2px 7px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:999px;
  background:rgba(255,255,255,.06);
  color:#99a9bf!important;
  font-size:8px!important;
}
#navMenu{padding:10px 9px 18px!important}
.nav-group{margin-bottom:7px}
.nav-group-title{
  width:100%;
  min-height:29px;
  padding:5px 9px!important;
  border:0;
  background:transparent!important;
  color:#71839c!important;
  font-size:8.5px!important;
  font-weight:850!important;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.nav-chevron{font-size:12px;transition:.2s}
.nav-group.collapsed .nav-chevron{transform:rotate(-90deg)}
.nav-group-items{display:grid;gap:3px}
.nav-btn{
  position:relative;
  width:100%;
  min-height:42px!important;
  padding:7px 10px!important;
  border:1px solid transparent!important;
  border-radius:11px!important;
  background:transparent!important;
  color:#aebbd0!important;
  font-weight:650!important;
  transition:background .16s,border-color .16s,color .16s,transform .16s!important;
}
.nav-btn:hover{
  transform:translateX(2px);
  background:rgba(255,255,255,.06)!important;
  border-color:rgba(255,255,255,.06)!important;
  color:#fff!important;
}
.nav-btn.active{
  background:linear-gradient(135deg,rgba(79,70,229,.96),rgba(6,182,212,.78))!important;
  color:#fff!important;
  border-color:rgba(255,255,255,.14)!important;
  box-shadow:0 10px 25px rgba(31,41,109,.34);
}
.nav-btn.active:before{
  content:"";
  position:absolute;
  left:-9px;
  width:3px;
  height:24px;
  border-radius:0 999px 999px 0;
  background:#67e8f9;
  box-shadow:0 0 14px #22d3ee;
}
.nav-icon{
  display:grid!important;
  place-items:center;
  width:27px!important;
  height:27px!important;
  border-radius:8px;
  background:rgba(255,255,255,.055);
  color:#a9b9d1;
  font-size:13px!important;
  flex:none;
}
.nav-btn.active .nav-icon{background:rgba(255,255,255,.16);color:#fff}
.nav-label{font-size:11px}
.sidebar-foot{
  padding:12px!important;
  border-top:1px solid rgba(255,255,255,.08)!important;
  background:rgba(0,0,0,.12);
}
.sidebar-foot>small{
  display:block;
  margin-bottom:8px;
  padding:7px 9px;
  border-radius:9px;
  background:rgba(255,255,255,.05);
  color:#aab9ce!important;
}
.sidebar-collapse-btn{
  min-height:35px!important;
  border-radius:9px!important;
  color:#9eacc0!important;
}
.danger-outline{border-color:rgba(248,113,113,.36)!important;color:#fca5a5!important;background:rgba(127,29,29,.12)!important}

/* Top bar */
.topbar{
  height:var(--topbar-height)!important;
  margin:0 -24px 20px!important;
  padding:0 24px!important;
  background:rgba(255,255,255,.88)!important;
  border-bottom:1px solid rgba(228,233,242,.92)!important;
  box-shadow:0 6px 22px rgba(16,24,40,.035);
  backdrop-filter:blur(14px);
}
:root[data-theme="dark"] .topbar{background:rgba(15,25,41,.9)!important}
.page-heading h2{
  font-size:20px!important;
  font-weight:820!important;
  letter-spacing:-.025em;
}
.breadcrumb{margin-top:3px!important;font-size:9px!important}
.page-heading>#pageSubtitle{
  display:block!important;
  margin-top:2px;
  color:var(--muted);
  font-size:9px;
  white-space:nowrap;
  max-width:280px;
  overflow:hidden;
  text-overflow:ellipsis;
}
.icon-btn{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  border-radius:10px!important;
  border:1px solid var(--line)!important;
  background:var(--card)!important;
  color:var(--muted)!important;
}
.icon-btn:hover{color:var(--primary)!important;border-color:#c7d2fe!important;background:var(--primary-soft)!important}
.global-search{
  width:280px!important;
  height:40px!important;
  padding:0 11px!important;
  border-radius:11px!important;
  border-color:var(--line)!important;
  background:var(--soft)!important;
}
.global-search input{height:36px!important;font-size:11px!important}
.global-search kbd{
  padding:2px 5px;
  border:1px solid var(--line);
  border-radius:5px;
  background:var(--card);
}
.profile-chip{
  min-width:150px!important;
  padding:5px 8px!important;
  border:1px solid var(--line)!important;
  border-radius:11px;
  background:var(--card);
}
.profile-avatar{
  width:34px!important;height:34px!important;
  background:linear-gradient(135deg,#e0e7ff,#cffafe)!important;
  color:#3730a3!important;
  border:0!important;
  font-size:11px!important;
}
.profile-chip strong{font-size:11px!important}
.profile-chip small{font-size:9px!important}
.status-badge{min-height:26px;padding:3px 9px!important}

/* Buttons and form controls */
.btn{
  min-height:39px!important;
  padding:8px 13px!important;
  border-radius:10px!important;
  font-size:11px!important;
  font-weight:760!important;
  box-shadow:none;
}
.btn:hover{transform:translateY(-1px)!important;box-shadow:0 7px 16px rgba(16,24,40,.08)!important}
.btn.primary{
  background:linear-gradient(135deg,#4f46e5,#4338ca)!important;
  border-color:#4f46e5!important;
  box-shadow:0 7px 16px rgba(79,70,229,.2);
}
.btn.primary:hover{background:linear-gradient(135deg,#4338ca,#3730a3)!important}
.btn.secondary{
  color:#3730a3!important;
  background:#eef2ff!important;
  border-color:#c7d2fe!important;
}
.btn.ghost{background:var(--card)!important;border-color:var(--line)!important;color:var(--text)!important}
.btn.success{background:#079455!important;color:#fff!important}
.btn.warning{background:#f79009!important;color:#fff!important}
.btn.danger{background:#d92d20!important;color:#fff!important}
.btn.sm{min-height:31px!important;padding:5px 9px!important;border-radius:8px!important;font-size:9.5px!important}
input,select,textarea{
  min-height:41px!important;
  padding:9px 11px!important;
  border-radius:10px!important;
  border-color:var(--line)!important;
  background:var(--card)!important;
  font-size:11.5px!important;
  box-shadow:0 1px 2px rgba(16,24,40,.02);
}
textarea{min-height:88px!important}
input:hover,select:hover,textarea:hover{border-color:#c7d2fe!important}
input:focus,select:focus,textarea:focus{
  border-color:#818cf8!important;
  box-shadow:0 0 0 4px rgba(79,70,229,.10)!important;
}
.field{gap:6px!important;margin:10px 0!important;font-size:10.5px!important;font-weight:720!important}
.field label,.compact-field label{color:#344054}
:root[data-theme="dark"] .field label,:root[data-theme="dark"] .compact-field label{color:#cdd8e8}
.check-field label{min-height:40px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--soft)}

/* Page headers and sections */
.page-toolbar,.dashboard-toolbar{
  position:relative;
  align-items:center!important;
  margin-bottom:14px!important;
  padding:18px 20px!important;
  border:1px solid var(--line);
  border-radius:17px;
  background:
    radial-gradient(circle at 95% 0,rgba(6,182,212,.11),transparent 25%),
    linear-gradient(135deg,var(--card),var(--soft));
  box-shadow:var(--shadow);
  overflow:hidden;
}
.page-toolbar:before,.dashboard-toolbar:before{
  content:"";
  position:absolute;
  left:0;top:15px;bottom:15px;
  width:4px;border-radius:0 999px 999px 0;
  background:linear-gradient(#4f46e5,#06b6d4);
}
.dashboard-title-copy h3,.page-toolbar h3{
  font-size:18px!important;
  font-weight:820!important;
  letter-spacing:-.02em;
}
.dashboard-title-copy p,.page-toolbar p{margin-top:4px!important;font-size:10.5px!important;line-height:1.55}
.dashboard-toolbar-actions,.page-toolbar-actions{align-items:center!important}

/* Cards and panels */
.cards{gap:12px!important}
.card,.panel,.kpi-card,.chart-panel{
  border:1px solid rgba(218,225,237,.92)!important;
  border-radius:16px!important;
  background:var(--card)!important;
  box-shadow:var(--shadow)!important;
}
:root[data-theme="dark"] .card,:root[data-theme="dark"] .panel,:root[data-theme="dark"] .kpi-card,:root[data-theme="dark"] .chart-panel{border-color:var(--line)!important}
.card{padding:16px!important;transition:.18s}
.card:hover{transform:translateY(-2px);box-shadow:0 14px 34px rgba(16,24,40,.075)!important}
.card .label{font-size:10px!important;font-weight:700;color:var(--muted)}
.card .value{font-size:22px!important;letter-spacing:-.03em}
.card .hint{font-size:9.5px!important}
.panel{
  padding:17px!important;
  margin-top:13px!important;
  overflow:visible!important;
}
.panel-head{margin-bottom:13px!important}
.panel-head h3{font-size:14px!important;font-weight:800!important;letter-spacing:-.01em}
.panel-head small{font-size:9.5px!important;line-height:1.5}
.sub-panel{border:1px solid var(--line);border-radius:12px!important}
.form-section{
  margin:12px 0!important;
  padding:15px!important;
  border:1px solid var(--line)!important;
  border-radius:13px;
  background:linear-gradient(180deg,var(--card),var(--soft));
}
.form-section:last-child{border-bottom:1px solid var(--line)!important}
.form-section h4{margin-bottom:10px!important;font-size:13px!important;font-weight:820!important}

/* KPI dashboard */
.kpi-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
}
.kpi-card{
  position:relative;
  min-height:120px!important;
  padding:16px!important;
  overflow:hidden!important;
  transition:.18s;
}
.kpi-card:after{
  content:"";
  position:absolute;
  width:90px;height:90px;
  right:-35px;bottom:-42px;
  border-radius:50%;
  background:rgba(79,70,229,.045);
}
.kpi-card:hover{transform:translateY(-2px);border-color:#c7d2fe!important;box-shadow:0 16px 36px rgba(16,24,40,.08)!important}
.kpi-label{font-size:10px!important;font-weight:720!important}
.kpi-value{margin-top:9px!important;font-size:21px!important;letter-spacing:-.035em}
.kpi-meta{margin-top:9px!important;font-size:9px!important}
.kpi-icon{
  width:38px!important;height:38px!important;
  border-radius:11px!important;
  font-size:16px!important;
  z-index:1;
}
.kpi-icon.blue{background:#eef2ff!important;color:#4f46e5!important}
.kpi-icon.green{background:#ecfdf3!important;color:#079455!important}
.kpi-icon.red{background:#fef3f2!important;color:#d92d20!important}
.kpi-icon.amber{background:#fffaeb!important;color:#dc6803!important}
.cash-bank-summary{border-radius:15px!important}
.cash-bank-grid>div{padding:9px 14px!important}
.cash-bank-grid span{font-size:9.5px!important}
.cash-bank-grid strong{font-size:15px!important}

/* Charts */
.dashboard-charts{gap:12px!important;margin-top:13px!important}
.chart-panel{padding:16px!important}
.chart-box{height:235px!important}
.chart-empty{border:1px dashed var(--line);border-radius:12px;background:var(--soft)}
.report-chart-card{border-radius:15px!important;border-color:var(--line)!important}

/* Tables */
.table-toolbar{
  margin-bottom:12px!important;
  padding:10px!important;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--soft);
}
.table-filters,.search-row{gap:8px!important}
.table-filters input,.table-filters select,.search-row input,.search-row select,.table-toolbar>input{min-width:170px!important}
.table-wrap{
  border:1px solid var(--line)!important;
  border-radius:14px!important;
  background:var(--card)!important;
  box-shadow:0 3px 12px rgba(16,24,40,.025);
}
.table th,.table td{
  padding:10px 11px!important;
  font-size:10.5px!important;
  line-height:1.45!important;
}
.table th{
  background:linear-gradient(180deg,var(--soft),var(--card))!important;
  color:#475467!important;
  font-size:9px!important;
  letter-spacing:.045em;
  text-transform:uppercase!important;
  font-weight:820!important;
}
:root[data-theme="dark"] .table th{color:#aebbd0!important}
.table tbody tr{transition:.12s}
.table tbody tr:hover td{background:rgba(79,70,229,.035)!important}
.table tbody tr:nth-child(even) td{background:rgba(248,250,252,.5)}
:root[data-theme="dark"] .table tbody tr:nth-child(even) td{background:rgba(255,255,255,.012)}
.table td .actions{gap:5px!important}
.empty-cell{padding:38px!important}
.badge{
  min-height:23px;
  padding:3px 8px!important;
  border:1px solid transparent;
  font-size:8.5px!important;
  letter-spacing:.015em;
}
.badge:before{content:"";width:5px;height:5px;border-radius:50%;margin-right:5px;background:currentColor;opacity:.75}
.badge.green{background:#ecfdf3!important;color:#027a48!important;border-color:#abefc6!important}
.badge.red{background:#fef3f2!important;color:#b42318!important;border-color:#fecdca!important}
.badge.amber{background:#fffaeb!important;color:#b54708!important;border-color:#fedf89!important}
.badge.blue{background:#eef4ff!important;color:#3538cd!important;border-color:#c7d7fe!important}
.badge.gray{background:#f2f4f7!important;color:#475467!important;border-color:#e4e7ec!important}

/* Period filters and utilities */
.period-filter,.period-custom,.report-controls{gap:8px!important}
.period-label{height:39px!important;padding:0 11px!important;border-radius:10px!important;background:var(--card)!important}
.compact-field{min-width:150px!important}
.actions{gap:7px!important}

/* Modal UX */
.modal{
  padding:22px!important;
  background:rgba(7,13,24,.64)!important;
  backdrop-filter:blur(6px)!important;
}
.modal-panel{
  width:min(1080px,100%)!important;
  max-height:92dvh!important;
  padding:19px!important;
  border:1px solid rgba(255,255,255,.12);
  border-radius:19px!important;
  box-shadow:var(--shadow-lg)!important;
}
.modal-head{
  top:-19px!important;
  margin:-2px 0 14px;
  padding:10px 0 13px!important;
}
.modal-head h3{font-size:17px!important;font-weight:830!important;letter-spacing:-.02em}
.line-row{
  gap:8px!important;
  margin:8px 0!important;
  padding:10px!important;
  border-radius:12px!important;
  background:var(--soft)!important;
}
.calc-box{gap:9px!important;margin:13px 0!important}
.calc-item{padding:11px!important;border-radius:11px!important}
.calc-item small{font-size:9px!important}
.calc-item b{font-size:16px!important}

/* Notices, toasts and states */
.notice{padding:11px 13px!important;border-radius:11px!important;font-size:10.5px!important;border:1px solid transparent}
.notice.success{border-color:#abefc6}
.notice.error{border-color:#fecdca}
.toast-root{right:18px!important;top:18px!important;gap:9px!important}
.toast{
  min-width:260px;
  padding:12px 14px!important;
  border-radius:12px!important;
  font-size:11px!important;
  box-shadow:0 16px 40px rgba(0,0,0,.24)!important;
  animation:tnToast .22s ease both;
}
@keyframes tnToast{from{opacity:0;transform:translateX(16px)}to{opacity:1;transform:none}}
.empty,.category-empty-state,.error-state{border-radius:14px}
.category-empty-state,.error-state{background:linear-gradient(180deg,var(--card),var(--soft))}
.error-icon{width:58px!important;height:58px!important;border-radius:17px!important}

/* POS */
.pos-header,.accounts-hero,.settings-hero{
  border-radius:18px!important;
  background:
    radial-gradient(circle at 90% 20%,rgba(34,211,238,.22),transparent 27%),
    linear-gradient(135deg,#111827,#3730a3 68%,#155e75)!important;
  border:1px solid rgba(255,255,255,.10)!important;
  box-shadow:0 18px 45px rgba(31,41,109,.22)!important;
}
.pos-header{padding:21px 22px!important}
.pos-header h3{font-size:20px!important;letter-spacing:-.025em}
.pos-header p{font-size:10.5px!important;line-height:1.55}
.pos-scanner-panel{
  border-color:#a5f3fc!important;
  background:linear-gradient(135deg,#ecfeff,#eef2ff)!important;
  border-radius:16px!important;
}
:root[data-theme="dark"] .pos-scanner-panel{background:linear-gradient(135deg,#0d3039,#1d234c)!important}
.pos-scanner-preview{height:205px!important;border-radius:14px!important}
.pos-cart-panel,.pos-catalog-panel{padding:18px!important}
.pos-product-grid{gap:12px!important}
.pos-product-card{
  padding:9px!important;
  border-radius:14px!important;
  transition:.18s!important;
}
.pos-product-card:hover{
  transform:translateY(-3px)!important;
  border-color:#a5b4fc!important;
  box-shadow:0 13px 28px rgba(79,70,229,.13)!important;
}
.pos-product-image{border-radius:11px!important;background:linear-gradient(135deg,#eef2ff,#cffafe)!important}
.pos-product-name{font-size:11.5px!important}
.pos-cart-line{border-radius:13px!important;padding:11px!important}
.pos-cart-summary{border:1px solid #c7d2fe;background:linear-gradient(135deg,#eef2ff,#ecfeff)!important}

/* Settings, categories, accounts */
.settings-card,.category-summary-card,.account-pro-card{
  border-radius:16px!important;
  border-color:var(--line)!important;
  box-shadow:var(--shadow)!important;
}
.settings-card{padding:19px!important}
.settings-icon,.account-pro-icon{width:43px!important;height:43px!important;border-radius:12px!important}
.category-chip{padding:8px 11px!important;border-radius:999px!important}
.category-hero,.accounts-hero{padding:21px!important}
.category-summary-grid,.accounts-summary-grid{gap:12px!important}
.category-summary-card,.accounts-summary-grid article{padding:16px!important;border-radius:14px!important}
.account-pro-card{padding:17px!important}
.account-pro-balance{padding:14px!important}
.account-pro-actions{padding-top:12px;border-top:1px solid var(--line)}
.ledger-account-head{border-radius:16px!important}

/* Import, reports, ERP management and users */
.import-grid{gap:14px!important}
.import-card{
  padding:30px!important;
  border-radius:17px!important;
  border:1px solid var(--line)!important;
  transition:.18s;
}
.import-card:hover{transform:translateY(-2px);border-color:#c7d2fe!important}
.import-icon{
  width:54px!important;height:54px!important;
  border-radius:15px!important;
  background:linear-gradient(135deg,#eef2ff,#cffafe)!important;
  color:#4f46e5!important;
}
.report-document,.courier-document{
  border-radius:16px;
  box-shadow:var(--shadow);
}
.module-grid{gap:10px!important}
.module-check{min-height:44px;border-radius:11px!important;background:var(--soft)!important}
.protected-main-row{background:linear-gradient(90deg,#eef2ff,var(--card))!important}

/* Sign in rebrand */
.signin-only-screen{
  background:
    radial-gradient(circle at 14% 16%,rgba(79,70,229,.44),transparent 34%),
    radial-gradient(circle at 88% 82%,rgba(6,182,212,.22),transparent 30%),
    linear-gradient(145deg,#070d18,#111c32 58%,#081421)!important;
}
.signin-brand-mark,.signin-mobile-logo{
  background:linear-gradient(135deg,#22d3ee,#4f46e5 65%,#7c3aed)!important;
}
.signin-brand-panel h1{letter-spacing:-.045em}
.signin-card{border-left:1px solid rgba(255,255,255,.08)}
.whatsapp-contact-button{background:linear-gradient(135deg,#16a34a,#128c4a)!important}

/* Footer */
.app-footer{
  margin-top:18px;
  padding:16px 5px 0!important;
  border-top:1px solid var(--line);
  font-size:9px!important;
}

/* Desktop layout */
@media(min-width:901px){
  .app-shell{display:block!important}
  .sidebar{width:var(--sidebar-width)!important}
  .main{
    margin-left:var(--sidebar-width)!important;
    width:calc(100% - var(--sidebar-width))!important;
    max-width:none!important;
  }
  body.sidebar-collapsed .sidebar{width:76px!important}
  body.sidebar-collapsed .main{margin-left:76px!important;width:calc(100% - 76px)!important}
  body.sidebar-collapsed .sidebar-product-name,
  body.sidebar-collapsed #sidebarBusinessName,
  body.sidebar-collapsed #sidebarBusinessType,
  body.sidebar-collapsed .sidebar-version{display:none!important}
}

/* Tablet */
@media(max-width:1250px) and (min-width:901px){
  .kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .dashboard-charts{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .chart-panel.chart-wide{grid-column:span 2!important}
  .global-search{width:220px!important}
  .profile-chip{min-width:120px!important}
}

/* Mobile */
@media(max-width:900px){
  :root{--topbar-height:64px}
  .main{padding:0 12px 22px!important}
  .topbar{
    margin:0 -12px 14px!important;
    padding:0 12px!important;
    height:64px!important;
  }
  .sidebar{width:min(84vw,292px)!important}
  .global-search,.top-actions #themeBtn,.top-actions #notificationBtn,.top-actions #fullscreenBtn,.profile-chip>div:last-child{display:none!important}
  .profile-chip{min-width:42px!important;width:42px!important;padding:3px!important;border:0!important;background:transparent!important}
  .profile-avatar{width:34px!important;height:34px!important}
  .top-actions{gap:5px!important}
  #quickSaleBtn{min-height:36px!important;padding:7px 10px!important;font-size:10px!important}
  .page-heading h2{font-size:16px!important}
  .breadcrumb{display:none!important}
  .page-heading>#pageSubtitle{max-width:160px}
  .page-toolbar,.dashboard-toolbar{
    padding:15px!important;
    border-radius:15px!important;
  }
  .dashboard-toolbar-actions,.page-toolbar-actions{display:grid!important;grid-template-columns:1fr 1fr;width:100%!important}
  .dashboard-toolbar-actions>.btn,.page-toolbar-actions>.btn{width:100%}
  .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .kpi-card{min-height:110px!important;padding:13px!important}
  .kpi-value{font-size:17px!important}
  .kpi-icon{width:32px!important;height:32px!important}
  .dashboard-charts,.dashboard-table-grid{display:grid!important;grid-template-columns:1fr!important}
  .chart-panel.chart-wide,.dashboard-table-grid>.panel:last-child{grid-column:auto!important}
  .chart-box{height:210px!important}
  .panel{padding:13px!important;border-radius:14px!important}
  .table-toolbar{display:grid!important;grid-template-columns:1fr;padding:9px!important}
  .table-filters,.search-row{display:grid!important;grid-template-columns:1fr 1fr}
  .table-filters input,.table-filters select,.search-row input,.search-row select,.table-toolbar>input{width:100%!important;min-width:0!important}
  .modal{align-items:end!important;padding:0!important}
  .modal-panel{
    width:100%!important;
    height:auto!important;
    max-height:94dvh!important;
    padding:16px 14px 88px!important;
    border-radius:22px 22px 0 0!important;
  }
  .modal-head{top:-16px!important}
  .grid2,.grid3,.grid4{gap:8px!important}
  .form-section{padding:12px!important}
  .accounts-summary-grid{grid-template-columns:1fr 1fr!important}
  .accounts-hero,.settings-hero,.category-hero,.pos-header{padding:17px!important}
  .pos-scanner-preview{height:165px!important}
  .pos-product-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
  .pos-product-card{padding:6px!important}
  .pos-product-name{font-size:10px!important}
  .toast-root{left:12px!important;right:12px!important;top:12px!important}
  .toast{min-width:0;width:100%;max-width:none!important}
}
@media(max-width:520px){
  .kpi-grid{grid-template-columns:1fr 1fr!important}
  .cash-bank-grid{grid-template-columns:1fr 1fr!important}
  .cash-bank-grid>div{border-right:0!important;border-bottom:1px solid var(--line)}
  .dashboard-toolbar-actions,.page-toolbar-actions{grid-template-columns:1fr!important}
  .table-filters,.search-row{grid-template-columns:1fr!important}
  .accounts-summary-grid{grid-template-columns:1fr!important}
  .signin-card{border-radius:20px!important}
}


/* ==========================================================
   TajirNova 3.0.1 — Mobile-first business-aware dashboard
   ========================================================== */
.dashboard-report-icon{font-size:15px;line-height:1}
.dashboard-report-btn,.dashboard-new-sale-btn{white-space:nowrap}
.dashboard-period-control{min-width:0}
.mobile-dashboard-toolbar .period-filter{margin:0!important}
.mobile-dashboard-toolbar .compact-field{margin:0!important}
.mobile-dashboard-toolbar .period-label{display:none!important}

@media(max-width:900px){
  body[data-page="dashboard"] .main{padding:0 10px 20px!important}
  body[data-page="dashboard"] .topbar{
    height:58px!important;
    min-height:58px!important;
    margin:0 -10px 10px!important;
    padding:0 10px!important;
  }
  body[data-page="dashboard"] .page-heading h2{font-size:15px!important}
  body[data-page="dashboard"] .page-heading>#pageSubtitle{font-size:8px!important;max-width:130px!important}
  body[data-page="dashboard"] #quickSaleBtn{
    min-width:36px!important;
    width:36px!important;
    padding:0!important;
    font-size:0!important;
  }
  body[data-page="dashboard"] #quickSaleBtn:before{content:"+";font-size:20px;font-weight:800}
  .mobile-dashboard-toolbar{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:start!important;
    gap:10px!important;
    padding:13px!important;
    margin-bottom:9px!important;
    border-radius:14px!important;
  }
  .mobile-dashboard-toolbar:before{top:12px!important;bottom:12px!important}
  .mobile-dashboard-toolbar .dashboard-title-copy h3{font-size:15px!important}
  .mobile-dashboard-toolbar .dashboard-title-copy p{
    max-width:230px;
    margin-top:2px!important;
    font-size:8.5px!important;
    line-height:1.35!important;
  }
  .mobile-dashboard-toolbar .dashboard-toolbar-actions{
    display:flex!important;
    width:auto!important;
    gap:5px!important;
    align-items:center!important;
  }
  .mobile-dashboard-toolbar .dashboard-period-control{
    position:absolute;
    left:13px;
    right:13px;
    top:68px;
  }
  .mobile-dashboard-toolbar{padding-bottom:60px!important}
  .mobile-dashboard-toolbar .period-filter{
    display:grid!important;
    grid-template-columns:1fr!important;
    width:100%!important;
    padding:5px!important;
    border:1px solid var(--line);
    border-radius:10px;
    background:rgba(255,255,255,.76);
  }
  :root[data-theme="dark"] .mobile-dashboard-toolbar .period-filter{background:rgba(15,25,41,.82)}
  .mobile-dashboard-toolbar .period-filter .field{margin:0!important}
  .mobile-dashboard-toolbar .period-filter label{display:none!important}
  .mobile-dashboard-toolbar .period-filter select{
    width:100%!important;
    min-width:0!important;
    min-height:35px!important;
    height:35px!important;
    padding:6px 9px!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
    font-size:10px!important;
  }
  .mobile-dashboard-toolbar .period-custom{
    display:grid!important;
    grid-template-columns:1fr 1fr auto!important;
    gap:5px!important;
    margin-top:5px!important;
  }
  .mobile-dashboard-toolbar .period-custom.hidden{display:none!important}
  .mobile-dashboard-toolbar .period-custom input{
    min-width:0!important;
    width:100%!important;
    min-height:34px!important;
    height:34px!important;
    padding:5px!important;
    font-size:9px!important;
  }
  .mobile-dashboard-toolbar .period-custom .btn{min-height:34px!important;height:34px!important;padding:5px 8px!important}
  .dashboard-report-btn,.dashboard-new-sale-btn{
    width:38px!important;
    min-width:38px!important;
    height:38px!important;
    min-height:38px!important;
    padding:0!important;
    display:grid!important;
    place-items:center!important;
    border-radius:10px!important;
  }
  .dashboard-report-text,.dashboard-new-sale-btn span:last-child{display:none!important}
  .dashboard-new-sale-btn span:first-child{font-size:20px!important;line-height:1}
  .business-aware-kpis{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }
  .business-aware-kpis .kpi-card{
    min-height:88px!important;
    padding:10px!important;
    border-radius:12px!important;
  }
  .business-aware-kpis .kpi-label{
    max-width:calc(100% - 26px);
    font-size:8.5px!important;
    line-height:1.25!important;
  }
  .business-aware-kpis .kpi-value{
    margin-top:6px!important;
    font-size:14px!important;
    line-height:1.2!important;
  }
  .business-aware-kpis .kpi-meta{
    margin-top:5px!important;
    min-height:12px;
    font-size:7.5px!important;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .business-aware-kpis .kpi-icon{
    width:27px!important;
    height:27px!important;
    border-radius:8px!important;
    font-size:12px!important;
  }
  .business-aware-charts{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    margin-top:9px!important;
  }
  .business-aware-charts .chart-panel{
    padding:11px!important;
    border-radius:13px!important;
  }
  .business-aware-charts .chart-panel .panel-head{margin-bottom:7px!important}
  .business-aware-charts .chart-panel .panel-head h3{font-size:11px!important}
  .business-aware-charts .chart-panel .panel-head small{font-size:8px!important}
  .business-aware-charts .chart-box{height:190px!important}
  body[data-page="dashboard"] .dashboard-table-grid{gap:8px!important}
  body[data-page="dashboard"] .dashboard-table-grid .panel{
    margin-top:0!important;
    padding:11px!important;
  }
  body[data-page="dashboard"] .dashboard-table-grid .panel-head h3{font-size:11px!important}
  body[data-page="dashboard"] .dashboard-table .table{min-width:560px!important}
  body[data-page="dashboard"] .dashboard-table .table th,
  body[data-page="dashboard"] .dashboard-table .table td{
    padding:8px!important;
    font-size:9px!important;
  }
  body[data-page="dashboard"] .cash-bank-summary{padding:11px!important}
  body[data-page="dashboard"] .cash-bank-grid{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
  }
  body[data-page="dashboard"] .cash-bank-grid>div{
    min-height:64px;
    padding:10px!important;
    border-right:0!important;
    border-bottom:1px solid var(--line);
  }
  body[data-page="dashboard"] .cash-bank-grid span{font-size:8px!important}
  body[data-page="dashboard"] .cash-bank-grid strong{font-size:13px!important}
}
@media(max-width:390px){
  .mobile-dashboard-toolbar .dashboard-title-copy p{max-width:190px}
  .business-aware-kpis .kpi-card{min-height:84px!important;padding:9px!important}
  .business-aware-kpis .kpi-value{font-size:13px!important}
}

/* ==========================================================
   TajirNova 3.1 — Enterprise UI Final
   ========================================================== */
:root{
  --primary:#0f766e;--primary-dark:#115e59;--primary-soft:#ecfdf5;
  --accent:#2563eb;--accent-soft:#eff6ff;--sidebar:#0b1320;--sidebar-2:#101c2f;
  --bg:#f4f7fb;--card:#fff;--surface:#fff;--text:#111827;--muted:#64748b;
  --line:#dfe6ef;--soft:#f8fafc;--green:#0f9f6e;--red:#dc2626;--amber:#d97706;
  --purple:#7c3aed;--cyan:#0891b2;--shadow:0 1px 2px rgba(15,23,42,.03),0 10px 28px rgba(15,23,42,.06)
}
body{background:radial-gradient(circle at 100% 0,rgba(37,99,235,.04),transparent 28%),linear-gradient(180deg,#f7f9fc,#f3f6fa)!important}
.sidebar{background:radial-gradient(circle at 20% 0,rgba(15,118,110,.26),transparent 34%),linear-gradient(180deg,#0b1320,#101c2f 64%,#0b1320)!important}
.logo-mark,.signin-brand-mark,.signin-mobile-logo{background:linear-gradient(135deg,#14b8a6,#2563eb 68%,#4f46e5)!important}
.nav-btn.active,.btn.primary{background:linear-gradient(135deg,#0f766e,#2563eb)!important;border-color:#0f766e!important}
.page-title-line{display:flex;align-items:center;gap:7px;min-width:0;white-space:nowrap}.page-title-line h2{margin:0!important}.page-business-separator{color:#94a3b8}.page-title-line small{display:block!important;max-width:240px;overflow:hidden;text-overflow:ellipsis;color:var(--muted);font-size:10px}.breadcrumb{margin-top:2px!important}
.module-accent,.panel,.card,.settings-card,.account-pro-card{position:relative}.module-accent:before,.panel:before{content:"";position:absolute;left:0;top:12px;bottom:12px;width:4px;border-radius:0 999px 999px 0;background:linear-gradient(180deg,#0f766e,#2563eb)}
.sidebar-foot,.sidebar-collapse-wrap,#sidebarCollapseBtn,.app-footer{display:none!important}.sidebar{padding-bottom:16px!important}
.kpi-grid,.summary-grid,.report-metrics,.accounts-summary-grid,.courier-summary-grid{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:10px!important}
.kpi-card,.summary-card,.report-metric,.accounts-summary-grid>article,.courier-summary-card{min-height:96px!important;padding:12px!important;border-radius:13px!important}.kpi-value,.summary-card strong,.report-metric strong{font-size:17px!important}.kpi-label,.summary-card small,.report-metric small{font-size:9px!important}.kpi-meta,.summary-card span,.report-metric span{font-size:8px!important}.kpi-icon{width:30px!important;height:30px!important;border-radius:8px!important;font-size:13px!important}
.page-toolbar,.dashboard-toolbar,.settings-hero,.category-hero,.accounts-hero,.pos-header{padding:14px 16px!important;border-radius:14px!important}.page-toolbar h3,.dashboard-title-copy h3{font-size:16px!important}.page-toolbar p,.dashboard-title-copy p{font-size:9.5px!important}.panel{padding:14px!important;margin-top:10px!important;border-radius:14px!important}
.period-filter,.report-controls,.table-toolbar,.search-row{gap:6px!important}.period-filter .field,.compact-field{margin:0!important;min-width:132px!important}.period-filter input,.period-filter select,.report-controls input,.report-controls select{min-height:35px!important;height:35px!important;padding:6px 9px!important;font-size:10px!important}.period-label{height:35px!important;font-size:9px!important}.table-toolbar{padding:8px!important;border-radius:10px!important}.table th,.table td{padding:8px 9px!important}
body[data-page="sales"] .cards,body[data-page="sales"] .kpi-grid,body[data-page="sales"] .summary-grid,body[data-page="categories"] .category-summary-grid,body[data-page="suppliers"] .cards,body[data-page="suppliers"] .kpi-grid,body[data-page="vendors"] .cards,body[data-page="vendors"] .kpi-grid{display:none!important}
body[data-page="purchases"] .kpi-grid,body[data-page="inventory"] .kpi-grid,body[data-page="expenses"] .kpi-grid,body[data-page="taxrecords"] .kpi-grid,body[data-page="assets"] .kpi-grid,body[data-page="accounts"] .kpi-grid,body[data-page="ownerfund"] .kpi-grid,body[data-page="loans"] .kpi-grid,body[data-page="couriers"] .kpi-grid,body[data-page="tcs"] .kpi-grid,body[data-page="leopard"] .kpi-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}
.account-pro-card,.settings-card,.import-card{padding:14px!important;border-radius:13px!important}.account-pro-balance{padding:10px!important}
.invoice-paper,.receipt-paper,.report-document,.courier-document{border:1px solid #dbe4ee!important;background:linear-gradient(180deg,#fff,#fbfdff)!important;box-shadow:0 22px 60px rgba(15,23,42,.14)!important}.invoice-paper:before,.receipt-paper:before,.report-document:before,.courier-document:before{content:"";display:block;height:8px;margin:-1px -1px 18px;background:linear-gradient(90deg,#0f766e,#2563eb,#4f46e5)}.invoice-head,.report-head,.courier-head{border-bottom:2px solid #e2e8f0!important}.invoice-total,.receipt-total,.report-total{background:linear-gradient(135deg,#ecfdf5,#eff6ff)!important;border:1px solid #bfdbfe!important;color:#0f172a!important}.report-chart-card,.report-metric,.invoice-summary-card{border:1px solid #dfe6ef!important;border-radius:12px!important;background:#fff!important}.report-chart-card canvas{max-height:250px!important}
@media(max-width:1200px) and (min-width:901px){.kpi-grid,.summary-grid,.report-metrics,.accounts-summary-grid,.courier-summary-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:900px){
  .main{padding:0 8px 18px!important}.topbar{margin:0 -8px 8px!important;padding:0 8px!important;height:56px!important}.page-title-line{gap:5px}.page-title-line h2{font-size:14px!important}.page-title-line small{max-width:100px;font-size:8px!important}.page-business-separator{font-size:9px}.breadcrumb{display:none!important}
  #quickSaleBtn{min-width:36px!important;width:36px!important;height:36px!important;padding:0!important;font-size:0!important}#quickSaleBtn:before{content:"+";font-size:19px;font-weight:800}.profile-chip{width:34px!important;min-width:34px!important}.profile-avatar{width:32px!important;height:32px!important}
  .page-toolbar,.dashboard-toolbar,.settings-hero,.category-hero,.accounts-hero,.pos-header{padding:11px 12px!important;border-radius:12px!important}.page-toolbar h3,.dashboard-title-copy h3{font-size:14px!important}.page-toolbar p,.dashboard-title-copy p{font-size:8.5px!important}
  .kpi-grid,.summary-grid,.report-metrics,.accounts-summary-grid,.courier-summary-grid,.business-aware-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}.kpi-card,.summary-card,.report-metric,.accounts-summary-grid>article,.courier-summary-card,.business-aware-kpis .kpi-card{min-height:78px!important;padding:8px!important;border-radius:10px!important}.kpi-label,.summary-card small,.report-metric small{max-width:calc(100% - 22px);font-size:7.3px!important;line-height:1.18!important}.kpi-value,.summary-card strong,.report-metric strong{margin-top:5px!important;font-size:12px!important;line-height:1.15!important}.kpi-meta,.summary-card span,.report-metric span{margin-top:4px!important;font-size:6.6px!important}.kpi-icon{width:23px!important;height:23px!important;border-radius:7px!important;font-size:10px!important}
  .module-accent:before,.panel:before{top:9px;bottom:9px;width:3px}.panel{padding:10px!important;border-radius:12px!important}.panel-head{margin-bottom:8px!important}.panel-head h3{font-size:11px!important}
  .period-filter{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;width:100%!important}.period-filter .field,.compact-field{min-width:0!important}.period-filter input,.period-filter select{width:100%!important}.period-custom{grid-column:1/-1;display:grid!important;grid-template-columns:1fr 1fr auto!important;gap:5px!important}.period-custom.hidden{display:none!important}.period-label{display:none!important}
  .table-toolbar,.search-row,.table-filters{display:grid!important;grid-template-columns:1fr 1fr!important}.table-wrap{border-radius:10px!important}.table{min-width:620px!important}.table th,.table td{padding:7px!important;font-size:8.5px!important}.btn{min-height:34px!important;padding:6px 9px!important;font-size:9px!important}.btn.sm{min-height:28px!important;font-size:8px!important}.chart-box{height:175px!important}.pos-product-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media print{body{background:#fff!important}.daily-sales-chart,.daily-expenses-chart,.daily-profit-chart{display:none!important}.invoice-paper,.receipt-paper,.report-document,.courier-document{box-shadow:none!important;border:1px solid #b8c2cf!important}}


/* ==========================================================
   TajirNova 3.1.1 — Stable Enterprise Theme
   ========================================================== */
:root{
  --primary:#0b7a6e;
  --primary-dark:#075e55;
  --primary-soft:#e9f8f5;
  --accent:#1d4ed8;
  --accent-soft:#eef4ff;
  --gold:#b88918;
  --sidebar:#0a1220;
  --sidebar-2:#111d2f;
  --bg:#f2f5f7;
  --card:#ffffff;
  --surface:#ffffff;
  --text:#101828;
  --muted:#667085;
  --line:#dde4ea;
  --soft:#f7f9fb;
  --shadow:0 1px 2px rgba(16,24,40,.035),0 10px 28px rgba(16,24,40,.065);
  --shadow-lg:0 26px 70px rgba(3,12,24,.18);
  --page-accent:#0b7a6e;
}
:root[data-theme="dark"]{
  --bg:#08111d;--card:#0f1b2a;--surface:#0f1b2a;--text:#eef4f8;--muted:#9aa8b8;--line:#26364a;--soft:#142235;--primary-soft:#123a36;--accent-soft:#182b52;
}
body{
  background:radial-gradient(circle at 100% 0,rgba(29,78,216,.045),transparent 27%),linear-gradient(180deg,#f7f9fb 0%,var(--bg) 250px)!important;
  color:var(--text);
}
body[data-page="dashboard"]{--page-accent:#0b7a6e}
body[data-page="pos"],body[data-page="sales"]{--page-accent:#1d4ed8}
body[data-page="products"],body[data-page="categories"],body[data-page="inventory"]{--page-accent:#7c3aed}
body[data-page="purchases"],body[data-page="vendors"]{--page-accent:#b88918}
body[data-page="expenses"],body[data-page="taxrecords"]{--page-accent:#dc2626}
body[data-page="accounts"],body[data-page="owner"],body[data-page="loans"]{--page-accent:#0891b2}
body[data-page^="courier"],body[data-page^="tcs"],body[data-page^="leopard"]{--page-accent:#ea580c}
body[data-page="reports"],body[data-page="settings"],body[data-page="erpmanagement"]{--page-accent:#334155}

/* Completely redesigned login */
.signin-only-screen{
  position:relative!important;display:grid!important;place-items:center!important;min-height:100dvh!important;padding:32px!important;overflow:hidden!important;
  background:linear-gradient(145deg,#07111e 0%,#0c1b2b 48%,#0a2430 100%)!important;
}
.login-atmosphere{position:absolute;border-radius:50%;filter:blur(4px);pointer-events:none}
.login-atmosphere-one{width:520px;height:520px;left:-220px;top:-220px;background:radial-gradient(circle,rgba(20,184,166,.22),transparent 68%)}
.login-atmosphere-two{width:620px;height:620px;right:-260px;bottom:-320px;background:radial-gradient(circle,rgba(29,78,216,.24),transparent 67%)}
.nova-login-shell{
  position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1.08fr) minmax(390px,.72fr);width:min(1120px,100%);min-height:680px;
  border:1px solid rgba(255,255,255,.12);border-radius:28px;overflow:hidden;background:rgba(255,255,255,.06);box-shadow:0 40px 100px rgba(0,0,0,.38);backdrop-filter:blur(16px);
}
.nova-login-brand{display:flex;flex-direction:column;padding:48px 54px;color:#fff;background:linear-gradient(145deg,rgba(6,18,31,.82),rgba(7,51,55,.52));}
.nova-brand-row,.nova-mobile-brand{display:flex;align-items:center;gap:12px}
.nova-brand-symbol{display:grid;place-items:center;width:50px;height:50px;border-radius:15px;background:linear-gradient(135deg,#14b8a6,#1d4ed8);box-shadow:0 14px 30px rgba(20,184,166,.22);color:#fff;font-size:16px;font-weight:900;letter-spacing:-.05em}
.nova-brand-row strong,.nova-mobile-brand strong{display:block;font-size:17px;letter-spacing:-.025em}.nova-brand-row span,.nova-mobile-brand span{display:block;margin-top:2px;color:#91a6bc;font-size:9px;text-transform:uppercase;letter-spacing:.12em}
.nova-brand-message{margin:auto 0 34px}.nova-eyebrow{display:block;margin-bottom:15px;color:#5eead4;font-size:9px;font-weight:850;letter-spacing:.18em}
.nova-brand-message h1{max-width:650px;margin:0;color:#fff;font-size:42px;line-height:1.12;letter-spacing:-.045em}.nova-brand-message p{max-width:600px;margin:17px 0 0;color:#b8c6d5;font-size:14px;line-height:1.75}
.nova-feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.nova-feature-grid article{min-height:122px;padding:15px;border:1px solid rgba(255,255,255,.09);border-radius:15px;background:rgba(255,255,255,.045)}
.nova-feature-grid article>span{display:block;color:#5eead4;font-size:9px;font-weight:850}.nova-feature-grid b{display:block;margin-top:12px;color:#fff;font-size:11px}.nova-feature-grid small{display:block;margin-top:6px;color:#8fa2b7;font-size:9px;line-height:1.5}
.nova-login-footer{display:flex;align-items:center;gap:8px;margin-top:25px;color:#8fa2b7;font-size:9px}.nova-status-dot{width:7px;height:7px;border-radius:50%;background:#34d399;box-shadow:0 0 0 5px rgba(52,211,153,.1)}
.nova-login-card{display:flex;flex-direction:column;justify-content:center;padding:52px 48px;background:#fff;color:#101828}.nova-mobile-brand{display:none;margin-bottom:26px}.nova-access-badge{display:inline-flex;align-items:center;gap:7px;align-self:flex-start;padding:6px 9px;border:1px solid #cdeae5;border-radius:999px;background:#f0faf8;color:#0b7a6e;font-size:8px;font-weight:800;text-transform:uppercase;letter-spacing:.09em}.nova-access-badge span{width:6px;height:6px;border-radius:50%;background:#10b981}
.nova-login-card h2{margin:17px 0 5px;font-size:29px;letter-spacing:-.04em}.nova-login-intro{margin:0 0 24px!important;color:#667085;font-size:11px;line-height:1.6}
.nova-field{display:grid!important;gap:7px!important;margin:0 0 14px!important;color:#344054;font-size:10px!important;font-weight:750!important}.nova-input-wrap{display:flex;align-items:center;min-height:48px;border:1px solid #d6dee7;border-radius:12px;background:#fbfcfd;transition:.16s}.nova-input-wrap:focus-within{border-color:#0b7a6e;box-shadow:0 0 0 4px rgba(11,122,110,.1);background:#fff}.nova-input-wrap i{display:grid;place-items:center;width:44px;color:#98a2b3;font-size:11px;font-style:normal}.nova-input-wrap input{flex:1;min-width:0;min-height:46px!important;height:46px!important;padding:0 12px 0 0!important;border:0!important;background:transparent!important;box-shadow:none!important;font-size:12px!important}.nova-password-wrap input{padding-right:0!important}.nova-password-wrap .password-toggle{position:static!important;width:auto!important;height:34px!important;margin-right:6px;padding:0 9px!important;border-radius:8px!important}
.signin-button{display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:48px!important;margin-top:4px!important;padding:0 17px!important;border-radius:12px!important;background:linear-gradient(135deg,#0b7a6e,#075e55)!important;border:0!important;font-size:11px!important}.signin-button:hover{background:linear-gradient(135deg,#086b61,#064f48)!important}.signin-button.loading{opacity:.78;cursor:wait}.login-button-arrow{display:grid;place-items:center;width:27px;height:27px;border-radius:8px;background:rgba(255,255,255,.13);font-size:15px}
.nova-login-divider{display:flex;align-items:center;gap:10px;margin:23px 0 15px;color:#98a2b3;font-size:8px;text-transform:uppercase;letter-spacing:.1em}.nova-login-divider:before,.nova-login-divider:after{content:"";height:1px;flex:1;background:#e4e7ec}
.nova-contact-panel{display:grid;gap:12px;padding:14px;border:1px solid #e1e7ed;border-radius:13px;background:#f8fafb}.nova-contact-panel>div b{display:block;font-size:10px}.nova-contact-panel>div span{display:block;margin-top:3px;color:#667085;font-size:9px}.whatsapp-contact-button{display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:40px!important;margin:0!important;padding:0 12px!important;border-radius:10px!important;background:#eef8f2!important;color:#167447!important;border:1px solid #cdebd8!important;font-size:9px!important}.whatsapp-contact-button b{font-size:10px}.whatsapp-contact-button:hover{background:#e4f5eb!important;color:#12613c!important}
.nova-security-note{display:flex;align-items:flex-start;justify-content:center;gap:7px;margin-top:15px;color:#98a2b3;font-size:8px;text-align:center;line-height:1.5}.nova-security-note span{color:#b88918}
#authMessage .notice{margin:0 0 14px;padding:10px 11px!important;border-radius:10px!important;font-size:9px!important;line-height:1.45}

/* Main product theme */
.sidebar{background:linear-gradient(180deg,#091321 0%,#101d2f 72%,#0a1422 100%)!important;border-right:1px solid rgba(255,255,255,.065)!important}.sidebar-head{min-height:76px!important}.sidebar-product-name{font-size:15px!important}.sidebar-brand-copy #sidebarBusinessType{color:#71849a!important}.sidebar-version{display:none!important}.nova-sidebar-actions{padding:11px!important}.nova-sidebar-actions .danger-outline{min-height:36px!important;border-color:rgba(248,113,113,.2)!important;background:rgba(127,29,29,.08)!important}.desktop-sidebar-toggle{display:none!important}
.nav-btn.active{background:linear-gradient(135deg,#0b7a6e,#0b6577)!important;box-shadow:0 10px 23px rgba(4,83,77,.31)!important}.nav-btn.active:before{background:#d8b64c!important;box-shadow:0 0 13px rgba(216,182,76,.58)!important}.nav-btn:hover{background:rgba(255,255,255,.055)!important}
.main{background:transparent!important}.topbar{background:rgba(255,255,255,.9)!important;border-bottom-color:#e1e7ed!important}.page-title-line{display:flex;align-items:center;gap:7px;min-width:0;white-space:nowrap}.page-title-line h2{font-size:18px!important}.page-business-separator{color:#a1acb8}.page-title-line small{display:block!important;max-width:260px;overflow:hidden;text-overflow:ellipsis;color:#667085;font-size:9px}.breadcrumb{font-size:8px!important}.app-footer{display:none!important}
.module-accent:before,.module-panel:before,.page-toolbar:before,.dashboard-toolbar:before{background:var(--page-accent)!important}.page-toolbar,.dashboard-toolbar{background:linear-gradient(135deg,var(--card),var(--soft))!important;border-color:var(--line)!important}.panel,.card,.kpi-card,.chart-panel{border-color:var(--line)!important;box-shadow:var(--shadow)!important}.panel:before{background:var(--page-accent)!important}
.btn.primary{background:linear-gradient(135deg,#0b7a6e,#075e55)!important;border-color:#0b7a6e!important}.btn.secondary{background:#e9f8f5!important;border-color:#bfe3dc!important;color:#075e55!important}.btn.ghost{background:#fff!important}.icon-btn:hover{color:#0b7a6e!important;border-color:#bfe3dc!important;background:#effaf8!important}.global-search{background:#f5f7f9!important}.profile-avatar{background:linear-gradient(135deg,#e3f7f3,#eaf0ff)!important;color:#075e55!important}
.kpi-grid,.cards,.summary-grid,.accounts-summary-grid,.courier-summary-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:9px!important}.kpi-card,.card,.summary-card,.accounts-summary-grid>article,.courier-summary-card{min-height:92px!important;padding:11px!important;border-radius:12px!important}.kpi-card:after{background:color-mix(in srgb,var(--page-accent) 5%,transparent)!important}.kpi-value,.card .value,.summary-card strong{font-size:16px!important}.kpi-label,.card .label,.summary-card small{font-size:8.5px!important}.kpi-meta,.card .hint,.summary-card span{font-size:7.5px!important}.kpi-icon{width:29px!important;height:29px!important;border-radius:8px!important}
body[data-page="sales"] .cards,body[data-page="sales"] .kpi-grid,body[data-page="sales"] .summary-grid,body[data-page="categories"] .category-summary-grid,body[data-page="vendors"] .cards,body[data-page="vendors"] .kpi-grid{display:none!important}.category-hero{padding:15px 17px!important}.category-hero h3,.category-hero h2{font-size:17px!important}.page-toolbar,.dashboard-toolbar,.settings-hero,.accounts-hero,.pos-header{padding:14px 16px!important;border-radius:14px!important}.period-filter input,.period-filter select,.report-controls input,.report-controls select{min-height:34px!important;height:34px!important}.panel{padding:13px!important}.table th,.table td{padding:8px 9px!important}.table th{color:#475467!important;background:#f6f8fa!important}.table tbody tr:hover td{background:#f1f8f7!important}.badge.green{background:#eaf8f1!important;color:#087443!important}.badge.blue{background:#eef4ff!important;color:#1d4ed8!important}
.pos-header{background:linear-gradient(135deg,#0a1828,#0b625d 56%,#174a7a)!important}.pos-scanner-panel{background:linear-gradient(135deg,#edf9f7,#eef4ff)!important;border-color:#bfe3dc!important}.pos-product-image{background:linear-gradient(135deg,#eaf8f5,#eaf0ff)!important}.pos-cart-summary{background:linear-gradient(135deg,#eaf8f5,#eef4ff)!important;border-color:#bfe3dc!important}
.invoice-paper,.receipt-paper,.report-document,.courier-document{border-color:#dbe3e9!important;background:#fff!important}.invoice-paper:before,.receipt-paper:before,.report-document:before,.courier-document:before{background:linear-gradient(90deg,#0b7a6e,#1d4ed8,#b88918)!important}.invoice-total,.receipt-total,.report-total{background:linear-gradient(135deg,#edf9f7,#eef4ff)!important;border-color:#c9dedb!important}

@media(max-width:1200px) and (min-width:901px){.kpi-grid,.cards,.summary-grid,.accounts-summary-grid,.courier-summary-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}.nova-login-shell{grid-template-columns:1fr 430px}.nova-login-brand{padding:42px}.nova-brand-message h1{font-size:36px}}
@media(max-width:900px){
  .signin-only-screen{padding:14px!important;align-items:center!important}.nova-login-shell{display:block;width:min(500px,100%);min-height:0;border-radius:22px;background:transparent;border:0;box-shadow:none}.nova-login-brand{display:none}.nova-login-card{padding:28px 22px;border-radius:22px;box-shadow:0 24px 70px rgba(0,0,0,.34)}.nova-mobile-brand{display:flex}.nova-login-card h2{font-size:25px}.nova-login-intro{font-size:10px}.nova-input-wrap{min-height:46px}.nova-feature-grid{display:none}
  .main{padding:0 8px 18px!important}.topbar{height:56px!important;margin:0 -8px 8px!important;padding:0 8px!important}.page-title-line{gap:5px}.page-title-line h2{font-size:14px!important}.page-title-line small{max-width:105px;font-size:8px}.breadcrumb{display:none!important}.global-search,.top-actions #themeBtn,.top-actions #notificationBtn,.top-actions #fullscreenBtn{display:none!important}.profile-chip{width:34px!important;min-width:34px!important;border:0!important;background:transparent!important}.profile-avatar{width:32px!important;height:32px!important}.top-actions{gap:4px!important}#quickSaleBtn{width:36px!important;min-width:36px!important;height:36px!important;padding:0!important;font-size:0!important}#quickSaleBtn:before{content:"+";font-size:19px;font-weight:850}
  .kpi-grid,.cards,.summary-grid,.accounts-summary-grid,.courier-summary-grid,.business-aware-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}.kpi-card,.card,.summary-card,.accounts-summary-grid>article,.courier-summary-card,.business-aware-kpis .kpi-card{min-height:76px!important;padding:7px!important;border-radius:10px!important}.kpi-label,.card .label,.summary-card small{max-width:calc(100% - 21px);font-size:7px!important;line-height:1.17!important}.kpi-value,.card .value,.summary-card strong{margin-top:4px!important;font-size:11px!important;line-height:1.15!important}.kpi-meta,.card .hint,.summary-card span{margin-top:3px!important;font-size:6.2px!important}.kpi-icon{width:22px!important;height:22px!important;font-size:9px!important;border-radius:6px!important}
  .page-toolbar,.dashboard-toolbar,.settings-hero,.accounts-hero,.category-hero,.pos-header{padding:11px 12px!important;border-radius:12px!important}.page-toolbar h3,.dashboard-title-copy h3{font-size:14px!important}.page-toolbar p,.dashboard-title-copy p{font-size:8px!important}.module-accent:before,.module-panel:before,.panel:before{width:3px!important;top:9px!important;bottom:9px!important}.panel{padding:10px!important;border-radius:11px!important}.panel-head{margin-bottom:8px!important}.panel-head h3{font-size:11px!important}
  .period-filter{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;width:100%!important}.period-filter .field,.compact-field{min-width:0!important}.period-filter input,.period-filter select{width:100%!important;min-height:33px!important;height:33px!important;font-size:9px!important}.period-custom{grid-column:1/-1;display:grid!important;grid-template-columns:1fr 1fr auto!important;gap:4px!important}.period-custom.hidden{display:none!important}.period-label{display:none!important}
  .table-toolbar,.search-row,.table-filters{display:grid!important;grid-template-columns:1fr 1fr!important;gap:5px!important}.table{min-width:600px!important}.table th,.table td{padding:7px!important;font-size:8px!important}.btn{min-height:33px!important;padding:6px 9px!important;font-size:8.5px!important}.chart-box{height:175px!important}.dashboard-charts{gap:7px!important}.pos-product-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:430px){.signin-only-screen{padding:10px!important}.nova-login-card{padding:24px 18px}.nova-brand-symbol{width:44px;height:44px}.nova-login-card h2{font-size:23px}.nova-contact-panel{padding:12px}.table-toolbar,.search-row,.table-filters{grid-template-columns:1fr!important}}
@media print{.invoice-paper:before,.receipt-paper:before,.report-document:before,.courier-document:before{print-color-adjust:exact;-webkit-print-color-adjust:exact}}


/* ==========================================================
   TajirNova 3.1.2 — Auth isolation and green enterprise polish
   ========================================================== */

/* Absolute screen isolation: login and ERP can never occupy the page together. */
#authScreen.hidden,
#authScreen[hidden],
body:not(.logged-out) #authScreen{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
  position:fixed!important;
  inset:0!important;
  width:0!important;
  height:0!important;
  min-height:0!important;
  overflow:hidden!important;
}
#appShell.hidden,
#appShell[hidden],
body.logged-out #appShell{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
body.logged-out,html.logged-out{
  overflow:auto!important;
  background:#eef8f5!important;
}
body:not(.logged-out){overflow-x:hidden!important}

/* Login: lighter, premium green atmosphere. */
.signin-only-screen{
  min-height:100dvh!important;
  padding:clamp(16px,4vw,42px)!important;
  background:
    radial-gradient(circle at 8% 10%,rgba(45,212,191,.30),transparent 30%),
    radial-gradient(circle at 92% 88%,rgba(14,165,233,.18),transparent 30%),
    linear-gradient(145deg,#e9f8f4 0%,#dff3ee 46%,#eaf3fb 100%)!important;
}
.login-atmosphere-one{
  background:rgba(20,184,166,.16)!important;
  filter:blur(70px)!important;
}
.login-atmosphere-two{
  background:rgba(14,165,233,.12)!important;
  filter:blur(80px)!important;
}
.nova-login-shell{
  border:1px solid rgba(15,118,110,.16)!important;
  box-shadow:0 28px 80px rgba(15,76,70,.16)!important;
}
.nova-login-brand{
  background:
    radial-gradient(circle at 20% 12%,rgba(45,212,191,.22),transparent 28%),
    linear-gradient(155deg,#0b4f4a 0%,#0f766e 56%,#164e63 100%)!important;
}
.nova-login-card{
  background:rgba(255,255,255,.96)!important;
}
.nova-brand-symbol,
.logo-mark{
  background:linear-gradient(135deg,#2dd4bf 0%,#0f9f82 52%,#0f766e 100%)!important;
  box-shadow:0 12px 28px rgba(15,118,110,.24)!important;
}
.nova-access-badge{
  color:#0f766e!important;
  border-color:#b7e4d9!important;
  background:#effbf7!important;
}
.nova-access-badge span{background:#10b981!important}
.nova-input-wrap:focus-within{
  border-color:#28a98f!important;
  box-shadow:0 0 0 4px rgba(20,184,166,.12)!important;
}
.nova-input-wrap input:-webkit-autofill,
.nova-input-wrap input:-webkit-autofill:hover,
.nova-input-wrap input:-webkit-autofill:focus{
  -webkit-text-fill-color:#0f172a!important;
  -webkit-box-shadow:0 0 0 1000px #f4fbf8 inset!important;
  transition:background-color 9999s ease-out 0s;
}
.signin-button,
.signin-button:hover,
.signin-button:focus,
.signin-button:focus-visible,
.signin-button:active,
.signin-button.loading{
  color:#fff!important;
  border-color:#0f766e!important;
  background:linear-gradient(135deg,#0f8b74,#0f766e 58%,#115e59)!important;
  box-shadow:0 12px 26px rgba(15,118,110,.24)!important;
  outline-color:rgba(20,184,166,.28)!important;
  -webkit-tap-highlight-color:transparent!important;
}
.signin-button:active{transform:translateY(1px)!important}
.login-button-arrow{background:rgba(255,255,255,.16)!important}
.password-toggle,
.password-toggle:hover,
.password-toggle:focus{
  color:#0f766e!important;
  background:#ecfdf5!important;
  border-color:#d1fae5!important;
}
.whatsapp-contact-button{
  color:#087a51!important;
  background:#ecfdf5!important;
  border-color:#b7ebd3!important;
}

/* Main ERP green-led enterprise system */
:root{
  --primary:#0f766e!important;
  --primary-dark:#115e59!important;
  --primary-soft:#ecfdf5!important;
  --accent:#0891b2!important;
  --accent-soft:#ecfeff!important;
}
.sidebar{
  background:
    radial-gradient(circle at 20% 0,rgba(45,212,191,.22),transparent 34%),
    linear-gradient(180deg,#0b2528 0%,#0d3335 62%,#081e22 100%)!important;
}
.nav-btn.active{
  background:linear-gradient(135deg,#0f8b74,#0f766e 58%,#0e7490)!important;
  box-shadow:0 10px 24px rgba(15,118,110,.28)!important;
}
.btn.primary,
.btn.primary:hover,
.btn.primary:focus,
.btn.primary:active{
  background:linear-gradient(135deg,#0f8b74,#0f766e)!important;
  border-color:#0f766e!important;
}
.topbar{
  border-bottom-color:#d8e8e3!important;
}
.page-toolbar:before,.dashboard-toolbar:before,.module-accent:before,.module-panel:before{
  background:linear-gradient(180deg,#14b8a6,#0f766e 55%,#0891b2)!important;
}

/* Apply the same colored visual language to every remaining metric card. */
.kpi-card,.card,.summary-card,.report-metric,.category-summary-card,
.accounts-summary-grid>article,.courier-summary-card,.account-summary-card{
  position:relative!important;
  overflow:hidden!important;
  border-top:3px solid var(--metric-color,#0f766e)!important;
}
.kpi-card:after,.card:after,.summary-card:after,.report-metric:after,
.category-summary-card:after,.accounts-summary-grid>article:after,
.courier-summary-card:after,.account-summary-card:after{
  content:""!important;
  position:absolute!important;
  right:-28px!important;
  bottom:-34px!important;
  width:78px!important;
  height:78px!important;
  border-radius:50%!important;
  background:color-mix(in srgb,var(--metric-color,#0f766e) 9%,transparent)!important;
  pointer-events:none!important;
}
.kpi-card:nth-child(5n+1),.card:nth-child(5n+1),.summary-card:nth-child(5n+1),
.report-metric:nth-child(5n+1),.accounts-summary-grid>article:nth-child(5n+1){--metric-color:#0f766e}
.kpi-card:nth-child(5n+2),.card:nth-child(5n+2),.summary-card:nth-child(5n+2),
.report-metric:nth-child(5n+2),.accounts-summary-grid>article:nth-child(5n+2){--metric-color:#2563eb}
.kpi-card:nth-child(5n+3),.card:nth-child(5n+3),.summary-card:nth-child(5n+3),
.report-metric:nth-child(5n+3),.accounts-summary-grid>article:nth-child(5n+3){--metric-color:#7c3aed}
.kpi-card:nth-child(5n+4),.card:nth-child(5n+4),.summary-card:nth-child(5n+4),
.report-metric:nth-child(5n+4),.accounts-summary-grid>article:nth-child(5n+4){--metric-color:#d97706}
.kpi-card:nth-child(5n+5),.card:nth-child(5n+5),.summary-card:nth-child(5n+5),
.report-metric:nth-child(5n+5),.accounts-summary-grid>article:nth-child(5n+5){--metric-color:#dc2626}
.kpi-icon{
  color:var(--metric-color,#0f766e)!important;
  background:color-mix(in srgb,var(--metric-color,#0f766e) 10%,white)!important;
}
.kpi-card:hover,.card:hover,.summary-card:hover,.report-metric:hover{
  border-color:color-mix(in srgb,var(--metric-color,#0f766e) 32%,#dfe6ef)!important;
}

/* Consistent accents for analysis sections throughout modules. */
body[data-page="expenses"] .page-toolbar,
body[data-page="taxrecords"] .page-toolbar,
body[data-page="assets"] .page-toolbar,
body[data-page="withdrawals"] .page-toolbar,
body[data-page="accounts"] .accounts-hero,
body[data-page="owner"] .page-toolbar,
body[data-page="loans"] .page-toolbar,
body[data-page="courierdashboard"] .page-toolbar,
body[data-page="tcssettlements"] .page-toolbar,
body[data-page="leopardsettlements"] .page-toolbar,
body[data-page="couriersettlements"] .page-toolbar{
  background:
    radial-gradient(circle at 96% 0,rgba(20,184,166,.13),transparent 28%),
    linear-gradient(135deg,#ffffff,#f2fbf8)!important;
  border-color:#d7ebe5!important;
}

/* iPhone login fitting and no sticky overlap. */
@media(max-width:900px){
  .signin-only-screen{
    display:grid!important;
    align-items:center!important;
    min-height:100dvh!important;
    padding:max(14px,env(safe-area-inset-top)) 10px max(18px,env(safe-area-inset-bottom))!important;
  }
  .nova-login-shell{margin:auto!important}
  #authScreen.hidden,#authScreen[hidden],body:not(.logged-out) #authScreen{display:none!important}
}


/* ==========================================================
   TajirNova 3.1.3 — Final auth detach + adaptive green UI
   ========================================================== */
:root{
  --primary:#0f766e!important;--primary-dark:#115e59!important;--primary-soft:#ecfdf5!important;
  --accent:#65a30d!important;--accent-soft:#f7fee7!important;
  --sidebar:#12372f!important;--sidebar-2:#1a4d3f!important;
  --bg:#f6f8f2!important;--card:#fffef9!important;--surface:#fffef9!important;
  --text:#17211d!important;--muted:#66756d!important;--line:#dce6dd!important;--soft:#f8faf6!important;
  --green:#0f9f6e!important;--amber:#d97706!important;--cyan:#0f766e!important;
}
html,body{background:radial-gradient(circle at 100% 0,rgba(132,204,22,.06),transparent 25%),linear-gradient(180deg,#f8faf5,#f3f6f0)!important}
.sidebar{background:radial-gradient(circle at 20% 0,rgba(132,204,22,.16),transparent 32%),linear-gradient(180deg,#12372f 0%,#184b3e 62%,#102e28 100%)!important}
.nav-btn.active{background:linear-gradient(135deg,#0f766e,#16856e 60%,#65a30d)!important}
.logo-mark,.nova-brand-symbol,.signin-brand-mark,.signin-mobile-logo{background:linear-gradient(135deg,#34d399 0%,#0f766e 60%,#65a30d 100%)!important}
.btn.primary,.btn.primary:hover,.btn.primary:focus,.btn.primary:active,
.signin-button,.signin-button:hover,.signin-button:focus,.signin-button:active,.signin-button.loading{
  background:linear-gradient(135deg,#0f8b74,#0f766e 62%,#4d7c0f)!important;border-color:#0f766e!important;color:#fff!important
}
.topbar{background:rgba(255,254,249,.94)!important;border-bottom-color:#dce6dd!important}
.page-toolbar,.dashboard-toolbar,.settings-hero,.category-hero,.accounts-hero{
  background:radial-gradient(circle at 96% 0,rgba(132,204,22,.10),transparent 28%),linear-gradient(135deg,#fffef9,#f4faf4)!important;border-color:#dce8de!important
}
.module-accent:before,.module-panel:before,.page-toolbar:before,.dashboard-toolbar:before{background:linear-gradient(180deg,#22c55e,#0f766e 62%,#65a30d)!important}
.card,.panel,.kpi-card,.summary-card,.report-metric,.settings-card,.account-pro-card,.chart-panel{background:#fffef9!important;border-color:#dfe8df!important}

/* Login is physically detached after sign-in; this is an extra safety layer. */
#authScreen.hidden,#authScreen[hidden],body:not(.logged-out) #authScreen{display:none!important;min-height:0!important;height:0!important;width:0!important;margin:0!important;padding:0!important;overflow:hidden!important}
#authMount{display:none!important;width:0!important;height:0!important}

/* Same colored metric language across all modules. */
.kpi-card,.card,.summary-card,.report-metric,.category-summary-card,.accounts-summary-grid>article,.courier-summary-card,.account-summary-card{border-top:3px solid var(--metric-color,#0f766e)!important}
.kpi-card:nth-child(6n+1),.card:nth-child(6n+1),.summary-card:nth-child(6n+1),.report-metric:nth-child(6n+1),.accounts-summary-grid>article:nth-child(6n+1){--metric-color:#0f766e}
.kpi-card:nth-child(6n+2),.card:nth-child(6n+2),.summary-card:nth-child(6n+2),.report-metric:nth-child(6n+2),.accounts-summary-grid>article:nth-child(6n+2){--metric-color:#16a34a}
.kpi-card:nth-child(6n+3),.card:nth-child(6n+3),.summary-card:nth-child(6n+3),.report-metric:nth-child(6n+3),.accounts-summary-grid>article:nth-child(6n+3){--metric-color:#65a30d}
.kpi-card:nth-child(6n+4),.card:nth-child(6n+4),.summary-card:nth-child(6n+4),.report-metric:nth-child(6n+4),.accounts-summary-grid>article:nth-child(6n+4){--metric-color:#d97706}
.kpi-card:nth-child(6n+5),.card:nth-child(6n+5),.summary-card:nth-child(6n+5),.report-metric:nth-child(6n+5),.accounts-summary-grid>article:nth-child(6n+5){--metric-color:#b45309}
.kpi-card:nth-child(6n+6),.card:nth-child(6n+6),.summary-card:nth-child(6n+6),.report-metric:nth-child(6n+6),.accounts-summary-grid>article:nth-child(6n+6){--metric-color:#047857}
.kpi-value,.card .value,.summary-card strong,.report-metric strong,.cash-bank-grid strong,.account-pro-balance strong{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;font-variant-numeric:tabular-nums}

/* Mobile scaling for iPhone and Galaxy widths. */
@media(max-width:900px){
  html{font-size:12px!important}body{font-size:11px!important}.main{padding:0 7px 16px!important}
  .topbar{height:54px!important;margin:0 -7px 7px!important;padding:0 7px!important}
  .page-title-line h2{font-size:clamp(12px,3.4vw,14px)!important}.page-title-line small{font-size:clamp(7px,2vw,8px)!important;max-width:86px!important}
  .kpi-grid,.cards,.summary-grid,.accounts-summary-grid,.courier-summary-grid,.business-aware-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important}
  .kpi-card,.card,.summary-card,.report-metric,.accounts-summary-grid>article,.courier-summary-card,.business-aware-kpis .kpi-card{min-width:0!important;min-height:70px!important;padding:7px 6px!important;border-radius:9px!important}
  .kpi-label,.card .label,.summary-card small,.report-metric small{max-width:calc(100% - 18px)!important;font-size:clamp(6px,1.85vw,7.2px)!important;line-height:1.12!important;letter-spacing:0!important}
  .kpi-value,.card .value,.summary-card strong,.report-metric strong{margin-top:4px!important;font-size:clamp(8.5px,2.55vw,11px)!important;line-height:1.08!important}
  .kpi-meta,.card .hint,.summary-card span,.report-metric span{margin-top:3px!important;font-size:clamp(5.5px,1.55vw,6.8px)!important;line-height:1.1!important}
  .kpi-icon{width:20px!important;height:20px!important;border-radius:6px!important;font-size:8.5px!important}
  .page-toolbar,.dashboard-toolbar,.settings-hero,.category-hero,.accounts-hero,.pos-header{padding:10px!important;border-radius:11px!important}
  .page-toolbar h3,.dashboard-title-copy h3{font-size:clamp(12px,3.2vw,14px)!important}.page-toolbar p,.dashboard-title-copy p{font-size:clamp(7px,2vw,8.5px)!important}
  .panel{padding:9px!important}.panel-head h3{font-size:clamp(9.5px,2.7vw,11px)!important}.table th,.table td{font-size:clamp(7px,1.9vw,8.5px)!important}.btn{font-size:clamp(7px,2vw,8.5px)!important}
  .chart-box,.business-aware-charts .chart-box{height:145px!important}.chart-panel{padding:8px!important}.chart-panel .panel-head{margin-bottom:5px!important}.chart-panel .panel-head h3{font-size:9px!important}.chart-panel .panel-head small{font-size:6.5px!important}
  .signin-only-screen{background:radial-gradient(circle at 10% 8%,rgba(52,211,153,.22),transparent 30%),radial-gradient(circle at 90% 90%,rgba(132,204,22,.12),transparent 28%),linear-gradient(150deg,#edf9f2,#f7f9ee)!important}
  .nova-login-card{padding:22px 17px!important;border:1px solid #dbe8df!important;box-shadow:0 22px 55px rgba(25,78,60,.14)!important}
}
@media(max-width:412px){
  .kpi-card,.card,.summary-card,.report-metric,.accounts-summary-grid>article,.courier-summary-card,.business-aware-kpis .kpi-card{min-height:66px!important;padding:6px 5px!important}
  .kpi-label,.card .label,.summary-card small,.report-metric small{font-size:6px!important;max-width:calc(100% - 16px)!important}
  .kpi-value,.card .value,.summary-card strong,.report-metric strong{font-size:8.7px!important}
  .kpi-meta,.card .hint,.summary-card span,.report-metric span{font-size:5.5px!important}
  .kpi-icon{width:18px!important;height:18px!important;font-size:7.5px!important}
  .chart-box,.business-aware-charts .chart-box{height:132px!important}
}
@media(max-width:360px){.kpi-value,.card .value,.summary-card strong,.report-metric strong{font-size:8px!important}}


/* ==========================================================
   TajirNova 3.1.5 — final login/white-screen fix
   ========================================================== */
#authMount{display:none!important;width:0!important;height:0!important}

body.erp-active #authScreen,
html.erp-active #authScreen,
body:not(.logged-out) #authScreen,
html:not(.logged-out) #authScreen,
#authScreen.hidden,
#authScreen[hidden]{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
  position:fixed!important;
  inset:0!important;
  width:0!important;
  height:0!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  overflow:hidden!important;
  z-index:-999999!important;
}

body.logged-out #appShell,
html.logged-out #appShell,
#appShell.hidden,
#appShell[hidden]{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

body.erp-active #appShell,
html.erp-active #appShell{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  min-height:100dvh!important;
}

.workspace-opening{
  min-height:calc(100dvh - 120px);
  display:grid;
  place-items:center;
  align-content:center;
  gap:8px;
  text-align:center;
  color:var(--text);
}
.workspace-opening-spinner{
  width:38px;
  height:38px;
  border:4px solid #d9ebe3;
  border-top-color:#0f766e;
  border-radius:50%;
  animation:workspaceSpin .75s linear infinite;
}
.workspace-opening strong{font-size:14px}
.workspace-opening small{color:var(--muted);font-size:10px}
@keyframes workspaceSpin{to{transform:rotate(360deg)}}

@media(max-width:480px){
  .workspace-opening{min-height:calc(100dvh - 90px)}
  .workspace-opening-spinner{width:32px;height:32px;border-width:3px}
}


/* TajirNova 3.1.6 — report, print, graph and sidebar polish */
.sidebar{
  background:
    radial-gradient(circle at 18% 0,rgba(132,168,59,.10),transparent 30%),
    linear-gradient(180deg,#202820 0%,#29332a 60%,#1d251f 100%)!important;
  border-right-color:rgba(255,255,255,.07)!important;
}
.sidebar-head{background:rgba(255,255,255,.025)!important}
.nav-btn.active{
  background:linear-gradient(135deg,#0f766e,#4d7a46 65%,#806b3b)!important;
  box-shadow:0 10px 24px rgba(10,42,31,.30)!important;
}
.nav-btn:hover{background:rgba(255,255,255,.065)!important}

.courier-blue-toolbar{
  border-left-color:#0f766e!important;
  background:linear-gradient(90deg,#edf7f1,#fffef9)!important;
}
.courier-blue-toolbar h3,.settlement-summary-panel h4,.settlement-summary-item b{color:#174b3f!important}
.courier-kpis .kpi-card{border-top-color:var(--metric-color,#0f766e)!important}
.settlement-summary-panel{background:#f1f8f2!important;border-color:#d3e5d7!important}
.settlement-summary-item{border-bottom-color:#dce6dd!important}
.attachment-row{border-color:#dce6dd!important;background:#fbfcf8!important}
.courier-doc-header{
  background:linear-gradient(135deg,#f1f8f2,#fbf8ec)!important;
  color:#17211d!important;
  border:1px solid #dce6dd!important;
}
.courier-doc-header h1{color:#0f766e!important}

.report-document,.courier-document,.courier-report-document{
  background:#fffef9!important;
  color:#17211d!important;
}
.report-header{
  background:linear-gradient(135deg,#f1f8f2,#fbf8ec)!important;
  color:#17211d!important;
  border:1px solid #dce6dd!important;
  border-radius:12px!important;
}
.report-header h1{color:#0f766e!important}
.report-section h3{
  color:#174b3f!important;
  background:linear-gradient(90deg,#edf7f1,#fbf8ec)!important;
  border-left:4px solid #0f766e!important;
  padding:7px 9px!important;
  border-radius:0 8px 8px 0!important;
}
.report-table th{background:#edf7f1!important;color:#174b3f!important}
.report-chart-card{background:#fffef9!important;border-color:#dce6dd!important}
.report-footer span:first-child{color:#0f766e!important;font-weight:750!important}

@media print{
  @page{size:A4 portrait;margin:9mm}
  body{background:#fff!important}
  .report-document,.courier-document,.courier-report-document{
    color:#17211d!important;
    background:#fff!important;
    box-shadow:none!important;
  }
  .report-header,.courier-doc-header{
    background:linear-gradient(135deg,#f1f8f2,#fbf8ec)!important;
    color:#17211d!important;
    border-color:#dce6dd!important;
  }
  .report-metric{
    background:#fffef9!important;
    border-color:#dce6dd!important;
  }
  .report-table th{background:#edf7f1!important;color:#174b3f!important}
  .report-section h3{background:linear-gradient(90deg,#edf7f1,#fbf8ec)!important;color:#174b3f!important}
}

.profile-menu-wrap{position:relative}.profile-menu-button{cursor:pointer;border:1px solid var(--line)!important;background:var(--card)!important}.profile-copy{text-align:left}.profile-copy strong,.profile-copy small{display:block}.profile-menu-chevron{color:var(--muted)}.profile-menu{position:absolute;right:0;top:calc(100% + 9px);z-index:1200;width:230px;padding:8px;border:1px solid #dce6dd;border-radius:14px;background:#fffef9;box-shadow:0 20px 50px rgba(23,33,29,.16)}.profile-menu-head{display:flex;align-items:center;gap:10px;padding:9px;margin-bottom:6px;border-bottom:1px solid #e4ebe5}.profile-menu-head small{display:block;color:var(--muted);font-size:9px}.profile-menu-item{width:100%;min-height:38px;display:flex;align-items:center;gap:9px;padding:8px 10px;border:0;border-radius:9px;background:transparent;color:var(--text);font-size:10px;font-weight:700;text-align:left}.profile-menu-item:hover{background:#f2f8f3}.profile-menu-item.danger{color:#b42318}.profile-menu-item.danger:hover{background:#fef3f2}@media(max-width:900px){.profile-menu{position:fixed;right:10px;top:62px;width:min(240px,calc(100vw - 20px))}.profile-menu-button{width:36px!important;min-width:36px!important;padding:2px!important}.profile-menu-button .profile-copy,.profile-menu-button .profile-menu-chevron{display:none!important}}

/* v3.1.8.4 mobile dashboard/date/search fixes */
.mobile-global-search{display:block!important}
@media(max-width:768px){
  .topbar,.app-header,.header{display:flex!important;flex-wrap:wrap!important;gap:6px!important}
  .global-search,.topbar-search,.header-search,.search-box{display:flex!important;width:100%!important;order:3!important}
  .global-search input,.topbar-search input,.header-search input,.search-box input{display:block!important;width:100%!important;min-width:0!important}
  .mobile-dashboard-toolbar{display:block!important;padding:9px!important}
  .dashboard-toolbar-actions{display:grid!important;grid-template-columns:1fr auto!important;gap:7px!important;width:100%!important}
  .dashboard-period-control{grid-column:1/-1!important;width:100%!important}
  .period-filter{display:grid!important;grid-template-columns:1fr!important;gap:7px!important;width:100%!important}
  .period-filter .compact-field,.period-filter select,.period-filter input{width:100%!important;min-width:0!important}
  .period-custom{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;width:100%!important}
  .period-custom.hidden{display:none!important}
  .period-custom .field{min-width:0!important}
  .period-custom .btn{grid-column:1/-1!important;width:100%!important}
  .period-label{display:block!important;font-size:10px!important}
  .dashboard-report-btn .dashboard-report-text{display:none!important}
  .dashboard-report-btn{width:36px!important;padding:6px!important}
  .table-toolbar{display:flex!important;flex-direction:column!important;align-items:stretch!important}
  .table-toolbar .table-filters,.table-toolbar .actions{display:flex!important;flex-wrap:wrap!important;width:100%!important;gap:6px!important}
  .table-toolbar .table-filters>*{flex:1 1 140px!important;min-width:0!important}
}


/* =========================================================
   v3.1.8.5 — Professional Mobile Navigation & Bulk Actions
   ========================================================= */

/* Selection columns remain hidden until user explicitly enters selection mode */
.bulk-select-col{display:none!important}
body.bulk-select-sales .bulk-select-col,
body.bulk-select-customers .bulk-select-col,
body.bulk-select-products .bulk-select-col{display:table-cell!important}
.bulk-record-checkbox{width:17px!important;height:17px!important;min-height:17px!important;accent-color:#0f766e}

.data-action-sheet{display:grid;gap:8px}
.data-action-item{
  width:100%;display:flex;align-items:center;gap:12px;padding:13px;
  border:1px solid var(--line);border-radius:12px;background:var(--card);
  color:var(--text);text-align:left;box-shadow:none
}
.data-action-item:hover{background:#f5faf7;border-color:#bcd8cf}
.data-action-item .data-action-icon{
  width:36px;height:36px;display:grid;place-items:center;border-radius:10px;
  background:#e9f7f2;color:#0f766e;font-size:18px;font-weight:800
}
.data-action-item div{flex:1;min-width:0}
.data-action-item b,.data-action-item small{display:block}
.data-action-item small{margin-top:2px;color:var(--muted);font-size:9px}
.data-action-item i{font-style:normal;color:var(--muted);font-size:18px}

.bulk-selection-bar{
  position:fixed;left:50%;bottom:20px;z-index:2500;transform:translateX(-50%);
  display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid #cddbd6;
  border-radius:14px;background:rgba(255,255,255,.97);box-shadow:0 18px 48px rgba(15,23,42,.18);
  backdrop-filter:blur(14px)
}
.bulk-selection-bar>span{min-width:76px;font-size:10px;font-weight:800;color:#334155}
.bulk-selection-bar.hidden{display:none!important}

.mobile-bottom-nav{display:none}

@media(max-width:900px){
  /* Sidebar is hidden by default and opens only from the menu button */
  .sidebar{
    position:fixed!important;left:0!important;top:0!important;bottom:0!important;
    width:min(82vw,260px)!important;max-width:260px!important;
    transform:translateX(-105%)!important;z-index:2100!important;
    transition:transform .22s ease!important
  }
  .sidebar.open{transform:translateX(0)!important}
  body:not(.sidebar-mobile-open) .sidebar{transform:translateX(-105%)!important}
  .sidebar-backdrop{z-index:2050!important}
  .main{margin-left:0!important;width:100%!important;padding-bottom:76px!important}

  /* Clean two-row mobile header: title/actions, then search */
  .topbar{
    height:auto!important;min-height:0!important;margin:0 -7px 8px!important;
    padding:max(7px,env(safe-area-inset-top)) 8px 8px!important;
    display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:"left actions" "search search"!important;
    align-items:center!important;gap:7px!important;background:rgba(255,254,249,.98)!important
  }
  .topbar-left{grid-area:left!important;min-width:0!important;display:flex!important;align-items:center!important;gap:7px!important}
  .top-actions{grid-area:actions!important;display:flex!important;align-items:center!important;gap:5px!important;min-width:0!important}
  .global-search{
    grid-area:search!important;display:flex!important;width:100%!important;min-width:0!important;
    height:36px!important;margin:0!important;border-radius:10px!important;background:#fff!important
  }
  .global-search input{width:100%!important;min-width:0!important;font-size:11px!important}
  .global-search kbd{display:none!important}
  .page-heading{min-width:0!important}
  .page-title-line h2{font-size:15px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .page-title-line small,.page-business-separator,.breadcrumb{display:none!important}
  #desktopSidebarToggle{display:none!important}
  #menuBtn{display:grid!important;width:36px!important;min-width:36px!important;height:36px!important}
  #themeBtn,#notificationBtn,#fullscreenBtn,#onlineBadge,#installBtn{display:none!important}
  .profile-menu-wrap{display:none!important}
  #quickSaleBtn{
    display:grid!important;place-items:center!important;width:38px!important;min-width:38px!important;
    height:38px!important;padding:0!important;font-size:0!important;border-radius:11px!important
  }
  #quickSaleBtn:before{content:"+";font-size:21px;font-weight:850}

  /* Dashboard date controls no longer overlap */
  .mobile-dashboard-toolbar{padding:10px!important;overflow:visible!important}
  .dashboard-toolbar-actions{display:block!important;width:100%!important}
  .dashboard-period-control{width:100%!important}
  .period-filter{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:7px!important;width:100%!important}
  .period-filter>.compact-field,.period-filter>select{width:100%!important;max-width:none!important}
  .period-custom{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:7px!important;width:100%!important}
  .period-custom.hidden{display:none!important}
  .period-custom .field{min-width:0!important;width:100%!important}
  .period-custom input{width:100%!important;min-width:0!important}
  .period-custom .btn{grid-column:1/-1!important;width:100%!important}
  .dashboard-report-btn{display:none!important}

  /* Compact professional table controls */
  .table-toolbar{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important}
  .table-toolbar .table-filters{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;width:100%!important}
  .table-toolbar .table-filters input{grid-column:1/-1!important}
  .table-toolbar .table-filters>*{width:100%!important;min-width:0!important}
  .table-toolbar .actions{display:flex!important;flex-wrap:wrap!important;gap:6px!important;width:100%!important}
  .table-toolbar .actions .btn{flex:0 0 auto!important}
  .data-menu-btn{order:1}
  .report-action-btn{order:2}
  .table-toolbar .actions .btn.primary{margin-left:auto!important;order:3}

  /* Mobile tables horizontally scroll without crushing columns */
  .table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  .table{min-width:980px!important}
  .table th,.table td{white-space:nowrap!important}
  .table td:nth-child(4),.table td:nth-child(5){white-space:normal!important;min-width:145px!important}

  /* Compact mobile typography/cards */
  body{font-size:10.5px!important}
  .main{padding-left:7px!important;padding-right:7px!important}
  .cards{gap:7px!important}
  .card{padding:9px!important}
  .card h3,.card strong{font-size:12px!important}
  .card .value{font-size:15px!important}
  .chart-panel{padding:9px!important}
  .chart-box,.business-aware-charts .chart-box{height:170px!important}

  /* Bottom app navigation */
  .mobile-bottom-nav{
    position:fixed;left:0;right:0;bottom:0;z-index:1900;
    display:grid!important;grid-template-columns:repeat(5,1fr);
    min-height:62px;padding:5px 7px max(5px,env(safe-area-inset-bottom));
    border-top:1px solid #dfe7e3;background:rgba(255,255,255,.97);
    box-shadow:0 -10px 30px rgba(15,23,42,.09);backdrop-filter:blur(16px)
  }
  .mobile-bottom-nav button{
    position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:2px;min-width:0;border:0;background:transparent;color:#748197;padding:3px!important;
    font-size:9px!important;box-shadow:none!important
  }
  .mobile-bottom-nav button span{font-size:17px;line-height:1}
  .mobile-bottom-nav button b{font-size:8.5px;font-weight:750}
  .mobile-bottom-nav button.active{color:#0f766e!important}
  .mobile-bottom-nav .mobile-pos-action{transform:translateY(-13px)}
  .mobile-bottom-nav .mobile-pos-action span{
    width:47px;height:47px;display:grid;place-items:center;border-radius:16px;
    background:linear-gradient(135deg,#0f766e,#65a30d);color:#fff;font-size:25px;
    box-shadow:0 8px 20px rgba(15,118,110,.28)
  }

  .bulk-selection-bar{
    left:8px;right:8px;bottom:73px;transform:none;justify-content:space-between;
    padding:7px 8px;border-radius:12px
  }
  .bulk-selection-bar .btn{min-height:32px!important;font-size:9.5px!important}
}

@media(max-width:430px){
  .table-toolbar .table-filters{grid-template-columns:1fr!important}
  .table-toolbar .table-filters input{grid-column:auto!important}
  .period-custom{grid-template-columns:1fr!important}
  .period-custom .btn{grid-column:auto!important}
}


/* =========================================================
   v3.1.8.7 — Mobile Header Search + Sales-only Date Range Fix
   ========================================================= */

.mobile-search-toggle{display:none!important}

@media(max-width:900px){
  /* Mobile header stays clean: menu, title, quick sale, search icon */
  .topbar{
    position:sticky!important;
    top:0!important;
    z-index:1800!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:"left actions"!important;
    padding:max(7px,env(safe-area-inset-top)) 8px 8px!important;
    gap:7px!important;
  }
  .global-search{
    display:none!important;
    position:fixed!important;
    left:50%!important;
    top:max(64px,calc(env(safe-area-inset-top) + 54px))!important;
    transform:translateX(-50%)!important;
    width:min(92vw,520px)!important;
    height:42px!important;
    z-index:2400!important;
    border-radius:12px!important;
    background:#fff!important;
    box-shadow:0 16px 44px rgba(15,23,42,.22)!important;
    border:1px solid #d8e2de!important;
    padding:0 12px!important;
  }
  body.mobile-search-open .global-search{display:flex!important}
  body.mobile-search-open::after{
    content:"";
    position:fixed;
    inset:0;
    z-index:2300;
    background:rgba(15,23,42,.28);
    backdrop-filter:blur(2px);
  }
  body.mobile-search-open .topbar{z-index:2350!important}
  .mobile-search-toggle{
    display:grid!important;
    place-items:center!important;
    width:36px!important;
    min-width:36px!important;
    height:36px!important;
    padding:0!important;
    border-radius:10px!important;
    font-size:18px!important;
    background:#fff!important;
    color:#415466!important;
    border:1px solid #d9e2df!important;
    box-shadow:none!important;
  }
  .top-actions{
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
  }

  /* Dashboard has no period control, so remove empty/overlap-prone area */
  body[data-page="dashboard"] .dashboard-period-control{display:none!important}
  body[data-page="dashboard"] .dashboard-toolbar-actions{
    display:flex!important;
    width:auto!important;
    margin-left:auto!important;
  }
  body[data-page="dashboard"] .dashboard-toolbar{
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    padding:10px!important;
  }
  body[data-page="dashboard"] .dashboard-title-copy{
    min-width:0!important;
    flex:1!important;
  }
  body[data-page="dashboard"] .dashboard-new-sale-btn{
    width:38px!important;
    min-width:38px!important;
    height:38px!important;
    padding:0!important;
    border-radius:11px!important;
    font-size:0!important;
  }
  body[data-page="dashboard"] .dashboard-new-sale-btn span:first-child{
    font-size:22px!important;
  }

  /* Sales is the only visible shared date range control */
  body[data-page="sales"] .page-toolbar{
    display:block!important;
    padding:12px!important;
    overflow:visible!important;
  }
  body[data-page="sales"] .page-toolbar>div:first-child{
    margin-bottom:10px!important;
  }
  body[data-page="sales"] .page-toolbar-actions{
    display:block!important;
    width:100%!important;
  }
  body[data-page="sales"] .period-filter{
    display:block!important;
    width:100%!important;
  }
  body[data-page="sales"] .period-filter>.field{
    width:100%!important;
    margin:0!important;
  }
  body[data-page="sales"] .period-filter select{
    width:100%!important;
    min-height:42px!important;
  }
  body[data-page="sales"] .period-label{
    display:none!important;
  }
  body[data-page="sales"] .period-custom{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    width:100%!important;
    margin-top:8px!important;
  }
  body[data-page="sales"] .period-custom.hidden{display:none!important}
  body[data-page="sales"] .period-custom .field,
  body[data-page="sales"] .period-custom input,
  body[data-page="sales"] .period-custom .btn{
    width:100%!important;
    min-width:0!important;
  }

  /* Avoid duplicate vertical space from desktop toolbar rules */
  body[data-page="sales"] .page-toolbar.module-accent::before{display:none!important}
  body[data-page="sales"] .page-toolbar h3{font-size:15px!important}
  body[data-page="sales"] .page-toolbar p{font-size:10px!important;line-height:1.4!important}
}

@media(max-width:430px){
  .global-search{width:calc(100vw - 22px)!important}
}


/* v3.1.8.8 — High-speed barcode scanner */
.scanner-video-wrap video,
.pos-scanner-video-wrap video{
  image-rendering:auto;
  transform:translateZ(0);
  will-change:contents;
}
.scanner-frame::after,
.pos-scanner-frame::after{
  animation:scannerPulse .85s ease-in-out infinite alternate;
}
@keyframes scannerPulse{
  from{opacity:.55}
  to{opacity:1}
}
.scanner-status,.pos-scanner-status{font-weight:700}


/* =========================================================
   v3.1.8.9 — Clean module UI and overflow fixes
   ========================================================= */
html,body,.app,.main,#content{max-width:100%;overflow-x:hidden}
.topbar,.topbar-left,.top-actions,.page-heading{min-width:0}
.top-actions{margin-left:auto;max-width:100%}
#quickSaleBtn{flex:0 0 auto}
.panel-head,.table-toolbar,.actions{min-width:0}
.actions{flex-wrap:wrap}
.compact-date-btn{white-space:nowrap}
.date-range-modal-form{display:grid;gap:12px}
.modal-actions{display:flex;justify-content:flex-end;gap:8px}

@media(max-width:900px){
  .topbar{
    width:100%!important;
    max-width:100%!important;
    overflow:hidden!important;
  }
  .topbar-left{max-width:calc(100% - 92px)!important}
  .top-actions{
    width:auto!important;
    max-width:88px!important;
    justify-content:flex-end!important;
    overflow:visible!important;
  }
  #mobileSearchToggle,#quickSaleBtn{
    width:36px!important;
    min-width:36px!important;
    height:36px!important;
    flex:0 0 36px!important;
  }
  #quickSaleBtn{
    position:relative!important;
    right:auto!important;
    margin:0!important;
  }

  /* No large intro/banner blocks on regular modules */
  .page-toolbar,.filter-panel,.category-hero,.dashboard-toolbar{
    display:none!important;
  }

  /* Dashboard starts directly from KPI cards */
  body[data-page="dashboard"] .business-aware-kpis{
    margin-top:4px!important;
  }

  /* Compact table action rows */
  .panel-head,.table-toolbar{
    padding:9px!important;
    gap:7px!important;
    align-items:center!important;
  }
  .panel-head h3{font-size:13px!important}
  .panel-head>.actions,.table-toolbar>.actions{
    margin-left:auto!important;
    width:auto!important;
  }

  /* Sales date filter appears as a small action, not a banner */
  body[data-page="sales"] .compact-date-btn{
    max-width:145px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  .category-summary-grid,.cards,.compact-summary-cards{
    margin-top:7px!important;
  }
}

@media(max-width:430px){
  .topbar-left{max-width:calc(100% - 84px)!important}
  .top-actions{max-width:82px!important;gap:4px!important}
  #mobileSearchToggle,#quickSaleBtn{
    width:34px!important;
    min-width:34px!important;
    height:34px!important;
    flex-basis:34px!important;
  }
  .panel-head,.table-toolbar{
    align-items:flex-start!important;
  }
}


/* =========================================================
   TajirNova v3.1.9.0 — Stable Mobile Header & Search
   ========================================================= */

.app-version-badge{
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  padding:2px 5px;
  border-radius:999px;
  background:#eef7f4;
  border:1px solid #d5e9e2;
  color:#17735d;
  font-size:8px;
  font-weight:800;
  line-height:1;
}
.sidebar-version{
  display:block!important;
  margin-bottom:7px;
  color:#94a8bc!important;
  font-size:8.5px!important;
  text-align:center;
}

@media(max-width:900px){
  html,body,.app-shell,.main{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
  }

  .main{
    padding-left:7px!important;
    padding-right:7px!important;
  }

  .topbar{
    display:flex!important;
    grid-template:none!important;
    align-items:center!important;
    width:100vw!important;
    max-width:100vw!important;
    box-sizing:border-box!important;
    margin-left:calc(50% - 50vw)!important;
    margin-right:calc(50% - 50vw)!important;
    padding-left:max(12px,env(safe-area-inset-left))!important;
    padding-right:max(14px,env(safe-area-inset-right))!important;
    gap:7px!important;
    overflow:hidden!important;
  }

  .topbar-left{
    display:flex!important;
    flex:1 1 auto!important;
    min-width:0!important;
    max-width:none!important;
    gap:7px!important;
  }

  .page-heading{
    flex:1 1 auto!important;
    min-width:0!important;
    overflow:hidden!important;
  }

  .page-title-line{
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    min-width:0!important;
  }

  .page-title-line h2{
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  .top-actions{
    display:flex!important;
    flex:0 0 auto!important;
    align-items:center!important;
    justify-content:flex-end!important;
    width:auto!important;
    max-width:none!important;
    min-width:0!important;
    gap:5px!important;
    overflow:visible!important;
    margin-left:auto!important;
  }

  #mobileSearchToggle{
    display:none!important;
  }

  .global-search{
    position:static!important;
    inset:auto!important;
    transform:none!important;
    display:flex!important;
    flex:0 1 118px!important;
    width:118px!important;
    min-width:76px!important;
    max-width:132px!important;
    height:36px!important;
    margin:0!important;
    padding:0 8px!important;
    border-radius:10px!important;
    background:#fff!important;
    border:1px solid #d9e2df!important;
    box-shadow:none!important;
    z-index:auto!important;
  }

  .global-search span{
    flex:0 0 auto;
    font-size:13px!important;
  }

  .global-search input{
    width:100%!important;
    min-width:0!important;
    height:32px!important;
    padding:0!important;
    font-size:10.5px!important;
  }

  .global-search input::placeholder{
    color:#8b98a8!important;
  }

  .global-search kbd{
    display:none!important;
  }

  body.mobile-search-open::after{
    display:none!important;
    content:none!important;
  }

  #quickSaleBtn{
    position:static!important;
    right:auto!important;
    flex:0 0 36px!important;
    width:36px!important;
    min-width:36px!important;
    height:36px!important;
    margin:0!important;
    padding:0!important;
    border-radius:10px!important;
  }
}

@media(max-width:430px){
  .global-search{
    flex-basis:94px!important;
    width:94px!important;
    min-width:68px!important;
    max-width:100px!important;
  }

  .app-version-badge{
    font-size:7.5px!important;
    padding:2px 4px!important;
  }

  #menuBtn,#quickSaleBtn{
    width:34px!important;
    min-width:34px!important;
    height:34px!important;
    flex-basis:34px!important;
  }
}

@media(max-width:370px){
  .global-search{
    flex-basis:72px!important;
    width:72px!important;
    min-width:62px!important;
  }

  .app-version-badge{
    display:none!important;
  }
}

/* Scanner rendering and guide optimization */
.pos-scanner-preview video,
.scanner-preview video,
video[id*="ScannerVideo"]{
  backface-visibility:hidden;
  transform:translateZ(0);
  image-rendering:auto;
}


/* =========================================================
   TajirNova v3.1.9.1 — Native-like single-shot scanner
   ========================================================= */
.pos-scanner-panel,
.modal-live-scanner{
  animation:scannerPanelIn .16s ease-out;
}
@keyframes scannerPanelIn{
  from{opacity:0;transform:translateY(4px)}
  to{opacity:1;transform:none}
}
.pos-scanner-preview,
.modal-live-preview{
  background:#020b0a!important;
  overflow:hidden!important;
}
.pos-scanner-preview video,
.modal-live-preview video,
#scannerVideo{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  filter:contrast(1.04) saturate(.88)!important;
}
.pos-scan-corners,
.modal-scan-frame{
  width:88%!important;
  height:45%!important;
  left:6%!important;
  top:27.5%!important;
  border-color:#62efbd!important;
  box-shadow:
    0 0 0 999px rgba(0,0,0,.28),
    0 0 18px rgba(98,239,189,.35)!important;
}
.pos-scan-line,
.modal-scan-line{
  left:7%!important;
  width:86%!important;
  background:linear-gradient(90deg,transparent,#6affc9,transparent)!important;
  box-shadow:0 0 10px #6affc9!important;
  animation-duration:1s!important;
}
.pos-scanner-info strong,
.modal-live-info strong{
  color:#0f766e!important;
}
#posStartScannerBtn{min-width:132px}
@media(max-width:768px){
  .pos-scanner-preview,
  .modal-live-preview{
    min-height:245px!important;
    max-height:52vh!important;
  }
  #posStartScannerBtn{width:100%!important}
}


/* =========================================================
   TajirNova v3.1.9.2 — Mobile Header & Modal Action Fix
   ========================================================= */

/* The version remains in sidebar/footer, not beside the page title. */
.app-version-badge{display:none!important}

@media(max-width:900px){
  /* Full-width header with: menu + title | search | plus */
  .topbar{
    display:flex!important;
    align-items:center!important;
    width:100vw!important;
    max-width:100vw!important;
    min-width:0!important;
    box-sizing:border-box!important;
    margin-left:calc(50% - 50vw)!important;
    margin-right:calc(50% - 50vw)!important;
    padding-left:max(12px,env(safe-area-inset-left))!important;
    padding-right:max(14px,env(safe-area-inset-right))!important;
    gap:7px!important;
    overflow:hidden!important;
  }

  .topbar-left{
    order:1!important;
    display:flex!important;
    align-items:center!important;
    flex:0 1 auto!important;
    min-width:0!important;
    max-width:48%!important;
    gap:7px!important;
  }

  .page-heading{
    min-width:0!important;
    flex:0 1 auto!important;
  }

  .page-title-line{
    min-width:0!important;
    display:flex!important;
    align-items:center!important;
    gap:0!important;
  }

  .page-title-line h2{
    margin:0!important;
    min-width:0!important;
    max-width:100%!important;
    font-size:13px!important;
    line-height:1.1!important;
    font-weight:800!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  .top-actions{
    order:2!important;
    display:flex!important;
    align-items:center!important;
    flex:1 1 0!important;
    min-width:0!important;
    width:auto!important;
    max-width:none!important;
    justify-content:flex-end!important;
    gap:5px!important;
    margin-left:auto!important;
    overflow:visible!important;
  }

  .global-search{
    order:1!important;
    position:static!important;
    inset:auto!important;
    transform:none!important;
    display:flex!important;
    flex:1 1 auto!important;
    width:auto!important;
    min-width:62px!important;
    max-width:145px!important;
    height:36px!important;
    margin:0!important;
    padding:0 8px!important;
    border-radius:10px!important;
    background:#fff!important;
    border:1px solid #d9e2df!important;
    box-shadow:none!important;
  }

  .global-search input{
    width:100%!important;
    min-width:0!important;
    height:32px!important;
    padding:0!important;
    font-size:10.5px!important;
  }

  .global-search kbd{display:none!important}

  #quickSaleBtn{
    order:2!important;
    position:static!important;
    right:auto!important;
    flex:0 0 36px!important;
    width:36px!important;
    min-width:36px!important;
    height:36px!important;
    margin:0!important;
    padding:0!important;
    border-radius:10px!important;
  }

  /* A full-screen editor should not compete with the app bottom navigation. */
  body.modal-open .mobile-bottom-nav{
    display:none!important;
  }

  .modal{
    z-index:2600!important;
  }

  .modal-panel{
    padding-bottom:calc(88px + env(safe-area-inset-bottom))!important;
  }

  .mobile-form-actions{
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    z-index:2700!important;
    margin:0!important;
    padding:10px 12px calc(10px + env(safe-area-inset-bottom))!important;
    background:rgba(255,255,255,.98)!important;
    border-top:1px solid #dfe7e3!important;
    box-shadow:0 -10px 28px rgba(15,23,42,.12)!important;
    backdrop-filter:blur(14px)!important;
  }

  .mobile-form-actions .btn{
    width:100%!important;
    min-height:44px!important;
    margin:0!important;
  }

  /* Keep the final fields visible above the fixed save button. */
  #modalBody form{
    padding-bottom:8px!important;
  }
}

@media(max-width:430px){
  .topbar-left{max-width:46%!important}
  .page-title-line h2{font-size:12.5px!important}
  .global-search{
    min-width:58px!important;
    max-width:112px!important;
  }
  #menuBtn,#quickSaleBtn{
    width:34px!important;
    min-width:34px!important;
    height:34px!important;
    flex-basis:34px!important;
  }
}

@media(max-width:370px){
  .topbar-left{max-width:44%!important}
  .page-title-line h2{font-size:12px!important}
  .global-search{
    min-width:54px!important;
    max-width:86px!important;
  }
}


/* =========================================================
   TajirNova v3.1.9.3 — Wider Search + Continuous 1080p Scanner
   ========================================================= */
@media(max-width:900px){
  .topbar-left{
    max-width:44%!important;
  }

  .global-search{
    flex-basis:160px!important;
    width:160px!important;
    min-width:92px!important;
    max-width:170px!important;
  }
}

@media(max-width:430px){
  .topbar-left{
    max-width:42%!important;
  }

  .global-search{
    flex-basis:132px!important;
    width:132px!important;
    min-width:82px!important;
    max-width:140px!important;
  }
}

@media(max-width:370px){
  .topbar-left{
    max-width:40%!important;
  }

  .global-search{
    flex-basis:104px!important;
    width:104px!important;
    min-width:72px!important;
    max-width:112px!important;
  }
}

/* Higher-detail camera preview without visual over-processing. */
.pos-scanner-preview video,
.modal-live-preview video,
#scannerVideo{
  filter:contrast(1.03) saturate(.92)!important;
  image-rendering:auto!important;
}


/* v3.1.9.4 product images + mobile profile */
.product-image-picker{display:grid;grid-template-columns:120px 1fr;gap:12px;align-items:start}
.product-image-preview{width:120px;height:120px;border:1px dashed var(--line);border-radius:14px;background:var(--soft);display:grid;place-items:center;overflow:hidden;color:var(--muted);font-size:10px;text-align:center;padding:8px}
.product-image-preview img{width:100%;height:100%;object-fit:cover;display:block}
.product-image-actions{display:flex;flex-direction:column;gap:8px}
.product-image-actions input[type=file]{width:100%;padding:8px;border:1px solid var(--line);border-radius:10px;background:var(--card)}
.product-list-cell{display:flex;align-items:center;gap:10px;min-width:0}
.product-list-thumb{width:42px;height:42px;border-radius:10px;background:var(--soft);display:grid;place-items:center;overflow:hidden;flex:0 0 auto;color:var(--muted);font-size:10px;font-weight:800}
.product-list-thumb img{width:100%;height:100%;object-fit:cover}
.profile-menu-version{padding:8px 10px 2px;color:var(--muted);font-size:9px;border-top:1px solid #e4ebe5;margin-top:6px}
.pos-product-name{font-size:10px!important;line-height:1.2!important;min-height:28px!important}
.pos-product-meta{font-size:8.5px!important}
@media(max-width:900px){
  .profile-menu-wrap{display:block!important;order:3!important}
  #quickSaleBtn{order:2!important}
  .global-search{order:1!important;flex:1 1 auto!important;min-width:120px!important;width:min(46vw,190px)!important}
}
@media(max-width:760px){
  .product-image-picker{grid-template-columns:1fr}
}
.field-span-2{grid-column:span 2}@media(max-width:900px){.field-span-2{grid-column:auto}}


/* v3.1.9.5 — Cloudinary product images and store branding */
.store-logo-settings{display:grid;grid-template-columns:150px minmax(0,1fr);gap:16px;align-items:start}
.store-logo-preview{width:150px;height:120px;border:1px dashed var(--line);border-radius:14px;background:var(--soft);display:grid;place-items:center;overflow:hidden;padding:10px;color:var(--muted);font-size:10px;text-align:center}
.store-logo-preview img{width:100%;height:100%;object-fit:contain;display:block}
.store-logo-controls{display:flex;flex-direction:column;gap:9px;min-width:0}
.store-logo-controls input[type=file]{width:100%;padding:9px;border:1px solid var(--line);border-radius:10px;background:var(--card)}
@media(max-width:720px){.store-logo-settings{grid-template-columns:1fr}.store-logo-preview{width:100%;max-width:220px;height:130px}}

/* v3.1.9.6 Cloudinary unsigned upload fix */

/* v3.1.9.7 — corrected Cloudinary environment cloud name */


/* TajirNova v3.1.9.8 branding and document logo fixes */
.sidebar-erp-logo{display:block;width:48px;height:48px;object-fit:contain;flex:0 0 48px}
.tajirnova-login-logo{display:block;width:86px;max-height:64px;object-fit:contain}
.receipt-title{margin-top:3px}
.report-brand{display:flex;align-items:center;gap:12px;min-width:0}
.report-store-logo{display:block;max-width:90px;max-height:68px;width:auto;height:auto;object-fit:contain;flex:0 0 auto}
@media(max-width:900px){
  .sidebar-erp-logo{width:44px;height:44px}
}


/* =========================================================
   TajirNova ERP v3.1.9.9 — final mobile/report/UI polish
   ========================================================= */
.sidebar{
  background:#fff!important;color:#17211d!important;border-right:1px solid #dfe8df!important;
  box-shadow:8px 0 30px rgba(31,55,43,.06)!important;
}
.sidebar-head{background:#fff!important;border-bottom:1px solid #e4ebe5!important;padding:10px 8px 14px!important;align-items:center!important}
.sidebar-erp-logo{width:54px!important;height:54px!important;object-fit:contain!important;background:#fff!important;border:1px solid #e1e9e2!important;border-radius:12px!important;padding:4px!important;flex:0 0 54px!important}
.sidebar-product-name{font-size:12px!important;color:#17211d!important;line-height:1.15!important}
#sidebarBusinessName{display:none!important}
#sidebarBusinessType{display:block!important;color:#66756d!important;font-size:8px!important;margin-top:3px!important;white-space:normal!important}
.nav-group-title{color:#7b8b82!important}.nav-btn{color:#405148!important}.nav-btn:hover{background:#f1f7f2!important;color:#0f766e!important}.nav-btn.active{background:linear-gradient(90deg,#e8f6ef,#f4f8e9)!important;color:#0f766e!important;box-shadow:inset 3px 0 #22a06b!important}.sidebar-foot{border-top:1px solid #e4ebe5!important}.sidebar-foot>small,.sidebar-version{color:#66756d!important}.sidebar-collapse-btn{color:#52635a!important}
.nova-sidebar-actions .danger-outline{color:#b42318!important;border-color:#f3c7c2!important;background:#fff!important}

/* Store logos remain readable even when uploaded with a white canvas. */
.report-brand,.courier-brand{display:flex;align-items:center;gap:12px;min-width:0}
.report-store-logo,.courier-store-logo{display:block!important;width:auto!important;height:auto!important;max-width:115px!important;max-height:76px!important;object-fit:contain!important;background:#fff!important;border:1px solid #e1e9e2!important;border-radius:12px!important;padding:7px!important;box-shadow:0 5px 18px rgba(31,55,43,.08)!important}
.courier-doc-header{align-items:center!important}.courier-brand h1{margin:0!important}

/* Settings had an unused top banner; the profile card now starts immediately. */
.settings-page>.settings-hero{display:none!important}.settings-page{padding-top:0!important}

/* Compact Accounts & Ledger summary. */
.accounts-hero{min-height:0!important;padding:13px 15px!important}.accounts-hero h3{font-size:15px!important}.accounts-hero p{font-size:8.5px!important}.accounts-summary-grid{gap:7px!important}.accounts-summary-grid article{padding:9px 10px!important;min-height:82px!important}.accounts-summary-grid b{font-size:15px!important;line-height:1.2!important;overflow-wrap:anywhere!important}.accounts-summary-grid small,.accounts-summary-grid span{font-size:8px!important}
.account-pro-balance b{overflow-wrap:anywhere!important;font-size:17px!important}

/* Report preview and controls on phones. */
.mobile-report-actions{display:none;gap:6px;margin:8px 0;position:sticky;top:58px;z-index:25;padding:7px;background:rgba(255,255,255,.96);border:1px solid #dfe8df;border-radius:11px;box-shadow:0 8px 24px rgba(31,55,43,.1);backdrop-filter:blur(10px)}
.mobile-report-actions .btn{flex:1!important;min-width:0!important}
.report-preview-shell{width:100%;overflow:auto;-webkit-overflow-scrolling:touch;padding-bottom:10px}

/* Dashboard graphs become more compact. */
.dashboard-charts .chart-box{height:165px!important}.dashboard-charts .chart-panel{padding:8px!important}.dashboard-charts .panel-head h3{font-size:9.5px!important}.dashboard-charts .panel-head small{font-size:7px!important}

.profile-menu{z-index:5000!important;pointer-events:auto!important}.profile-menu-wrap{z-index:4999!important}.profile-menu:not(.hidden){display:block!important;visibility:visible!important;opacity:1!important}

@media(max-width:900px){
  .profile-menu-wrap{display:block!important;position:relative!important;order:3!important;z-index:5000!important}
  .profile-menu-button{display:flex!important;pointer-events:auto!important}
  .profile-menu{position:fixed!important;top:62px!important;right:max(10px,env(safe-area-inset-right))!important;width:min(260px,calc(100vw - 20px))!important;max-height:calc(100dvh - 80px)!important;overflow:auto!important}
  .mobile-report-actions{display:flex!important}
  .report-preview-shell{margin-left:-2px;margin-right:-2px;width:calc(100% + 4px)!important}
  .report-document,.courier-report-document,.courier-document{min-width:720px!important;transform-origin:top left!important}
  .report-document,.courier-document{padding:14px!important}
  .report-header,.courier-doc-header{gap:12px!important}
  .report-store-logo,.courier-store-logo{max-width:100px!important;max-height:66px!important}
  .accounts-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .accounts-summary-grid article{min-width:0!important}
  .dashboard-charts .chart-box{height:140px!important}
}
@media(max-width:430px){
  .sidebar{width:min(82vw,285px)!important}.sidebar-erp-logo{width:50px!important;height:50px!important;flex-basis:50px!important}.sidebar-product-name{font-size:11px!important}
  .report-preview-shell{max-height:none!important}
  .accounts-summary-grid b{font-size:13px!important}
  .accounts-summary-grid article{padding:8px!important;min-height:76px!important}
}
@media print{.mobile-report-actions{display:none!important}.report-preview-shell{overflow:visible!important}.report-store-logo,.courier-store-logo{box-shadow:none!important}}

/* TajirNova v4.0.2 — PWA print and real PDF file sharing */
.document-action-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.pdf-render-host{font-family:Inter,Arial,sans-serif}
@media(max-width:900px){
  .document-action-row{display:grid;grid-template-columns:1fr 1fr}
  .document-action-row .btn{width:100%;min-height:42px;font-size:10px}
}
@media(max-width:420px){.document-action-row{grid-template-columns:1fr}}


/* =========================================================
   TajirNova ERP v4.0.3 — Report toolbar visibility + courier parity
   ========================================================= */

/* The primary reporting toolbar must always be visible on report pages. */
body[data-page="reports"] .report-system-panel,
body[data-page="courierreports"] .report-system-panel,
body[data-page="reports"] .filter-panel,
body[data-page="courierreports"] .filter-panel{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
}
body[data-page="courierreports"] .courier-blue-toolbar{display:none!important}

.report-system-panel{
  background:#fff!important;
  border:1px solid #dfe5ea!important;
  border-radius:14px!important;
  padding:13px!important;
  margin-bottom:12px!important;
  box-shadow:0 8px 24px rgba(15,23,42,.055)!important;
}
.report-system-panel .panel-head{margin-bottom:10px!important;padding:0!important}
.report-system-panel .panel-head h3{font-size:15px!important;margin:0!important}
.report-system-panel .panel-head small{font-size:8.5px!important;color:#667085!important}
.report-system-controls{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(115px,1fr)) auto auto auto!important;
  gap:7px!important;
  align-items:end!important;
  width:100%!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
}
.report-system-controls .field,
.report-system-controls .compact-field,
.report-system-controls .period-filter,
.report-system-controls .period-custom{min-width:0!important;width:100%!important;margin:0!important}
.report-system-controls label{white-space:nowrap!important;font-size:8px!important}
.report-system-controls select,
.report-system-controls input{width:100%!important;min-width:0!important;height:34px!important;font-size:9px!important}
.report-system-controls>.btn{height:34px!important;white-space:nowrap!important;padding:6px 10px!important;font-size:9px!important}

/* One toolbar only. */
.mobile-report-actions{display:none!important}

/* Courier preview and printed/PDF document use the same professional theme. */
.courier-report-document>.courier-document,
.courier-document.report-document{
  background:#fff!important;
  color:#17211d!important;
  border:1px solid #dbe4ee!important;
  border-radius:12px!important;
  box-shadow:0 18px 48px rgba(15,23,42,.10)!important;
  padding:18px!important;
}
.courier-document .courier-doc-header{
  background:linear-gradient(135deg,#f1f8f2,#fbf8ec)!important;
  border:1px solid #dce6dd!important;
  border-radius:12px!important;
  padding:14px!important;
  margin-bottom:13px!important;
}
.courier-document .report-metric{
  background:#fff!important;
  border:1px solid #dfe6ef!important;
  border-radius:12px!important;
}
.courier-document .report-section h3{
  background:linear-gradient(90deg,#edf7f1,#eef4ff)!important;
  color:#174b3f!important;
  border-left:4px solid #0f766e!important;
}
.courier-document .report-table th{background:#edf7f1!important;color:#174b3f!important}

@media(max-width:900px){
  body[data-page="reports"] .report-system-panel,
  body[data-page="courierreports"] .report-system-panel{
    display:block!important;
    margin:8px 8px 10px!important;
    padding:10px!important;
    border-radius:12px!important;
  }
  .report-system-panel .panel-head{display:block!important;margin-bottom:8px!important}
  .report-system-panel .panel-head h3{font-size:12px!important}
  .report-system-panel .panel-head small{font-size:7px!important;line-height:1.25!important}
  .report-system-controls{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    overflow:visible!important;
  }
  .report-system-controls .period-filter,
  .report-system-controls .period-custom{
    grid-column:span 2!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
  }
  .report-system-controls .period-filter>.field,
  .report-system-controls .period-custom>.field{min-width:0!important;width:100%!important}
  .report-system-controls>.btn{width:100%!important;min-width:0!important}
  .report-system-controls label{font-size:7px!important}
  .report-system-controls select,
  .report-system-controls input,
  .report-system-controls>.btn{height:32px!important;min-height:32px!important;font-size:8px!important;padding:5px 7px!important}

  /* Keep a desktop-like page composition, scaled to the phone width. */
  .report-preview-shell{
    width:100%!important;
    overflow:hidden!important;
    padding:0 8px 90px!important;
    box-sizing:border-box!important;
  }
  .report-preview-shell>.report-document,
  .report-preview-shell>.courier-report-document{
    min-width:0!important;
    width:100%!important;
    transform:none!important;
    margin:0!important;
  }
  .report-preview-shell .report-document,
  .report-preview-shell .courier-document{
    min-width:0!important;
    width:100%!important;
    transform:none!important;
    padding:11px!important;
    box-sizing:border-box!important;
  }
  .report-header,.courier-doc-header{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .report-title-block{text-align:left!important}
  .report-header h1,.courier-doc-header h2{font-size:14px!important}
  .report-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  .report-metric{min-height:68px!important;padding:7px!important}
  .report-metric strong{font-size:11px!important}
  .report-table{font-size:6.5px!important}
  .report-table th,.report-table td{padding:3px!important}
}

@media(max-width:430px){
  .report-system-controls{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .report-system-controls .period-filter,
  .report-system-controls .period-custom{grid-column:span 2!important}
}

@media print{
  *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
  .report-system-panel,.mobile-report-actions{display:none!important}
  .courier-document.report-document,
  .courier-report-document>.courier-document{
    background:#fff!important;
    box-shadow:none!important;
    border:0!important;
  }
  .courier-doc-header,.report-header,
  .report-section h3,.report-table th,.report-metric{
    -webkit-print-color-adjust:exact!important;
    print-color-adjust:exact!important;
  }
}
/* =========================================================
   TajirNova ERP v4.1.0 — production white theme and responsive QA
   ========================================================= */
:root,
:root[data-theme="dark"]{
  --primary:#0f766e!important;
  --primary-dark:#0b5f59!important;
  --bg:#f7f9f8!important;
  --card:#fff!important;
  --text:#17211d!important;
  --muted:#66756d!important;
  --line:#dfe7e2!important;
  --soft:#f5f8f6!important;
  --sidebar-width:210px!important;
  --shadow:0 1px 2px rgba(23,33,29,.035),0 7px 22px rgba(23,33,29,.045)!important;
}
html,body{background:#f7f9f8!important;color:#17211d!important}
#themeBtn{display:none!important}

/* White shell with black navigation icons and a green active state. */
.sidebar{
  width:var(--sidebar-width)!important;
  background:#fff!important;
  background-image:none!important;
  color:#17211d!important;
  border-right:1px solid #dfe7e2!important;
  box-shadow:7px 0 24px rgba(23,33,29,.045)!important;
}
.sidebar-head,.sidebar-foot{background:#fff!important;background-image:none!important}
.sidebar-product-name{color:#17211d!important;font-size:13px!important;letter-spacing:-.01em!important}
.sidebar-erp-logo{background:#fff!important;border-color:#dfe7e2!important}
#sidebarBusinessName{display:none!important}
#sidebarBusinessType{display:block!important;color:#66756d!important;font-size:8px!important}
.sidebar-version{display:block!important;color:#66756d!important;background:#f5f8f6!important;border:1px solid #dfe7e2!important;border-radius:8px!important;padding:5px 7px!important;margin:0 0 7px!important}
.nav-group-title{color:#76857c!important}
.nav-btn{color:#28362f!important;background:#fff!important;background-image:none!important;border-color:transparent!important;box-shadow:none!important}
.nav-btn .nav-icon{color:#111!important;background:#f4f6f5!important;background-image:none!important}
.nav-btn:hover{color:#0f766e!important;background:#f0f7f3!important;border-color:#dceae2!important;transform:none!important}
.nav-btn.active{color:#0f766e!important;background:#eaf6ef!important;background-image:none!important;border-color:#cee5d7!important;box-shadow:inset 3px 0 #16a36a!important}
.nav-btn.active:before{display:none!important}
.nav-btn.active .nav-icon{color:#0f766e!important;background:#dff1e7!important}
.nova-sidebar-actions .danger-outline{background:#fff!important;color:#b42318!important;border-color:#efcbc7!important}

/* Green is the only application accent; gradients stay inside reports/documents. */
.btn.primary{background:#0f766e!important;background-image:none!important;border-color:#0f766e!important;color:#fff!important;box-shadow:none!important}
.btn.primary:hover{background:#0b5f59!important;background-image:none!important}
.btn.secondary{background:#33443b!important;background-image:none!important;border-color:#33443b!important}
.btn.success{background:#158a60!important;background-image:none!important}
.topbar,.mobile-bottom-nav{background:#fff!important;background-image:none!important}
.page-toolbar,.dashboard-toolbar,.settings-hero,.category-hero,.accounts-hero,.pos-header,
.panel,.card,.kpi-card,.chart-panel,.settings-card,.account-pro-card,.pos-product-card,.pos-cart-panel,.pos-catalog-panel{
  background:#fff!important;
  background-image:none!important;
}
.page-toolbar:before,.dashboard-toolbar:before,.module-accent:before,.module-panel:before{background:#0f766e!important;background-image:none!important}
.page-toolbar,.dashboard-toolbar,.settings-hero,.category-hero,.accounts-hero,.pos-header{border-color:#dfe7e2!important}
.kpi-icon{background-image:none!important}
.kpi-icon.blue{background:#e8f2ef!important;color:#0f766e!important}
.table th{background:#f5f8f6!important;color:#405148!important}
.table tbody tr:hover td{background:#f3f8f5!important}

/* Compact dashboard and exact single-line POS product titles. */
.kpi-grid{gap:8px!important}
.kpi-card{min-height:86px!important;padding:10px!important}
.dashboard-charts{gap:8px!important;margin-top:9px!important}
.dashboard-charts .chart-box{height:145px!important}
.dashboard-charts .chart-panel{padding:8px!important}
.pos-product-name{display:block!important;min-height:0!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:9.5px!important;line-height:1.25!important}
.product-list-cell b{display:block;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Business branding always sits on a white card. */
.report-brand,.courier-brand{min-width:0!important}
.report-store-logo,.courier-store-logo,.store-logo-preview,.product-image-preview{
  background:#fff!important;
  border-color:#dfe7e2!important;
}
.report-store-logo,.courier-store-logo{padding:7px!important;border-radius:11px!important;box-shadow:0 5px 18px rgba(23,33,29,.07)!important}

/* Reports retain the approved professional gradients. */
.report-document,.courier-document.report-document{background:#fff!important}
.report-header,.courier-doc-header{background:linear-gradient(135deg,#f3faf5,#fbf8ec)!important}
.report-section h3,.courier-document .report-section h3{background:linear-gradient(90deg,#edf7f1,#fbf8ec)!important}
.report-metric{background:#fff!important}
.report-system-panel{background:#fff!important;background-image:none!important}
.report-system-controls{grid-template-columns:repeat(6,minmax(108px,1fr)) repeat(4,auto)!important}
.report-preview-shell{max-width:100%!important}

/* Settings and account layouts begin directly with useful content. */
.settings-page>.settings-hero{display:none!important}
.settings-page{padding-top:0!important}
.accounts-hero{padding:11px 13px!important;min-height:0!important}
.accounts-summary-grid{gap:7px!important}
.accounts-summary-grid article{min-height:76px!important;padding:8px 9px!important;background:#fff!important;background-image:none!important}
.account-pro-card{padding:10px!important}

@media(max-width:1300px){
  .kpi-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}
  .report-system-controls{grid-template-columns:repeat(5,minmax(105px,1fr)) repeat(4,auto)!important}
}

@media(max-width:1050px){
  .kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .report-system-controls{grid-template-columns:repeat(4,minmax(100px,1fr))!important}
  .report-system-controls>.btn{width:100%!important}
}

@media(max-width:900px){
  .sidebar{left:-228px!important;width:218px!important;max-width:218px!important;padding-left:7px!important;padding-right:7px!important}
  .sidebar.open{left:0!important}
  .sidebar-head{padding:8px 6px 11px!important}
  .sidebar-erp-logo{width:45px!important;height:45px!important;flex-basis:45px!important}
  .nav-btn{min-height:38px!important;padding:5px 8px!important}
  .nav-icon{width:25px!important;height:25px!important}

  .topbar{min-height:56px!important;height:56px!important;overflow:visible!important;padding:0 8px!important}
  .topbar-left{flex:0 1 auto!important;max-width:36%!important;min-width:0!important}
  .page-heading{min-width:0!important}
  .page-title-line h2{max-width:96px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .top-actions{display:flex!important;width:auto!important;max-width:64%!important;gap:4px!important;overflow:visible!important}
  .global-search{display:flex!important;flex:1 1 128px!important;width:min(36vw,170px)!important;min-width:92px!important;max-width:170px!important;height:34px!important;padding:0 7px!important}
  .global-search input{height:30px!important;font-size:9px!important}
  .global-search kbd{display:none!important}
  .profile-menu-wrap{display:block!important;position:relative!important;order:3!important;z-index:5000!important}
  .profile-menu-button{display:flex!important;width:34px!important;min-width:34px!important;height:34px!important;padding:1px!important}
  .profile-menu{display:block;position:fixed!important;top:61px!important;right:max(8px,env(safe-area-inset-right))!important;width:min(250px,calc(100vw - 16px))!important;z-index:5001!important}
  .profile-menu.hidden{display:none!important}
  #quickSaleBtn{width:34px!important;min-width:34px!important;height:34px!important;flex-basis:34px!important}

  body[data-page="reports"] .report-system-panel,
  body[data-page="courierreports"] .report-system-panel{display:block!important;margin:0 0 9px!important;padding:9px!important}
  .report-system-controls{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  .report-system-controls .period-filter,.report-system-controls .period-custom{display:grid!important;grid-column:span 2!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .report-system-controls>.btn{display:inline-flex!important;width:100%!important;min-width:0!important}
  .report-preview-shell{width:100%!important;max-width:100%!important;overflow:hidden!important;padding:0 0 86px!important;margin:0!important}
  .report-preview-shell>.report-document,.report-preview-shell>.courier-report-document,
  .report-preview-shell .report-document,.report-preview-shell .courier-document{width:100%!important;min-width:0!important;max-width:100%!important;transform:none!important;margin:0!important;box-sizing:border-box!important}
  .report-header,.courier-doc-header{display:grid!important;grid-template-columns:minmax(0,1fr)!important}
  .report-title-block{text-align:left!important}
  .report-chart-grid{grid-template-columns:1fr!important}
  .report-chart-card{height:150px!important}
  .report-table-wrap{max-width:100%!important;overflow:auto!important;-webkit-overflow-scrolling:touch!important}
  .report-table{min-width:560px!important;font-size:7px!important}
  .dashboard-charts .chart-box{height:132px!important}
  .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .kpi-card{min-width:0!important;min-height:78px!important;padding:8px!important}
  .kpi-value{font-size:13px!important}
}

@media(max-width:430px){
  .topbar-left{max-width:34%!important}
  .top-actions{max-width:66%!important}
  .global-search{flex-basis:102px!important;width:30vw!important;min-width:78px!important;max-width:122px!important}
  .page-title-line h2{max-width:76px!important;font-size:12px!important}
  .report-system-controls select,.report-system-controls input,.report-system-controls>.btn{height:31px!important;min-height:31px!important;font-size:7.5px!important}
  .report-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .report-document,.courier-document{padding:9px!important}
  .report-store-logo,.courier-store-logo{max-width:86px!important;max-height:58px!important}
  .dashboard-charts .chart-box{height:122px!important}
}

@media(max-width:360px){
  .page-heading{display:none!important}
  .topbar-left{max-width:36px!important}
  .top-actions{max-width:calc(100% - 42px)!important}
  .global-search{width:auto!important;min-width:88px!important;max-width:none!important}
}

@media print{
  .sidebar,.topbar,.mobile-bottom-nav,.app-footer,.report-system-panel,.document-action-row{display:none!important}
  .main,#content{margin:0!important;padding:0!important;width:100%!important;max-width:100%!important}
  .report-store-logo,.courier-store-logo{background:#fff!important;box-shadow:none!important}
}

/* =========================================================
   TajirNova ERP v4.1.1 — Mobile screen parity and KPI clarity
   ========================================================= */

/* A white page surface must never keep the former white hero text. */
body[data-page="pos"] .pos-header,
body[data-page="accounts"] .accounts-hero{
  color:#17211d!important;
  background:#fff!important;
  background-image:none!important;
  border:1px solid #dfe7e2!important;
  box-shadow:0 7px 20px rgba(23,33,29,.045)!important;
}
body[data-page="pos"] .pos-header{min-height:0!important;padding:14px 16px!important}
body[data-page="pos"] .pos-header h3,
body[data-page="accounts"] .accounts-hero h3{color:#17211d!important}
body[data-page="pos"] .pos-header p,
body[data-page="accounts"] .accounts-hero p{color:#66756d!important;opacity:1!important}
body[data-page="pos"] .pos-header-actions .btn,
body[data-page="accounts"] .accounts-hero .btn{color:#fff!important}
body[data-page="pos"] .pos-scanner-panel{background:#f8fbf9!important;background-image:none!important;border-color:#cfe4d9!important}
body[data-page="pos"] .pos-product-image,
body[data-page="pos"] .pos-cart-summary{background:#f4f9f6!important;background-image:none!important;border-color:#d6e7dc!important}

/* Secondary actions use a deliberate readable contrast throughout the ERP. */
.btn.secondary{color:#fff!important}
body[data-page="accounts"] .account-pro-card{color:#17211d!important;background:#fff!important}
body[data-page="accounts"] .account-pro-head h4,
body[data-page="accounts"] .account-pro-balance b,
body[data-page="accounts"] .account-pro-stats b{color:#17211d!important}
body[data-page="accounts"] .account-pro-actions{gap:8px!important}
body[data-page="accounts"] .account-pro-actions .btn{min-height:34px!important;color:#fff!important}

/* The report controls have one layout contract: no period label duplication,
   and custom dates may never override their hidden state. */
body[data-page="reports"] .report-system-controls .period-filter,
body[data-page="courierreports"] .report-system-controls .period-filter{display:contents!important;width:auto!important}
body[data-page="reports"] .report-system-controls .period-label,
body[data-page="courierreports"] .report-system-controls .period-label{display:none!important}
body[data-page="reports"] .report-system-controls .period-custom.hidden,
body[data-page="courierreports"] .report-system-controls .period-custom.hidden{display:none!important}
body[data-page="reports"] .report-system-controls .period-custom:not(.hidden),
body[data-page="courierreports"] .report-system-controls .period-custom:not(.hidden){display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-column:span 3!important;gap:7px!important;min-width:0!important;width:100%!important}
body[data-page="reports"] .report-system-controls .period-custom .field,
body[data-page="courierreports"] .report-system-controls .period-custom .field{min-width:0!important;width:100%!important}

/* TCS, Leopard and Other Courier settlements share the same compact header. */
.settlement-page-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:end!important;gap:12px!important;padding:12px 14px!important;color:#17211d!important;background:#fff!important;background-image:none!important;border-color:#dfe7e2!important}
.settlement-toolbar-title{display:flex!important;align-items:flex-start!important;gap:9px!important;min-width:0!important}
.courier-settlement-badge{display:inline-grid!important;place-items:center!important;flex:0 0 auto!important;min-width:38px!important;height:27px!important;padding:0 7px!important;border:1px solid #bfe0cf!important;border-radius:8px!important;background:#edf8f1!important;color:#0f766e!important;font-size:10px!important;font-weight:800!important;letter-spacing:.04em!important}
.settlement-page-toolbar h3{color:#17211d!important;margin:0!important}
.settlement-page-toolbar p{color:#66756d!important;opacity:1!important;margin:3px 0 0!important;line-height:1.35!important}
.settlement-toolbar-actions{justify-content:flex-end!important;min-width:0!important}

/* Slim, readable status breakdown instead of extra large dashboard KPI cards. */
.dashboard-order-status-band{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;align-items:center!important;gap:12px!important;margin:8px 0!important;padding:9px 12px!important;border:1px solid #dfe7e2!important;border-radius:12px!important;background:#fff!important;box-shadow:0 5px 16px rgba(23,33,29,.035)!important}
.dashboard-order-status-head span{display:block!important;color:#17211d!important;font-size:10px!important;font-weight:800!important}
.dashboard-order-status-head small{display:block!important;margin-top:2px!important;color:#66756d!important;font-size:8px!important}
.dashboard-order-status-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
.dashboard-order-status-grid>div{min-width:0!important;padding-left:8px!important;border-left:2px solid #d7ebe0!important}
.dashboard-order-status-grid>div:nth-child(2){border-left-color:#e2c889!important}.dashboard-order-status-grid>div:nth-child(3){border-left-color:#ecc4bf!important}
.dashboard-order-status-grid span,.dashboard-order-status-grid small{display:block!important;color:#66756d!important;font-size:8px!important;line-height:1.2!important}
.dashboard-order-status-grid b{display:block!important;margin:2px 0!important;color:#17211d!important;font-size:11px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}

/* Mobile Orders use full cards so all six actions remain reachable without
   horizontally clipping the Delete action. */
.mobile-sales-list{display:grid!important;gap:8px!important}
.mobile-sales-empty{padding:24px 12px!important;text-align:center!important;color:#66756d!important;border:1px dashed #cddfd4!important;border-radius:11px!important;background:#fbfdfb!important}
.mobile-sale-card{padding:10px!important;border:1px solid #dfe7e2!important;border-radius:12px!important;background:#fff!important;box-shadow:0 5px 16px rgba(23,33,29,.035)!important}
.mobile-sale-card-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:7px!important;padding-bottom:8px!important;border-bottom:1px solid #edf1ee!important}
.mobile-sale-title{display:flex!important;align-items:flex-start!important;gap:7px!important;min-width:0!important}.mobile-sale-title strong,.mobile-sale-customer strong{display:block!important;color:#17211d!important;font-size:11px!important}.mobile-sale-title small,.mobile-sale-customer span,.mobile-sale-customer small{display:block!important;margin-top:2px!important;color:#66756d!important;font-size:8px!important;line-height:1.25!important}
.mobile-sale-select{display:none!important;padding-top:1px!important}.mobile-sale-select .bulk-record-checkbox{display:block!important}
body.bulk-select-sales .mobile-sale-select{display:block!important}
.mobile-sale-customer{padding:8px 0!important}.mobile-sale-stat-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}.mobile-sale-stat-grid>div{min-width:0!important;padding:7px!important;border:1px solid #e5ece7!important;border-radius:8px!important;background:#f8fbf9!important}.mobile-sale-stat-grid span{display:block!important;color:#66756d!important;font-size:7px!important}.mobile-sale-stat-grid b{display:block!important;margin-top:2px!important;color:#17211d!important;font-size:9px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.mobile-sale-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;margin-top:9px!important}.mobile-sale-actions .btn{width:100%!important;min-height:32px!important;justify-content:center!important}.mobile-sale-actions .btn.danger{grid-column:1/-1!important}

@media(max-width:900px){
  body[data-page="pos"] .pos-header{display:block!important;padding:11px 12px!important}
  body[data-page="pos"] .pos-header h3{font-size:14px!important}
  body[data-page="pos"] .pos-header p{font-size:8.5px!important;line-height:1.4!important}
  body[data-page="pos"] .pos-header-actions{width:100%!important;margin-top:9px!important}
  body[data-page="pos"] .pos-header-actions .btn{width:100%!important;min-height:36px!important}

  body[data-page="accounts"] .accounts-hero{padding:11px 12px!important}
  body[data-page="accounts"] .accounts-hero h3{font-size:14px!important}
  body[data-page="accounts"] .accounts-hero p{font-size:8px!important;line-height:1.35!important}
  body[data-page="accounts"] .accounts-hero .btn{width:100%!important;min-height:36px!important}
  body[data-page="accounts"] .account-pro-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  body[data-page="accounts"] .account-pro-actions .btn{width:100%!important}

  body[data-page="reports"] .report-system-controls,
  body[data-page="courierreports"] .report-system-controls{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;overflow:visible!important}
  body[data-page="reports"] .report-system-controls .period-custom:not(.hidden),
  body[data-page="courierreports"] .report-system-controls .period-custom:not(.hidden){grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-column:1/-1!important;gap:6px!important}
  body[data-page="reports"] .report-system-controls .period-custom .btn,
  body[data-page="courierreports"] .report-system-controls .period-custom .btn{grid-column:1/-1!important;width:100%!important}
  body[data-page="reports"] .report-system-controls>.btn,
  body[data-page="courierreports"] .report-system-controls>.btn{display:inline-flex!important;min-width:0!important;width:100%!important}

  .settlement-page-toolbar{display:block!important;padding:10px 11px!important}
  .settlement-toolbar-title{gap:8px!important}.courier-settlement-badge{min-width:34px!important;height:24px!important;font-size:8px!important}
  .settlement-page-toolbar h3{font-size:13px!important}.settlement-page-toolbar p{font-size:7.7px!important}
  .settlement-toolbar-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;width:100%!important;margin-top:9px!important}
  .settlement-toolbar-actions .period-filter{display:contents!important;width:auto!important}
  .settlement-toolbar-actions .period-label{display:none!important}
  .settlement-toolbar-actions .period-custom.hidden{display:none!important}
  .settlement-toolbar-actions .period-custom:not(.hidden){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-column:1/-1!important;gap:6px!important}
  .settlement-toolbar-actions .period-custom .btn{grid-column:1/-1!important;width:100%!important}
  .settlement-toolbar-actions select,.settlement-toolbar-actions .btn{width:100%!important;min-width:0!important;min-height:33px!important}

  .dashboard-order-status-band{grid-template-columns:1fr!important;gap:6px!important;padding:8px!important}
  .dashboard-order-status-head{display:flex!important;align-items:baseline!important;justify-content:space-between!important;gap:8px!important}.dashboard-order-status-head small{margin:0!important}
  .dashboard-order-status-grid{gap:5px!important}.dashboard-order-status-grid>div{padding-left:5px!important}.dashboard-order-status-grid span,.dashboard-order-status-grid small{font-size:6.5px!important}.dashboard-order-status-grid b{font-size:8.5px!important}
}

@media(max-width:390px){
  .settlement-toolbar-actions{grid-template-columns:1fr!important}
  .settlement-toolbar-actions .period-custom:not(.hidden){grid-template-columns:1fr!important}
  .mobile-sale-actions{grid-template-columns:1fr!important}.mobile-sale-actions .btn.danger{grid-column:auto!important}
}

/* ==========================================================
   TajirNova ERP v4.1.3 — compact history rows and settlement parity
   ========================================================== */

/* TCS is the visual reference.  Keep each courier settlement header at the
   same calm, single-line desktop height instead of letting one courier's
   controls create a much taller toolbar. */
@media(min-width:901px){
  .settlement-page-toolbar{
    grid-template-columns:minmax(220px,1fr) minmax(0,auto)!important;
    align-items:center!important;
    min-height:68px!important;
    overflow:hidden!important;
  }
  .settlement-toolbar-title{align-items:center!important}
  .settlement-toolbar-actions{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    flex-wrap:nowrap!important;
    gap:6px!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overscroll-behavior-x:contain!important;
    white-space:nowrap!important;
  }
  .settlement-toolbar-actions .period-filter{
    display:flex!important;
    align-items:center!important;
    flex:0 0 auto!important;
    width:auto!important;
  }
  .settlement-toolbar-actions .period-filter .field,
  .settlement-toolbar-actions .period-filter .compact-field{
    flex:0 0 122px!important;
    min-width:122px!important;
    margin:0!important;
  }
  .settlement-toolbar-actions .period-label{display:none!important}
  .settlement-toolbar-actions>select{
    flex:0 0 128px!important;
    min-width:128px!important;
    min-height:34px!important;
  }
  .settlement-toolbar-actions>.btn{
    flex:0 0 auto!important;
    min-height:34px!important;
  }
}

/* Mobile history pages use ERP-style horizontal records.  Keeping each
   record to one compact table line makes old data quick to scan without
   removing any actions or columns. */
@media(max-width:700px){
  body[data-page="sales"] .table-toolbar,
  body[data-page="customers"] .table-toolbar,
  body[data-page="products"] .table-toolbar,
  body[data-page="categories"] .table-toolbar,
  body[data-page="purchases"] .table-toolbar,
  body[data-page="inventory"] .table-toolbar,
  body[data-page="vendors"] .table-toolbar,
  body[data-page="expenses"] .table-toolbar,
  body[data-page="taxrecords"] .table-toolbar,
  body[data-page="withdrawals"] .table-toolbar,
  body[data-page="owner"] .table-toolbar{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:5px!important;
    padding:7px!important;
  }

  body[data-page="sales"] .table-toolbar .table-filters,
  body[data-page="sales"] .table-toolbar .actions{
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    width:100%!important;
    max-width:100%!important;
    gap:5px!important;
    overflow-x:auto!important;
    overscroll-behavior-x:contain!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body[data-page="sales"] .table-toolbar .table-filters>*{
    flex:0 0 112px!important;
    width:112px!important;
    min-width:112px!important;
    min-height:28px!important;
    height:28px!important;
    padding:4px 6px!important;
    font-size:7.4px!important;
  }
  body[data-page="sales"] .table-toolbar .table-filters input{
    flex-basis:178px!important;
    width:178px!important;
  }
  body[data-page="sales"] .table-toolbar .actions .btn{
    flex:0 0 auto!important;
    min-height:28px!important;
    height:28px!important;
    padding:4px 7px!important;
    font-size:7.3px!important;
  }

  body[data-page="customers"] .panel-head,
  body[data-page="products"] .panel-head,
  body[data-page="categories"] .panel-head,
  body[data-page="purchases"] .panel-head,
  body[data-page="inventory"] .panel-head,
  body[data-page="vendors"] .panel-head,
  body[data-page="expenses"] .panel-head,
  body[data-page="taxrecords"] .panel-head,
  body[data-page="withdrawals"] .panel-head,
  body[data-page="owner"] .panel-head{
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    gap:5px!important;
    min-width:0!important;
    overflow-x:auto!important;
    overscroll-behavior-x:contain!important;
  }
  body[data-page="customers"] .panel-head h3,
  body[data-page="products"] .panel-head h3,
  body[data-page="categories"] .panel-head h3,
  body[data-page="purchases"] .panel-head h3,
  body[data-page="inventory"] .panel-head h3,
  body[data-page="vendors"] .panel-head h3,
  body[data-page="expenses"] .panel-head h3,
  body[data-page="taxrecords"] .panel-head h3,
  body[data-page="withdrawals"] .panel-head h3,
  body[data-page="owner"] .panel-head h3{flex:0 0 auto!important;font-size:9px!important;white-space:nowrap!important}
  body[data-page="customers"] .panel-head .actions,
  body[data-page="products"] .panel-head .actions,
  body[data-page="categories"] .panel-head .actions,
  body[data-page="purchases"] .panel-head .actions,
  body[data-page="inventory"] .panel-head .actions,
  body[data-page="vendors"] .panel-head .actions,
  body[data-page="expenses"] .panel-head .actions,
  body[data-page="taxrecords"] .panel-head .actions,
  body[data-page="withdrawals"] .panel-head .actions,
  body[data-page="owner"] .panel-head .actions{display:flex!important;flex:0 0 auto!important;flex-wrap:nowrap!important}
  body[data-page="customers"] .panel-head .btn,
  body[data-page="products"] .panel-head .btn,
  body[data-page="categories"] .panel-head .btn,
  body[data-page="purchases"] .panel-head .btn,
  body[data-page="inventory"] .panel-head .btn,
  body[data-page="vendors"] .panel-head .btn,
  body[data-page="expenses"] .panel-head .btn,
  body[data-page="taxrecords"] .panel-head .btn,
  body[data-page="withdrawals"] .panel-head .btn,
  body[data-page="owner"] .panel-head .btn{flex:0 0 auto!important;min-height:27px!important;height:27px!important;padding:4px 7px!important;font-size:7.2px!important}

  body[data-page="sales"] .table-wrap,
  body[data-page="customers"] .table-wrap,
  body[data-page="products"] .table-wrap,
  body[data-page="categories"] .table-wrap,
  body[data-page="purchases"] .table-wrap,
  body[data-page="inventory"] .table-wrap,
  body[data-page="vendors"] .table-wrap,
  body[data-page="expenses"] .table-wrap,
  body[data-page="taxrecords"] .table-wrap,
  body[data-page="withdrawals"] .table-wrap,
  body[data-page="owner"] .table-wrap{
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    border-radius:9px!important;
    overscroll-behavior-x:contain!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body[data-page="sales"] .table,
  body[data-page="customers"] .table,
  body[data-page="products"] .table,
  body[data-page="categories"] .table,
  body[data-page="purchases"] .table,
  body[data-page="inventory"] .table,
  body[data-page="vendors"] .table,
  body[data-page="expenses"] .table,
  body[data-page="taxrecords"] .table,
  body[data-page="withdrawals"] .table,
  body[data-page="owner"] .table{
    width:max-content!important;
    min-width:max-content!important;
    table-layout:auto!important;
  }
  body[data-page="sales"] .table th,
  body[data-page="sales"] .table td,
  body[data-page="customers"] .table th,
  body[data-page="customers"] .table td,
  body[data-page="products"] .table th,
  body[data-page="products"] .table td,
  body[data-page="categories"] .table th,
  body[data-page="categories"] .table td,
  body[data-page="purchases"] .table th,
  body[data-page="purchases"] .table td,
  body[data-page="inventory"] .table th,
  body[data-page="inventory"] .table td,
  body[data-page="vendors"] .table th,
  body[data-page="vendors"] .table td,
  body[data-page="expenses"] .table th,
  body[data-page="expenses"] .table td,
  body[data-page="taxrecords"] .table th,
  body[data-page="taxrecords"] .table td,
  body[data-page="withdrawals"] .table th,
  body[data-page="withdrawals"] .table td,
  body[data-page="owner"] .table th,
  body[data-page="owner"] .table td{
    height:29px!important;
    padding:5px 6px!important;
    font-size:7.2px!important;
    line-height:1.1!important;
    white-space:nowrap!important;
    vertical-align:middle!important;
  }
  body[data-page="sales"] .table th,
  body[data-page="customers"] .table th,
  body[data-page="products"] .table th,
  body[data-page="categories"] .table th,
  body[data-page="purchases"] .table th,
  body[data-page="inventory"] .table th,
  body[data-page="vendors"] .table th,
  body[data-page="expenses"] .table th,
  body[data-page="taxrecords"] .table th,
  body[data-page="withdrawals"] .table th,
  body[data-page="owner"] .table th{height:27px!important;font-size:6.7px!important;letter-spacing:.025em!important}
  body[data-page="sales"] .table td .actions,
  body[data-page="customers"] .table td .actions,
  body[data-page="products"] .table td .actions,
  body[data-page="categories"] .table td .actions,
  body[data-page="purchases"] .table td .actions,
  body[data-page="inventory"] .table td .actions,
  body[data-page="vendors"] .table td .actions,
  body[data-page="expenses"] .table td .actions,
  body[data-page="taxrecords"] .table td .actions,
  body[data-page="withdrawals"] .table td .actions,
  body[data-page="owner"] .table td .actions{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:3px!important;white-space:nowrap!important}
  body[data-page="sales"] .table td .btn.sm,
  body[data-page="customers"] .table td .btn.sm,
  body[data-page="products"] .table td .btn.sm,
  body[data-page="categories"] .table td .btn.sm,
  body[data-page="purchases"] .table td .btn.sm,
  body[data-page="inventory"] .table td .btn.sm,
  body[data-page="vendors"] .table td .btn.sm,
  body[data-page="expenses"] .table td .btn.sm,
  body[data-page="taxrecords"] .table td .btn.sm,
  body[data-page="withdrawals"] .table td .btn.sm,
  body[data-page="owner"] .table td .btn.sm{min-height:23px!important;height:23px!important;padding:3px 5px!important;font-size:6.5px!important;border-radius:5px!important}
  body[data-page="sales"] .table td small,
  body[data-page="customers"] .table td small,
  body[data-page="products"] .table td small,
  body[data-page="categories"] .table td small,
  body[data-page="purchases"] .table td small,
  body[data-page="inventory"] .table td small,
  body[data-page="vendors"] .table td small,
  body[data-page="expenses"] .table td small,
  body[data-page="taxrecords"] .table td small,
  body[data-page="withdrawals"] .table td small,
  body[data-page="owner"] .table td small{font-size:6.2px!important;white-space:nowrap!important}
  body[data-page="customers"] .table td br,
  body[data-page="products"] .table td br,
  body[data-page="purchases"] .table td br,
  body[data-page="expenses"] .table td br{display:none!important}
  body[data-page="customers"] .table td small:before,
  body[data-page="products"] .table td small:before,
  body[data-page="expenses"] .table td small:before{content:" · "!important}
  body[data-page="products"] .product-list-thumb{width:20px!important;height:20px!important;min-width:20px!important}
  body[data-page="products"] .product-list-cell{gap:4px!important}
  body[data-page="sales"] .compact-mobile-sales-table{min-width:900px!important}
  body[data-page="sales"] .compact-mobile-sales-table td:nth-child(4){min-width:135px!important}
  body[data-page="sales"] .compact-mobile-sales-table td:nth-child(5){min-width:125px!important}
  body[data-page="sales"] .compact-mobile-sales-table td:nth-last-child(1){min-width:255px!important}
  body[data-page="sales"] .compact-mobile-record-wrap{box-shadow:none!important}
}

/* v4.1.8 — Tax-filer working schedules, delivered-sales accounting, and settlement-aware payment reconciliation. */
body[data-page="accounts"] .accounts-hero{align-items:center!important}
.accounts-hero-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}
body[data-page="accounts"] .accounts-hero .btn.ghost{color:#0f766e!important;background:#fff!important;border-color:#b9d8c8!important}
body[data-page="accounts"] .accounts-hero .btn.secondary{background:#33443b!important;border-color:#33443b!important;color:#fff!important}
body[data-page="accounts"] .account-pro-actions{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;justify-content:stretch!important}
body[data-page="accounts"] .account-pro-actions .btn{min-width:0!important;white-space:nowrap!important}
body[data-page="accounts"] .account-pro-actions .btn.ghost{color:#234339!important;background:#fff!important;border-color:#d7e4dc!important}
body[data-page="accounts"] .account-pro-actions .btn:disabled{cursor:not-allowed!important;opacity:.52!important}
.account-transfer-log-panel{margin-top:12px!important}
.account-transfer-log-panel .panel-head{gap:12px!important}
.account-transfer-log-panel .panel-head small{display:block;max-width:660px;color:var(--muted);font-size:11px;line-height:1.35}
.account-transfer-table-wrap .table{min-width:860px}
.account-transfer-notice,.account-reconciliation-notice{margin-bottom:14px!important;border-color:#bfe3d1!important;background:#f1faf4!important;color:#24523c!important;line-height:1.45!important}
.account-transfer-preview{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto;gap:7px;align-items:center;margin:12px 0;padding:10px 12px;border:1px solid #d9e8df;border-radius:10px;background:#f8fbf9;color:#51675b;font-size:12px}
.account-transfer-preview b{color:#17211d;white-space:nowrap}
.account-reconciliation-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:0 0 14px}
.account-reconciliation-summary>div{padding:11px;border:1px solid #d8e6dd;border-radius:10px;background:#fbfdfb}
.account-reconciliation-summary small,.account-reconciliation-summary b{display:block}.account-reconciliation-summary small{color:var(--muted);font-size:10px}.account-reconciliation-summary b{margin-top:4px;color:#17211d;font-size:17px}
.account-reconciliation-preview{display:block;margin:12px 0;padding:10px 12px;border-radius:10px;background:#f7faf8;color:#385646;font-size:12px;font-weight:700}
.account-reconciliation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0}
.account-reconciliation-item{display:grid;grid-template-columns:minmax(0,1fr) 132px;gap:8px;align-items:center;padding:10px;border:1px solid #d8e6dd;border-radius:10px;background:#fbfdfb}
.account-reconciliation-item b{display:block;color:#17211d;font-size:13px}.account-reconciliation-item small{display:block;margin-top:3px;color:var(--muted);font-size:9px;line-height:1.35}.account-reconciliation-item label{display:grid;gap:4px;color:#53675d;font-size:9px;font-weight:800}.account-reconciliation-item input{min-width:0!important}.account-reconciliation-item-preview{grid-column:1/-1;color:#236147;font-size:10px;font-weight:800}
.field-help{display:block;margin-top:4px;color:var(--muted);font-size:10px;line-height:1.3}
.ledger-modal-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px;margin:10px 0}.ledger-modal-actions .btn.ghost{color:#234339;background:#fff;border-color:#d7e4dc}

@media(max-width:900px){
  body[data-page="accounts"] .accounts-hero-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important;margin-top:9px!important;gap:5px!important}
  body[data-page="accounts"] .accounts-hero-actions .btn{width:100%!important;min-width:0!important;min-height:36px!important;padding:5px!important;white-space:normal!important;line-height:1.2!important}
  body[data-page="accounts"] .account-pro-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .account-transfer-log-panel .panel-head{display:block!important}.account-transfer-log-panel .panel-head .btn{width:100%;margin-top:8px}.account-transfer-log-panel .panel-head small{font-size:8px!important}
  .account-transfer-preview{grid-template-columns:minmax(0,1fr) auto!important;font-size:10px!important}.account-transfer-preview span:nth-of-type(2){margin-top:5px}.account-transfer-preview b:nth-of-type(2){margin-top:5px}
  .account-reconciliation-summary,.account-reconciliation-grid{grid-template-columns:1fr!important}.account-reconciliation-item{grid-template-columns:minmax(0,1fr) 112px!important}.account-reconciliation-item b{font-size:11px!important}.account-reconciliation-item small,.account-reconciliation-item label,.account-reconciliation-item-preview,.field-help{font-size:8px!important}
  .ledger-modal-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}.ledger-modal-actions .btn{width:100%!important;min-height:34px!important}
}

@media(max-width:390px){
  body[data-page="accounts"] .accounts-hero-actions{grid-template-columns:1fr!important}
  .account-reconciliation-item{grid-template-columns:1fr!important}.account-reconciliation-item-preview{grid-column:auto!important}
}


/* v4.2.0 — mixed physical, digital and service sales */
.sale-mode-strip{display:flex;gap:8px;flex-wrap:wrap;padding:10px;border:1px solid var(--border,#dce6dd);border-radius:12px;background:#f8fbf8}
.sale-mode-strip label{display:flex;align-items:center;gap:7px;padding:9px 13px;border:1px solid #d7e4da;border-radius:10px;background:#fff;cursor:pointer;font-weight:700}
.sale-mode-strip label:has(input:checked){border-color:#0f766e;box-shadow:0 0 0 2px rgba(15,118,110,.12);color:#0f766e;background:#f0faf6}
.sale-mode-strip input{accent-color:#0f766e}
.digital-sale-section{border:1px solid #cfe4db;background:linear-gradient(145deg,#f4fbf8,#fffdf4)}
.digital-sale-section .notice{margin-bottom:12px}
.sale-line-type{display:block;margin-top:4px;color:#66756d;font-size:11px}
.mode-hidden{display:none!important}
@media(max-width:700px){.sale-mode-strip{display:grid;grid-template-columns:1fr}.sale-mode-strip label{width:100%}.digital-sale-section .grid4{grid-template-columns:1fr 1fr}}

/* v4.2.1 compact sale mode layout */
.sale-details-compact{align-items:start}
.sale-details-compact .field{min-width:0}
.sale-details-compact input,.sale-details-compact select{min-height:42px}
.compact-sale-mode-select{max-width:220px;margin:0 0 12px}
@media(min-width:900px){.sale-details-compact{grid-template-columns:1.15fr .85fr 1fr .85fr .9fr}}

/* v4.3.3 real-time inventory reporting */
.annual-readiness-section{border:1px solid #cbded2;background:linear-gradient(180deg,#f8fcf9,#fff)}
.report-note{margin:10px 0 0;padding:10px 12px;border:1px solid #d9e6dd;border-left:4px solid #0f766e;border-radius:8px;background:#f6faf7;color:#33443b;font-size:12px;line-height:1.5}
.report-table td .badge{white-space:nowrap}
@media print{.report-note{break-inside:avoid}.annual-readiness-section{break-inside:avoid}}

/* v4.4.0 */
.payment-reference-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}.business-insights-panel{margin-top:16px}.business-insights-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.business-insights-grid>div{border:1px solid var(--border,#e5e7eb);border-radius:14px;padding:12px;background:var(--card,#fff);min-width:0}.business-insights-grid span,.business-insights-grid small{display:block;color:var(--muted,#64748b);font-size:.75rem}.business-insights-grid b{display:block;margin:5px 0;font-size:1rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media(max-width:1100px){.business-insights-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:650px){.business-insights-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.business-type-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin-top:10px}.business-type-option{display:flex;align-items:center;gap:9px;padding:10px 12px;border:1px solid var(--border,#dfe5e2);border-radius:10px;background:var(--surface,#fff);cursor:pointer;font-size:13px}.business-type-option:hover{border-color:#9ab7a8}.business-type-option input{width:16px;height:16px;accent-color:#1f7a4f}.check-row{display:flex;align-items:center;gap:9px;font-weight:600}.check-row input{width:17px;height:17px;accent-color:#1f7a4f}

/* v4.5.1 team/security polish */

/* v4.6.2 integrations, automation and payment verification */
.integration-settings-card{overflow:visible}
.integration-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:12px}
.integration-card{border:1px solid var(--border,#dfe6df);border-radius:16px;padding:16px;background:var(--card,#fff);display:flex;flex-direction:column;gap:12px;min-width:0}
.integration-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.integration-card-head>div{display:flex;flex-direction:column;gap:4px;min-width:0}.integration-card-head small{overflow-wrap:anywhere;color:var(--muted,#64748b)}
.connection-dot{width:10px;height:10px;border-radius:50%;background:#cbd5e1;box-shadow:0 0 0 4px rgba(148,163,184,.12);flex:none;margin-top:4px}.connection-dot.connected{background:#16a34a;box-shadow:0 0 0 4px rgba(22,163,74,.12)}
.integration-actions{display:flex;gap:8px;flex-wrap:wrap}.compact-grid{gap:8px!important}.disabled-row{opacity:.55}
.automation-template-details{border:1px solid var(--border,#dfe6df);border-radius:14px;padding:12px 14px;margin-top:14px;background:rgba(248,250,248,.7)}
.automation-template-details summary{cursor:pointer;font-weight:700}.automation-template-details[open] summary{margin-bottom:14px}
.payment-verification-card{display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid #f59e0b;background:#fffaf0;border-radius:14px;padding:14px 16px;margin:14px 0}.payment-verification-card.verified{border-color:#22c55e;background:#f0fdf4}.payment-verification-card>div:first-child{display:flex;flex-direction:column;gap:3px}.payment-verification-card b{font-size:18px}.payment-verification-card span{font-size:12px;color:#64748b}.status-pill{display:inline-flex!important;align-items:center;padding:7px 10px;border-radius:999px;background:#e2e8f0;color:#334155!important;font-weight:700}.status-pill.success{background:#dcfce7;color:#166534!important}
.advance-value-field.hidden{display:none!important}
@media(max-width:1000px){.integration-grid{grid-template-columns:1fr 1fr}}
@media(max-width:680px){.integration-grid{grid-template-columns:1fr}.integration-card{padding:13px}.payment-verification-card{align-items:flex-start;flex-direction:column}.payment-verification-card .actions{width:100%}.payment-verification-card .actions .btn{flex:1}}
/* v4.6.2 integrations */
.integration-meta{display:block;color:var(--muted,#64748b);line-height:1.45;overflow-wrap:anywhere}

/* v4.6.2 provider-managed integrations + manual Shopify history import */
.provider-feature-lock{padding:12px 14px;border:1px dashed var(--border,#d9e2dc);border-radius:12px;background:#fafcf9;color:var(--muted,#667085);font-size:13px;line-height:1.45}
.compact-notice{padding:10px 12px;margin-top:10px;font-size:12px}
.integration-help-actions{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 14px}
.shopify-old-orders-result{margin-top:14px}
.shopify-old-orders-result .row-disabled{opacity:.6}
.modal-action-bar{display:flex;justify-content:flex-end;gap:10px;margin-top:14px}
.muted-block{padding:16px;border:1px dashed var(--border,#d9e2dc);border-radius:12px;color:var(--muted,#667085);background:#fafcf9}
@media(max-width:700px){.integration-help-actions .btn,.modal-action-bar .btn{width:100%}.modal-action-bar{flex-direction:column}}

/* v4.8.5 dashboard operational pipeline */
.dashboard-pipeline-band .dashboard-order-status-grid>div{border-left-color:#bcd8f4!important}.dashboard-pipeline-band .dashboard-order-status-grid>div:nth-child(2){border-left-color:#b8d9c7!important}.dashboard-pipeline-band .dashboard-order-status-grid>div:nth-child(3){border-left-color:#d9c6ef!important}


/* v4.9.6 Security / Login Activity & Devices */
.security-settings-card{overflow:hidden}.security-toolbar,.security-log-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:8px 0 14px}.security-toolbar>div:first-child,.security-log-head>div:first-child{display:flex;flex-direction:column;gap:4px}.security-toolbar small,.security-log-head small{color:var(--muted,#64748b)}.security-device-list{display:grid;gap:10px}.security-device-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px;border:1px solid #e2e8f0;border-radius:12px;background:#fff}.security-device-card.current{border-color:#bfdbfe;background:#f8fbff}.security-device-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:11px;background:#f1f5f9;font-size:20px}.security-device-main{min-width:0}.security-device-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.security-device-meta,.security-device-times{display:flex;gap:8px 16px;flex-wrap:wrap;margin-top:5px;color:#64748b;font-size:12px}.security-device-actions{display:flex;align-items:center}.security-current-note{font-size:12px;color:#2563eb;font-weight:700}.security-loading{padding:16px;border:1px dashed #cbd5e1;border-radius:10px;color:#64748b;text-align:center}.security-log-head{margin-top:22px;padding-top:18px;border-top:1px solid #e2e8f0}.security-log-filters{display:flex;gap:8px;flex-wrap:wrap}.security-log-filters select,.security-log-filters input{min-height:38px;border:1px solid #cbd5e1;border-radius:8px;padding:7px 9px;background:#fff}.security-log-table td{vertical-align:top}.empty-state.compact{padding:16px;text-align:center;border:1px dashed #dbe2ea;border-radius:10px;color:#64748b}.empty-state.compact p{margin:5px 0 0}.badge.blue{background:#dbeafe;color:#1d4ed8}
@media(max-width:760px){.security-toolbar,.security-log-head{align-items:stretch;flex-direction:column}.security-toolbar .actions{width:100%;display:grid;grid-template-columns:1fr}.security-device-card{grid-template-columns:auto minmax(0,1fr);align-items:start}.security-device-actions{grid-column:1/-1}.security-device-actions .btn{width:100%}.security-device-meta,.security-device-times{display:grid;grid-template-columns:1fr;gap:4px}.security-log-filters{display:grid;grid-template-columns:1fr}.security-log-filters select,.security-log-filters input{width:100%}.security-log-table thead{display:none}.security-log-table,.security-log-table tbody,.security-log-table tr,.security-log-table td{display:block;width:100%}.security-log-table tr{padding:10px 0;border-bottom:1px solid #e2e8f0}.security-log-table td{padding:3px 8px;border:0}.security-log-table td:before{display:inline-block;min-width:88px;margin-right:6px;color:#64748b;font-size:11px;font-weight:700}.security-log-table td:nth-child(1):before{content:"Activity"}.security-log-table td:nth-child(2):before{content:"Device"}.security-log-table td:nth-child(3):before{content:"IP / Location"}.security-log-table td:nth-child(4):before{content:"Date"}.security-log-table td:nth-child(5):before{content:"Status"}}
