/* ══════════════════════════════════════════════════════════
   MotoPartsHub — Main Stylesheet  v2.0
   Bebas Neue (headings) + DM Sans (body) + JetBrains Mono (numbers)
══════════════════════════════════════════════════════════ */

/* ── DARK THEME (default) ── */
:root,
[data-theme="dark"] {
  --bg:       #0c0d0f;
  --surface:  #141519;
  --surface2: #1c1e24;
  --surface3: #232630;
  --border:   #2a2d38;
  --border2:  #363944;
  --text:     #f0f1f5;
  --text2:    #9da3b4;
  --text3:    #5d6375;
  --accent:   #f59e0b;
  --accent2:  #d97706;
  --accent3:  #34d399;
  --red:    #ef4444;
  --blue:   #60a5fa;
  --green:  #34d399;
  --amber:  #f59e0b;
  --purple: #a78bfa;
  --sidebar-w: 240px;
  --topbar-h:  62px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

/* ── LIGHT THEME ── */
[data-theme="light"] {
  --bg:       #f4f5f7;
  --surface:  #ffffff;
  --surface2: #f0f1f4;
  --surface3: #e5e7ed;
  --border:   #dde0e8;
  --border2:  #c9cdd8;
  --text:     #111827;
  --text2:    #4b5563;
  --text3:    #9ca3af;
  --accent:   #f59e0b;
  --accent2:  #d97706;
  --accent3:  #059669;
  --red:    #ef4444;
  --blue:   #2563eb;
  --green:  #059669;
  --amber:  #d97706;
  --purple: #7c3aed;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.5;
  min-height: 100vh; overflow-x: hidden;
  transition: background 0.25s, color 0.25s;
}
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ── LAYOUT ── */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100; overflow-y: auto;
  transition: width 0.25s, transform 0.25s, background 0.25s;
}
.main {
  margin-left: var(--sidebar-w); min-height: 100vh;
  display: flex; flex-direction: column;
  min-width: 0; overflow-x: hidden;
  width: calc(100% - var(--sidebar-w));
  transition: margin-left 0.25s, width 0.25s;
}
.content { flex: 1; padding: 24px; min-width: 0; overflow-x: hidden; }

/* ── LOGO ── */
.logo {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.logo-icon {
  width: 38px; height: 38px; background: var(--accent);
  border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px;
  flex-shrink: 0;
}
.logo-text { font-family: 'Bebas Neue', sans-serif; font-size: 22px; letter-spacing: 1.5px; }
.logo-text span { color: var(--accent); }

/* ── NAV ── */
.nav { padding: 10px 8px; flex: 1; }
.nav-section {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--text3); padding: 12px 8px 4px;
  white-space: nowrap; overflow: hidden;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px; text-decoration: none;
  color: var(--text2); font-size: 13px; font-weight: 500;
  transition: all 0.15s; margin-bottom: 2px; position: relative;
  white-space: nowrap; overflow: hidden;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: rgba(245,158,11,0.12); color: var(--accent); font-weight: 600; }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; background: var(--accent); border-radius: 0 2px 2px 0;
}
.nav-item .icon { font-size: 16px; flex-shrink: 0; }
.badge { margin-left: auto; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px; min-width: 18px; text-align: center; flex-shrink: 0; }
.badge-green { background: var(--green); color: #000; }

/* ── SIDEBAR BOTTOM ── */
.sidebar-bottom { padding: 12px; border-top: 1px solid var(--border); flex-shrink: 0; }
.user-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; background: var(--surface2); border-radius: 10px;
  overflow: hidden;
}
.avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #000; flex-shrink: 0;
}
.user-info { flex: 1; overflow: hidden; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text3); }

/* ── TOPBAR ── */
.topbar {
  height: var(--topbar-h); background: var(--surface);
  border-bottom: 1px solid var(--border); padding: 0 24px;
  display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 50;
  transition: background 0.25s;
}
.page-title { font-family: 'Bebas Neue', sans-serif; font-size: 22px; letter-spacing: 1px; flex-shrink: 0; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar .search-bar {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 14px;
  display: flex; align-items: center; gap: 8px; width: 240px;
  transition: background 0.25s;
}
.topbar .search-bar input {
  background: none; border: none; outline: none;
  color: var(--text); font-size: 13px; font-family: 'DM Sans', sans-serif; width: 100%;
}
.icon-btn {
  width: 36px; height: 36px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px; position: relative; transition: background 0.2s;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface3); }
