/* ==========================================
   ALTITUDE GEAR POS - STYLE SYSTEM
   Theme: Red & Black Premium Dark
   ========================================== */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Colors - Red Palette */
  --red-50: #fef2f2;
  --red-100: #fee2e2;
  --red-200: #fecaca;
  --red-300: #fca5a5;
  --red-400: #f87171;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --red-800: #991b1b;
  --red-900: #7f1d1d;
  --red-primary: #FF0000;
  --brand-red: #E10600;

  /* Background */
  --bg-body: #050505;
  --bg-sidebar: #0a0a0a;
  --bg-main: #0d0d0d;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --bg-input: #1a1a1a;
  --bg-input-focus: #1e1e1e;
  --bg-table-header: #111111;
  --bg-table-row-hover: rgba(255, 0, 0, 0.04);
  --bg-modal: #161616;

  /* Borders */
  --border-color: #222222;
  --border-color-light: #2a2a2a;
  --border-red: rgba(255, 0, 0, 0.2);
  --border-red-strong: rgba(255, 0, 0, 0.4);

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --text-red: #ff3333;

  /* Accents */
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);

  /* Glow Effects */
  --glow-red: 0 0 20px rgba(255, 0, 0, 0.15);
  --glow-red-strong: 0 0 30px rgba(255, 0, 0, 0.25);
  --glow-red-subtle: 0 0 10px rgba(255, 0, 0, 0.08);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.7);

  /* Layout */
  --sidebar-width: 260px;
  --header-height: 60px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;

  /* Font */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color-light);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--red-800);
}

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

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  transition: transform var(--transition-normal);
}

.sidebar-header {
  padding: 24px 20px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.logo-svg {
  width: 140px;
  height: auto;
  margin-bottom: 4px;
  filter: drop-shadow(0 0 8px rgba(255, 0, 0, 0.3));
}

.sidebar-subtitle {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 6px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 0, 0, 0.06);
}

.nav-item.active {
  color: var(--red-primary);
  background: rgba(255, 0, 0, 0.1);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--red-primary);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-footer .btn-primary {
  width: 100%;
  justify-content: center;
}

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

.sidebar-footer-row .btn {
  flex: 1;
  justify-content: center;
  font-size: 0.75rem;
  padding: 5px 8px;
}

/* ===== MOBILE HEADER ===== */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  z-index: 90;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all var(--transition-fast);
}

.mobile-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-logo svg {
  height: 28px;
  width: auto;
}

.mobile-logo span {
  font-weight: 800;
  font-size: 1rem;
  color: var(--red-primary);
  letter-spacing: 2px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 95;
  backdrop-filter: blur(2px);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  padding: 32px;
  background: var(--bg-main);
}

/* ===== PAGES ===== */
.page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--red-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

.btn-primary:hover {
  background: #e60000;
  box-shadow: 0 4px 16px rgba(255, 0, 0, 0.4);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color-light);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-red);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color-light);
}

.btn-outline:hover {
  color: var(--text-primary);
  border-color: var(--border-red);
  background: rgba(255, 0, 0, 0.05);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  padding: 4px 8px;
  line-height: 1;
  transition: color var(--transition-fast);
}

.btn-close:hover {
  color: var(--red-primary);
}

.btn-icon-sm {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px;
  border-radius: 6px;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-sm:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-icon-sm.btn-icon-danger:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

.btn-icon-sm.btn-icon-edit:hover {
  color: var(--warning);
  background: var(--warning-bg);
}

.btn-icon-sm svg {
  width: 16px;
  height: 16px;
}

/* ===== STAT CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.stat-card:hover {
  border-color: var(--border-red);
  box-shadow: var(--glow-red-subtle);
  transform: translateY(-2px);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-omset::before { background: linear-gradient(90deg, var(--red-primary), var(--red-600)); }
.stat-modal::before { background: linear-gradient(90deg, var(--warning), #d97706); }
.stat-laba::before { background: linear-gradient(90deg, var(--success), #16a34a); }
.stat-terjual::before { background: linear-gradient(90deg, #8b5cf6, #6d28d9); }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-omset .stat-icon { background: rgba(255, 0, 0, 0.1); color: var(--red-primary); }
.stat-modal .stat-icon { background: var(--warning-bg); color: var(--warning); }
.stat-laba .stat-icon { background: var(--success-bg); color: var(--success); }
.stat-terjual .stat-icon { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== CHARTS ===== */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
}

