/* ═══════════════════════════════════════════════════════════
   Shop POS — Main Stylesheet
   Premium, modern design with light/dark mode
   ═══════════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --primary:       #6366f1;
  --primary-dark:  #4f46e5;
  --primary-light: #e0e7ff;
  --secondary:     #8b5cf6;
  --success:       #10b981;
  --success-light: #d1fae5;
  --danger:        #ef4444;
  --danger-light:  #fee2e2;
  --warning:       #f59e0b;
  --warning-light: #fef3c7;
  --info:          #3b82f6;
  --info-light:    #dbeafe;

  --bg:            #f8fafc;
  --bg-card:       #ffffff;
  --bg-sidebar:    #1e1b4b;
  --bg-sidebar-hover: #2e2b6b;
  --sidebar-text:  #c7d2fe;
  --sidebar-active: #6366f1;

  --text:          #1e293b;
  --text-muted:    #64748b;
  --text-light:    #94a3b8;
  --border:        #e2e8f0;
  --border-focus:  #6366f1;

  --shadow-sm:     0 1px 2px rgba(0,0,0,.05);
  --shadow:        0 4px 6px -1px rgba(0,0,0,.1);
  --shadow-lg:     0 10px 25px -5px rgba(0,0,0,.15);
  --shadow-card:   0 2px 12px rgba(0,0,0,.06);

  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     16px;
  --radius-xl:     24px;

  --sidebar-w:     240px;
  --topbar-h:      60px;
  --font:          'Inter', system-ui, sans-serif;

  --transition:    all .2s ease;
}

[data-theme="dark"] {
  --bg:            #0f172a;
  --bg-card:       #1e293b;
  --bg-sidebar:    #0f172a;
  --bg-sidebar-hover: #1e293b;
  --border:        #334155;
  --text:          #f1f5f9;
  --text-muted:    #94a3b8;
  --text-light:    #64748b;
  --shadow-card:   0 2px 12px rgba(0,0,0,.3);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; transition: background .3s, color .3s; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

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

/* ══════════════════════════════
   LAYOUT
   ══════════════════════════════ */

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  display: flex; flex-direction: column;
  z-index: 100;
  transition: transform .3s ease, width .3s ease;
  overflow-y: auto; overflow-x: hidden;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  min-height: var(--topbar-h);
}
.brand-icon { width: 36px; height: 36px; background: var(--primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; flex-shrink: 0; }
.brand-name { color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-logo { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }

.sidebar-nav { flex: 1; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.nav-group-label { font-size: 10px; font-weight: 600; color: rgba(199,210,254,.4); letter-spacing: .08em; padding: 10px 10px 4px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--sidebar-text); font-size: 13.5px; font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-sidebar-hover); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,.4); }

.sidebar-footer { padding: 12px 10px; border-top: 1px solid rgba(255,255,255,.07); }
.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.user-name { color: #fff; font-size: 13px; font-weight: 600; }
.user-role { color: var(--sidebar-text); font-size: 11px; }

.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
  transition: margin-left .3s ease;
}

.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px;
  box-shadow: var(--shadow-sm);
}
.sidebar-toggle { display: none; padding: 8px; border-radius: 8px; color: var(--text-muted); font-size: 18px; }
.sidebar-toggle:hover { background: var(--bg); color: var(--text); }
.topbar-title { font-weight: 700; font-size: 17px; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 15px; transition: var(--transition); }
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-light); color: var(--danger); }

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

/* ══════════════════════════════
   FLASH / TOAST
   ══════════════════════════════ */