.notif-dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; background: var(--red); border-radius: 50%; border: 1.5px solid var(--surface); }

/* ── THEME TOGGLE ── */
.theme-toggle {
  width: 36px; height: 36px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 17px; transition: all 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--surface3); transform: rotate(15deg); }

/* ── HAMBURGER ── */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px; border-radius: 8px;
  background: none; border: none; flex-shrink: 0;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all 0.25s;
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 99;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ── GRIDS ── */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; width: 100%; }
.grid-2   { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid-3   { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid-7-3 { display: grid; grid-template-columns: 7fr 3fr; gap: 16px; margin-bottom: 16px; min-width: 0; }

/* ── STAT CARD ── */
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px; position: relative; overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, background 0.25s; min-width: 0;
}
.stat-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.stat-icon { font-size: 22px; margin-bottom: 10px; }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text3); font-weight: 600; margin-bottom: 4px; }
.stat-value { font-family: 'JetBrains Mono', monospace; font-size: clamp(18px, 2vw, 26px); font-weight: 600; word-break: break-word; }
.stat-value.gold  { color: var(--amber); } .stat-value.blue  { color: var(--blue); }
.stat-value.green { color: var(--green); } .stat-value.red   { color: var(--red); }
.stat-change { font-size: 11px; color: var(--text3); margin-top: 6px; }
.stat-change.up { color: var(--green); } .stat-change.down { color: var(--red); }
.stat-card.gold  { border-color: rgba(245,158,11,0.2); } .stat-card.blue  { border-color: rgba(96,165,250,0.2); }
.stat-card.green { border-color: rgba(52,211,153,0.2); } .stat-card.red   { border-color: rgba(239,68,68,0.2); }

/* ── CARD ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; min-width: 0; margin-bottom: 16px; transition: background 0.25s; }
.card-header { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-title { font-weight: 700; font-size: 14px; }
.card-body { padding: 20px; }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
thead th { background: var(--surface2); padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text3); white-space: nowrap; }
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }
td { padding: 12px 16px; font-size: 13px; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 9px; border: 1px solid transparent; font-size: 13px; font-weight: 600; font-family: 'DM Sans', sans-serif; cursor: pointer; text-decoration: none; transition: all 0.15s; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #000; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent2); border-color: var(--accent2); transform: translateY(-1px); }
.btn-ghost { background: var(--surface2); color: var(--text2); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface3); color: var(--text); }
.btn-ghost.active { background: rgba(245,158,11,0.15); color: var(--accent); border-color: rgba(245,158,11,0.3); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-danger { background: rgba(239,68,68,0.1); color: var(--red); border-color: rgba(239,68,68,0.3); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-success { background: rgba(52,211,153,0.1); color: var(--green); border-color: rgba(52,211,153,0.3); }
.btn-success:hover { background: var(--green); color: #000; }

/* ── TAGS ── */
.tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.tag.green  { background: rgba(52,211,153,0.1);  color: var(--green); }
.tag.red    { background: rgba(239,68,68,0.1);   color: var(--red); }
.tag.amber, .tag.gold { background: rgba(245,158,11,0.12); color: var(--amber); }
.tag.blue   { background: rgba(96,165,250,0.1);  color: var(--blue); }
.tag.gray   { background: var(--surface3); color: var(--text2); }

/* ── FORMS ── */
.input-field { background: var(--surface2); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; color: var(--text); font-size: 13px; font-family: 'DM Sans', sans-serif; outline: none; transition: border-color 0.2s, background 0.25s; width: 100%; }
.input-field:focus { border-color: var(--accent); }
.input-field::placeholder { color: var(--text3); }
.input-field option { background: var(--surface2); color: var(--text); }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text3); margin-bottom: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }

/* ── TOGGLE SWITCH ── */
.toggle-switch { display: flex; align-items: center; gap: 10px; }
.toggle-switch input[type=checkbox] { display: none; }
.toggle-track {
  width: 44px; height: 24px; background: var(--surface3); border: 1px solid var(--border2);
  border-radius: 12px; position: relative; cursor: pointer; transition: background 0.2s;
}
.toggle-track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; background: #fff; border-radius: 50%;
  transition: transform 0.2s; box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.toggle-switch input:checked + .toggle-track { background: var(--green); border-color: var(--green); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(20px); }
