/* ═══════════════════════════════════════════════════
   VELO POS — Modern Dashboard Stylesheet
   Font: Figtree + JetBrains Mono
   Palette: Deep Slate + Indigo Accent
═══════════════════════════════════════════════════ */

:root {
  /* Backgrounds */
  --bg-app:        #0b0e14;
  --bg-sidebar:    #0f1318;
  --bg-topbar:     #0f1318;
  --bg-main:       #111520;
  --bg-panel:      #161b26;
  --bg-panel-hover:#1c2232;
  --bg-input:      #0d1119;
  --bg-row-hover:  rgba(255,255,255,0.03);

  /* Borders */
  --br-soft:       rgba(255,255,255,0.05);
  --br-mid:        rgba(255,255,255,0.08);
  --br-active:     rgba(99,102,241,0.4);

  /* Accent */
  --accent:        #6366f1;
  --accent-light:  #818cf8;
  --accent-dim:    rgba(99,102,241,0.12);
  --accent-glow:   rgba(99,102,241,0.2);

  /* Status */
  --green:         #10b981;
  --green-dim:     rgba(16,185,129,0.12);
  --amber:         #f59e0b;
  --amber-dim:     rgba(245,158,11,0.12);
  --red:           #f43f5e;
  --red-dim:       rgba(244,63,94,0.12);
  --cyan:          #06b6d4;
  --cyan-dim:      rgba(6,182,212,0.12);

  /* Text */
  --tx-1:          #e2e8f0;
  --tx-2:          #64748b;
  --tx-3:          #334155;
  --tx-muted:      #1e2a3a;

  /* Sidebar */
  --sb-w:          240px;
  --tb-h:          56px;

  /* Radius */
  --r-sm:          6px;
  --r:             10px;
  --r-lg:          14px;
  --r-xl:          20px;

  /* Shadows */
  --sh-panel:      0 1px 20px rgba(0,0,0,0.4);
  --sh-glow:       0 0 24px rgba(99,102,241,0.18);
}

/* ─ Reset ─ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--bg-app); color: var(--tx-1); font-family: 'Figtree', sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
.mono { font-family: 'JetBrains Mono', monospace; }
a { text-decoration: none; cursor: pointer; }

/* ─ Scrollbar ─ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--tx-3); border-radius: 10px; }

/* ═══════════════════════════════════
   APP SHELL
═══════════════════════════════════ */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ═══════════════════════════════════
   SIDEBAR
═══════════════════════════════════ */
.sidebar {
  width: var(--sb-w);
  min-width: var(--sb-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--br-soft);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  transition: width 0.25s ease, min-width 0.25s ease;
  position: relative;
  z-index: 200;
}

.sidebar.collapsed {
  width: 60px;
  min-width: 60px;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-group-label,
.sidebar.collapsed .nav-link-item span:not(.nl-badge),
.sidebar.collapsed .nl-badge,
.sidebar.collapsed .sf-info,
.sidebar.collapsed .btn-logout span {
  display: none;
}

.sidebar.collapsed .nav-link-item {
  justify-content: center;
  padding: 10px;
}

.sidebar.collapsed .sidebar-brand {
  justify-content: center;
  padding: 18px 0;
}

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--br-soft);
  flex-shrink: 0;
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99,102,241,0.35);
}

.brand-name {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--tx-1);
  line-height: 1.1;
}

.brand-tag {
  display: block;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tx-2);
}

/* Nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-group-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tx-3);
  padding: 14px 8px 5px;
  white-space: nowrap;
  overflow: hidden;
}

.nav-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r);
  color: var(--tx-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  position: relative;
  border: 1px solid transparent;
}

.nav-link-item i {
  font-size: 15px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  transition: color 0.18s;
}

.nav-link-item span:first-of-type {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-link-item:hover {
  background: var(--bg-panel);
  color: var(--tx-1);
  border-color: var(--br-soft);
}

.nav-link-item.active {
  background: var(--accent-dim);
  color: var(--accent-light);
  border-color: var(--br-active);
  font-weight: 600;
}

.nav-link-item.active i { color: var(--accent-light); }

.nl-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.live-badge {
  background: rgba(16,185,129,0.14);
  color: var(--green);
  border: 1px solid rgba(16,185,129,0.25);
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.warn-badge {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(244,63,94,0.2);
}

/* Sidebar footer */
.sidebar-footer {
  border-top: 1px solid var(--br-soft);
  padding: 12px 10px;
  flex-shrink: 0;
}

.sf-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: var(--r);
  background: var(--bg-panel);
  border: 1px solid var(--br-soft);
}

.sf-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--br-active);
}

.sf-info { flex: 1; overflow: hidden; }
.sf-name { font-size: 13px; font-weight: 600; color: var(--tx-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-role { font-size: 10px; color: var(--tx-2); }

.btn-logout {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  border: 1px solid var(--br-mid);
  background: transparent;
  color: var(--tx-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s;
  flex-shrink: 0;
}
.btn-logout:hover { background: var(--red-dim); border-color: var(--red); color: var(--red); }

/* ═══════════════════════════════════
   MAIN WRAPPER
═══════════════════════════════════ */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-main);
}

/* ─ Topbar ─ */
.topbar {
  height: var(--tb-h);
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--br-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  gap: 12px;
}

.topbar-left { display: flex; align-items: center; gap: 12px; }

.topbar-toggle {
  width: 34px; height: 34px;
  border-radius: var(--r);
  border: 1px solid var(--br-mid);
  background: transparent;
  color: var(--tx-2);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
}
.topbar-toggle:hover { background: var(--bg-panel); color: var(--tx-1); }

.topbar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--tx-1);
}

.topbar-right { display: flex; align-items: center; gap: 8px; }

.tb-clock {
  font-size: 12px;
  color: var(--tx-2);
  letter-spacing: 0.04em;
  background: var(--bg-panel);
  padding: 5px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--br-soft);
}

.tb-sep { width: 1px; height: 24px; background: var(--br-soft); margin: 0 4px; }

.tb-btn {
  width: 34px; height: 34px;
  border-radius: var(--r);
  border: 1px solid var(--br-mid);
  background: transparent;
  color: var(--tx-2);
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
}
.tb-btn:hover { background: var(--bg-panel); color: var(--tx-1); }

.pos-rel { position: relative; }
.notif-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  background: var(--red);
  border-radius: 50%;
  border: 1px solid var(--bg-topbar);
}

.tb-avatar {
  width: 34px; height: 34px;
  border-radius: var(--r);
  background: var(--accent-dim);
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--br-active);
  cursor: pointer;
}

/* ═══════════════════════════════════
   PAGE SYSTEM
═══════════════════════════════════ */
.pages-container {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.page-view {
  display: none;
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  animation: page-in 0.2s ease;
}

.page-view.active { display: block; }

@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Page header */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 12px;
}

.ph-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--tx-1);
  letter-spacing: -0.01em;
}

.ph-sub {
  font-size: 13px;
  color: var(--tx-2);
  margin-top: 3px;
}

/* Primary action button */
.btn-primary-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: 'Figtree', sans-serif;
  box-shadow: 0 2px 12px rgba(99,102,241,0.3);
}
.btn-primary-action:hover { background: var(--accent-light); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(99,102,241,0.4); }

/* Ghost sm */
.btn-ghost-sm {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--br-mid);
  border-radius: var(--r);
  color: var(--tx-2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  font-family: 'Figtree', sans-serif;
  white-space: nowrap;
}
.btn-ghost-sm:hover { background: var(--bg-panel); color: var(--tx-1); }

