/* =====================================================
   POSify — Main Stylesheet
   Design: Dark industrial with electric accents
   ===================================================== */

:root {
  --bg-base:       #0d0f14;
  --bg-surface:    #141720;
  --bg-elevated:   #1c2030;
  --bg-hover:      #242840;
  --border:        #2a2f45;
  --border-light:  #343a55;

  --accent:        #5b6ef5;
  --accent-bright: #7b8eff;
  --accent-glow:   rgba(91, 110, 245, 0.25);
  --accent-dim:    rgba(91, 110, 245, 0.12);

  --green:         #22d3a0;
  --green-dim:     rgba(34, 211, 160, 0.12);
  --red:           #f5365c;
  --red-dim:       rgba(245, 54, 92, 0.12);
  --yellow:        #f5a623;
  --yellow-dim:    rgba(245, 166, 35, 0.12);
  --cyan:          #22d3ee;
  --purple:        #a78bfa;

  --text-primary:  #e8eaf5;
  --text-secondary:#8a90b0;
  --text-muted:    #555c7a;

  --sidebar-w:     260px;
  --topbar-h:      64px;
  --radius:        10px;
  --radius-lg:     16px;
  --shadow:        0 4px 24px rgba(0,0,0,0.4);
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.3);

  --font-display:  'Syne', sans-serif;
  --font-body:     'DM Sans', sans-serif;
}

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

html { font-size: 15px; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-bright); text-decoration: none; }
a:hover { color: var(--accent); }

/* ===================== LAYOUT ===================== */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ===================== SIDEBAR ===================== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

.brand-icon {
  font-size: 1.5rem;
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent));
}

.sidebar-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 32px; height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.sidebar-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }

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

.nav-section {
  margin-bottom: 8px;
}

.nav-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 8px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  margin-bottom: 1px;
  text-decoration: none;
  position: relative;
}

.nav-item i { width: 18px; text-align: center; font-size: 0.9rem; }

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent-bright);
  border: 1px solid rgba(91, 110, 245, 0.2);
}
.nav-item.active i { color: var(--accent); }

.nav-item--highlight {
  background: var(--accent-dim);
  color: var(--accent-bright) !important;
  border: 1px solid rgba(91, 110, 245, 0.25);
  font-weight: 600;
}
.nav-item--highlight:hover { background: var(--accent-glow); }

.nav-item--danger { color: var(--red) !important; }
.nav-item--danger:hover { background: var(--red-dim); }

.badge {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
}
.badge--warn { background: var(--yellow-dim); color: var(--yellow); }
.badge--danger { background: var(--red-dim); color: var(--red); }
.badge--success { background: var(--green-dim); color: var(--green); }
.badge--info { background: var(--accent-dim); color: var(--accent-bright); }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.user-avatar {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  color: #fff;
  flex-shrink: 0;
}

.user-info { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.7rem; color: var(--text-muted); }

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

.topbar {
  height: var(--topbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
}

.topbar-left { display: flex; align-items: center; gap: 14px; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-secondary); font-size: 1.1rem; cursor: pointer; }
.page-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; }

.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-info { display: flex; align-items: center; gap: 16px; }
.topbar-date, .topbar-biz { font-size: 0.78rem; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.topbar-biz { color: var(--text-secondary); }

.page-content {
  flex: 1;
  padding: 24px;
  max-width: 1600px;
  width: 100%;
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-bright); box-shadow: 0 0 16px var(--accent-glow); }