.toggle-label { font-size: 13px; font-weight: 500; }

/* ── MODAL ── */
.modal-overlay { position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); animation: fadeIn 0.15s ease; }
.modal { background: var(--surface); border: 1px solid var(--border2); border-radius: 16px; width: 100%; max-height: 90vh; overflow-y: auto; animation: slideUp 0.2s ease; }
.modal-header { display: flex; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.modal-title { font-weight: 700; font-size: 16px; flex: 1; }
.modal-close { background: none; border: none; color: var(--text3); font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: all 0.15s; }
.modal-close:hover { background: var(--surface2); color: var(--text); }
.modal-body { padding: 20px 24px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border); }
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }
@keyframes slideUp { from { transform:translateY(20px);opacity:0 } to { transform:translateY(0);opacity:1 } }

/* ── CHARTS ── */
.line-chart { display: flex; align-items: flex-end; gap: 5px; height: 120px; padding: 10px 0; }
.line-chart-bar { flex: 1; min-width: 8px; background: linear-gradient(to top, var(--accent), rgba(245,158,11,0.3)); border-radius: 4px 4px 0 0; transition: height 0.5s ease, opacity 0.2s; cursor: pointer; }
.line-chart-bar:hover { opacity: 0.8; }
.chart-labels { display: flex; gap: 5px; padding-top: 6px; }
.chart-labels span { flex: 1; text-align: center; font-size: 9px; color: var(--text3); text-transform: uppercase; min-width: 0; overflow: hidden; }

/* ── TOP PRODUCTS ── */
.top-product-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.top-product-row:last-child { border-bottom: none; }
.tp-rank { width: 26px; height: 26px; background: var(--surface2); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--text3); flex-shrink: 0; }
.tp-rank.gold { background: rgba(245,158,11,0.15); color: var(--amber); }
.tp-name { font-size: 13px; font-weight: 500; }
.tp-sales { font-size: 11px; color: var(--text3); }
.tp-amount { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--accent); flex-shrink: 0; }