.btn-text-sm {
  background: none; border: none; color: var(--accent-light);
  font-size: 12px; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; gap: 4px;
  transition: color 0.18s;
  font-family: 'Figtree', sans-serif;
}
.btn-text-sm:hover { color: #fff; }

/* ═══════════════════════════════════
   KPI CARDS
═══════════════════════════════════ */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--bg-panel);
  border: 1px solid var(--br-soft);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color 0.2s;
}
.kpi-card:hover { border-color: var(--br-mid); }

.kpi-ico {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--kb);
  color: var(--kc);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.kpi-lbl { font-size: 11px; color: var(--tx-2); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; }
.kpi-val { font-size: 24px; font-weight: 800; color: var(--tx-1); margin: 3px 0; letter-spacing: -0.02em; }
.kpi-trend { font-size: 11px; font-weight: 500; display: flex; align-items: center; gap: 2px; }
.kpi-trend.up { color: var(--green); }
.kpi-trend.down { color: var(--red); }

/* ═══════════════════════════════════
   PANEL CARDS
═══════════════════════════════════ */
.panel-card {
  background: var(--bg-panel);
  border: 1px solid var(--br-soft);
  border-radius: var(--r-lg);
  padding: 0;
  overflow: hidden;
  margin-bottom: 20px;
}

.panel-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--br-soft);
}

.panel-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--tx-1);
}

.chip {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent-light);
  border: 1px solid rgba(99,102,241,0.2);
}

/* Two column grid */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

/* ═══════════════════════════════════
   CHARTS
═══════════════════════════════════ */
.rev-chart {
  display: block;
  width: 100%;
  height: 130px;
  padding: 10px 20px 4px;
}

.chart-day-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 20px 14px;
  font-size: 10px;
  color: var(--tx-2);
  letter-spacing: 0.05em;
}

/* Top products */
.top-prod-list {
  padding: 8px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tp-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tp-num { font-size: 10px; font-weight: 700; color: var(--tx-3); font-family: 'JetBrains Mono', monospace; min-width: 18px; }
.tp-em  { font-size: 16px; flex-shrink: 0; }
.tp-nm  { font-size: 12px; font-weight: 500; color: var(--tx-1); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-bar-bg { flex: 1; height: 4px; background: var(--bg-app); border-radius: 10px; overflow: hidden; }
.tp-bar-fill { height: 100%; background: var(--accent); border-radius: 10px; }
.tp-amt { font-size: 12px; font-weight: 700; color: var(--tx-1); min-width: 38px; text-align: right; }

/* ═══════════════════════════════════
   TABLES
═══════════════════════════════════ */
.table-scroll { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead th {
  padding: 11px 16px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tx-2);
  border-bottom: 1px solid var(--br-soft);
  white-space: nowrap;
  background: var(--bg-panel);
}

.data-table tbody td {
  padding: 12px 16px;
  color: var(--tx-1);
  border-bottom: 1px solid var(--br-soft);
  white-space: nowrap;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg-row-hover); }

/* Table utilities */
.tbl-search-box { position: relative; }
.tbl-search-box i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--tx-2); font-size: 12px; }
.tbl-search-in {
  background: var(--bg-input);
  border: 1px solid var(--br-mid);
  border-radius: var(--r);
  color: var(--tx-1);
  font-size: 12px;
  padding: 7px 10px 7px 30px;
  outline: none;
  font-family: 'Figtree', sans-serif;
  min-width: 180px;
  transition: border-color 0.18s;
}
.tbl-search-in:focus { border-color: var(--accent); }
.tbl-search-in::placeholder { color: var(--tx-2); }

.tbl-select {
  background: var(--bg-input);
  border: 1px solid var(--br-mid);
  border-radius: var(--r);
  color: var(--tx-1);
  font-size: 12px;
  padding: 7px 10px;
  outline: none;
  font-family: 'Figtree', sans-serif;
  cursor: pointer;
}

.tbl-btn {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  border: 1px solid var(--br-mid);
  background: transparent;
  color: var(--tx-2);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.18s;
  display: inline-flex; align-items: center; justify-content: center;
}
.tbl-btn:hover { background: var(--accent-dim); border-color: var(--accent); color: var(--accent-light); }

