/* Narguna Foods global ERP design system */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-subtle: #f9fafb;
  --surface-raised: #ffffff;
  --text: #252a34;
  --text-strong: #171b24;
  --text-muted: #6b7280;
  --text-faint: #98a1b2;
  --border: #e3e6eb;
  --border-strong: #d4d8e0;
  --sidebar: #20242d;
  --sidebar-hover: #2a2f3a;
  --sidebar-text: #aeb5c2;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --accent-border: #c7d2fe;
  --success: #16835d;
  --success-soft: #eaf7f1;
  --warning: #a86008;
  --warning-soft: #fff6e5;
  --danger: #c1374a;
  --danger-soft: #fff0f2;
  --info: #2563a8;
  --info-soft: #edf5ff;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-sm: 0 2px 8px rgba(16, 24, 40, .05);
  --shadow-modal: 0 20px 50px rgba(16, 24, 40, .18);
  --sidebar-width: 252px;
  --focus: 0 0 0 3px rgba(79, 70, 229, .14);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { color-scheme: light; }
body { background: var(--bg); color: var(--text); font-family: "DM Sans", system-ui, -apple-system, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--focus); }
.hidden { display: none !important; }
.eyebrow { color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.eyebrow.green { color: var(--accent); }

/* Brand */
.brand-mark { width: 36px; height: 36px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: 0 0 auto; font: 700 17px "Manrope", sans-serif; }
.login-brand, .side-brand { display: flex; align-items: center; gap: 11px; font: 600 16px "Manrope", sans-serif; }

/* Authentication */
.login-screen { min-height: 100vh; padding: 28px clamp(24px, 5vw, 72px); background: #171a21; color: #fff; display: flex; flex-direction: column; }
.login-brand b { color: #c7d2fe; }
.login-panel { width: min(1060px, 100%); min-height: 600px; margin: auto; display: grid; grid-template-columns: 1fr 440px; overflow: hidden; background: var(--surface); border: 1px solid #343a46; border-radius: var(--radius-lg); box-shadow: 0 28px 70px rgba(0, 0, 0, .3); }
.login-copy { position: relative; overflow: hidden; padding: 72px; background: #242832; }
.login-copy::before { content: ""; position: absolute; right: -130px; bottom: -180px; width: 440px; height: 440px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 50%; }
.login-copy h1 { max-width: 620px; margin: 22px 0; color: #fff; font: 700 clamp(38px, 4.8vw, 60px)/1.08 "Manrope", sans-serif; letter-spacing: -.04em; }
.login-copy p { max-width: 450px; margin: 0; color: #b0b7c4; font-size: 16px; line-height: 1.7; }
.factory-art { position: absolute; right: 36px; bottom: 0; left: 36px; height: 195px; border-bottom: 8px solid #4f46e5; opacity: .55; }
.factory-art span { position: absolute; right: 25px; bottom: -8px; color: #818cf8; font-size: 132px; }
.factory-art i { position: absolute; bottom: 8px; width: 92px; background: #161922; }
.factory-art i:nth-of-type(1) { left: 14px; height: 95px; }
.factory-art i:nth-of-type(2) { left: 116px; height: 132px; }
.factory-art i:nth-of-type(3) { left: 218px; height: 68px; }
.login-form { padding: 68px 52px; background: var(--surface); color: var(--text); display: flex; flex-direction: column; justify-content: center; }
.login-panel, .login-form { min-width: 0; }
.login-form h2, .modal-card h2 { margin: 10px 0 8px; color: var(--text-strong); font: 700 28px/1.2 "Manrope", sans-serif; letter-spacing: -.025em; }
.login-form > div > p { margin: 0 0 32px; color: var(--text-muted); }
.login-footer { color: #868e9c; text-align: center; }
.demo-note { margin-top: 4px; padding: 10px 12px; color: var(--text-muted); background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); text-align: center; }

/* Form system */
.login-form label, .modal-card label, .setting-card label { display: flex; flex-direction: column; gap: 7px; margin-bottom: 17px; color: #454b57; font-size: 12px; font-weight: 600; }
input, select, textarea { width: 100%; min-height: 40px; padding: 9px 11px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 74px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #b8bec9; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; background: #f1f3f5; color: var(--text-faint); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row.thirds { grid-template-columns: repeat(3, 1fr); }
.status { min-height: 17px; margin: 10px 0 0; color: var(--danger); font-size: 12px; }
.status.success { color: var(--success); }

/* Button system */
.primary-btn, .secondary-btn, .text-btn, .edit-stock { min-height: 38px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; transition: background-color .15s, border-color .15s, color .15s; }
.primary-btn { padding: 10px 15px; color: #fff; background: var(--accent); border: 1px solid var(--accent); display: flex; align-items: center; justify-content: space-between; }
.primary-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.primary-btn:disabled { cursor: not-allowed; opacity: .48; }
.primary-btn.compact { min-height: 36px; padding: 8px 14px; display: inline-block; }
.secondary-btn { padding: 9px 13px; color: #3d4350; background: var(--surface); border: 1px solid var(--border-strong); }
.secondary-btn:hover { background: var(--surface-subtle); border-color: #b7bec9; }
.secondary-btn.full { width: 100%; margin-top: 8px; }
.text-btn { min-height: auto; padding: 5px; color: var(--accent); background: transparent; border: 0; font-size: 11px; }
.text-btn:hover { color: var(--accent-hover); }
.edit-stock { min-height: 30px; padding: 5px 9px; color: var(--accent); background: #fff; border: 1px solid var(--border); font-size: 10px; }
.edit-stock:hover { background: var(--accent-soft); border-color: var(--accent-border); }
.action-row { display: flex; gap: 8px; align-items: center; }

/* Application layout */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-width); padding: 23px 14px 16px; overflow-y: auto; color: #fff; background: var(--sidebar); display: flex; flex-direction: column; }
.side-brand { padding: 0 9px 24px; }
.side-brand .brand-mark { width: 34px; height: 34px; }
.side-brand span { color: #d6dae2; font-size: 14px; line-height: 1.25; }
.side-brand b { color: #fff; font-weight: 700; }
.sidebar nav { display: flex; flex-direction: column; gap: 3px; padding-bottom: 18px; }
.nav-item { position: relative; min-height: 41px; padding: 9px 11px; color: var(--sidebar-text); background: transparent; border: 0; border-radius: var(--radius-sm); display: flex; align-items: center; gap: 11px; cursor: pointer; text-align: left; font-size: 12.5px; font-weight: 500; }
.nav-item > span { width: 19px; color: #8e97a6; font-size: 16px; text-align: center; }
.nav-item:hover { color: #f2f4f7; background: var(--sidebar-hover); }
.nav-item.active { color: #fff; background: #303541; font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: -14px; width: 3px; height: 22px; background: #818cf8; border-radius: 0 3px 3px 0; }
.nav-item.active > span { color: #a5b4fc; }
.side-user { margin-top: auto; padding: 15px 5px 0; border-top: 1px solid rgba(255,255,255,.09); display: grid; grid-template-columns: 34px minmax(0,1fr) 28px; gap: 9px; align-items: center; }
.avatar { width: 34px; height: 34px; color: #e0e7ff; background: #373d4a; border: 1px solid #4a5261; border-radius: 7px; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.side-user div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.side-user b { overflow: hidden; color: #f5f6f8; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { margin-top: 2px; color: #8f98a7; font-size: 9px; text-transform: capitalize; }
.side-user button { color: #929aa8; background: transparent; border: 0; cursor: pointer; font-size: 16px; }
.side-user button:hover { color: #fff; }
.workspace { grid-column: 2; min-width: 0; padding-bottom: 48px; }
.topbar { min-height: 80px; padding: 0 clamp(24px, 3.25vw, 48px); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.crumb { color: var(--text-faint); font-size: 9px; font-weight: 600; letter-spacing: .1em; }
.crumb b { color: var(--accent); }
.topbar h2 { margin: 5px 0 0; color: var(--text-strong); font: 700 20px "Manrope", sans-serif; letter-spacing: -.02em; }
.top-actions { display: flex; align-items: center; gap: 16px; }
.today { color: var(--text-muted); font-size: 11px; }
.status-dot { padding: 6px 10px; color: var(--text-muted); background: #fff; border: 1px solid var(--border); border-radius: 999px; font-size: 10px; }
.status-dot i { width: 6px; height: 6px; margin-right: 5px; background: var(--success); border-radius: 50%; display: inline-block; }
.mobile-menu { display: none; }
.view { display: none; padding: 30px clamp(24px, 3.25vw, 48px); }
.view.active { display: block; }
.welcome, .view-head { margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.welcome p, .view-head p { margin: 5px 0 0; color: var(--text-muted); font-size: 12px; }
.view-head h2 { margin: 0; color: var(--text-strong); font: 700 22px "Manrope", sans-serif; letter-spacing: -.02em; }

/* Panels and KPI cards */
.panel, .metric, .stock-card, .report-grid button, .empty-state { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.metrics { margin-bottom: 18px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.metric { position: relative; min-height: 118px; padding: 18px; }
.metric .metric-icon { width: 32px; height: 32px; margin-bottom: 14px; color: var(--accent); background: var(--accent-soft); border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.metric strong { color: var(--text-strong); font: 700 23px "Manrope", sans-serif; letter-spacing: -.025em; }
.metric p { margin: 4px 0 0; color: var(--text-muted); font-size: 10.5px; }
.metric .alert { position: absolute; top: 15px; right: 15px; padding: 4px 7px; color: var(--danger); background: var(--danger-soft); border-radius: 999px; font-size: 9px; font-weight: 600; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,.75fr); gap: 16px; }
.panel { overflow: hidden; }
.panel-head { min-height: 68px; padding: 17px 19px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.panel-head h3 { margin: 5px 0 0; color: var(--text-strong); font: 700 15px "Manrope", sans-serif; }
.quick-panel { padding-bottom: 4px; }
.quick-panel > button { width: 100%; min-height: 67px; padding: 13px 17px; background: #fff; border: 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 36px 1fr 16px; align-items: center; gap: 11px; cursor: pointer; text-align: left; }
.quick-panel > button:last-child { border-bottom: 0; }
.quick-panel > button:hover { background: var(--surface-subtle); }
.quick-panel > button div { display: flex; flex-direction: column; gap: 3px; }
.quick-panel > button b { color: var(--text); font-size: 11.5px; }
.quick-panel > button small { color: var(--text-muted); font-size: 9px; }
.quick-panel > button > i { color: var(--text-faint); font-style: normal; }
.quick-icon { width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center; font-weight: 700; }
.quick-icon.orange { color: var(--warning); background: var(--warning-soft); }
.quick-icon.green-bg { color: var(--accent); background: var(--accent-soft); }
.quick-icon.blue { color: var(--info); background: var(--info-soft); }

/* Tables */
.table-panel { min-height: 280px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
thead { background: var(--surface-subtle); }
th { padding: 11px 15px; color: #697181; border-bottom: 1px solid var(--border); text-align: left; text-transform: uppercase; letter-spacing: .055em; font-size: 9px; font-weight: 700; white-space: nowrap; }
td { padding: 13px 15px; color: #444b57; border-bottom: 1px solid #eceef2; vertical-align: middle; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfc; }
td b { color: var(--text-strong); font-weight: 600; }
td small, .sku, .order-code { color: var(--text-muted); font-size: 10px; }
td:nth-last-child(-n+3), th:nth-last-child(-n+3) { font-variant-numeric: tabular-nums; }
.product-cell { display: flex; align-items: center; gap: 10px; }
.product-dot { width: 30px; height: 30px; color: var(--accent); background: var(--accent-soft); border-radius: 6px; display: grid; place-items: center; font-weight: 700; }
.sku-product-cell { display: flex; align-items: center; gap: 11px; }
.product-thumb { width: 42px; height: 42px; flex: 0 0 42px; padding: 0; overflow: hidden; background: #f6f0e2; border: 1px solid var(--border); border-radius: 7px; cursor: pointer; display: grid; place-items: center; }
.product-thumb:hover { border-color: var(--accent-border); box-shadow: 0 0 0 2px var(--accent-soft); }
.product-thumb img { width: 40px; height: 40px; display: block; object-fit: contain; }
.product-thumb.placeholder { color: var(--text-faint); background: var(--surface-subtle); font-size: 18px; }
.table-actions { display: flex; align-items: center; gap: 6px; }
.empty-cell { padding: 44px !important; color: var(--text-muted); text-align: center !important; }

/* Semantic states */
.badge { padding: 4px 7px; border: 1px solid transparent; border-radius: 999px; display: inline-flex; align-items: center; font-size: 9px; font-weight: 600; line-height: 1.2; text-transform: capitalize; }
.badge.new, .badge.planned { color: var(--info); background: var(--info-soft); border-color: #d7e8fa; }
.badge.processing, .badge.in_progress { color: var(--warning); background: var(--warning-soft); border-color: #f6dfb7; }
.badge.ready, .badge.completed, .badge.good, .badge.paid, .badge.received { color: var(--success); background: var(--success-soft); border-color: #ccebdd; }
.badge.low, .badge.overdue, .badge.blocked { color: var(--danger); background: var(--danger-soft); border-color: #f5d3d9; }
.profit { color: var(--success); }
.loss { color: var(--danger) !important; }
.rule-ok { padding: 11px; color: var(--success); background: var(--success-soft); border: 1px solid #d3ede2; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; }

/* Tabs, inventory, reports and settings */
.subtabs { margin-bottom: 15px; border-bottom: 1px solid var(--border); display: flex; gap: 22px; }
.subtabs button { margin-bottom: -1px; padding: 10px 1px; color: var(--text-muted); background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-size: 11px; font-weight: 600; }
.subtabs button:hover { color: var(--text); }
.subtabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.inventory-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.stock-card { padding: 15px; }
.stock-card > div:first-child { display: flex; flex-direction: column; }
.stock-card > div:first-child b { color: var(--text-strong); font-size: 11.5px; }
.stock-card > div:first-child small { margin-top: 3px; color: var(--text-muted); font-size: 9px; }
.stock-locations { margin-top: 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.stock-locations span { padding: 9px 10px; background: var(--surface-subtle); border: 1px solid #eceef1; border-radius: var(--radius-sm); display: flex; flex-direction: column; }
.stock-locations small { color: var(--text-muted); font-size: 8px; font-weight: 600; letter-spacing: .05em; }
.stock-locations strong { margin-top: 2px; color: var(--text-strong); font: 700 18px "Manrope",sans-serif; }
.stock-locations .stock-low { color: var(--danger); background: var(--danger-soft); border-color: #f2d7db; }
.stock-locations .stock-low strong { color: var(--danger); }
.section-title { margin: 27px 0 11px; color: var(--text-strong); font: 700 14px "Manrope",sans-serif; }
.report-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.report-grid button { min-height: 130px; padding: 17px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.report-grid button:hover { border-color: var(--accent-border); box-shadow: var(--shadow-sm); }
.report-grid button > span { color: var(--accent); font-size: 22px; }
.report-grid button b { color: var(--text-strong); font-size: 11.5px; }
.report-grid button small { margin-top: auto; color: var(--text-muted); font-size: 9px; }
.module-tabs { margin-bottom: 0; padding: 0 8px; overflow-x: auto; background: var(--surface-raised); border: 1px solid var(--border); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; display: flex; scrollbar-width: thin; }
.module-tabs button { min-height: 49px; margin-bottom: -1px; padding: 0 16px; color: var(--text-muted); background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; font-size: 11px; font-weight: 600; }
.module-tabs button:hover { color: var(--text); background: var(--surface-subtle); }
.module-tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.customer-list-tools { min-height: 86px; padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.customer-list-tools h3 { margin: 0 0 4px; }
.customer-list-tools p { margin: 0; color: var(--text-muted); font-size: 12px; }
.customer-searches { display: flex; align-items: end; gap: 10px; }
.customer-searches label { min-width: 190px; margin: 0; font-size: 10px; }
.customer-searches input { min-height: 38px; margin-top: 4px; }
.module-panel { display: none; }
.module-panel.active { display: block; }
.inventory-tools { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); }
.inventory-tools h3 { margin: 0 0 5px; font-size: 14px; }
.inventory-tools p { margin: 0; color: var(--text-muted); font-size: 12px; max-width: 570px; }
.inventory-filters { display: flex; flex-wrap: wrap; gap: 12px; }
.inventory-filters label { margin: 0; min-width: 190px; font-size: 11px; }
.inventory-filters input, .inventory-filters select { min-height: 38px; margin-top: 5px; }
.inventory-record-filters { padding: 14px 20px; border-bottom: 1px solid var(--border); }
.inventory-table .inventory-family-start td { border-top: 2px solid var(--border); }
.inventory-table td:first-child { background: var(--surface-subtle); }
#inventory-view .numeric, #stock-history-modal .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.inventory-table .stock-low { color: var(--danger); font-weight: 700; }
.inventory-stock-table { table-layout:fixed; min-width:660px; }
.inventory-stock-table .inventory-product-col { width:auto; }
.inventory-stock-table .inventory-pack-col { width:130px; }
.inventory-stock-table .inventory-number-col { width:76px; }
.inventory-stock-table .inventory-action-col { width:112px; }
.inventory-stock-table th,.inventory-stock-table td { padding:10px; overflow-wrap:anywhere; }
.inventory-stock-table .numeric { white-space:nowrap; }
.inventory-stock-table [data-stock-history] { white-space:nowrap; font-size:12px; border:0; background:transparent; box-shadow:none; padding:0; }
.inventory-stock-table [data-stock-history]:hover { text-decoration:underline; }
#consumables-view .module-panel > .panel, #accounts-view [data-account-panel="salary"] > .panel, #accounts-view [data-account-panel="pnl"] > .panel, .report-criteria, #report-results-panel { padding:20px; }
.report-criteria { margin-bottom:20px; }
.finance-tools { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:16px; }
.finance-filters { display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.finance-filters label { flex:1 1 145px; max-width:260px; margin:0; font-size:12px; color:var(--muted); font-weight:500; }
.finance-filters button { margin-bottom:1px; }
.finance-actions { justify-content:flex-end; margin:0 0 16px; }
.finance-table th,.finance-table td { padding:10px; }
.finance-table .numeric { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.select-add { display:flex; align-items:center; gap:8px; }
.select-add select { min-width:0; flex:1; }
.select-add button { flex:0 0 36px; padding:9px; }
.report-criteria summary { cursor:pointer; font-weight:700; margin-bottom:16px; }
.report-mappings { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.report-mappings label { display:flex; align-items:flex-start; gap:8px; }
.report-mappings input { width:auto; margin-top:4px; }
.report-mappings small { display:block; color:var(--muted); }
.report-print-frame { position:fixed; width:1px; height:1px; left:-10000px; }
#report-output-actions button:disabled { opacity:.45; cursor:not-allowed; }
@media(max-width:700px) { .finance-filters label { max-width:none; flex-basis:100%; } .report-mappings { grid-template-columns:1fr; } .finance-tools .action-row { flex-wrap:wrap; } }
#inventory-view > .view-head h2 { display: none; }
#processing-view > .view-head h2 { display: none; }
#processing-view .numeric, #processing-detail-modal .numeric, #supplier-bill-detail-modal .numeric { text-align: right; font-variant-numeric: tabular-nums; }
#processing-view th, #processing-view td { padding-left: 10px; padding-right: 10px; }
#processing-view .table-actions { width: 180px; flex-wrap: wrap; }
#supplier-bill-detail-modal .table-actions { flex-wrap: wrap; }
.processing-tools { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); }
.processing-tools h3 { margin: 0 0 5px; font-size: 14px; }
.processing-tools p { margin: 0; font-size: 12px; color: var(--text-muted); max-width: 650px; }
.processing-filters { padding: 14px 20px; display: flex; flex-wrap: wrap; gap: 12px; border-bottom: 1px solid var(--border); }
.processing-filters label { flex: 1; min-width: 140px; margin: 0; font-size: 11px; }
.processing-filters label:first-child { flex: 2; min-width: 200px; }
.processing-filters input, .processing-filters select { min-height: 38px; margin-top: 5px; }
.processing-detail-grid { margin: 15px 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.processing-detail-grid > div { padding: 12px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.processing-detail-grid small { display: block; color: var(--text-muted); margin-bottom: 5px; }
@media (max-width:600px) { .processing-tools { align-items: stretch; flex-direction: column; } .processing-detail-grid { grid-template-columns: 1fr; } .processing-filters label { min-width: 100%; } }
.inventory-pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12px; }
.inventory-pagination-controls { display: flex; align-items: center; gap: 12px; }
.inventory-pagination button:disabled { cursor: default; opacity: .45; }
@media (max-width: 1000px) { .inventory-tools { align-items: stretch; flex-direction: column; } }
@media (max-width: 600px) { .inventory-filters, .inventory-pagination { align-items: stretch; flex-direction: column; } .inventory-filters label { min-width: 0; } }
.product-panel-head { padding: 18px 20px; border-radius: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.product-panel-head h3, .pricing-section-head h4 { margin: 0 0 4px; color: var(--text-strong); font: 700 14px "Manrope",sans-serif; }
.product-panel-head p, .pricing-section-head p { margin: 0; color: var(--text-muted); font-size: 10.5px; line-height: 1.5; }
.product-table-panel { margin-top: 10px; }
.product-admin-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.product-admin-actions .primary-btn, .product-admin-actions .secondary-btn { width: auto; }
.customer-admin-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.customer-admin-actions .primary-btn, .customer-admin-actions .secondary-btn { width: auto; }
.item-id-badge { padding: 2px 6px; color: #14532d; background: #dcfce7; border: 1px solid #bbf7d0; border-radius: 4px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.pricing-workspace { min-height: 430px; padding: 25px; border-radius: 0 0 var(--radius) var(--radius); }
.pricing-customer-select { max-width: 460px; }
.customer-pricing-summary { margin: 18px 0 24px; padding: 14px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
.customer-pricing-summary span { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.customer-pricing-summary small { color: var(--text-muted); font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.customer-pricing-summary b { overflow: hidden; color: var(--text-strong); font-size: 10.5px; text-overflow: ellipsis; }
.customer-pricing-summary.muted-placeholder { color: var(--text-muted); display: block; font-size: 11px; }
.b2b-credit-form { margin: 0 0 18px; padding: 12px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); display: grid; grid-template-columns: minmax(190px,1.5fr) 130px 160px auto; gap: 10px; align-items: end; }.b2b-credit-form h4,.b2b-credit-form p { margin: 0; }.b2b-credit-form p { margin-top: 3px; color: var(--text-muted); font-size: 9px; }.b2b-credit-form label,.b2b-credit-form .status { margin: 0; }.b2b-credit-form .status { grid-column: 1/-1; }
.pricing-section-head { margin: 22px 0 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; }
.agreement-section { margin-top: 30px; padding-top: 5px; border-top: 1px solid var(--border); }
#b2b-agreement-form { margin-bottom: 20px; padding: 18px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.table-input { width: 130px; min-height: 34px; padding: 7px 9px; }
.pricing-table td { vertical-align: top; }
.pricing-table td small { margin-top: 4px; display: block; }
.pricing-table .profit, .pricing-table .loss { font-weight: 650; }
.settings-form { min-height: 410px; padding: 27px; border-radius: 0 0 var(--radius) var(--radius); }
.settings-section-head { margin-bottom: 24px; padding-bottom: 19px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.settings-section-head h3 { margin: 6px 0 5px; color: var(--text-strong); font: 700 17px "Manrope",sans-serif; }
.settings-section-head p { max-width: 690px; margin: 0; color: var(--text-muted); font-size: 11.5px; line-height: 1.6; }
.settings-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; }
.settings-fields.full-span { grid-column: 1 / -1; }
.settings-fields .full-span, .full-span { grid-column: 1 / -1; }
.settings-fields label small { margin-top: -3px; color: var(--text-muted); font-size: 9.5px; font-weight: 400; line-height: 1.45; }
.settings-section-divider { margin: 22px 0 14px; padding-top: 17px; border-top: 1px solid var(--border); }
.settings-section-divider h4 { margin: 0 0 3px; color: var(--text-strong); font: 700 12px "Manrope",sans-serif; }
.settings-section-divider p { margin: 0; color: var(--text-muted); font-size: 10.5px; }
.settings-savebar { margin-top: 25px; padding-top: 17px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: flex-end; gap: 15px; }
.settings-savebar .status { flex: 1; margin: 0; }
.settings-savebar .primary-btn, .settings-savebar .secondary-btn { min-width: 135px; justify-content: center; }
.settings-links { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 8px; }
.thermal-settings-form { min-height: 0; margin-top: 12px; border-radius: var(--radius); }
.thermal-config-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(260px,.65fr); gap: 28px; align-items: start; }
.thermal-field-grid { margin: 16px 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 14px; }
.thermal-preview-shell { padding: 16px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius); }
.thermal-preview { width: 100%; max-width: 300px; min-height: 430px; margin: 12px auto 0; padding: 18px 15px; color: #111; background: #fff; border: 1px solid #d7d7d7; box-shadow: var(--shadow-sm); font-family: "Courier New",monospace; font-size: 9px; line-height: 1.45; }
.thermal-preview.width-58 { max-width: 220px; }
.thermal-preview h4,.thermal-preview p { margin: 0; text-align: center; }
.thermal-preview h4 { font-size: 13px; }
.thermal-preview hr { margin: 8px 0; border: 0; border-top: 1px dashed #555; }
.thermal-preview .preview-pair { display: flex; justify-content: space-between; gap: 8px; }
.thermal-preview .preview-total { margin-top: 4px; font-size: 11px; font-weight: 700; }
.thermal-preview .preview-item { margin: 5px 0; }
.thermal-preview .preview-item small { display: block; }
.discount-control-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.discount-control-groups section { padding: 18px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.discount-control-groups h4 { margin: 7px 0 4px; color: var(--text-strong); font: 700 13px "Manrope",sans-serif; }
.discount-control-groups p { min-height: 34px; margin: 0 0 12px; color: var(--text-muted); font-size: 10.5px; line-height: 1.55; }
.staff-reference { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.staff-reference span, .control-list span { padding: 13px 14px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 3px; }
.staff-reference b, .control-list b { color: var(--text-strong); font-size: 11px; }
.staff-reference small, .control-list small { color: var(--text-muted); font-size: 9.5px; line-height: 1.5; }
.control-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.control-list span:last-child:nth-child(odd) { grid-column: 1 / -1; }
#whatsapp-template-form textarea { min-height: 230px; line-height: 1.55; resize: vertical; }
.whatsapp-test-send-fields { max-width: 520px; margin-top: 22px; }
.template-variables { margin: 4px 0 14px; color: var(--text-muted); font-size: 10px; line-height: 2; }
.template-variables code { margin-right: 4px; padding: 3px 6px; color: var(--accent); background: var(--accent-soft); border: 1px solid #dfe3ff; border-radius: 4px; }
.check-label { min-height: 36px; flex-direction: row !important; align-items: center; gap: 8px !important; }
.check-label input { width: 16px; height: 16px; margin: 0; }
.setting-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.notice-box { padding: 10px 12px; color: var(--success); background: var(--success-soft); border: 1px solid #ccebdd; border-radius: var(--radius-sm); }
.notice-box.warning { color: var(--warning); background: var(--warning-soft); border-color: #f6dfb7; }
.direct-whatsapp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.direct-whatsapp-head p { margin: 4px 0 0; color: var(--text); font-size: 10.5px; }
.direct-whatsapp-warning { margin: 12px 0; padding-top: 11px; border-top: 1px solid currentColor; font-size: 10px; line-height: 1.55; opacity: .9; }
.direct-whatsapp-qr { margin: 14px 0; display: flex; align-items: center; gap: 18px; }
.direct-whatsapp-qr.hidden { display: none; }
.direct-whatsapp-qr img { width: 220px; max-width: 100%; padding: 8px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.direct-whatsapp-qr p { max-width: 360px; margin: 0; color: var(--text); font-size: 10.5px; line-height: 1.6; }
.share-history { margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--border); }
.share-history h3 { margin: 0 0 8px; color: var(--text-strong); font-size: 11px; }
.share-history-row { padding: 7px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 10px; }
.share-history-row span { display: flex; flex-direction: column; }
.share-history-row small { color: var(--text-muted); }
.metrics.mini { grid-template-columns: repeat(4,1fr); }
.metrics.mini .metric { min-height: 88px; }
.empty-state { padding: 52px 24px; color: var(--text-muted); text-align: center; }
.empty-state > span { color: var(--accent); font-size: 34px; }
.empty-state h3 { color: var(--text); }

/* Modals and transactional forms */
.modal { position: fixed; inset: 0; z-index: 60; padding: 22px; background: rgba(17,24,39,.58); display: grid; place-items: center; }
.modal-card { position: relative; width: min(520px,100%); max-height: calc(100vh - 44px); padding: 28px; overflow: auto; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-modal); }
.modal-card.wide { width: min(800px,100%); }
.modal-card.import-modal-card { width: min(1220px,calc(100vw - 36px)); }
.modal-card.pos-workspace { width: min(1280px,calc(100vw - 36px)); max-height: calc(100vh - 24px); padding: 25px 28px; }
.pos-title-row { padding-right: 40px; display: grid; grid-template-columns: 1fr auto auto; align-items: start; gap: 16px; }
.pos-title-row h2 { margin-bottom: 0; }
.pos-new-sale { width: auto; min-width: 145px; align-self: center; white-space: nowrap; }
.pos-header-fields { grid-template-columns: repeat(4,minmax(0,1fr)); }
.pos-invoice-number { min-width: 220px; padding: 10px 13px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; align-items: flex-end; }
.pos-invoice-number span, .pos-invoice-number small { color: var(--text-muted); font-size: 8px; }
.pos-invoice-number strong { margin: 2px 0; color: var(--accent); font: 700 15px "Manrope",sans-serif; }
.modal-card > p { color: var(--text-muted); font-size: 12px; }
.modal-close { position: absolute; top: 14px; right: 15px; width: 31px; height: 31px; padding: 0; color: var(--text-muted); background: transparent; border: 0; border-radius: 6px; cursor: pointer; font-size: 22px; }
.modal-close:hover { color: var(--text); background: var(--surface-subtle); }
.modal-card .primary-btn { width: 100%; justify-content: center; }
.modal-card .import-actions .primary-btn, .modal-card .import-actions .secondary-btn { width: auto; }
.modal-card hr { margin: 20px 0; border: 0; border-top: 1px solid var(--border); }
.modal-card details { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--border); }
.modal-card summary { margin-bottom: 16px; color: var(--accent); cursor: pointer; font-size: 11px; font-weight: 600; }
.form-section-title { margin: 18px 0 12px; padding-top: 15px; color: var(--text-strong); border-top: 1px solid var(--border); font: 700 13px "Manrope", sans-serif; }
.read-only-field input, input[readonly] { background: var(--surface-subtle); color: var(--text-muted); }
.import-summary { margin: 18px 0 12px; display: grid; grid-template-columns: repeat(5,minmax(110px,1fr)); gap: 8px; }
.import-summary span { padding: 11px 13px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; }
.import-summary small { color: var(--text-muted); }
.import-summary b { margin-top: 3px; color: var(--text-strong); font: 700 18px "Manrope",sans-serif; }
.import-update-confirm { margin: 14px 0 !important; padding: 12px; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-sm); }
.import-preview-table { max-height: 48vh; border: 1px solid var(--border); }
.import-preview-table th { position: sticky; top: 0; z-index: 1; }
.import-preview-table td { min-width: 130px; vertical-align: top; }
.import-preview-table td:nth-child(6), .import-preview-table td:nth-child(7) { min-width: 230px; }
.import-row-error { background: #fff7f7; }
.import-error, .import-warning, .import-ok, .import-change { margin-bottom: 4px; display: block; font-size: 10px; line-height: 1.4; }
.import-error { color: #b42318; }.import-warning { color: #9a6700; }.import-ok { color: #16794a; }.import-change { color: var(--text-muted); }
.import-actions { margin-top: 14px; display: flex; justify-content: flex-end; gap: 9px; }
.barcode-toolbar { margin-bottom: 10px; padding: 14px 18px; display: flex; align-items: end; gap: 10px; }
.barcode-toolbar label { flex: 1; margin: 0; }
.barcode-toolbar button { width: auto; min-width: 130px; }
.label-quantity { width: 76px; }
.barcode-preview-card { width: min(950px,calc(100vw - 36px)); }
.barcode-label-grid { max-height: 56vh; margin: 14px 0; padding: 15px; overflow: auto; background: #d8d8d8; display: grid; grid-template-columns: repeat(auto-fill,50mm); gap: 5mm; justify-content: center; }
.barcode-label { box-sizing: border-box; width: 50mm; height: 30mm; padding: 1.5mm; overflow: hidden; color: #000; background: #fff; border: 1px solid #aaa; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: Arial,sans-serif; }
.barcode-label > b { font-size: 8pt; text-transform: uppercase; }.barcode-label > span { max-width: 100%; overflow: hidden; font-size: 7pt; text-overflow: ellipsis; white-space: nowrap; }.barcode-label img { width: 44mm; height: 14mm; object-fit: contain; }.barcode-label small { font-size: 6.5pt; }
.image-upload-row { display: grid; grid-template-columns: 1fr 112px; gap: 15px; align-items: center; }
.image-upload-preview { width: 112px; height: 112px; overflow: hidden; color: var(--text-muted); background: #f6f0e2; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); display: grid; place-items: center; text-align: center; font-size: 10px; }
.image-upload-preview img, .image-master-preview img { width: 100%; height: 100%; display: block; object-fit: contain; }
.image-guidance { margin: 8px 0 14px; color: var(--text-muted); font-size: 10px !important; line-height: 1.5; }
.image-master-preview { width: min(360px,100%); aspect-ratio: 1; margin: 17px auto; overflow: hidden; color: var(--text-muted); background: #f6f0e2; border: 1px solid var(--border); border-radius: var(--radius); display: grid; place-items: center; font-size: 11px; }
.image-preview-card { width: min(640px,100%); }
.image-preview-card .image-master-preview { width: min(520px,100%); }
.image-actions { margin-top: 16px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.danger-btn { min-height: 38px; padding: 9px 13px; color: var(--danger); background: var(--danger-soft); border: 1px solid #efcbd1; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; }
.danger-btn:hover { background: #fbe4e8; }
.line-editor { margin-bottom: 12px; padding: 14px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius); }
.pos-mode-banner { margin: 13px 0 16px; padding: 10px 13px; color: var(--accent); background: var(--accent-soft); border: 1px solid #dfe3ff; border-radius: var(--radius-sm); display: flex; align-items: center; gap: 9px; }
.pos-mode-banner b { font-size: 11px; }
.pos-mode-banner span { color: var(--text-muted); font-size: 10px; }
.pos-item-fields { display: grid; grid-template-columns: minmax(160px,1.4fr) minmax(150px,1.2fr) 90px 120px; gap: 10px; }
.pos-rate-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: end; }
.b2c-mode .pos-rate-row { grid-template-columns: 1fr; }
.pos-rate-row .price-preview { min-height: 38px; margin-top: 0; display: flex; align-items: center; }
.pos-entry-grid { display: grid; grid-template-columns: minmax(200px,2fr) minmax(135px,1.15fr) 68px 95px minmax(120px,.8fr) 110px; gap: 9px; align-items: end; }
.gst-mode .pos-entry-grid, .b2b-mode .pos-entry-grid { grid-template-columns: minmax(185px,1.8fr) minmax(125px,1.05fr) 66px 90px 98px minmax(116px,.8fr) 106px; }
.b2b-mode.gst-mode .pos-entry-grid { grid-template-columns: minmax(170px,1.65fr) minmax(118px,1fr) 62px 86px 94px 90px minmax(112px,.75fr) 102px; }
.pos-entry-grid .primary-btn { min-height: 38px; padding-right: 10px; padding-left: 10px; white-space: nowrap; }
.line-amount-field { min-width: 112px; white-space: nowrap; }
.line-amount-field b { overflow: visible; font-size: 12px; }
.pos-entry-value { min-height: 38px; padding: 5px 10px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; justify-content: center; }
.pos-entry-value span { color: var(--text-muted); font-size: 8px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.pos-entry-value b { margin-top: 2px; color: var(--text-strong); font-size: 11px; font-variant-numeric: tabular-nums; }
.pos-price-context { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 13px; }
.pos-price-context .price-preview { flex: 1; margin: 0; }
.pos-price-context > small { max-width: 300px; color: var(--text-muted); font-size: 9px; line-height: 1.45; }
.stock-availability { padding: 7px 10px; border-radius: var(--radius-sm); color: var(--text-muted); background: var(--surface-subtle); font-size: 9px; white-space: nowrap; }.stock-good { color: var(--success); background: #edf8f2; }.stock-danger { color: var(--danger); background: var(--danger-soft); }
.pos-credit-summary { margin: 8px 0 12px; padding: 8px 10px; background: #f2faf6; border: 1px solid #cfe8db; border-radius: var(--radius-sm); display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; }.pos-credit-summary span { min-width: 0; padding-right: 7px; border-right: 1px solid #d9e9e1; display: flex; flex-direction: column; }.pos-credit-summary span:last-child { border: 0; }.pos-credit-summary small { color: var(--text-muted); font-size: 7.5px; text-transform: uppercase; letter-spacing: .035em; }.pos-credit-summary b { margin-top: 3px; color: var(--text-strong); font-size: 11px; white-space: nowrap; }.pos-credit-summary.credit-warning { background: #fff8e7; border-color: #ead493; }.pos-credit-summary.credit-warning #pos-remaining-credit { color: #9a6800; }.pos-credit-summary.credit-danger { background: #fff0ef; border-color: #e7b9b5; }.pos-credit-summary.credit-danger #pos-remaining-credit { color: var(--danger); }
.pos-price-context .primary-btn { width: auto; min-width: 120px; }
.product-search-control { position: relative; display: block; }
.product-search-control > input { padding-right: 36px; }
.scan-indicator { position: absolute; top: 50%; right: 11px; color: var(--accent); transform: translateY(-50%); font-size: 17px; pointer-events: none; }
.product-search-results { position: absolute; top: calc(100% + 5px); right: 0; left: 0; z-index: 12; max-height: 280px; overflow-y: auto; background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-modal); }
.product-search-results button { width: 100%; min-height: 52px; padding: 9px 12px; color: var(--text); background: #fff; border: 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; text-align: left; }
.product-search-results button:hover { background: var(--accent-soft); }
.product-search-results button:last-child { border-bottom: 0; }
.product-search-results button span { display: flex; flex-direction: column; }
.product-search-results button b { color: var(--text-strong); font-size: 11px; }
.product-search-results button small { margin-top: 2px; color: var(--text-muted); font-size: 9px; }
.product-search-results button em { color: var(--text-muted); font-size: 8.5px; font-style: normal; white-space: nowrap; }
.product-search-results button em.stock-result-good { color: #147a45; font-weight: 700; }
.product-search-results button em.stock-result-low { color: #a56300; font-weight: 700; }
.product-search-results button em.stock-result-zero { color: #b42318; font-weight: 700; }
.all-products-btn { float: right; padding: 0; font-size: 10px; }
.preinvoice-meta { margin: 14px 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.preinvoice-meta span { padding: 10px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 4px; }
.preinvoice-meta small { color: var(--text-muted); font-size: 8px; text-transform: uppercase; }
.preinvoice-final { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.preinvoice-final > div { padding: 12px; background: var(--surface-subtle); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 7px; }
.preinvoice-final span,.preinvoice-final strong { display: flex; justify-content: space-between; gap: 12px; }
.preinvoice-final strong { padding-top: 8px; border-top: 1px solid var(--border-strong); }
.product-search-empty { padding: 15px; color: var(--text-muted); display: block; font-size: 10px; }
#sale-rate[readonly] { color: var(--text-strong); background: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.pos-items-head { margin: 20px 1px 8px; display: flex; align-items: end; justify-content: space-between; }
.pos-items-head h3 { margin: 0; color: var(--text-strong); font: 700 13px "Manrope",sans-serif; }
.pos-items-head p { margin: 3px 0 0; color: var(--text-muted); font-size: 9px; }
.pos-items-head > span { color: var(--text-muted); font-size: 10px; font-weight: 600; }
.pos-items-actions { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 10px; font-weight: 600; }
.pos-items-actions .secondary-btn { min-height: 30px; padding: 5px 10px; font-size: 9px; }
.commercial-context-locked { opacity: .72; }
.pos-lines { min-height: 116px; margin: 0 0 16px; overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pos-items-table { width: 100%; min-width: 760px; }
.pos-items-table th { color: var(--text-muted); background: var(--surface-subtle); font-size: 8px; letter-spacing: .045em; text-transform: uppercase; }
.pos-items-table td { vertical-align: middle; font-size: 10.5px; }
.pos-items-table td small { margin-top: 3px; color: var(--text-muted); display: block; font-size: 8.5px; }
.pos-items-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.pos-items-table .remove-row { padding: 5px 8px; color: var(--danger); background: transparent; border: 0; cursor: pointer; font-size: 9px; font-weight: 600; }
.pos-items-table tr.pricing-stale { color: var(--danger); background: var(--danger-soft); }
.pos-line { min-height: 58px; padding: 10px 12px; border-bottom: 1px solid var(--border); display: grid; gap: 10px; align-items: center; color: var(--text); font-size: 10.5px; }
.pos-line.b2c-line.no-gst { min-width: 620px; grid-template-columns: minmax(175px,1.8fr) 100px 55px 105px 120px 24px; }
.pos-line.b2c-line.has-gst { min-width: 780px; grid-template-columns: minmax(160px,1.6fr) 90px 50px 95px 105px 90px 115px 24px; }
.pos-line.b2b-line.no-gst { min-width: 730px; grid-template-columns: minmax(165px,1.65fr) 95px 50px 100px 110px 120px 24px; }
.pos-line.b2b-line.has-gst { min-width: 880px; grid-template-columns: minmax(155px,1.55fr) 85px 48px 92px 105px 105px 85px 112px 24px; }
.pos-line.b2c-line { min-width: 650px; grid-template-columns: minmax(165px,1.7fr) 95px 50px 95px 95px 110px 24px; }
.pos-line:last-child { border-bottom: 0; }
.pos-line > span, .pos-product { display: flex; flex-direction: column; }
.pos-line small { margin-top: 2px; color: var(--text-muted); font-size: 8.5px; }
.pos-line strong { color: var(--text-strong); font-variant-numeric: tabular-nums; }
.pos-line button { color: var(--danger); background: transparent; border: 0; cursor: pointer; font-size: 17px; }
.pos-line-head { min-height: 35px; padding-top: 7px; padding-bottom: 7px; color: var(--text-muted); background: var(--surface-subtle); text-transform: uppercase; letter-spacing: .045em; font-size: 8px; font-weight: 700; }
.pos-line-head span { display: block; }
.pos-line.pricing-stale { color: var(--danger); background: var(--danger-soft); }
.pos-line:not(.pos-line-head):hover { background: #fafbfc; }
.pos-items-empty { min-height: 114px; padding: 24px; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.pos-items-empty span { color: var(--accent); font-size: 21px; }
.pos-items-empty b { margin-top: 4px; color: var(--text); font-size: 11px; }
.pos-items-empty small { margin-top: 3px; font-size: 9px; }
.price-preview, .profit-preview { margin-bottom: 10px; padding: 9px 10px; color: #3e4784; background: var(--accent-soft); border: 1px solid #dfe3ff; border-radius: var(--radius-sm); font-size: 10.5px; }
.invoice-line { min-height: 50px; padding: 9px 3px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto auto 24px; gap: 12px; align-items: center; font-size: 11px; }
.invoice-line > div { display: flex; flex-direction: column; }
.invoice-line small { margin-top: 2px; color: var(--text-muted); }
.invoice-line button, .cost-row button { color: var(--danger); background: transparent; border: 0; cursor: pointer; font-size: 17px; }
.invoice-total, .cost-summary { margin: 12px 0; padding: 12px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: space-between; }
.invoice-total strong { color: var(--text-strong); font: 700 20px "Manrope",sans-serif; }
.pos-payment-controls small { margin-top: -3px; color: var(--text-muted); font-size: 9px; font-weight: 400; }
.pos-summary { width: min(390px,100%); margin: 14px 0 17px auto; padding: 10px 15px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pos-summary > div { min-height: 31px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--text-muted); font-size: 10.5px; }
.pos-summary > div:last-child { border-bottom: 0; }
.pos-summary b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.pos-summary .grand-total { min-height: 45px; color: var(--text-strong); font-weight: 700; }
.pos-summary .grand-total strong { color: var(--text-strong); font: 700 20px "Manrope",sans-serif; font-variant-numeric: tabular-nums; }
.pos-checkout { margin-top: 6px; display: grid; grid-template-columns: minmax(250px,1fr) minmax(340px,390px); gap: 28px; align-items: start; }
.pos-payment-controls { padding-top: 5px; }
.payment-section-head { margin: 17px 0 8px; }
.payment-section-head h3 { margin: 0; color: var(--text-strong); font-size: 12px; }
.payment-section-head p { margin: 3px 0 0; color: var(--text-muted); font-size: 9px; }
.payment-entry-row { display: grid; grid-template-columns: minmax(135px,1fr) 115px auto; gap: 8px; align-items: end; }
.payment-entry-row label { margin: 0; }
.payment-entry-row .secondary-btn { min-height: 38px; }
.payment-lines { min-height: 45px; margin: 9px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.payment-lines > p { margin: 0; padding: 14px; color: var(--text-muted); font-size: 9.5px; text-align: center; }
.payment-lines table { width: 100%; }
.payment-lines th, .payment-lines td { padding: 8px 10px; font-size: 9.5px; }
.payment-lines .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.payment-lines button { color: var(--danger); background: transparent; border: 0; cursor: pointer; font-size: 9px; font-weight: 600; }
.invoice-payment-print { margin: 12px 0; padding: 10px 12px; background: var(--surface-subtle); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 5px; font-size: 10px; }
.invoice-payment-print > b { margin-bottom: 2px; }
.invoice-payment-print span { display: flex; justify-content: space-between; }
.overpaid { color: var(--danger) !important; }
.pos-payment-note { padding: 13px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 3px; }
.pos-payment-note b { color: var(--text-strong); font-size: 11px; }
.pos-payment-note span { color: var(--text-muted); font-size: 9.5px; }
.summary-payment { min-height: 45px; margin: 0 !important; border-bottom: 1px solid var(--border); flex-direction: row !important; align-items: center; justify-content: space-between; gap: 20px !important; color: var(--text-muted) !important; font-size: 10.5px !important; font-weight: 400 !important; }
.summary-payment input { width: 140px; min-height: 33px; padding: 6px 9px; text-align: right; }
.pos-summary .balance-total { min-height: 37px; color: var(--text-strong); font-weight: 600; }
.pos-summary .balance-total strong { color: var(--danger); font: 700 14px "Manrope",sans-serif; }
.pos-footer { padding-top: 15px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.pos-footer .status { flex: 1; margin: 0; }
.pos-footer .primary-btn { width: auto; min-width: 170px; }
.cost-row { margin-bottom: 7px; display: grid; grid-template-columns: 1fr 125px 28px; gap: 7px; }
.allocation-list { max-height: 240px; margin-bottom: 14px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.allocation { margin: 0 !important; padding: 10px !important; border-bottom: 1px solid var(--border); display: grid !important; grid-template-columns: 1fr 105px; align-items: center; }
.allocation:last-child { border-bottom: 0; }
.allocation span { display: flex; flex-direction: column; }
.allocation small { margin-top: 2px; color: var(--text-muted); }
.cash-book-toolbar { display: flex; align-items: end; gap: 12px; margin-bottom: 16px; padding: 14px 18px; }
.cash-book-toolbar label { width: min(230px,100%); margin: 0; color: var(--text-muted); font-size: 11px; font-weight: 700; }
.cash-book-toolbar input { margin-top: 6px; }
.cash-book-balance-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 14px 0; }
.closing-position-card { grid-column: 1/-1; padding: 16px; display: grid; grid-template-columns: 1.25fr repeat(4,1fr); align-items: center; gap: 10px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); }
.closing-position-card > span { padding: 10px; display: flex; flex-direction: column; gap: 4px; background: var(--surface-subtle); border-radius: var(--radius-sm); }
.closing-position-card small { color: var(--text-muted); font-size: 8px; text-transform: uppercase; }
.closing-position-card .receivable-position { border-left: 3px solid #d99a29; }
.reversal-row { background: #fff8ea; }
.ledger-reconcile-note { margin: -8px 0 16px; color: var(--text-muted); font-size: 10px; }
#sales-view > .view-head h2,#customers-view > .view-head h2,#products-view > .view-head h2,#barcodes-view > .view-head h2,#processing-view > .view-head h2,#accounts-view > .view-head h2,#reports-view > .view-head h2,#whatsapp-view > .view-head h2 { display:none; }
.cash-balance-card { padding: 15px 18px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); }
.cash-balance-card small { display: block; margin-bottom: 5px; color: var(--text-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.cash-balance-card b { color: var(--text-strong); font: 700 20px/1.2 "Manrope",sans-serif; }
.cash-book-panel { margin-top: 12px; }
.cash-book-table .numeric { text-align: right; white-space: nowrap; }
.cash-book-table .credit-value { color: #087c55; font-weight: 700; }
.cash-book-table .debit-value { color: #b33b36; font-weight: 700; }
.cash-book-table .opening-row { background: #f4faf7; }
.cash-book-table .void-row { color: var(--text-muted); background: #fafafa; }
.cash-book-closing { display: flex; justify-content: flex-end; align-items: center; gap: 18px; padding: 18px 8px 4px; color: var(--text-muted); font-weight: 700; }
.cash-book-closing strong { color: var(--accent); font: 800 25px/1 "Manrope",sans-serif; }
.collection-type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 20px; padding: 0; border: 0; }
.collection-type-switch legend { margin-bottom: 8px; color: var(--text-muted); font-size: 11px; font-weight: 700; }
.collection-type-switch label { margin: 0; cursor: pointer; }
.collection-type-switch input { position: absolute; opacity: 0; pointer-events: none; }
.collection-type-switch span { display: block; padding: 11px 14px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.collection-type-switch input:checked + span { color: var(--accent); border-color: var(--accent); background: #eef8f3; box-shadow: inset 0 0 0 1px var(--accent); }
.allocation-table-wrap { max-height: 280px; margin: 4px 0 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.allocation-table th,.allocation-table td { padding: 10px; }
.allocation-table input { min-width: 115px; }
.collection-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 12px 0; }
.collection-summary span { padding: 11px; color: var(--text-muted); background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 10px; }
.collection-summary b { display: block; margin-top: 4px; color: var(--text-strong); font-size: 15px; }
.ledger-summary { margin: 18px 0; display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }
.ledger-summary span { padding: 11px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; }
.ledger-summary small { color: var(--text-muted); font-size: 8px; }
.ledger-summary b { margin-top: 5px; color: var(--text-strong); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 80; max-width: 360px; padding: 11px 15px; color: #fff; background: #282d38; border: 1px solid #3f4654; border-radius: var(--radius); box-shadow: var(--shadow-modal); font-size: 11px; }
.confirm-card { max-width: 520px; }.confirm-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; }.confirm-actions button { width: auto; }
.audit-report-panel { margin-top: 18px; }.audit-filters { margin: 14px 0 18px; display: grid; grid-template-columns: repeat(4,minmax(120px,1fr)); gap: 10px; align-items: end; }.audit-filters label { margin: 0; }.audit-filters .primary-btn { min-height: 38px; }.audit-record-summary { margin: 16px 0; display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }.audit-record-summary span { padding: 12px; background: var(--surface-subtle); border: 1px solid var(--border); display: flex; flex-direction: column; }.audit-record-summary small { color: var(--text-muted); }.audit-detail-table th { width: 180px; text-transform: capitalize; }.audit-detail-table td { white-space: pre-wrap; word-break: break-word; }.audit-timeline { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }.audit-timeline button { width: 100%; padding: 13px; background: #fff; border: 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 20px; text-align: left; cursor: pointer; }.audit-timeline button:last-child { border-bottom: 0; }.audit-timeline span { display: flex; flex-direction: column; }.audit-timeline small { margin-top: 3px; color: var(--text-muted); }

/* Invoice / thermal document */
.invoice-print { width: min(80mm,100%); margin: 0 auto; padding: 12px 10px; color: #111; background: #fff; border: 1px solid #d8d8d8; font-family: "Courier New",monospace; }
.completed-sale-label { margin-bottom: 10px; color: var(--success); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.print-head { padding-bottom: 9px; border-bottom: 1px dashed #555; display: flex; align-items: center; justify-content: center; gap: 9px; text-align: center; }
.print-head h2 { margin: 0; font-size: 17px; letter-spacing: .03em; text-transform: uppercase; }
.print-head p { margin: 2px 0; color: #333; font-size: 8px; }
.invoice-meta { margin: 9px 0; padding-bottom: 7px; border-bottom: 1px dashed #555; display: grid; grid-template-columns: 1fr; gap: 5px; }
.invoice-meta span { display: flex; flex-direction: column; }
.invoice-meta small { color: #555; font-size: 7px; }
.invoice-meta b { margin-top: 1px; color: #111; font-size: 9px; }
.invoice-print table { width: 100%; border-collapse: collapse; font-size: 8px; }
.invoice-print thead th { padding: 5px 3px; color: #111; background: #fff; border-bottom: 1px solid #555; }
.invoice-print tbody td { padding: 7px 3px; border-bottom: 1px dashed #777; vertical-align: top; }
.invoice-print th:not(:first-child),.invoice-print td:not(:first-child) { text-align: right; }
.print-total { padding: 18px; display: flex; justify-content: flex-end; gap: 24px; font-size: 17px; }
.print-summary { width: 100%; margin: 8px 0 10px; padding: 5px 0; border-top: 1px dashed #555; display: flex; flex-direction: column; }
.print-summary > span, .print-summary > strong { min-height: 22px; padding: 3px 2px; border-bottom: 0; display: flex; justify-content: space-between; gap: 20px; color: #222; font-size: 9px; }
.print-summary b { color: var(--text-strong); font-variant-numeric: tabular-nums; }
.print-summary > strong { min-height: 32px; margin-top: 3px; padding-top: 6px; border-top: 2px solid #111; border-bottom: 2px solid #111; align-items: center; color: #111; font-size: 11px; }
.print-summary > strong b { font-size: 14px; }
.print-actions { display: flex; justify-content: flex-end; gap: 8px; }
.print-actions .primary-btn { width: auto; display: inline-flex; text-decoration: none; }
.print-actions a.secondary-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.invoice-footer-message { margin: 5px auto; color: var(--text-muted); text-align: center; font-size: 9px; }
.invoice-payment-print { margin: 8px 0; padding: 7px 2px; background: #fff; border: 0; border-top: 1px dashed #555; border-bottom: 1px dashed #555; gap: 3px; font-size: 8.5px; }
.invoice-payment-print > b { margin-bottom: 3px; letter-spacing: .04em; }

/* Responsive system */
@media (max-width: 1120px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .inventory-cards { grid-template-columns: 1fr 1fr; }
  .report-grid { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 900px) {
  .pos-entry-grid, .gst-mode .pos-entry-grid, .b2b-mode .pos-entry-grid, .b2b-mode.gst-mode .pos-entry-grid { grid-template-columns: minmax(170px,1.4fr) minmax(150px,1.2fr) 80px 110px; }
  .pos-entry-value, .pos-entry-grid .primary-btn { min-height: 44px; }
  .pos-checkout { grid-template-columns: minmax(210px,1fr) minmax(320px,370px); gap: 18px; }
  .b2b-credit-form { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 820px) {
  .login-panel { grid-template-columns: 1fr 400px; }
  .login-copy { padding: 50px; }
  .login-form { padding: 50px 38px; }
}

@media (max-width: 720px) {
  .login-screen { padding: 15px; }
  .login-brand { padding: 4px 2px; }
  .login-panel { width: calc(100vw - 30px); max-width: 100%; min-height: 0; grid-template-columns: minmax(0,1fr); }
  .login-copy { display: none; }
  .login-form { min-height: 510px; padding: 38px 26px; overflow: hidden; }
  .app-shell { display: block; }
  .sidebar { width: 270px; transform: translateX(-100%); box-shadow: 12px 0 30px rgba(0,0,0,.25); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .workspace { min-width: 0; }
  .topbar { min-height: 70px; padding: 0 17px; justify-content: flex-start; }
  .mobile-menu { width: 38px; height: 38px; margin-right: 10px; padding: 0; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); display: block; font-size: 18px; }
  .topbar > div:first-of-type { flex: 1; }
  .today { display: none; }
  .view { padding: 22px 16px; }
  .welcome, .view-head { align-items: flex-start; }
  .view-head { flex-direction: column; }
  .action-row { width: 100%; }
  .action-row button { flex: 1; }
  .cash-book-toolbar { align-items: stretch; flex-direction: column; }
  .cash-book-balance-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .closing-position-card { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .closing-position-card > div { grid-column: 1/-1; }
  .preinvoice-meta,.preinvoice-final { grid-template-columns: 1fr 1fr; }
  .collection-summary { grid-template-columns: 1fr; }
  .form-row, .form-row.thirds, .pos-header-fields { grid-template-columns: 1fr; gap: 0; }
  .audit-filters,.audit-record-summary { grid-template-columns: 1fr; }
  .pos-credit-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .b2b-credit-form { grid-template-columns: 1fr; }
  .pos-item-fields, .pos-rate-row, .pos-entry-grid, .gst-mode .pos-entry-grid, .b2b-mode .pos-entry-grid, .b2b-mode.gst-mode .pos-entry-grid { grid-template-columns: 1fr; gap: 7px; }
  .modal-card.pos-workspace { width: 100%; max-height: 94vh; padding: 22px 16px; }
  .pos-mode-banner, .pos-price-context, .pos-items-head, .pos-footer { align-items: stretch; flex-direction: column; }
  .pos-price-context > small { max-width: none; }
  .pos-checkout { grid-template-columns: 1fr; gap: 5px; }
  .payment-entry-row { grid-template-columns: 1fr 1fr; }
  .payment-entry-row .secondary-btn { grid-column: 1 / -1; }
  .pos-footer .primary-btn { width: 100%; }
  .image-upload-row { grid-template-columns: 1fr; }
  .image-actions { grid-template-columns: 1fr; }
  .table-actions { align-items: stretch; flex-direction: column; }
  .inventory-cards { grid-template-columns: 1fr; }
  .module-tabs { padding: 0 3px; }
  .module-tabs button { min-height: 46px; padding: 0 12px; }
  .product-panel-head { align-items: stretch; flex-direction: column; }
  .product-admin-actions, .customer-admin-actions, .barcode-toolbar, .import-actions { align-items: stretch; flex-direction: column; }
  .product-admin-actions .primary-btn, .product-admin-actions .secondary-btn, .customer-admin-actions .primary-btn, .customer-admin-actions .secondary-btn, .barcode-toolbar button, .import-actions .primary-btn, .import-actions .secondary-btn { width: 100%; }
  .import-summary { grid-template-columns: 1fr 1fr; }
  .customer-list-tools, .customer-searches { align-items: stretch; flex-direction: column; }
  .customer-searches label { min-width: 0; }
  .product-panel-head button { width: 100%; }
  .pricing-workspace { min-height: 0; padding: 20px 15px; }
  .customer-pricing-summary { grid-template-columns: 1fr 1fr; }
  #b2b-agreement-form { padding: 14px; }
  .settings-form { min-height: 0; padding: 21px 16px; }
  .pos-title-row { padding-right: 34px; flex-direction: column; }
  .pos-invoice-number { width: 100%; align-items: flex-start; }
  .settings-section-head { align-items: flex-start; flex-direction: column; }
  .settings-fields, .staff-reference, .control-list, .discount-control-groups, .thermal-config-layout, .thermal-field-grid { grid-template-columns: 1fr; }
  .settings-fields .full-span, .full-span, .control-list span:last-child:nth-child(odd) { grid-column: auto; }
  .settings-savebar { align-items: stretch; flex-direction: column; }
  .settings-savebar .primary-btn, .settings-savebar .secondary-btn { width: 100%; }
  .direct-whatsapp-head, .direct-whatsapp-qr { align-items: stretch; flex-direction: column; }
  .pos-summary { width: 100%; }
  .report-grid { grid-template-columns: 1fr 1fr; }
  .metrics.mini { grid-template-columns: 1fr 1fr; }
  .invoice-line { grid-template-columns: 1fr auto 22px; }
  .invoice-line > span { display: none; }
  .ledger-summary { grid-template-columns: 1fr 1fr; }
  .closing-position-card,.preinvoice-meta,.preinvoice-final { grid-template-columns: 1fr; }
  .modal { padding: 10px; align-items: end; }
  .modal-card { width: 100%; max-height: 92vh; padding: 24px 19px; border-radius: 12px 12px 8px 8px; }
  td, th { padding-right: 12px; padding-left: 12px; }
}

@media (max-width: 460px) {
  .metrics { grid-template-columns: 1fr; }
  .metric { min-height: 104px; }
  .topbar h2 { font-size: 17px; }
  .status-dot { display: none; }
  .welcome { align-items: stretch; flex-direction: column; }
  .report-grid { grid-template-columns: 1fr; }
  .subtabs { gap: 14px; overflow-x: auto; }
  .print-actions { align-items: stretch; flex-direction: column; }
  .print-actions .primary-btn { width: 100%; justify-content: center; }
}

@media print {
  body > * { display: none !important; }
  #detail-modal { position: static; padding: 0; background: #fff; display: block !important; }
  #detail-modal .modal-card { width: 80mm; max-height: none; padding: 0; overflow: visible; border: 0; border-radius: 0; box-shadow: none; }
  .invoice-print { width: 80mm; padding: 3mm; border: 0; }
  .completed-sale-label { display: none; }
  .modal-close, .print-actions { display: none !important; }
  .invoice-print table { font-size: 10px; }
  .invoice-meta { grid-template-columns: 1fr; }
  .invoice-meta span { margin-bottom: 4px; }
}
.access-panel{display:none}.access-panel.active{display:block}.access-choice-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px;margin:12px 0 18px}.access-choice{border:1px solid var(--line,#dde4df);border-radius:10px;padding:11px;display:flex;gap:9px;align-items:flex-start;background:#fff}.access-choice input{width:auto;margin-top:3px}.access-choice b,.access-choice small{display:block}.access-function-section{border:1px solid var(--line,#dde4df);border-radius:12px;margin:12px 0;overflow:hidden}.access-function-section>header{padding:10px 14px;background:#f4f7f5;display:flex;justify-content:space-between;align-items:center}.access-function-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1px;background:#e5eae7}.access-function-list .access-choice{border:0;border-radius:0;margin:0}.access-function-tools{display:flex;gap:10px;align-items:center;margin:14px 0}.access-function-tools input{flex:1}.function-code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.82rem;color:#245b45;background:#eef7f2;padding:4px 7px;border-radius:6px;white-space:nowrap}.access-summary{display:flex;gap:6px;flex-wrap:wrap}.access-summary .badge{white-space:nowrap}@media(max-width:760px){.access-function-tools{align-items:stretch;flex-direction:column}.access-choice-grid,.access-function-list{grid-template-columns:1fr}}
.cannot-edit-b2b-pricing #b2b-pricing-content input,.cannot-edit-b2c-pricing [data-product-panel="b2c-pricing"] input{pointer-events:none;opacity:.65}.cannot-edit-b2b-pricing [data-save-b2b-price],.cannot-edit-b2b-pricing #b2b-agreement-form,.cannot-edit-b2b-pricing #b2b-credit-form,.cannot-edit-b2b-pricing [data-agreement-status],.cannot-edit-b2c-pricing [data-save-b2c-price]{display:none!important}
.cannot-receive-transfer [data-receive-transfer],.cannot-receive-processing [data-receive-processing]{display:none!important}
.transfer-reference{display:flex;flex-direction:column;gap:3px;padding:13px 15px;margin-bottom:13px;border:1px solid #cfe1d8;border-radius:10px;background:#f3faf6}.transfer-reference small{color:var(--text-muted);font-size:10px;letter-spacing:.09em}.transfer-reference strong{color:#185c40;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:18px}.transfer-reference span{color:var(--text-muted);font-size:11px}#transfer-factory-availability{display:block;margin:0 0 13px;white-space:normal}.access-modal-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:12px}.access-modal-head h2{margin:0}@media(max-width:600px){.access-modal-head{align-items:stretch;flex-direction:column}.access-modal-head .primary-btn{width:100%}}
