/* ==========================================================================
   Simple Inventory — Static Prototype Stylesheet
   ========================================================================== */

:root {
  --primary: #7c3aed;
  --primary2: #a855f7;
  --accent: #20c9b2;
  --bg: #f6f3f9;
  --card: #fff;
  --text: #282432;
  --muted: #8b8798;
  --line: #ece8f1;
  --success: #16a879;
  --danger: #e85d6a;
  --warning: #d99524;
  --sidebar-w: 255px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button, input, select, textarea { font: inherit; }

img { max-width: 100%; display: block; }

.app { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.side {
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid var(--line);
  position: fixed;
  inset: 0 auto 0 0;
  overflow: auto;
  z-index: 30;
  transition: transform .25s ease;
}
.brand { height: 70px; display: flex; align-items: center; gap: 10px; padding: 0 22px; font-size: 20px; font-weight: 800; color: var(--primary); }
.brand img { width: 30px; height: 30px; }
.brand small { font-size: 10px; margin-left: 4px; color: #aaa; font-weight: 700; }
.profile { padding: 16px 20px; border-block: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: #eadcff; color: var(--primary); display: grid; place-items: center; font-weight: 800; }
.profile small { display: block; color: var(--muted); margin-top: 3px; }
nav { padding: 13px 10px; }
nav button { width: 100%; border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 9px; color: #696373; font-size: 13px; cursor: pointer; margin: 2px 0; }
nav button:hover, nav button.active { background: #f1e9ff; color: var(--primary); font-weight: 650; }
.section-label { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #aaa; padding: 13px 13px 5px; }

.side-overlay { display: none; position: fixed; inset: 0; background: rgba(20, 12, 35, .45); z-index: 25; }
.side-overlay.show { display: block; }

/* ---------- Main / Topbar ---------- */
.main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; }
.top { height: 70px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 25px; position: sticky; top: 0; z-index: 15; }
.menu-toggle { display: none; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 11px; cursor: pointer; font-size: 16px; }
.search { width: 320px; max-width: 40vw; border: 1px solid var(--line); background: #faf9fb; border-radius: 9px; padding: 10px 13px; outline: none; }
.top-actions { display: flex; gap: 14px; align-items: center; color: #777; }
.lang, .icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.content { padding: 26px; max-width: 1550px; margin: auto; }
.page { display: none; }
.page.show { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.title { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; }
.title h1 { margin: 0; font-size: 24px; }
.title p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn { border: 0; border-radius: 9px; padding: 10px 14px; background: var(--primary); color: #fff; cursor: pointer; font-weight: 650; transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease; }
.btn:hover { box-shadow: 0 6px 16px rgba(124,58,237,.28); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.alt { background: #fff; color: #666; border: 1px solid var(--line); }
.btn.alt:hover { box-shadow: 0 4px 12px rgba(30,30,40,.08); }
.btn.green { background: var(--accent); }
.btn.danger { background: var(--danger); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.primary-btn, .secondary-btn { border: 0; border-radius: 9px; padding: 10px 14px; cursor: pointer; font-weight: 650; }
.primary-btn { background: var(--primary); color: #fff; }
.secondary-btn { background: #fff; color: #555; border: 1px solid var(--line); }

/* ---------- Cards / KPIs ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 17px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 19px; box-shadow: 0 3px 14px rgba(50,30,80,.03); }
.stat { color: #fff; min-height: 140px; border: 0; position: relative; overflow: hidden; }
.stat:nth-child(1) { background: linear-gradient(135deg,#ffb38e,#ff759a); }
.stat:nth-child(2) { background: linear-gradient(135deg,#63b9ec,#368fe0); }
.stat:nth-child(3) { background: linear-gradient(135deg,#63d2c4,#20c8b2); }
.stat:nth-child(4) { background: linear-gradient(135deg,#a978f5,#7d45df); }
.stat h2 { font-size: 27px; margin: 15px 0 6px; }
.stat:after { content: ""; position: absolute; width: 145px; height: 145px; border-radius: 50%; right: -55px; top: -55px; background: rgba(255,255,255,.13); }

.grid2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 17px; margin-top: 17px; }
.grid3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 17px; margin-top: 17px; }
.grid3-charts { display: grid; grid-template-columns: 1.1fr 1.1fr .9fr; gap: 17px; margin-top: 17px; }

.card h3 { font-size: 16px; margin: 0 0 15px; }
.muted { color: var(--muted); font-size: 12px; }

/* Chart canvases */
.chart-card canvas { width: 100%; display: block; }
.chart-legend { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.chart-legend .legend-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #666; }
.chart-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.chart-legend b { color: var(--text); }
.chart-total { text-align: center; margin-top: 6px; }
.chart-total b { font-size: 22px; display: block; }
.chart-total small { color: var(--muted); }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 11px 9px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { color: #999; font-size: 11px; }
.table tr:hover td { background: #fcfbfd; }
.table-scroll { width: 100%; overflow-x: auto; }

.badge { padding: 5px 9px; border-radius: 20px; font-size: 10px; display: inline-block; }
.green-b { background: #e5faf3; color: #129b75; }
.red-b { background: #ffebee; color: #d65b67; }
.yellow-b { background: #fff3df; color: #bd7b18; }
.purple-b { background: #f0e8ff; color: var(--primary); }

.toolbar { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 15px; }
.toolbar input, .toolbar select { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: #fff; }

.formgrid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.formgrid.three { grid-template-columns: repeat(3,1fr); }
.field label { display: block; font-size: 11px; color: #777; margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,.12); }
.field textarea { min-height: 90px; resize: vertical; }
.field.error input, .field.error select { border-color: var(--danger); }
.field .err-msg { color: var(--danger); font-size: 10px; margin-top: 4px; display: none; }
.field.error .err-msg { display: block; }

.kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: #faf9fc; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.kpi small { color: var(--muted); }
.kpi b { display: block; font-size: 20px; margin-top: 5px; }
.kpi-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }

.split { display: grid; grid-template-columns: 1.4fr .8fr; gap: 17px; }
.total-box { background: #faf9fc; border: 1px solid var(--line); border-radius: 10px; padding: 15px; }
.total-row { display: flex; justify-content: space-between; padding: 7px 0; }
.grand { font-size: 19px; font-weight: 800; border-top: 1px dashed #ccc; margin-top: 5px; padding-top: 12px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 15px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 13px; color: #777; cursor: pointer; white-space: nowrap; }
.tabs button.active { color: var(--primary); border-bottom: 2px solid var(--primary); font-weight: 700; }

.code-box { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.code-preview { border: 1px dashed #ccc; border-radius: 12px; padding: 20px; text-align: center; background: #fff; }
.barcode { height: 75px; margin: 12px auto; background: repeating-linear-gradient(90deg,#111 0 2px,#fff 2px 5px,#111 5px 6px,#fff 6px 9px); max-width: 300px; }
.qr { width: 130px; height: 130px; margin: 12px auto; border: 8px solid #111; background: repeating-linear-gradient(45deg,#111 0 4px,#fff 4px 8px); }

.receipt-wrap { display: flex; justify-content: center; }
.receipt { width: 56mm; background: #fff; color: #111; padding: 4mm; font: 11px/1.35 monospace; box-shadow: 0 4px 20px #ddd; }
.receipt h2 { text-align: center; font-size: 14px; margin: 0 0 8px; }
.center { text-align: center; }
.receipt hr { border: 0; border-top: 1px dashed #777; }
.settings-grid { display: grid; grid-template-columns: 280px 1fr; gap: 17px; }
.theme-list { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 9px; border: 3px solid #fff; box-shadow: 0 0 0 1px #ddd; cursor: pointer; }
.range { width: 100%; }
.preview-panel { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 15px; }
.toggle { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }

/* ---------- POS ---------- */
.pos-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 14px; align-items: start; }
.pos-products { min-width: 0; }
.pos-filter { margin-bottom: 14px; }
.pos-product-grid { display: grid; grid-template-columns: repeat(4,minmax(150px,1fr)); gap: 12px; }
.product-card { background: #fff; border: 1px solid #dce3ef; border-radius: 13px; overflow: hidden; position: relative; min-height: 250px; cursor: pointer; transition: .15s; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(31,79,140,.07); }
.stock-ribbon { position: absolute; right: 7px; top: 7px; background: #df8c20; color: #fff; border-radius: 12px; padding: 3px 8px; font-size: 10px; font-weight: 700; }
.stock-ribbon.good { background: #666; }
.stock-ribbon.out { background: var(--danger); }
.product-image { height: 130px; display: grid; place-items: center; background: #fff; font-size: 55px; }
.product-image img { width: 100%; height: 100%; object-fit: contain; }
.product-info { padding: 9px; display: flex; flex-direction: column; flex: 1; }
.product-name { font-weight: 700; font-size: 13px; line-height: 1.25; }
.product-sku { font-size: 10px; color: #9aa2b1; margin-top: 5px; }
.product-price { font-size: 16px; color: #2675ed; font-weight: 800; margin-top: auto; padding-top: 8px; }
.plus-btn { position: absolute; right: 8px; bottom: 8px; width: 33px; height: 33px; border: 0; border-radius: 50%; background: #347ff0; color: #fff; font-size: 21px; cursor: pointer; line-height: 1; }
.plus-btn:disabled { background: #b7c1d1; cursor: not-allowed; }
.no-results { grid-column: 1 / -1; text-align: center; padding: 40px 10px; color: var(--muted); }

.pos-order { padding: 0; position: sticky; top: 85px; max-height: calc(100vh - 100px); overflow: auto; }
.order-head { display: flex; align-items: center; justify-content: space-between; padding: 13px; border-bottom: 1px solid var(--line); }
.order-head h3 { margin: 0; }
.order-count { display: inline-grid; place-items: center; background: #347ff0; color: #fff; border-radius: 15px; min-width: 24px; height: 24px; font-size: 11px; }
.clear-btn { border: 1px solid #ffb5bc; background: #fff3f4; color: #e05261; border-radius: 6px; padding: 5px 10px; cursor: pointer; }
.customer-box, .tax-box, .payment-box, .receipt-options { padding: 12px; border-bottom: 1px solid var(--line); }
.customer-label { font-size: 10px; letter-spacing: .6px; color: #8790a1; margin-bottom: 8px; }
.inline-field { display: flex; }
.inline-field input { border-radius: 8px 0 0 8px !important; }
.inline-field select { border-radius: 0 8px 8px 0 !important; width: 92px; }
.cart-items { padding: 4px 12px; min-height: 130px; }
.cart-item { display: grid; grid-template-columns: 42px 1fr auto; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-thumb { width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center; background: #f5f6f8; overflow: hidden; flex-shrink: 0; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-name { font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-meta { font-size: 9px; color: #8a91a0; margin-top: 3px; }
.cart-price { font-size: 11px; font-weight: 700; }
.qty-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-row button { width: 22px; height: 22px; border: 1px solid #d9dfea; background: #fff; border-radius: 5px; cursor: pointer; }
.remove { border: 0 !important; color: #f06068 !important; background: none !important; font-size: 16px !important; cursor: pointer; }
.order-summary { padding: 12px; border-top: 1px solid var(--line); }
.order-summary > div { display: flex; justify-content: space-between; padding: 5px 0; font-size: 12px; }
.order-summary .discount-row { color: #ef6068; }
.order-summary .grand { font-size: 15px; border-top: 1px solid var(--line); margin-top: 5px; padding-top: 10px; }
.profit-row { color: #16a879; }
.cash-settlement { display: grid; grid-template-columns: 1fr 105px; gap: 8px; align-items: end; margin-top: 9px; }
.cash-result { border: 1px solid var(--line); border-radius: 8px; padding: 9px; background: #f7fafc; }
.cash-result span { display: block; font-size: 9px; color: #7f8998; }
.cash-result b { display: block; font-size: 13px; margin-top: 4px; }
.supplier-history-card .table { font-size: 11px; }
.payment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.pay { background: #fff; border: 1px solid #d8dfeb; border-radius: 7px; padding: 8px; font-size: 11px; cursor: pointer; }
.pay.active { background: #347ff0; color: #fff; border-color: #347ff0; }
.receipt-options label { font-size: 11px; margin-right: 10px; }
.checkout-btn { margin: 0 12px 12px; width: calc(100% - 24px); }
.receipt-preview-card { margin-top: 15px; }
.receipt-live-wrap { display: flex; justify-content: center; background: #f4f4f4; padding: 18px; border-radius: 10px; }
.receipt-code { display: flex; flex-direction: column; align-items: center; margin: 8px 0; }
.receipt-barcode { width: 95%; height: 48px; background: repeating-linear-gradient(90deg,#111 0 2px,#fff 2px 4px,#111 4px 5px,#fff 5px 8px); }
.receipt-qr { width: 90px; height: 90px; background: repeating-conic-gradient(#111 0 25%,#fff 0 50%) 0/12px 12px; border: 5px solid #111; }
.receipt-fixed-footer { text-align: center; font-size: 9px; font-weight: 800; margin-top: 7px; padding-top: 5px; border-top: 1px dashed #999; }

/* ---------- Reports KPI grid (eye-catchy) ---------- */
.report-kpi-grid, .sales-kpi-grid, .purchase-kpi-grid, .stock-detail-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin: 12px 0 18px; }
.report-kpi-grid { grid-template-columns: repeat(6,1fr); }
.report-kpi, .sales-kpi, .purchase-kpi, .stock-detail-card {
  border-radius: 16px; padding: 18px; min-height: 108px; color: #fff !important;
  box-shadow: 0 10px 24px rgba(30,50,90,.14); position: relative; overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.report-kpi:hover, .sales-kpi:hover, .purchase-kpi:hover, .stock-detail-card:hover {
  transform: translateY(-3px); box-shadow: 0 16px 30px rgba(30,50,90,.22);
}
.report-kpi:after, .sales-kpi:after, .purchase-kpi:after, .stock-detail-card:after {
  content: ""; position: absolute; width: 110px; height: 110px; border-radius: 50%;
  right: -35px; top: -40px; background: rgba(255,255,255,.14);
}
.report-kpi .kpi-icon, .sales-kpi .kpi-icon, .purchase-kpi .kpi-icon, .stock-detail-card .kpi-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 10px; background: rgba(255,255,255,.22); font-size: 16px; position: relative; z-index: 1;
}
.report-kpi strong, .sales-kpi strong, .purchase-kpi strong, .stock-detail-card strong { display: block; font-size: 22px; font-weight: 800; color: #fff !important; margin-top: 9px; position: relative; z-index: 1; }
.report-kpi small, .sales-kpi small, .purchase-kpi small, .stock-detail-card small { color: rgba(255,255,255,.88) !important; font-weight: 700; position: relative; z-index: 1; }
.report-kpi span, .sales-kpi span, .purchase-kpi span, .stock-detail-card span { display: block; font-size: 18px; }
.kpi-trend { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; margin-top: 8px; padding: 3px 8px; border-radius: 20px; background: rgba(255,255,255,.2); position: relative; z-index: 1; }
.kpi-trend.down { background: rgba(0,0,0,.14); }

.revenue, .blue { background: linear-gradient(135deg,#3b82f6,#2563eb); }
.profit, .green { background: linear-gradient(135deg,#20c997,#0ca678); }
.orders, .purple { background: linear-gradient(135deg,#8b5cf6,#6d28d9); }
.purchase, .orange { background: linear-gradient(135deg,#f59e0b,#ea580c); }
.stock, .teal { background: linear-gradient(135deg,#06b6d4,#0891b2); }
.due, .amber { background: linear-gradient(135deg,#ef476f,#d61f45); }
.cyan { background: linear-gradient(135deg,#36bde0,#1e9fc3); }
.violet { background: linear-gradient(135deg,#8b5cf6,#7041d8); }

.report-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 16px; }
.report-summary { display: flex; gap: 20px; flex-wrap: wrap; background: #f7f6fb; border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; }
.report-summary div { display: flex; flex-direction: column; gap: 3px; }
.report-summary span { font-size: 11px; color: var(--muted); }
.report-summary b { font-size: 16px; }
.csv-format-box { background: #f6f9fc; border: 1px dashed #aac0d8; border-radius: 8px; padding: 12px; overflow: auto; }
.csv-format-box code { display: block; font-size: 11px; line-height: 1.8; white-space: nowrap; }
.csv-rules, .stock-overview-note { font-size: 11px; color: #60738b; }
.stock-overview-note { padding: 12px 14px; background: #f8fbff; border: 1px solid #dbe8f5; border-radius: 10px; margin: 10px 0 16px; }

/* ---------- Modal (Add / Edit Product) ---------- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(20,12,35,.5); z-index: 100; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.show { display: flex; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 620px; max-height: 90vh; overflow: auto; box-shadow: 0 24px 60px rgba(20,10,40,.25); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-close { border: 0; background: #f4f2f8; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 16px; color: #777; }
.modal-body { padding: 20px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); }
.icon-pick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.icon-pick button { width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: #faf9fc; font-size: 18px; cursor: pointer; }
.icon-pick button.active { border-color: var(--primary); background: #f1e9ff; }
.image-upload-row { display: flex; align-items: center; gap: 14px; }
.image-upload-preview { width: 72px; height: 72px; border-radius: 12px; background: #f1f1f4; display: grid; place-items: center; font-size: 32px; overflow: hidden; flex-shrink: 0; border: 1px solid var(--line); }
.image-upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.table-thumb-row { display: flex; align-items: center; gap: 10px; }
.table-thumb { width: 34px; height: 34px; border-radius: 8px; background: #f1f1f4; display: grid; place-items: center; font-size: 17px; overflow: hidden; flex-shrink: 0; }
.table-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #262034; color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 13px; box-shadow: 0 10px 24px rgba(0,0,0,.25); opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; max-width: 320px; }
.toast.show { opacity: 1; transform: none; }
.toast.success { background: #0ca678; }
.toast.error { background: #d64550; }

/* ---------- Responsive ---------- */
@media (max-width: 1250px) {
  .pos-product-grid { grid-template-columns: repeat(3,minmax(150px,1fr)); }
}
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2,1fr); }
  .grid2, .grid3, .grid3-charts, .split, .code-box, .settings-grid { grid-template-columns: 1fr; }
  .report-kpi-grid { grid-template-columns: repeat(3,1fr); }
  .sales-kpi-grid, .purchase-kpi-grid, .stock-detail-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  .pos-layout { grid-template-columns: 1fr; }
  .pos-order { position: static; max-height: none; }
}
@media (max-width: 700px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .side { transform: translateX(-100%); }
  .side.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .main { margin-left: 0; }
  .cards, .kpis { grid-template-columns: 1fr; }
  .top { padding: 0 12px; }
  .search { width: 160px; }
  .content { padding: 15px; }
  .formgrid, .formgrid.three { grid-template-columns: 1fr; }
  .pos-product-grid { grid-template-columns: repeat(2,minmax(120px,1fr)); }
  .report-kpi-grid, .sales-kpi-grid, .purchase-kpi-grid, .stock-detail-grid { grid-template-columns: 1fr; }
}
@media print {
  .side, .top, .title .actions, .menu-toggle { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; }
  .receipt { box-shadow: none; }
}