/* Pills / badges */
.pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}
.pill.green  { background: var(--green-dim); color: var(--green); border: 1px solid rgba(16,185,129,.2); }
.pill.amber  { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245,158,11,.2); }
.pill.blue   { background: var(--cyan-dim);  color: var(--cyan);  border: 1px solid rgba(6,182,212,.2); }
.pill.red    { background: var(--red-dim);   color: var(--red);   border: 1px solid rgba(244,63,94,.2); }

.role-pill {
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.role-pill.violet { background: var(--accent-dim); color: var(--accent-light); border: 1px solid rgba(99,102,241,.2); }
.role-pill.cyan   { background: var(--cyan-dim);   color: var(--cyan);          border: 1px solid rgba(6,182,212,.2); }
.role-pill.amber  { background: var(--amber-dim);  color: var(--amber);         border: 1px solid rgba(245,158,11,.2); }

/* Dot */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

/* User cell */
.user-cell { display: flex; align-items: center; gap: 8px; }
.u-av { width: 28px; height: 28px; border-radius: 7px; background: var(--accent-dim); color: var(--accent-light); font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ═══════════════════════════════════
   REPORT BARS
═══════════════════════════════════ */
.report-bars { padding: 12px 20px 16px; display: flex; flex-direction: column; gap: 14px; }
.rb-row { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--tx-2); }
.rb-row > span:first-child { min-width: 90px; white-space: nowrap; }
.rb-track { flex: 1; height: 6px; background: var(--bg-app); border-radius: 10px; overflow: hidden; }
.rb-fill { height: 100%; border-radius: 10px; transition: width 0.6s ease; }
.rb-row .mono { min-width: 50px; text-align: right; color: var(--tx-1); font-weight: 600; }

/* ═══════════════════════════════════
   SETTINGS
═══════════════════════════════════ */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.settings-group-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--tx-2); padding: 16px 20px 12px; border-bottom: 1px solid var(--br-soft); display: flex; align-items: center; gap: 8px; }
.settings-group-title i { color: var(--accent-light); }

.sf { padding: 10px 20px; border-bottom: 1px solid var(--br-soft); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sf label { font-size: 12px; color: var(--tx-2); min-width: 100px; }
.s-input { background: var(--bg-input); border: 1px solid var(--br-mid); border-radius: var(--r-sm); color: var(--tx-1); font-size: 13px; padding: 7px 10px; outline: none; flex: 1; font-family: 'Figtree', sans-serif; transition: border-color 0.18s; }
.s-input:focus { border-color: var(--accent); }
.toggle-sf { justify-content: space-between; }
.mt-3 { margin-top: 12px; }

.swatches { display: flex; gap: 8px; }
.swatch { width: 24px; height: 24px; border-radius: 6px; cursor: pointer; border: 2px solid transparent; transition: border-color 0.18s; }
.swatch.active { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }

.btn-primary-action.mt-3 { margin: 0 20px 20px; }

/* ═══════════════════════════════════
   POS PAGE
═══════════════════════════════════ */
.pos-shell {
  display: grid;
  grid-template-columns: 1fr 360px;
  height: 100%;
  overflow: hidden;
  gap: 0;
}

/* Products side */
.pos-products {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  overflow: hidden;
  border-right: 1px solid var(--br-soft);
}

/* Scanner */
.scanner-box {
  background: var(--bg-panel);
  border: 1px solid var(--br-mid);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.scanner-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}

.scan-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tx-2);
  margin-bottom: 10px;
}
.scan-label i { color: var(--accent-light); }

.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pd 1.8s ease-in-out infinite;
  margin-left: auto;
}
@keyframes pd { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.3;transform:scale(.7)} }

.scan-row { display: flex; gap: 8px; }

