:root {
  --primary: #1e3a5f;
  --primary-light: #2d5a8e;
  --primary-lighter: #e8f0fe;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --sidebar-w: 240px;
  --topbar-h: 56px;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .25s;
}
.sidebar-brand {
  padding: 18px 20px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.02em;
  border-bottom: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand svg { flex-shrink: 0; }
.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: rgba(255,255,255,.72);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all .15s;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav a.active {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-left-color: var(--accent);
}
.sidebar-nav a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .8; }
.sidebar-nav a.active svg { opacity: 1; }
.sidebar-footer { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: .78rem; color: rgba(255,255,255,.5); }

/* ---- Main ---- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title { font-size: 1.1rem; font-weight: 600; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

.page-content { padding: 24px; flex: 1; }

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h3 { font-size: 1rem; font-weight: 600; }
.card-body { padding: 20px; }
.card-body.no-pad { padding: 0; }

/* ---- Stat Cards ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.stat-card .stat-label { font-size: .82rem; color: var(--text-secondary); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; margin-top: 4px; }
.stat-card .stat-sub { font-size: .82rem; color: var(--text-muted); margin-top: 2px; }
.stat-card.stat-success { border-left: 4px solid var(--success); }
.stat-card.stat-warning { border-left: 4px solid var(--warning); }
.stat-card.stat-danger { border-left: 4px solid var(--danger); }
.stat-card.stat-accent { border-left: 4px solid var(--accent); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: .88rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--bg); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--primary-lighter); }
.btn-sm { padding: 5px 10px; font-size: .82rem; }
.btn-lg { padding: 10px 24px; font-size: 1rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-row-right { justify-content: flex-end; }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  font-size: .92rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { min-height: 80px; resize: vertical; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-inline { display: flex; gap: 8px; align-items: flex-end; }
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.form-input.is-error { border-color: var(--danger); }

.search-box {
  position: relative;
  max-width: 320px;
}
.search-box .form-input { padding-left: 36px; }
.search-box svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-size: .78rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; background: var(--bg); position: sticky; top: 0; }
tr:hover td { background: #f1f5f9; }
td { font-size: .88rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-nowrap { white-space: nowrap; }

/* ---- Badges ---- */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: .75rem;
  font-weight: 600;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge-success { background: var(--success-bg); color: #065f46; }
.badge-danger { background: var(--danger-bg); color: #991b1b; }
.badge-warning { background: var(--warning-bg); color: #92400e; }
.badge-info { background: var(--primary-lighter); color: var(--primary); }
.badge-muted { background: #f1f5f9; color: var(--text-secondary); }

/* ---- Tabs ---- */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 20px; gap: 0; }
.tabs button {
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  color: #fff;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: all .3s;
  box-shadow: var(--shadow-lg);
}
.toast-show { opacity: 1; transform: translateY(0); }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--accent); }
.toast-warning { background: var(--warning); }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  transition: opacity .2s;
}
.modal-overlay.modal-show { opacity: 1; }
.modal-dialog {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal-dialog.modal-wide { max-width: 800px; }
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 1.05rem; font-weight: 600; }
.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ---- Billing Specific ---- */
.billing-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.billing-items-table {
  margin-bottom: 20px;
}
.billing-items-table input {
  width: 100%;
  padding: 6px 8px;
  font-size: .88rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
}
.billing-items-table input:focus {
  outline: none;
  border-color: var(--border-focus);
}
.billing-items-table .sku-search {
  position: relative;
}
.billing-items-table .sku-dropdown {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 260px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  min-width: 320px;
}
.billing-items-table .sku-dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: .85rem;
  border-bottom: 1px solid var(--border);
}
.billing-items-table .sku-dropdown-item:last-child { border-bottom: none; }
.billing-items-table .sku-dropdown-item:hover,
.billing-items-table .sku-dropdown-item.highlighted {
  background: var(--primary-lighter);
}
.billing-items-table .sku-dropdown-item .sku-name { font-weight: 500; }
.billing-items-table .sku-dropdown-item .sku-meta { font-size: .78rem; color: var(--text-secondary); }
.billing-items-table .sku-no-results {
  padding: 12px 14px;
  font-size: .85rem;
  color: var(--text-muted);
}

.billing-totals {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}
.billing-totals table { width: auto; min-width: 320px; }
.billing-totals td { padding: 6px 14px; border: none; }
.billing-totals .total-row td { font-weight: 700; font-size: 1.1rem; border-top: 2px solid var(--primary); padding-top: 10px; }

.billing-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.remove-line {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 2px 6px;
  border-radius: 4px;
}
.remove-line:hover { background: var(--danger-bg); }

/* ---- Customer Search Dropdown ---- */
.customer-search-wrap { position: relative; }
.customer-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  max-height: 260px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}
.customer-dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.customer-dropdown-item:last-child { border-bottom: none; }
.customer-dropdown-item:hover,
.customer-dropdown-item.highlighted { background: var(--primary-lighter); }
.customer-dropdown-item .cust-name { font-weight: 500; font-size: .88rem; }
.customer-dropdown-item .cust-meta { font-size: .78rem; color: var(--text-secondary); }

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: .5; }
.empty-state p { font-size: .92rem; }