.chart-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.chart-wrapper {
  position: relative;
  height: 280px;
}

.chart-wrapper-sm {
  height: 240px;
}

.chart-empty {
  display: none;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-muted);
  font-style: italic;
}

.chart-empty.visible {
  display: flex;
}

/* ===== SECTION CARD ===== */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 20px;
}

.section-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input-wrapper svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrapper input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--red-primary);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.search-input-wrapper input::placeholder {
  color: var(--text-muted);
}

select {
  padding: 10px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  min-width: 180px;
  transition: all var(--transition-fast);
}

select:focus {
  outline: none;
  border-color: var(--red-primary);
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

/* ===== DATA TABLE ===== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
}

.data-table {
  width: 100%;
  font-size: 0.85rem;
}

.data-table thead {
  background: var(--bg-table-header);
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover:not(.empty-row) {
  background: var(--bg-table-row-hover);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.barcode-text {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--text-red);
  cursor: pointer;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.barcode-text:hover {
  color: var(--red-primary);
  text-decoration: underline;
}

.product-name-cell {
  font-weight: 600;
  max-width: 250px;
}

.brand-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.2);
}

.category-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 0, 0, 0.08);
  color: var(--red-400);
  border: 1px solid rgba(255, 0, 0, 0.15);
}

.margin-positive {
  color: var(--success);
  font-weight: 600;
}

.margin-negative {
  color: var(--danger);
  font-weight: 600;
}

.stock-low {
  color: var(--warning);
  font-weight: 700;
}

.stock-out {
  color: var(--danger);
  font-weight: 700;
}

.action-btns {
  display: flex;
  gap: 4px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-row td {
  background: transparent !important;
}

/* ===== POS LAYOUT ===== */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  min-height: calc(100vh - 160px);
}

.pos-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pos-input-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px;
}

.barcode-input-group {
  display: flex;
  gap: 8px;
}

.barcode-input-group .search-input-wrapper {
  flex: 1;
}

.scanner-container {
  margin-top: 12px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  display: none;
}

.scanner-container.active {
  display: block;
}

.scanner-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
}

.scanner-count {
  background: var(--red-primary);
  color: white;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
}

.pos-search-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px;
}

.pos-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  flex: 1;
}

.pos-product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  cursor: pointer;
  min-height: 110px;
  -webkit-tap-highlight-color: rgba(255,0,0,0.15);
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pos-product-card:hover {
  border-color: var(--border-red-strong);
  box-shadow: var(--glow-red-subtle);
  transform: translateY(-2px);
}

.pos-product-card.out-of-stock {
  opacity: 0.4;
  pointer-events: none;
}

.pos-product-card .product-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}

.pos-product-card:active {
  transform: scale(0.97);
  background: var(--bg-input);
}

.pos-product-card .product-card-category {
  font-size: 0.7rem;
  color: var(--red-400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pos-product-card .product-card-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--red-primary);
}

.pos-product-card .product-card-stock {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== CART PANEL ===== */
.pos-right {
  position: sticky;
  top: 32px;
  height: fit-content;
}

.cart-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 100px);
}

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