.flash-container { padding: 0 24px; }
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; margin: 8px 0;
  border-radius: var(--radius); font-size: 14px; font-weight: 500;
  animation: slideDown .3s ease;
}
.flash-close { margin-left: auto; font-size: 18px; color: inherit; opacity: .6; }
.flash-close:hover { opacity: 1; }
.flash-success { background: var(--success-light); color: #065f46; border-left: 4px solid var(--success); }
.flash-error   { background: var(--danger-light);  color: #991b1b; border-left: 4px solid var(--danger); }
.flash-info    { background: var(--info-light);    color: #1e40af; border-left: 4px solid var(--info); }
.flash-warning { background: var(--warning-light); color: #92400e; border-left: 4px solid var(--warning); }

.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; min-width: 280px; max-width: 380px;
  border-radius: var(--radius); font-size: 14px; font-weight: 500;
  background: var(--bg-card); box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary);
  animation: slideUp .3s ease;
}
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }

@keyframes slideDown { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideUp   { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

/* ══════════════════════════════
   CARDS & STATS
   ══════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card-header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-weight: 700; font-size: 15px; }
.card-body { padding: 20px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card::before { content: ''; position: absolute; top: 0; right: 0; width: 80px; height: 80px; border-radius: 0 0 0 80px; opacity: .08; }
.stat-card.primary::before { background: var(--primary); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger::before  { background: var(--danger); }
.stat-card.info::before    { background: var(--info); }
.stat-card.secondary::before { background: var(--secondary); }

.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.stat-card.primary .stat-icon  { background: var(--primary-light); color: var(--primary); }
.stat-card.success .stat-icon  { background: var(--success-light); color: var(--success); }
.stat-card.warning .stat-icon  { background: var(--warning-light); color: var(--warning); }
.stat-card.danger .stat-icon   { background: var(--danger-light);  color: var(--danger); }
.stat-card.info .stat-icon     { background: var(--info-light);    color: var(--info); }
.stat-card.secondary .stat-icon{ background: #ede9fe;              color: var(--secondary); }

.stat-label { font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-sub   { font-size: 11.5px; color: var(--text-light); }

/* ══════════════════════════════
   BUTTONS
   ══════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius);
  font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent;
  transition: var(--transition); cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(99,102,241,.4); }
.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-warning:hover { background: #d97706; }
.btn-info    { background: var(--info); color: #fff; }
.btn-info:hover { background: #2563eb; }
.btn-ghost   { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-outline-primary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { padding: 8px; width: 34px; height: 34px; justify-content: center; }
.btn-full { width: 100%; justify-content: center; }

/* ══════════════════════════════
   FORMS
   ══════════════════════════════ */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 14px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 14px; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.form-control::placeholder { color: var(--text-light); }
select.form-control { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius) 0 0 var(--radius); }
.input-group-append .btn { border-radius: 0 var(--radius) var(--radius) 0; }

/* ══════════════════════════════
   TABLES
   ══════════════════════════════ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { padding: 11px 16px; font-size: 11.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; border-bottom: 2px solid var(--border); background: var(--bg); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: var(--bg); }
.table tbody tr:last-child td { border-bottom: none; }

/* ══════════════════════════════
   BADGES & STATUS
   ══════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.badge-success { background: var(--success-light); color: #065f46; }
.badge-danger  { background: var(--danger-light);  color: #991b1b; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-info    { background: var(--info-light);    color: #1e40af; }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-gray    { background: #f1f5f9; color: var(--text-muted); }

/* ══════════════════════════════
   MODALS
   ══════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.6); backdrop-filter: blur(4px);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn .2s ease;
}
.modal {
  background: var(--bg-card); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  animation: scaleIn .25s ease;
}
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 18px; }
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

@keyframes fadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes scaleIn { from { opacity:0; transform: scale(.95); } to { opacity:1; transform: scale(1); } }

/* ══════════════════════════════
   AUTH - PREMIUM DARK GLASSMORPHISM
   ══════════════════════════════ */
.auth-body {
  background-color: #0f172a; /* Deep slate */
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  padding: 24px;
  position: relative;
  overflow: hidden;
  font-family: var(--font);
}

/* Glowing Animated Orbs */
.auth-body::before, .auth-body::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 1;
  opacity: 0.6;
  animation: orbFloat 10s infinite alternate ease-in-out;
}
.auth-body::before {
  width: 400px; height: 400px;
  background: #6366f1; /* Indigo */
  top: -100px; left: -100px;
}
.auth-body::after {
  width: 500px; height: 500px;
  background: #ec4899; /* Pink */
  bottom: -150px; right: -100px;
  animation-delay: -5s;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 50px) scale(1.1); }
}

.auth-container { 
  width: 100%; max-width: 420px; 
  z-index: 10; margin: 0 auto; 
  position: relative;
}

