:root {
  --accent: #2e7aad;
  --accent-light: #4a9fd4;
  --bg-cream: #f5f2eb;
  --dark-header: #1e2733;
}

body {
  background: var(--bg-cream);
  font-family: 'Segoe UI', Roboto, sans-serif;
}

.topbar {
  background: var(--dark-header);
  height: 56px;
}

.app-wrapper {
  display: flex;
  min-height: calc(100vh - 56px);
}

.app-sidebar {
  width: 240px;
  background: #fff;
  border-right: 1px solid #e5e0d5;
  padding-top: 12px;
  flex-shrink: 0;
}

.app-sidebar .nav-link {
  color: #333;
  padding: 10px 20px;
  font-size: 0.92rem;
  border-left: 3px solid transparent;
}

.app-sidebar .nav-link:hover {
  background: #f0f3f7;
  color: var(--accent);
}

.app-sidebar .nav-link.active {
  background: #eaf3fa;
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

.app-content {
  flex: 1;
  min-width: 0;
}

.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
}
.btn-primary:hover {
  background-color: var(--accent-light);
  border-color: var(--accent-light);
}

.card-stat {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.card-stat .icon-box {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  background: #eaf3fa;
  color: var(--accent);
}

.table-card {
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border: none;
}

.table thead th[style*="cursor: pointer"]:hover { background: #f0f3f7; }
.sort-icon { font-size: 0.75rem; opacity: 0.7; }

.icon-option.active, .product-icon-option.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* POS specific */
.product-card {
  cursor: pointer;
  border-radius: 10px;
  transition: 0.15s;
  border: 1px solid #eee;
  position: relative;
}
.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.product-card.out-of-stock {
  opacity: 0.5;
  cursor: not-allowed;
}
.cart-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

@media (max-width: 991px) {
  .app-sidebar {
    position: fixed;
    left: -260px;
    top: 56px;
    bottom: 0;
    z-index: 1030;
    transition: left 0.2s;
    overflow-y: auto;
  }
  .app-sidebar.show { left: 0; }
}

/* Struk thermal print */
/* Ukuran & font struk sekarang diatur dinamis lewat inline style di print_receipt.php,
   sesuai angka "Ukuran Kertas (mm)" bebas dari Pengaturan Struk. */
@media print {
  body * { visibility: hidden; }
  #receiptArea, #receiptArea * { visibility: visible; }
  #receiptArea { position: absolute; top: 0; left: 0; }
}