.cart-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.cart-badge {
  background: var(--red-primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  min-width: 24px;
  text-align: center;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  max-height: 400px;
  min-height: 200px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.cart-item:hover {
  border-color: var(--border-red);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-item-qty button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 1.1rem;
  -webkit-tap-highlight-color: rgba(255,0,0,0.2);
  touch-action: manipulation;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.cart-item-qty button:hover {
  border-color: var(--red-primary);
  color: var(--red-primary);
}

.cart-item-qty span {
  min-width: 36px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
}

.cart-item-qty button:active {
  transform: scale(0.92);
  background: var(--red-primary);
  color: white;
  border-color: var(--red-primary);
}

.cart-item-subtotal {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--red-400);
  white-space: nowrap;
}

.cart-item-remove {
  color: var(--text-muted);
  background: none;
  border: none;
  min-width: 36px;
  min-height: 36px;
  padding: 4px;
  font-size: 1.1rem;
  transition: color var(--transition-fast);
  -webkit-tap-highlight-color: rgba(255,0,0,0.2);
  touch-action: manipulation;
}

.cart-item-remove:hover {
  color: var(--danger);
}

.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.cart-total-row {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  padding: 12px 0;
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
}

.cart-total-row span:last-child {
  color: var(--red-primary);
}

.cart-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.cart-actions .btn-lg {
  flex: 1;
}

/* ===== DATE PICKER ===== */
.date-picker-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.date-picker-group label {
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.date-input {
  padding: 10px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.date-input:focus {
  outline: none;
  border-color: var(--red-primary);
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

/* ===== RECENT TRANSACTIONS ===== */
.recent-tx-list {
  max-height: 350px;
  overflow-y: auto;
}

.tx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

.tx-item:hover {
  background: var(--bg-table-row-hover);
}

.tx-item:last-child {
  border-bottom: none;
}

.tx-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tx-id {
  font-weight: 700;
  font-size: 0.85rem;
}

.tx-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tx-items-count {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.tx-amount {
  font-weight: 800;
  color: var(--red-primary);
  font-size: 1rem;
}

/* ===== REPORT TRANSACTIONS ===== */
.report-tx-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  margin-bottom: 12px;
  transition: all var(--transition-fast);
}

.report-tx-item:hover {
  border-color: var(--border-red);
}

.report-tx-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.report-tx-id {
  font-weight: 700;
  font-size: 0.9rem;
}

.report-tx-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.report-tx-products {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.report-tx-product {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.report-tx-product-name {
  color: var(--text-secondary);
}

.report-tx-product-detail {
  color: var(--text-primary);
  font-weight: 600;
}

.report-tx-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
  font-weight: 800;
}

.report-tx-total span:last-child {
  color: var(--red-primary);
  font-size: 1.1rem;
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Confirm dialog harus selalu di atas modal lain (jangan tertutup) */
#confirm-modal {
  z-index: 2000;
}

.modal {
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-sm {
  max-width: 420px;
}

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

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-body {
  padding: 24px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

/* ===== FORMS ===== */
form {
  padding: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="number"] {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-group input:focus {
  outline: none;
  border-color: var(--red-primary);
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
  background: var(--bg-input-focus);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.input-with-btn {
  display: flex;
  gap: 8px;
}

.input-with-btn input {
  flex: 1;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.form-preview {
  margin-top: 16px;
  padding: 16px;
  background: white;
  border-radius: var(--border-radius-sm);
  text-align: center;
}

.form-preview label {
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 8px;
}

.form-preview svg {
  max-width: 100%;
}

/* ===== BARCODE DETAIL ===== */
.barcode-detail-body {
  text-align: center;
  padding: 24px;
}

.barcode-detail-body svg {
  max-width: 100%;
  background: white;
  padding: 16px;
  border-radius: var(--border-radius-sm);
}

.barcode-product-name {
  font-weight: 700;
  font-size: 1rem;
  margin-top: 12px;
}

.barcode-product-price {
  color: var(--red-primary);
  font-weight: 800;
  font-size: 1.1rem;
  margin-top: 4px;
}

/* ======== RECEIPT MODAL ======== */
.modal-receipt {
  max-width: 380px;
  background: white;
  color: #000;
}

.receipt {
  padding: 24px 20px;
  font-size: 0.85rem;
  font-family: 'IBM Plex Mono', 'Courier New', ui-monospace, monospace;
}

.receipt-header {
  text-align: center;
  margin-bottom: 12px;
}

.receipt-header svg {
  margin-bottom: -4px; /* tighter gap between logo mark and brand text */
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.receipt-header h2 {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 2px;
  color: var(--brand-red);
}

.receipt-subtitle {
  font-size: 0.75rem;
  color: #666;
}

.receipt-date, .receipt-id {
  font-size: 0.75rem;
  color: #888;
  margin-top: 2px;
}

.receipt-divider {
  border-top: 1px dashed #ccc;
  margin: 12px 0;
}

.receipt-items {
  font-size: 0.8rem;
}

.receipt-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.receipt-item-name {
  flex: 1;
}

.receipt-item-qty {
  color: #666;
  margin: 0 8px;
  white-space: nowrap;
}

.receipt-item-subtotal {
  font-weight: 600;
  white-space: nowrap;
}

.receipt-item-name {
  font-weight: 500;
  margin-bottom: 2px;
  display: block;
}


.receipt-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.receipt-total-row.total-final {
  font-weight: 900;
  font-size: 1.1rem;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

.receipt-footer {
  text-align: center;
  margin-top: 12px;
  font-size: 0.8rem;
  color: #888;
}

.receipt-brand {
  font-weight: 900;
  color: var(--red-primary);
  letter-spacing: 2px;
  margin-top: 4px;
}

.receipt-actions {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid #eee;
  justify-content: flex-end;
}

.receipt-actions .btn {
  color: #333;
}

.receipt-actions .btn-primary {
  background: var(--red-primary);
  color: white;
}

/* ======== LOGIN SCREEN ======== */
.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Solid fallback dulu (radial dark + pojok merah samar) + gambar gunung opsional di atasnya */
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 0, 0, 0.15), transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(255, 0, 0, 0.1), transparent 50%),
    linear-gradient(135deg, #0a0a0a 0%, #1a0a0a 50%, #0a0a0a 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Gambar background opsional sebagai layer terpisah — kalau gagal load, gradient di atas tetap aman */
.login-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.85)),
    url('https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&q=80&w=1920&ixlib=rb-4.0.3') center/cover no-repeat;
  z-index: -1;
  opacity: 0.9;
}

.login-card {
  /* Background lebih opak supaya readability terjaga walau backdrop hilang */
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 48px 40px;
  border-radius: 24px;
  border: 1px solid rgba(255, 0, 0, 0.2);
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(255, 0, 0, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 440px;
  position: relative;
  overflow: hidden;
  animation: floatUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-logo-svg {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 0 auto 20px;
  filter: drop-shadow(0 4px 12px rgba(255, 0, 0, 0.4));
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff0000, #ff6b6b, #ff0000);
}

.login-card h2 {
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  margin-bottom: 32px !important;
}

.login-card .form-group label {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-card .form-group input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.login-card .form-group input:focus {
  background: rgba(0, 0, 0, 0.6);
  border-color: #ff0000;
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.2);
}

.login-card .btn-primary {
  padding: 14px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 8px;
  margin-top: 16px !important;
  background: linear-gradient(135deg, #ff0000, #cc0000);
  border: none;
  box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
}

.login-card .btn-primary:hover {
  background: linear-gradient(135deg, #ff1a1a, #e60000);
  box-shadow: 0 12px 24px rgba(255, 0, 0, 0.4);
  transform: translateY(-2px);
}

@keyframes floatUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.discount-input {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  width: 100px;
  text-align: right;
  font-family: inherit;
}

.discount-input:focus {
  border-color: var(--primary);
  outline: none;
}

.cart-discount-row {
  margin-bottom: 8px;
  color: #ffaa00;
}

.checkout-summary p {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 15px;
}

.checkout-summary h3 {
  display: flex;
  justify-content: space-between;
  border-top: 1px dashed var(--border-color);
  padding-top: 10px;
}


.receipt-actions .btn-secondary {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

/* ===== CONFIRM DIALOG ===== */
.modal-confirm {
  max-width: 380px;
  text-align: center;
  padding: 32px 24px;
}

.confirm-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.modal-confirm h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-confirm p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.confirm-actions .btn {
  min-width: 100px;
}

/* ===== TOASTS ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  min-width: 260px;
  animation: toastIn 0.3s ease;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-success {
  background: #065f46;
  color: #d1fae5;
  border: 1px solid #059669;
}

.toast-error {
  background: #7f1d1d;
  color: #fee2e2;
  border: 1px solid #dc2626;
}

.toast-warning {
  background: #78350f;
  color: #fef3c7;
  border: 1px solid #d97706;
}

.toast-info {
  background: #1e1b4b;
  color: #e0e7ff;
  border: 1px solid #6366f1;
}

.toast-hide {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .pos-layout {
    grid-template-columns: 1fr 320px;
  }
}

@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    z-index: 100;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.active {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 16px;
    padding-top: calc(var(--header-height) + 16px);
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pos-layout {
    grid-template-columns: 1fr;
  }

  .pos-right {
    position: static;
  }

  .cart-panel {
    max-height: none;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .date-picker-group {
    width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .stat-value {
    font-size: 1.1rem;
  }

  .toast-container {
    top: auto;
    bottom: 20px;
    left: 20px;
    right: 20px;
  }

  .toast {
    min-width: auto;
  }
}

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

  .pos-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .pos-product-card {
    min-height: 130px;
    padding: 14px;
  }

  .cart-item-qty button {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .cart-item-remove {
    min-width: 44px;
    min-height: 44px;
  }

  #btn-scan-camera {
    min-width: 52px;
    min-height: 48px;
  }
}

/* ===== CONNECTIVITY INDICATOR ===== */
.connectivity-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 16px 6px;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
}

.connectivity-indicator.online {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.3);
  color: #4ade80;
}

.connectivity-indicator.offline {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.4);
  color: #f87171;
}

.connectivity-indicator.has-pending {
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.4);
  color: #fbbf24;
}

.connectivity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
  flex-shrink: 0;
}

.connectivity-indicator.offline .connectivity-dot { animation: pulse-dot 1.5s infinite; }
.connectivity-indicator.has-pending .connectivity-dot { animation: pulse-dot 1.5s infinite; }

.connectivity-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connectivity-badge {
  background: currentColor;
  color: #000;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 18px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== EVENT MANAGEMENT ===== */
.sidebar-event-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 16px 14px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(34,197,94,0.12), rgba(34,197,94,0.04));
  border: 1px solid rgba(34,197,94,0.4);
  border-radius: 8px;
}

.sidebar-event-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.15); }
}

.sidebar-event-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-event-label {
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: #22c55e;
  font-weight: 700;
}

.sidebar-event-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-active-card {
  background: linear-gradient(135deg, rgba(34,197,94,0.1), rgba(34,197,94,0.02));
  border: 1px solid rgba(34,197,94,0.35);
  border-radius: 10px;
  padding: 16px;
}

.event-active-badge {
  display: inline-block;
  background: #22c55e;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.event-active-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.event-active-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.event-active-meta > div {
  display: flex;
  gap: 6px;
}

.event-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.event-history-item .event-history-name {
  font-weight: 600;
}

.event-history-item .event-history-meta {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.event-history-item .event-status-active {
  background: #22c55e; color: white;
  padding: 2px 8px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700;
}

.event-history-item .event-status-closed {
  background: var(--bg-card); color: var(--text-muted);
  padding: 2px 8px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 600;
  border: 1px solid var(--border-color);
}

/* ===== CLOSE EVENT MODAL ===== */
.modal.modal-lg {
  max-width: 900px;
  width: 95vw;
}

.event-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 16px;
}

.event-tab-btn {
  background: transparent;
  border: none;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
}

.event-tab-btn:hover { color: var(--text-primary); }

.event-tab-btn.active {
  color: var(--red-primary);
  border-bottom-color: var(--red-primary);
}

.event-tab-content { display: none; }
.event-tab-content.active { display: block; }

.cash-reconcile-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 12px;
}

.cash-reconcile-card h4 {
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.cash-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
}

.cash-row:last-child { border-bottom: none; }

.cash-row label {
  margin: 0;
  font-weight: 500;
}

.cash-amount {
  font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
}

.cash-input {
  width: 160px;
  text-align: right;
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
}

.cash-diff-row {
  background: rgba(255,255,255,0.03);
  margin: 6px -16px -14px;
  padding: 10px 16px;
  font-weight: 700;
}

.cash-diff-row.positive .cash-amount { color: #22c55e; }
.cash-diff-row.negative .cash-amount { color: #ef4444; }

.data-table.compact th,
.data-table.compact td {
  padding: 6px 10px;
  font-size: 0.85rem;
}

.opname-stock-input {
  width: 70px;
  text-align: right;
  padding: 4px 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
}

.opname-diff-positive { color: #22c55e; font-weight: 700; }
.opname-diff-negative { color: #ef4444; font-weight: 700; }
.opname-diff-zero { color: var(--text-muted); }

/* ===== PRINT STYLES ===== */
@media print {
  body {
    background: white;
    color: black;
  }

  .sidebar,
  .mobile-header,
  .sidebar-overlay,
  .toast-container,
  .btn,
  .filter-bar,
  .modal-actions,
  .receipt-actions,
  .confirm-actions,
  .cart-actions {
    display: none !important;
  }

  .main-content {
    margin-left: 0;
    padding: 0;
  }

  .stat-card {
    border: 1px solid #ddd;
    background: white;
  }

  .stat-label {
    color: #666;
  }

  .stat-value {
    color: #000;
  }

  .data-table th {
    color: #333;
    background: #f5f5f5;
  }

  .data-table td {
    border-color: #ddd;
  }

  .modal-overlay {
    position: static;
    background: none;
    backdrop-filter: none;
  }

  .modal, .modal-receipt {
    box-shadow: none;
    border: none;
    max-width: none;
  }

  .receipt {
    background: white;
    color: black;
  }
}

/* ===== BARCODE PRINT ===== */
@media print {
  .print-barcode-page {
    display: block !important;
  }

  .print-barcode-page .barcode-label {
    text-align: center;
    padding: 10px;
    page-break-inside: avoid;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

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

.animate-slide-up {
  animation: slideUp 0.4s ease;
}
