/* =============================================
   DOLLAR STORE POS — Main Stylesheet
   Theme engine via CSS custom properties
   ============================================= */

:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: #d1fae5;
  --sidebar-bg: #1e293b;
  --sidebar-width: 260px;
  --content-bg: #f1f5f9;
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
  --info: #3b82f6;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--content-bg);
  color: var(--text-primary);
  display: flex;
  font-size: 14px;
  line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

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

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;           /* fixed height so overflow-y:auto works */
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
}
/* Thin custom scrollbar inside sidebar */
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }

.sidebar-header {
  padding: 22px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.sidebar-logo {
  width: 42px; height: 42px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
  letter-spacing: -0.5px;
}
.sidebar-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }

.sidebar-title-area { overflow: hidden; }
.sidebar-store-name {
  color: white;
  font-size: 14px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-tagline {
  color: rgba(255,255,255,.4);
  font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}

.sidebar-nav { flex: 1; padding: 14px 10px; }

.nav-section-label {
  color: rgba(255,255,255,.28);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 14px 10px 5px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: rgba(255,255,255,.6);
  font-size: 13.5px; font-weight: 500;
  margin-bottom: 1px;
  transition: all var(--transition);
  cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: white; }
.nav-item.active { background: var(--primary); color: white; }
.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: 11px;
  color: rgba(255,255,255,.2);
  flex-shrink: 0;
}