.scan-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--br-mid);
  border-radius: var(--r);
  color: var(--tx-1);
  font-size: 14px;
  padding: 9px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  letter-spacing: 0.04em;
}
.scan-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.scan-input::placeholder { color: var(--tx-2); font-size: 13px; }

.btn-scan {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Figtree', sans-serif;
  white-space: nowrap;
}
.btn-scan:hover { background: var(--accent-light); box-shadow: 0 0 16px var(--accent-glow); }

.scan-status { margin-top: 7px; font-size: 11px; color: var(--tx-2); min-height: 14px; transition: color 0.2s; }
.scan-status.success { color: var(--green); }
.scan-status.error   { color: var(--red); }

/* Filter bar */
.pos-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cat-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.cat-strip::-webkit-scrollbar { display: none; }

.cat-btn {
  padding: 6px 13px;
  border-radius: 20px;
  border: 1px solid var(--br-mid);
  background: var(--bg-panel);
  color: var(--tx-2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s;
  font-family: 'Figtree', sans-serif;
}
.cat-btn:hover { border-color: var(--br-active); color: var(--tx-1); }
.cat-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent-light); font-weight: 600; }

.pos-search-box {
  position: relative;
  flex-shrink: 0;
  min-width: 160px;
}
.pos-search-box i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--tx-2); font-size: 12px; }
.pos-search-in { width: 100%; background: var(--bg-panel); border: 1px solid var(--br-mid); border-radius: var(--r); color: var(--tx-1); font-size: 12px; padding: 7px 10px 7px 28px; outline: none; font-family: 'Figtree', sans-serif; transition: border-color 0.18s; }
.pos-search-in:focus { border-color: var(--accent); }
.pos-search-in::placeholder { color: var(--tx-2); }

/* Product grid */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
  overflow-y: auto;
  padding-right: 2px;
  align-content: start;
}

.prod-card {
  background: var(--bg-panel);
  border: 1px solid var(--br-soft);
  border-radius: var(--r-lg);
  padding: 14px 12px;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
  overflow: hidden;
}
.prod-card:hover { border-color: var(--br-active); background: var(--bg-panel-hover); transform: translateY(-2px); box-shadow: var(--sh-panel); }
.prod-card:active { transform: translateY(0); }
.prod-card.out-of-stock { opacity: 0.45; pointer-events: none; }
.prod-card.flash-add { border-color: var(--green) !important; box-shadow: 0 0 14px rgba(16,185,129,0.25) !important; }

.pc-badge { position: absolute; top: 8px; right: 8px; font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 4px; background: var(--accent-dim); color: var(--accent-light); border: 1px solid rgba(99,102,241,.2); }
.pc-em   { font-size: 26px; line-height: 1; }
.pc-name { font-size: 12px; font-weight: 600; color: var(--tx-1); line-height: 1.3; }
.pc-sku  { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--tx-2); }
.pc-price { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; color: var(--accent-light); margin-top: auto; }
.pc-stock { font-size: 10px; color: var(--tx-2); }
.pc-stock.low { color: var(--amber); }

/* ─ Order Panel ─ */
.pos-order {
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
  overflow: hidden;
}

.order-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--br-soft);
  flex-shrink: 0;
}

.order-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--tx-2); font-weight: 600; }
.order-num { font-size: 17px; font-weight: 700; color: var(--tx-1); margin-top: 2px; }

.icon-btn {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  border: 1px solid var(--br-mid);
  background: transparent;
  color: var(--tx-2);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
}
.icon-btn:hover { background: var(--bg-panel); color: var(--tx-1); }
.icon-btn.danger:hover { background: var(--red-dim); border-color: var(--red); color: var(--red); }

.order-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
}

.empty-cart {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 6px; color: var(--tx-2); text-align: center;
}
.empty-cart i { font-size: 38px; opacity: 0.25; }
.empty-cart p { font-size: 13px; font-weight: 600; margin: 0; }
.empty-cart small { font-size: 11px; opacity: 0.5; }