/* ── PROGRESS ── */
.progress-bar { background: var(--surface3); border-radius: 4px; height: 6px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.progress-fill.green { background: linear-gradient(to right, var(--green), #10b981); }
.progress-fill.red   { background: linear-gradient(to right, var(--red), #dc2626); }
.progress-fill.blue  { background: linear-gradient(to right, var(--blue), #3b82f6); }
.progress-fill.amber { background: linear-gradient(to right, var(--amber), #d97706); }

/* ── POS ── */
.pos-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 16px; height: calc(100vh - var(--topbar-h) - 48px); min-width: 0; }
.pos-left { display: flex; flex-direction: column; gap: 12px; overflow: visible; min-width: 0; }
.pos-right { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.pos-header { padding: 14px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.pos-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; padding: 14px; overflow-y: auto; flex: 1; }
.product-tile { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 10px; cursor: pointer; text-align: center; transition: all 0.15s; user-select: none; }
.product-tile:hover { background: var(--surface3); border-color: var(--accent); transform: translateY(-2px); }
.product-tile:active { transform: scale(0.97); }
.pt-icon { font-size: 22px; margin-bottom: 6px; }
.pt-name { font-size: 12px; font-weight: 600; margin-bottom: 2px; line-height: 1.3; }
.pt-model { font-size: 10px; color: var(--text3); margin-bottom: 4px; }
.pt-price { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--accent); font-weight: 600; }
.customer-input { display: flex; gap: 8px; position: relative; }
.customer-info { display: flex; align-items: center; gap: 10px; }
.pos-cart { flex: 1; overflow-y: auto; padding: 10px; }
.cart-item { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--surface2); border-radius: 10px; margin-bottom: 8px; border: 1px solid var(--border); }
.cart-item-name { font-size: 13px; font-weight: 600; }
.cart-item-qty { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.cart-item-price { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--accent); font-weight: 600; }
.qty-btn { width: 28px; height: 28px; background: var(--surface3); border: 1px solid var(--border); border-radius: 7px; color: var(--text); cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.qty-btn:hover { background: var(--accent); color: #000; border-color: var(--accent); }
.pos-totals { padding: 14px; border-top: 1px solid var(--border); flex-shrink: 0; }
.total-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
.total-row:last-of-type { border: none; }
.total-row.grand { font-size: 16px; font-weight: 700; color: var(--accent); font-family: 'JetBrains Mono', monospace; padding: 10px 0; border-top: 1px solid var(--border2); border-bottom: none; }
.pay-method.active { background: rgba(245,158,11,0.15); color: var(--accent); border-color: rgba(245,158,11,0.3); }

/* ── CUSTOMER AUTOCOMPLETE ── */
/* POS header card must not clip the dropdown */
.pos-left .pos-header.card { overflow: visible; }
.ac-wrap { position: relative; flex: 1; }
.ac-dropdown {
  /* Lives on <body> — positioned via JS using fixed coords */
  position: fixed;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 10px; z-index: 99999; max-height: 280px; overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  display: none;
  min-width: 260px;
}
.ac-dropdown.open { display: block; }
.ac-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.active { background: var(--surface2); }
.ac-item-avatar {
  width: 30px; height: 30px; border-radius: 7px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.ac-item-name { font-size: 13px; font-weight: 600; }
.ac-item-meta { font-size: 11px; color: var(--text3); }
.ac-new { color: var(--accent3); font-size: 13px; font-weight: 600; padding: 10px 14px; }
.pending-badge { display:inline-flex; align-items:center; gap:5px; background:rgba(239,68,68,0.12); border:1px solid rgba(239,68,68,0.3); color:#ef4444; border-radius:8px; padding:3px 10px; font-size:12px; font-weight:700; margin-left:6px; }

/* ── MISC ── */
.alert-strip { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2); border-radius: 10px; padding: 10px 16px; color: var(--amber); font-size: 13px; margin-bottom: 20px; }
.alert-strip.info { background: rgba(96,165,250,0.08); border-color: rgba(96,165,250,0.2); color: var(--blue); }
.flash { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 9999; padding: 12px 24px; border-radius: 10px; font-size: 14px; font-weight: 600; animation: flashIn 0.3s ease; box-shadow: 0 8px 32px rgba(0,0,0,0.4); max-width: 90vw; text-align: center; }
.flash-success { background: var(--green); color: #000; } .flash-error { background: var(--red); color: #fff; }
@keyframes flashIn { from { transform:translateX(-50%) translateY(-10px);opacity:0 } to { transform:translateX(-50%) translateY(0);opacity:1 } }
.toast { position: fixed; bottom: 20px; right: 20px; z-index: 9999; background: var(--surface3); border: 1px solid var(--border2); color: var(--text); padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 500; opacity: 0; transform: translateY(10px); transition: all 0.25s; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,0.4); max-width: 90vw; }
.toast.show { opacity: 1; transform: translateY(0); }
.pagination { display: flex; align-items: center; gap: 4px; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.page-btn { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 7px; font-size: 12px; font-weight: 600; text-decoration: none; color: var(--text2); background: var(--surface2); border: 1px solid var(--border); transition: all 0.15s; }
.page-btn:hover, .page-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }
.page-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.search-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cust-avatar { width: 36px; height: 36px; background: linear-gradient(135deg, var(--purple), var(--blue)); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.cust-name { font-size: 13px; font-weight: 600; } .cust-meta { font-size: 11px; color: var(--text3); }
.live-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 0 rgba(52,211,153,0.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); } 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }

/* ── PRINT ── */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main { margin: 0 !important; width: 100% !important; }
  body { background: #fff !important; color: #000 !important; }
  .card { border: 1px solid #ddd !important; border-radius: 0 !important; }
  .btn { display: none !important; }
}

/* ── RESPONSIVE ── */
@media (max-width: 1400px) { .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1200px) {
  .grid-7-3 { grid-template-columns: 1fr; }
  .pos-layout { grid-template-columns: 1fr; height: auto; }
  .pos-right { max-height: 560px; }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 200px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .topbar .search-bar { display: none; }
}
@media (max-width: 700px) {
  :root { --sidebar-w: 240px; }
  .hamburger { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0 !important; width: 100% !important; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar-right { gap: 6px; }
  .page-title { font-size: 18px; }
  .content { padding: 14px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .modal { border-radius: 12px 12px 0 0; margin-top: auto; position: fixed; bottom: 0; left: 0; right: 0; max-height: 95vh; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  td { padding: 10px 12px; font-size: 12px; }
  .btn-sm { padding: 4px 8px; font-size: 11px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .pos-products { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