/* ── Sidebar User Section ── */
.sidebar-user-section {
  margin: 10px 10px 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.sidebar-user-avatar {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  color: white; flex-shrink: 0; letter-spacing: -0.5px;
}
.sidebar-user-info { flex: 1; overflow: hidden; }
.sidebar-user-name {
  font-size: 13px; font-weight: 600;
  color: white;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-user-role {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  margin-top: 1px;
}
.role-admin   { color: #fbbf24; }
.role-cashier { color: #34d399; }

.sidebar-logout-btn {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,.07);
  border: none; cursor: pointer;
  color: rgba(255,255,255,.45);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: all var(--transition);
}
.sidebar-logout-btn:hover { background: rgba(239,68,68,.3); color: #ef4444; }

/* ── Login Page ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--content-bg);
}
.login-box {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
}
.login-logo {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
  color: white;
  margin: 0 auto 20px;
}
.login-title    { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 4px; }
.login-subtitle { font-size: 13px; color: var(--text-secondary); text-align: center; margin-bottom: 28px; }
.login-error {
  background: #fee2e2;
  color: #991b1b;
  border-left: 3px solid #ef4444;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}

/* ── Users Page ── */
.user-avatar-sm {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white;
  flex-shrink: 0;
}
.role-badge-admin   { background: #fef3c7; color: #92400e; }
.role-badge-cashier { background: #d1fae5; color: #065f46; }

.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 199;
}

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

/* ── Topbar ── */
.topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 62px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-title { font-size: 18px; font-weight: 700; }
.topbar-subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ── Page Content ── */
.page-content { padding: 22px 24px; flex: 1; }

/* ── Cards ── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-title { font-size: 14px; font-weight: 700; }
.card-body { padding: 20px; }

/* ── Stat Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px;
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-icon.green  { background: #d1fae5; }
.stat-icon.blue   { background: #dbeafe; }
.stat-icon.orange { background: #fef3c7; }
.stat-icon.red    { background: #fee2e2; }
.stat-icon.purple { background: #ede9fe; }
.stat-icon.teal   { background: #ccfbf1; }

.stat-value { font-size: 22px; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; border: none;
  transition: all var(--transition);
  white-space: nowrap; line-height: 1.4;
}
.btn-primary  { background: var(--primary); color: white; }
.btn-primary:hover  { filter: brightness(1.08); }
.btn-secondary { background: var(--content-bg); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger   { background: var(--danger); color: white; }
.btn-danger:hover   { filter: brightness(1.08); }
.btn-warning  { background: var(--warning); color: white; }
.btn-warning:hover  { filter: brightness(1.08); }
.btn-success  { background: var(--success); color: white; }
.btn-info     { background: var(--info); color: white; }
.btn-outline  { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover  { background: var(--primary); color: white; }
.btn-ghost    { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover    { background: var(--content-bg); color: var(--text-primary); }
.btn-sm  { padding: 5px 11px; font-size: 12px; }
.btn-lg  { padding: 11px 22px; font-size: 15px; }
.btn-xl  { padding: 14px 28px; font-size: 16px; }
.btn-icon { padding: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none !important; }

/* ── Forms ── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%; padding: 8px 11px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 13.5px;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: white; color: var(--text-primary);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16,185,129,.12);
}
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ── Tables ── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--content-bg);
  padding: 10px 14px;
  text-align: left;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbfc; }

/* ── Modals ── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.48);
  z-index: 1000;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn .2s ease;
}
.modal-lg { max-width: 760px; }
.modal-sm { max-width: 420px; }
.modal-xl { max-width: 960px; }
@keyframes modalIn { from { transform: translateY(-16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: white; z-index: 1;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px;
  border-radius: var(--radius);
  background: var(--content-bg); border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--text-secondary);
  transition: all var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--text-primary); }
.modal-body { padding: 22px; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
}

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-gray    { background: var(--content-bg); color: var(--text-secondary); }
.badge-primary { background: var(--primary-light); color: var(--primary); }

/* ── Search ── */
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--content-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 12px;
  min-width: 240px;
  transition: border-color var(--transition);
}
.search-box:focus-within { border-color: var(--primary); }
.search-box input { background: none; border: none; outline: none; font-size: 13.5px; flex: 1; color: var(--text-primary); }
.search-box .search-icon { color: var(--text-muted); font-size: 15px; }

/* ── Barcode ── */
.barcode-container {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px; background: var(--content-bg);
  border-radius: var(--radius); border: 1px solid var(--border);
}
.barcode-number { font-family: monospace; font-size: 13px; color: var(--text-secondary); letter-spacing: 2px; }

/* ── Toast ── */
.toast-container {
  position: fixed; bottom: 22px; right: 22px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius);
  background: #1e293b; color: white;
  font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease;
  min-width: 250px; max-width: 360px;
}
.toast.success { background: #064e3b; border-left: 3px solid #10b981; }
.toast.error   { background: #7f1d1d; border-left: 3px solid #ef4444; }
.toast.warning { background: #78350f; border-left: 3px solid #f59e0b; }
.toast.info    { background: #1e3a5f; border-left: 3px solid #3b82f6; }
.toast-icon    { font-size: 16px; flex-shrink: 0; }
@keyframes toastIn  { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { to   { transform: translateX(110%); opacity: 0; } }

/* ── POS Layout ── */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: 16px;
  height: calc(100vh - 62px);
}
.pos-left {
  display: flex; flex-direction: column; gap: 12px;
  overflow: hidden;
}
.scanner-wrapper {
  background: #0f172a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  flex: 1;
  min-height: 260px;
  display: flex; flex-direction: column;
}
.scanner-video-area {
  flex: 1; position: relative; background: #000;
  display: flex; align-items: center; justify-content: center;
}
#scanner-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: rgba(255,255,255,.4);
  gap: 10px;
}
.scanner-placeholder .icon { font-size: 48px; opacity: 0.5; }
.scanner-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.scanner-frame {
  width: 260px; height: 160px;
  border: 2px solid var(--primary);
  border-radius: 12px;
  position: relative;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.35);
}
.scanner-line {
  position: absolute; left: 4px; right: 4px;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  animation: scanLine 1.8s linear infinite;
}
@keyframes scanLine { 0% { top: 8%; } 100% { top: 90%; } }
.scanner-controls {
  padding: 12px 16px;
  background: rgba(0,0,0,.6);
  display: flex; gap: 8px; align-items: center;
}
.scanner-status {
  font-size: 12px; color: rgba(255,255,255,.6);
  flex: 1; text-align: center;
}

/* Manual barcode input row */
.barcode-input-row {
  display: flex; gap: 8px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  box-shadow: var(--shadow);
}
.barcode-input-row input { flex: 1; }

/* Product search results */
.product-search-results {
  background: white; border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
  flex: 1; display: flex; flex-direction: column;
}

/* Cart Panel */
.cart-panel {
  background: white; border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow); overflow: hidden;
}
.cart-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.cart-items { flex: 1; overflow-y: auto; padding: 10px; }
.cart-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; color: var(--text-muted); gap: 10px; padding: 30px;
  text-align: center;
}
.cart-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px; border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 7px; background: white;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-price { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.cart-qty {
  display: flex; align-items: center; gap: 5px; flex-shrink: 0; margin-top: 2px;
}
.qty-btn {
  width: 24px; height: 24px;
  border-radius: 6px; border: 1.5px solid var(--border);
  background: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; line-height: 1;
  transition: all var(--transition); color: var(--text-primary);
}
.qty-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.qty-num { min-width: 24px; text-align: center; font-weight: 700; font-size: 13px; }
.cart-item-subtotal { font-size: 13px; font-weight: 700; flex-shrink: 0; }
.remove-item-btn { color: var(--text-muted); cursor: pointer; font-size: 16px; line-height: 1; flex-shrink: 0; transition: color var(--transition); }
.remove-item-btn:hover { color: var(--danger); }

.cart-footer { padding: 14px 16px; border-top: 1px solid var(--border); flex-shrink: 0; }
.cart-totals { margin-bottom: 12px; }
.total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; font-size: 13px; }
.total-row.grand { font-size: 17px; font-weight: 800; padding-top: 8px; border-top: 2px solid var(--border); margin-top: 8px; }
.payment-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }

/* ── Receipt ── */
.receipt {
  font-family: 'Courier New', monospace;
  max-width: 320px; margin: 0 auto;
  padding: 20px; background: white;
  font-size: 13px; line-height: 1.6;
}
.receipt-header { text-align: center; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed #ccc; }
.receipt-store { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.receipt-items { margin: 12px 0; }
.receipt-item { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.receipt-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt-divider { border: none; border-top: 1px dashed #ccc; margin: 10px 0; }
.receipt-totals { }
.receipt-total-row { display: flex; justify-content: space-between; gap: 8px; }
.receipt-total-row.grand { font-weight: 700; font-size: 15px; margin-top: 4px; }
.receipt-footer { text-align: center; margin-top: 14px; padding-top: 12px; border-top: 1px dashed #ccc; color: #666; font-size: 12px; }

/* ── Charts ── */
.chart-container { position: relative; height: 280px; }
.chart-container-sm { position: relative; height: 200px; }

/* ── Color Palette ── */
.color-palette { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.color-swatch {
  width: 30px; height: 30px; border-radius: 8px;
  cursor: pointer; border: 3px solid transparent;
  transition: transform .15s, border-color .15s;
}
.color-swatch:hover { transform: scale(1.12); }
.color-swatch.selected { border-color: var(--text-primary); }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-secondary); }
.empty-state .es-icon { font-size: 44px; margin-bottom: 14px; opacity: .35; }
.empty-state h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.empty-state p  { font-size: 13px; }

/* ── Alert ── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 13px;
}
.alert-warning { background: #fef3c7; border-left: 3px solid var(--warning); color: #78350f; }
.alert-danger  { background: #fee2e2; border-left: 3px solid var(--danger);  color: #991b1b; }
.alert-success { background: #d1fae5; border-left: 3px solid var(--success); color: #065f46; }
.alert-info    { background: #dbeafe; border-left: 3px solid var(--info);    color: #1e40af; }

/* ── Tag ── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 6px;
  background: var(--content-bg); border: 1px solid var(--border);
  font-size: 12px; font-weight: 500;
}

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── Hamburger ── */
.hamburger { display: none; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.show { display: block; }
  .main-content { margin-left: 0; }
  .hamburger { display: flex; }
  .pos-layout { grid-template-columns: 1fr; height: auto; }
}
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .page-content { padding: 14px 16px; }
  .topbar { padding: 0 16px; }
  .modal { max-width: 100%; margin: 0; max-height: 100vh; border-radius: 0; }
}

/* ── Utilities ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mr-2 { margin-right: 8px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 12.5px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-muted    { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-danger   { color: var(--danger); }
.text-success  { color: var(--success); }
.text-warning  { color: var(--warning); }
.text-primary-color { color: var(--primary); }
.font-bold   { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.rounded { border-radius: var(--radius); }
.rounded-full { border-radius: 9999px; }
.overflow-hidden { overflow: hidden; }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }
.opacity-50 { opacity: .5; }

/* ── Print ── */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main-content { margin-left: 0; }
  body { background: white; }
}