.btn-success { background: var(--green); color: #0a1a14; border-color: var(--green); }
.btn-success:hover { filter: brightness(1.1); }

.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { filter: brightness(1.1); }

.btn-warning { background: var(--yellow); color: #1a0d00; border-color: var(--yellow); }
.btn-warning:hover { filter: brightness(1.1); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-light); }

.btn-outline {
  background: transparent;
  color: var(--accent-bright);
  border-color: var(--accent);
}
.btn-outline:hover { background: var(--accent-dim); }

.btn-pos {
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.82rem;
  box-shadow: 0 0 12px var(--accent-glow);
}
.btn-pos:hover { background: var(--accent-bright); box-shadow: 0 0 20px var(--accent-glow); color: #fff; }

.btn-sm { padding: 5px 10px; font-size: 0.78rem; }
.btn-lg { padding: 12px 24px; font-size: 0.95rem; }
.btn-icon { padding: 7px; }

/* ===================== CARDS ===================== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--border); }

/* ===================== STAT CARDS ===================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.stat-card.accent::before { background: var(--accent); }
.stat-card.green::before { background: var(--green); }
.stat-card.red::before { background: var(--red); }
.stat-card.yellow::before { background: var(--yellow); }
.stat-card.purple::before { background: var(--purple); }

.stat-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.stat-icon.accent { background: var(--accent-dim); color: var(--accent); }
.stat-icon.green { background: var(--green-dim); color: var(--green); }
.stat-icon.red { background: var(--red-dim); color: var(--red); }
.stat-icon.yellow { background: var(--yellow-dim); color: var(--yellow); }
.stat-icon.purple { background: rgba(167,139,250,0.12); color: var(--purple); }

.stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.stat-value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; color: var(--text-primary); line-height: 1.1; }
.stat-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.stat-change { font-size: 0.75rem; font-weight: 600; margin-top: 2px; }
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red); }

/* ===================== TABLES ===================== */
.table-wrapper { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead tr { border-bottom: 2px solid var(--border); }
thead th {
  padding: 12px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
tbody tr:hover { background: var(--bg-hover); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 12px 14px;
  color: var(--text-secondary);
  vertical-align: middle;
}
tbody td:first-child { color: var(--text-primary); font-weight: 500; }

/* ===================== FORMS ===================== */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; gap: 16px; margin-bottom: 16px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
input[type="search"],
select,
textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 9px 12px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

input::placeholder { color: var(--text-muted); }
select option { background: var(--bg-elevated); }
textarea { resize: vertical; min-height: 80px; }

.input-group { position: relative; }
.input-group .input-addon {
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}
.input-group input { padding-left: 32px; }
.input-group .input-addon-right {
  position: absolute;
  right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
}

/* ===================== MODALS ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
  box-shadow: var(--shadow);
}
.modal--sm { max-width: 420px; }
.modal--lg { max-width: 900px; }
.modal--xl { max-width: 1100px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.modal-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.2rem; cursor: pointer; padding: 4px;
  border-radius: 6px; transition: all 0.2s;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.modal-body { padding: 22px; }
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
}

/* ===================== STATUS PILLS ===================== */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.status-pill.paid, .status-pill.received, .status-pill.active { background: var(--green-dim); color: var(--green); }
.status-pill.credit, .status-pill.pending { background: var(--yellow-dim); color: var(--yellow); }
.status-pill.partial { background: rgba(34, 211, 238, 0.12); color: var(--cyan); }
.status-pill.danger, .status-pill.inactive { background: var(--red-dim); color: var(--red); }

/* ===================== SEARCH BAR ===================== */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 12px;
  min-width: 240px;
}
.search-bar i { color: var(--text-muted); font-size: 0.85rem; }
.search-bar input {
  background: none; border: none; box-shadow: none;
  padding: 9px 0; font-size: 0.875rem;
}
.search-bar input:focus { box-shadow: none; border: none; }

/* ===================== ALERTS ===================== */
.alert {
  padding: 12px 16px;
  border-radius: 9px;
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: var(--green-dim); border: 1px solid rgba(34,211,160,0.2); color: var(--green); }
.alert-danger { background: var(--red-dim); border: 1px solid rgba(245,54,92,0.2); color: var(--red); }
.alert-warning { background: var(--yellow-dim); border: 1px solid rgba(245,166,35,0.2); color: var(--yellow); }
.alert-info { background: var(--accent-dim); border: 1px solid rgba(91,110,245,0.2); color: var(--accent-bright); }

/* ===================== PAGINATION ===================== */
.pagination {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.pagination a, .pagination span {
  min-width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px; font-size: 0.82rem; font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.2s;
  text-decoration: none;
}
.pagination a:hover { background: var(--bg-hover); color: var(--text-primary); }
.pagination .active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .disabled { opacity: 0.4; pointer-events: none; }

/* ===================== TOAST ===================== */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  min-width: 280px;
  box-shadow: var(--shadow);
  animation: slideInRight 0.3s ease;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--accent); }
.toast-icon.success { color: var(--green); }
.toast-icon.error { color: var(--red); }
.toast-icon.info { color: var(--accent); }

/* ===================== POS SPECIFIC ===================== */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
  height: calc(100vh - var(--topbar-h) - 48px);
}

.pos-products {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pos-search-bar {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
}

.pos-categories {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pos-categories::-webkit-scrollbar { display: none; }

.cat-btn {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.cat-btn:hover, .cat-btn.active {
  background: var(--accent-dim);
  color: var(--accent-bright);
  border-color: var(--accent);
}

.pos-product-grid {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  align-content: start;
}

.product-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  user-select: none;
}
.product-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.product-card.out-of-stock { opacity: 0.5; pointer-events: none; }

.product-card-img {
  width: 48px; height: 48px;
  border-radius: 8px;
  background: var(--bg-surface);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px;
  font-size: 1.4rem;
}
.product-card-name { font-size: 0.78rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; line-height: 1.3; }
.product-card-price { font-size: 0.875rem; font-weight: 700; color: var(--accent-bright); }
.product-card-stock { font-size: 0.7rem; color: var(--text-muted); }

/* POS Cart */
.pos-cart {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cart-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-title { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }

.cart-items { flex: 1; overflow-y: auto; padding: 10px; }

.cart-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  margin-bottom: 8px;
  transition: all 0.2s;
}
.cart-item:hover { border-color: var(--border-light); }

.cart-item-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.cart-item-name { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); flex: 1; line-height: 1.3; }
.cart-item-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.85rem; padding: 2px; transition: color 0.2s; }
.cart-item-remove:hover { color: var(--red); }

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.qty-btn { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-primary); font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.qty-btn:hover { background: var(--accent-dim); border-color: var(--accent); color: var(--accent-bright); }
.qty-display { font-size: 0.875rem; font-weight: 700; min-width: 28px; text-align: center; }
.cart-item-price { margin-left: auto; font-size: 0.875rem; font-weight: 700; color: var(--accent-bright); }

.cart-discount-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cart-discount-row label { font-size: 0.7rem; color: var(--text-muted); margin: 0; white-space: nowrap; }
.cart-discount-row input { padding: 4px 8px; font-size: 0.78rem; }

.cart-totals {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.total-row { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 0.82rem; color: var(--text-secondary); }
.total-row.grand { font-size: 1.1rem; font-weight: 800; color: var(--text-primary); font-family: var(--font-display); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }

.cart-actions {
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-top: 1px solid var(--border);
}

.cart-customer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
}
.cart-customer select { flex: 1; }

/* ===================== CHARTS ===================== */
.chart-container { position: relative; }

/* ===================== EMPTY STATE ===================== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 12px; opacity: 0.4; display: block; }
.empty-state h3 { font-size: 1rem; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 0.85rem; }

/* ===================== MISC ===================== */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 24px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-accent { color: var(--accent-bright); }
.font-bold { font-weight: 700; }
.font-display { font-family: var(--font-display); }
.w-full { width: 100%; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar-right { margin-left: auto; display: flex; gap: 10px; }

/* ===================== ANIMATIONS ===================== */
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
@keyframes slideInRight { from { transform: translateX(100px); opacity: 0 } to { transform: translateX(0); opacity: 1 } }
@keyframes spin { to { transform: rotate(360deg) } }
.spin { animation: spin 1s linear infinite; }

.loading {
  display: flex; align-items: center; justify-content: center;
  padding: 40px; color: var(--text-muted); gap: 10px;
}

/* ===================== PRINT ===================== */
@media print {
  .sidebar, .topbar, .btn, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  body { background: white; color: black; }
  .card { border: 1px solid #ccc; }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .pos-layout { grid-template-columns: 1fr 340px; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-menu-btn { display: flex; }
  .topbar-info { display: none; }
  .pos-layout { grid-template-columns: 1fr; height: auto; }
  .form-row.cols-3, .form-row.cols-4 { grid-template-columns: 1fr 1fr; }
  .form-row.cols-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-content { padding: 16px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