/* Order item */
.order-item-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 8px;
  border-radius: var(--r);
  border: 1px solid transparent;
  margin-bottom: 6px;
  background: var(--bg-panel);
  animation: oi-in 0.2s ease;
  transition: border-color 0.18s;
}
.order-item-row:hover { border-color: var(--br-soft); }

@keyframes oi-in { from { opacity:0; transform:translateX(10px); } to { opacity:1; transform:translateX(0); } }

.oi-em { font-size: 20px; flex-shrink: 0; width: 32px; text-align: center; }
.oi-info { flex: 1; min-width: 0; }
.oi-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oi-sku  { font-size: 10px; color: var(--tx-2); font-family: 'JetBrains Mono', monospace; }

.oi-qty { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.qty-btn {
  width: 24px; height: 24px; border-radius: 6px;
  border: 1px solid var(--br-mid); background: var(--bg-input);
  color: var(--tx-2); font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s;
}
.qty-btn:hover { border-color: var(--accent); color: var(--accent-light); background: var(--accent-dim); }
.qty-val { width: 26px; text-align: center; font-size: 13px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }

.oi-price { font-size: 13px; font-weight: 700; font-family: 'JetBrains Mono', monospace; min-width: 54px; text-align: right; flex-shrink: 0; }
.oi-remove {
  width: 24px; height: 24px; border-radius: 6px;
  border: 1px solid transparent; background: transparent;
  color: var(--tx-2); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s; flex-shrink: 0;
}
.oi-remove:hover { border-color: var(--red); color: var(--red); background: var(--red-dim); }

/* Order summary block */
.order-summary-block {
  padding: 12px 14px;
  border-top: 1px solid var(--br-soft);
  flex-shrink: 0;
  background: var(--bg-panel);
}

.sum-rows { margin-bottom: 10px; }
.sum-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--tx-2); margin-bottom: 5px; }
.sum-row .emerald { color: var(--green); }
.sum-divider { height: 1px; background: var(--br-soft); margin: 8px 0; }
.sum-row.grand { font-size: 16px; font-weight: 800; color: var(--tx-1); margin-bottom: 0; }

/* Payment grid */
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.pay-option {
  padding: 7px 6px;
  border-radius: var(--r);
  border: 1px solid var(--br-mid);
  background: var(--bg-input);
  color: var(--tx-2);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-family: 'Figtree', sans-serif;
}
.pay-option i { font-size: 15px; }
.pay-option:hover { border-color: var(--accent); color: var(--accent-light); background: var(--accent-dim); }
.pay-option.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent-light); }

/* Cash block */
.cash-block {
  background: var(--bg-input);
  border: 1px solid var(--br-soft);
  border-radius: var(--r);
  padding: 10px 12px;
  margin-bottom: 8px;
}
.cash-lbl { font-size: 9px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--tx-2); font-weight: 700; margin-bottom: 6px; }
.cash-row { display: flex; align-items: center; gap: 5px; }
.cash-sym { font-size: 16px; color: var(--tx-2); font-family: 'JetBrains Mono', monospace; }
.cash-in { flex: 1; background: transparent; border: none; border-bottom: 1px solid var(--br-mid); color: var(--tx-1); font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: 700; outline: none; padding: 2px 4px; transition: border-color 0.2s; }
.cash-in:focus { border-bottom-color: var(--accent); }
.cash-in::placeholder { color: var(--tx-3); font-size: 14px; }
.change-line { display: flex; justify-content: space-between; margin-top: 7px; font-size: 12px; color: var(--tx-2); }
.change-line .emerald { color: var(--green); font-weight: 700; }