/* Glassmorphism Card */
.auth-card { 
  background: rgba(30, 41, 59, 0.4); 
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px; 
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden; 
  transform: translateY(20px);
  opacity: 0;
  animation: authFadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes authFadeInUp {
  to { transform: translateY(0); opacity: 1; }
}

.auth-header { 
  padding: 40px 32px 16px; 
  text-align: center; 
}
.auth-logo { 
  font-size: 32px; 
  margin-bottom: 20px; 
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
  border: 1px solid rgba(255,255,255,0.2);
}
.auth-title { 
  font-size: 26px; 
  font-weight: 800; 
  background: linear-gradient(to right, #ffffff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}
.auth-subtitle { font-size: 15px; color: #94a3b8; }

.auth-body-inner { padding: 16px 32px 32px; }
.auth-body-inner .form-group { margin-bottom: 22px; }
.auth-body-inner .form-label { font-size: 13.5px; font-weight: 500; color: #cbd5e1; margin-bottom: 8px; }
.auth-body-inner .form-control {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 10px;
  color: #ffffff;
  transition: all 0.3s ease;
}
.auth-body-inner .form-control::placeholder { color: #64748b; }
.auth-body-inner .form-control:focus {
  background: rgba(15, 23, 42, 0.8);
  border-color: #8b5cf6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.25);
  outline: none;
}

.auth-body-inner .btn-primary {
  padding: 14px 16px;
  font-size: 15.5px;
  font-weight: 600;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border: none;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.025em;
  margin-top: 12px;
  position: relative;
  overflow: hidden;
}
.auth-body-inner .btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-20deg);
  animation: buttonShine 3s infinite;
}
@keyframes buttonShine {
  0% { left: -100%; }
  20% { left: 200%; }
  100% { left: 200%; }
}
.auth-body-inner .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(99, 102, 241, 0.5);
}

.auth-body-inner .input-group-append .pw-toggle-btn {
  border: 1px solid rgba(255,255,255,0.1);
  border-left: none;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 0 10px 10px 0;
  color: #94a3b8;
  transition: all 0.3s ease;
}
.auth-body-inner .input-group-append .pw-toggle-btn:hover {
  background: rgba(255,255,255,0.05);
  color: #ffffff;
}
.auth-body-inner .input-group:focus-within .pw-toggle-btn {
  border-color: #8b5cf6;
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.25);
}

.forgot-link {
  font-size: 13px;
  font-weight: 500;
  color: #a5b4fc;
  text-decoration: none;
  transition: all 0.2s;
}
.forgot-link:hover {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.auth-footer { 
  text-align: center; 
  padding: 24px 32px; 
  font-size: 13px; 
  color: #64748b; 
  background: rgba(15, 23, 42, 0.3);
  border-top: 1px solid rgba(255,255,255,0.05); 
}
.auth-footer a { color: #a5b4fc; font-weight: 500; transition: color 0.2s; }
.auth-footer a:hover { color: #ffffff; }

/* ══════════════════════════════
   DASHBOARD
   ══════════════════════════════ */
.period-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.period-tab { padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; border: 1.5px solid var(--border); color: var(--text-muted); cursor: pointer; transition: var(--transition); background: var(--bg-card); }
.period-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.period-tab:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

.chart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 24px; }
.chart-container { position: relative; height: 260px; }

.tables-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ══════════════════════════════
   PAGINATION
   ══════════════════════════════ */
.pagination { display: flex; gap: 4px; align-items: center; }
.page-btn { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; border: 1.5px solid var(--border); background: var(--bg-card); color: var(--text); transition: var(--transition); }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ══════════════════════════════
   LOADING
   ══════════════════════════════ */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: var(--text-muted); gap: 10px; }
.spinner { width: 20px; height: 20px; border: 2.5px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ══════════════════════════════
   UTILITIES
   ══════════════════════════════ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-success{ color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning{ color: var(--warning); }
.fw-bold     { font-weight: 700; }
.fw-semi     { font-weight: 600; }
.fs-sm       { font-size: 12.5px; }
.fs-lg       { font-size: 16px; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 24px; }
.mb-4 { margin-bottom: 24px; }
.p-4  { padding: 24px; }
.w-100{ width: 100%; }

/* ══════════════════════════════
   PRODUCT CARDS (Products page)
   ══════════════════════════════ */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.product-card-thumb {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.product-card-thumb:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.product-thumb-img { width: 100%; height: 140px; object-fit: cover; background: var(--bg); }
.product-thumb-body { padding: 12px; }
.product-thumb-name { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.product-thumb-sku  { font-size: 11px; color: var(--text-muted); }
.product-thumb-price{ font-size: 15px; font-weight: 700; color: var(--primary); margin: 6px 0; }
.product-thumb-stock{ font-size: 11.5px; color: var(--text-muted); }

/* ══════════════════════════════
   FILTER BAR
   ══════════════════════════════ */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 20px; }
.filter-bar .form-control { min-width: 140px; }
.filter-bar .form-group { margin-bottom: 0; }

/* ══════════════════════════════
   RESPONSIVE
   ══════════════════════════════ */
@media (max-width: 1024px) {
  .chart-grid  { grid-template-columns: 1fr; }
  .tables-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-240px); width: 240px; }
  .sidebar.open { transform: translateX(0); --sidebar-w: 240px; }
  .sidebar-toggle { display: flex; }
  .main-wrapper { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
  .filter-bar .form-control { width: 100%; }
}

/* ══════════════════════════════
   SETUP PAGE
   ══════════════════════════════ */
.setup-steps { display: flex; gap: 6px; margin-bottom: 24px; }
.setup-step { flex: 1; height: 4px; border-radius: 2px; background: var(--border); }
.setup-step.active { background: var(--primary); }