/* ---- Misc ---- */
.section-title { font-size: 1.15rem; font-weight: 600; margin-bottom: 16px; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.fw-600 { font-weight: 600; }
.text-sm { font-size: .82rem; }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.w-full { width: 100%; }

.selected-customer-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--primary-lighter);
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
}
.selected-customer-bar .cust-info { flex: 1; }
.selected-customer-bar .cust-info strong { font-size: .92rem; }
.selected-customer-bar .cust-info span { font-size: .78rem; color: var(--text-secondary); display: block; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .hamburger { display: block; }
  .page-content { padding: 16px; }
  .billing-header { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}

@media print {
  .sidebar, .topbar, .billing-actions, .btn, .no-print { display: none !important; }
  .main-content { margin-left: 0; }
  .page-content { padding: 0; }
}

/* Sync */
.sync-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.sync-indicator:hover { background: var(--bg); color: var(--primary); }
.sync-indicator.synced { color: var(--success); }

.sync-progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.sync-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width .3s ease;
}

/* ---- Language Toggle ---- */
.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 34px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.lang-toggle:hover { background: var(--bg); border-color: var(--accent); color: var(--accent); }

/* ---- POS Billing Layout ---- */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  height: calc(100vh - var(--topbar-h) - 48px);
  min-height: 500px;
}
.pos-left {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pos-right {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Customer bar */
.pos-customer-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.pos-customer-bar .cust-info { flex: 1; }
.pos-customer-bar .cust-info strong { font-size: .88rem; }
.pos-customer-bar .cust-info span { font-size: .78rem; color: var(--text-secondary); display: block; }
.pos-customer-search {
  position: relative;
  margin-bottom: 12px;
}
.pos-customer-search .customer-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

/* Categories strip */
.pos-categories {
  display: flex;
  gap: 6px;
  padding: 0 0 10px;
  overflow-x: auto;
  flex-shrink: 0;
}
.pos-categories::-webkit-scrollbar { height: 4px; }
.pos-categories::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.pos-cat-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.pos-cat-btn:hover { border-color: var(--accent); color: var(--accent); }
.pos-cat-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Product search bar in POS */
.pos-search {
  margin-bottom: 10px;
  flex-shrink: 0;
}
.pos-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .88rem;
  background: var(--surface);
  color: var(--text);
}
.pos-search input:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.pos-search input::placeholder { color: var(--text-muted); }

/* Product grid */
.pos-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 160px));
  justify-content: flex-start;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
  padding: 2px;
}
.pos-product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  aspect-ratio: 3 / 4;
  max-width: 160px;
}
.pos-product-card:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(59,130,246,.12); transform: translateY(-1px); }
.pos-product-card .prod-name { font-size: .82rem; font-weight: 600; line-height: 1.3; color: var(--text); }
.pos-product-card .prod-sku { font-size: .72rem; color: var(--text-muted); }
.pos-product-card .prod-price { font-size: .92rem; font-weight: 700; color: var(--primary); margin-top: auto; }
.pos-product-card .prod-stock {
  font-size: .72rem;
  font-weight: 500;
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  align-self: flex-start;
}
.pos-product-card .prod-stock.in-stock { background: var(--success-bg); color: #065f46; }
.pos-product-card .prod-stock.low-stock { background: var(--warning-bg); color: #92400e; }
.pos-product-card .prod-stock.no-stock { background: var(--danger-bg); color: #991b1b; }
.pos-product-card.disabled { opacity: .5; cursor: not-allowed; }
.pos-product-card.disabled:hover { border-color: var(--border); box-shadow: none; transform: none; }
.pos-product-card.selected { border-color: var(--primary); background: rgba(59,130,246,.06); box-shadow: 0 0 0 2px var(--primary); }
.pos-product-card .prod-kpi { font-size: .72rem; color: var(--text-secondary); }

/* Cart panel */
.pos-cart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}
.pos-cart-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.pos-cart-header h3 { font-size: .95rem; font-weight: 600; }
.pos-cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}
.pos-cart-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}
.pos-cart-empty p { font-size: .88rem; margin-bottom: 4px; }
.pos-cart-empty span { font-size: .78rem; }

.pos-cart-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.pos-cart-item:last-child { border-bottom: none; }
.pos-cart-item .item-info { flex: 1; min-width: 0; }
.pos-cart-item .item-name { font-size: .82rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-cart-item .item-rate { font-size: .72rem; color: var(--text-secondary); }
.pos-cart-item .item-total { font-size: .85rem; font-weight: 600; white-space: nowrap; min-width: 60px; text-align: right; }

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.qty-stepper button {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: none;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  transition: background .1s;
}
.qty-stepper button:hover { background: var(--border); }
.qty-stepper .qty-val {
  width: 30px;
  text-align: center;
  font-size: .82rem;
  font-weight: 600;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  line-height: 26px;
}
.pos-cart-item .remove-item {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .88rem;
  padding: 2px 4px;
  border-radius: 4px;
}
.pos-cart-item .remove-item:hover { color: var(--danger); background: var(--danger-bg); }

/* Cart footer / totals */
.pos-cart-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 10px 16px;
}
.pos-cart-totals {
  font-size: .82rem;
}
.pos-cart-totals .total-line {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
}
.pos-cart-totals .total-line.grand {
  font-size: 1rem;
  font-weight: 700;
  padding-top: 6px;
  margin-top: 4px;
  border-top: 2px solid var(--primary);
}
.pos-cart-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.pos-cart-actions .btn { flex: 1; justify-content: center; }

/* Invoice meta row */
.pos-meta-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.pos-meta-row .form-group { margin-bottom: 0; flex: 1; }
.pos-meta-row .form-label { font-size: .72rem; margin-bottom: 2px; }
.pos-meta-row .form-input, .pos-meta-row .form-select {
  padding: 6px 8px;
  font-size: .82rem;
}

/* POS responsive */
@media (max-width: 768px) {
  .pos-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .pos-right { min-height: 300px; }
  .pos-product-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 120px)); max-height: 50vh; }
  .pos-product-card { max-width: 120px; aspect-ratio: 3 / 4; }
}