/* Promo */
.promo-row { display: flex; gap: 6px; margin-bottom: 8px; }
.promo-in { flex: 1; background: var(--bg-input); border: 1px solid var(--br-soft); border-radius: var(--r-sm); color: var(--tx-1); font-size: 12px; padding: 7px 10px; outline: none; transition: border-color 0.18s; letter-spacing: 0.06em; }
.promo-in:focus { border-color: var(--accent); }
.promo-in::placeholder { color: var(--tx-2); font-family: 'Figtree', sans-serif; letter-spacing: 0; }
.btn-apply { padding: 7px 12px; background: var(--accent-dim); border: 1px solid rgba(99,102,241,.25); border-radius: var(--r-sm); color: var(--accent-light); font-size: 11px; font-weight: 700; cursor: pointer; transition: all 0.18s; white-space: nowrap; font-family: 'Figtree', sans-serif; }
.btn-apply:hover { background: rgba(99,102,241,.2); }

/* Checkout */
.btn-checkout {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  border: none;
  border-radius: var(--r);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Figtree', sans-serif;
  box-shadow: 0 4px 16px rgba(99,102,241,0.25);
  letter-spacing: 0.02em;
}
.btn-checkout:not(:disabled):hover { background: var(--accent-light); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(99,102,241,0.4); }
.btn-checkout:disabled { background: var(--bg-panel); color: var(--tx-2); box-shadow: none; cursor: not-allowed; }

/* ═══════════════════════════════════
   RECEIPT MODAL
═══════════════════════════════════ */
.receipt-content {
  background: #f4f0e6;
  color: #1a1a1a;
  border: none;
  border-radius: var(--r-xl);
  max-width: 340px;
  margin: auto;
  font-family: 'JetBrains Mono', monospace;
}

.rcpt-header { text-align: center; padding: 22px 20px 14px; border-bottom: 1px dashed #c8bfa0; }
.rcpt-logo { font-size: 18px; font-weight: 900; font-family: 'Figtree', sans-serif; letter-spacing: 0.12em; }
.rcpt-logo i { color: var(--accent); }
.rcpt-store { font-size: 11px; color: #666; margin-top: 3px; font-family: 'Figtree', sans-serif; }
.rcpt-date { font-size: 10px; color: #888; margin-top: 5px; }

.rcpt-body { padding: 14px 20px; }
.rcpt-oid { font-size: 10px; color: #999; text-align: center; margin-bottom: 10px; letter-spacing: 0.08em; }

.rcpt-item { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 5px; gap: 8px; }
.rcpt-item-n { flex: 1; }
.rcpt-item-q { color: #888; white-space: nowrap; }
.rcpt-item-p { font-weight: 700; white-space: nowrap; }

.rcpt-hr { border: none; border-top: 1px dashed #c8bfa0; margin: 10px 0; }
.rcpt-row { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; color: #555; }
.rcpt-grand { font-size: 15px; font-weight: 700; color: #1a1a1a; }
.rcpt-pm { text-align: center; font-size: 11px; color: #888; font-family: 'Figtree', sans-serif; letter-spacing: 0.08em; text-transform: uppercase; }

.rcpt-footer { text-align: center; padding: 12px 20px 18px; border-top: 1px dashed #c8bfa0; }
.rcpt-footer p { font-size: 11px; color: #666; font-family: 'Figtree', sans-serif; margin: 6px 0 0; }

.barcode-lines { display: flex; justify-content: center; gap: 1.5px; height: 32px; margin-bottom: 8px; }
.bc-line { background: #1a1a1a; width: 2px; border-radius: 1px; }

.rcpt-footer-btns { background: #ede8da; border-top: 1px solid #c8bfa0; border-radius: 0 0 var(--r-xl) var(--r-xl); padding: 10px 16px; }

/* ═══════════════════════════════════
   TOAST
═══════════════════════════════════ */
#pos-toast { background: var(--bg-panel); border: 1px solid var(--br-mid); color: var(--tx-1); font-size: 13px; border-radius: var(--r); min-width: 260px; }
#pos-toast.t-success { border-color: var(--green); }
#pos-toast.t-error   { border-color: var(--red); }
#pos-toast.t-info    { border-color: var(--cyan); }
