/* ===================================================
   ALKAMART WARUNG - PROFESSIONAL EXPERT DASHBOARD STYLESHEET
   Warna Tema: Enterprise Emerald & Slate
   =================================================== */

:root {
  /* Colors - Enterprise Emerald */
  --primary: #047857;
  /* Emerald 700 */
  --primary-light: #10B981;
  /* Emerald 500 */
  --primary-dark: #064E3B;
  /* Emerald 900 */
  --primary-bg: #ECFDF5;
  /* Emerald 50 */

  /* Background & Surfaces (Pure White) */
  --bg-body: #FFFFFF;
  /* Pure White */
  --surface: #FFFFFF;

  /* Text */
  --text-dark: #0F172A;
  /* Slate 900 */
  --text-muted: #475569;
  /* Slate 600 */
  --text-light: #94A3B8;
  /* Slate 400 */

  /* Borders */
  --border: #E2E8F0;
  /* Slate 200 */
  --border-light: #F1F5F9;
  /* Slate 100 */

  /* Status Colors */
  --danger: #DC2626;
  /* Red 600 */
  --danger-light: #FEF2F2;
  --warning: #D97706;
  /* Amber 600 */
  --warning-light: #FFFBEB;
  --info: #0284C7;
  /* Sky 600 */
  --info-light: #F0F9FF;

  /* Border Radii - Tighter, Professional */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-full: 9999px;

  /* Shadows - Crisper, Less Diffuse */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-dark);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ================= TOP NAVIGATION ================= */
.top-nav {
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 22px;
  background: var(--primary);
  color: #FFFFFF !important;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 10px rgba(2, 69, 45, 0.25);
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.5px;
  display: block;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: -3px;
}

.badge-role {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  background: var(--primary-bg);
  color: var(--primary);
  border: 1px solid rgba(2, 69, 45, 0.2);
}

.badge-role.admin {
  background: var(--warning-light);
  color: #B45309;
  border-color: rgba(245, 158, 11, 0.3);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.status-indicator:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  transform: scale(1.08);
}

.status-indicator:active {
  transform: scale(0.95);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
}

/* Hijau Bergerak (Aktif / Terhubung Cloud) */
.status-dot.online {
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 1.6s infinite ease-in-out;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 9px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Merah Bergerak (Tidak Aktif / Offline / Gagal Konek) */
.status-dot.offline,
.status-dot:not(.online):not(.syncing) {
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-red 1.2s infinite ease-in-out;
}

@keyframes pulse-red {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }

  70% {
    transform: scale(1.2);
    box-shadow: 0 0 0 9px rgba(239, 68, 68, 0);
  }

  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Kuning Berkedip (Sedang Menyinkronkan) */
.status-dot.syncing {
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  animation: pulse-yellow 0.8s infinite ease-in-out;
}

@keyframes pulse-yellow {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }

  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 7px rgba(245, 158, 11, 0);
  }

  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
}

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

.btn-outline:hover {
  background: var(--bg-body);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border: 1px solid var(--danger);
}

.btn-danger:hover {
  background: #B91C1C;
  /* darker red */
}

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

.btn-danger-outline:hover {
  background: var(--danger-light);
}

.btn-warning {
  background: #f59e0b;
  color: white;
  border: 1px solid #d97706;
}

.btn-warning:hover {
  background: #d97706;
}


.btn-excel {
  background: #107C41;
  color: #FFFFFF;
  border: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(16, 124, 65, 0.25);
  font-size: 13px;
  font-family: inherit;
}

.btn-excel:hover {
  background: #0E6836;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 124, 65, 0.35);
  color: #FFFFFF;
}

.reports-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-whatsapp {
  background: #25D366;
  color: white;
}

.btn-whatsapp:hover {
  background: #1EBE5D;
}

.btn-switch {
  background: var(--bg-body);
  color: var(--text-dark);
  border: 1px solid var(--border);
}

.btn-switch:hover {
  border-color: var(--primary);
  color: var(--primary);
}

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

/* ================= MAIN CONTAINER & VIEWS ================= */
.main-container {
  height: calc(100vh - 64px);
  position: relative;
  overflow: hidden;
}

.view-section {
  display: none;
  height: 100%;
}

.view-section.active {
  display: flex;
}

/* ================= KASIR (POS) VIEW ================= */
#cashierView {
  display: none;
  width: 100%;
}

#cashierView.active {
  display: flex;
}

.catalog-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--bg-body);
  padding: 16px;
}

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-light);
}

.search-input-wrapper input {
  width: 100%;
  height: 46px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 40px 0 42px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s;
}

.search-input-wrapper input:focus {
  border-color: var(--primary);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-light);
  cursor: pointer;
  display: none;
}

.category-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.pill {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  outline: none;
  box-shadow: none;
}

.pill:focus,
.pill:focus-visible {
  outline: none;
  box-shadow: none;
}

/* Kategori yang belum diklik (tidak aktif): Tampilkan ICON SAJA */
.pill:not(.active) {
  min-width: 38px;
  padding: 0 10px;
  justify-content: center;
}

.pill:not(.active) span {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  display: inline-block;
  white-space: nowrap;
  transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.pill i {
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #F0F6F3;
  transform: translateY(-1px);
}

/* Kategori yang sudah diklik (aktif): Tampilkan ICON + NAMA */
.pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  padding: 0 16px;
  box-shadow: 0 3px 8px rgba(2, 69, 45, 0.22);
}

.pill.active span {
  max-width: 150px;
  opacity: 1;
  display: inline-block;
  white-space: nowrap;
  transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease 0.05s;
}

.pill.active:hover {
  background: var(--primary-dark);
  color: #FFFFFF;
}

/* Grid Produk Kasir */
.products-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  padding-bottom: 24px;
}

.product-pos-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  user-select: none;
  min-height: 250px;
  /* Menjamin kartu cukup tinggi agar tombol tambah selalu terlihat */
  height: 100%;
}

.product-pos-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.card-img-wrapper {
  height: 120px;
  min-height: 120px;
  width: 100%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #F0F6F3 0%, #E2ECE6 100%);
  position: relative;
  overflow: hidden;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  z-index: 1;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-pos-card:hover .card-img-wrapper img {
  transform: scale(1.05);
}

.card-img-fallback {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 44px;
  color: var(--primary);
  background: linear-gradient(135deg, #EAF4F0 0%, #D8EAE1 100%);
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

.badge-stock {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 3px 7px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-dark);
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.badge-stock.low {
  background: var(--danger);
  color: white;
}

.badge-stock.out {
  background: #334155;
  color: white;
}

.card-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 35px;
}

.card-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.btn-add-cart {
  width: 100%;
  height: 34px;
  margin-top: auto;
  flex-shrink: 0;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-add-cart:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 10px rgba(2, 69, 45, 0.25);
}

.btn-add-cart:active {
  transform: scale(0.97);
}

.product-pos-card.disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* ================= CART SIDEBAR ================= */
.cart-sidebar {
  width: 380px;
  background: var(--surface);
  border-left: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.04);
}

/* Header Keranjang: Hijau Alkamart Mewah */
.cart-header {
  padding: 14px 18px;
  background: linear-gradient(135deg, #02452D 0%, #035637 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(2, 69, 45, 0.2);
}

.cart-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-title h3 {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.cart-title h3 i {
  font-size: 18px;
  color: #FFD166;
  /* Aksen icon keranjang emas */
}

.cart-item-count {
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.btn-clear-cart {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 11.5px;
  color: #FFFFFF;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  font-weight: 500;
}

.btn-clear-cart:hover {
  background: #E53E3E;
  border-color: #E53E3E;
  color: #FFFFFF;
}

.btn-close-cart {
  background: none;
  border: none;
  color: #FFFFFF;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

/* List Item Keranjang */
.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #F8FAF9;
}

.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-light);
  gap: 12px;
  text-align: center;
  padding: 30px;
}

.cart-empty-icon {
  font-size: 52px;
  color: #B2D8C9;
}

.cart-empty-state p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid #E2EDE7;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.2s;
}

.cart-item-row:hover {
  border-color: #B2D8C9;
  box-shadow: 0 2px 8px rgba(2, 69, 45, 0.07);
}

.cart-item-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #F0F6F3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.cart-item-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.cart-item-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

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

.btn-qty {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text-dark);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-qty:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.qty-val {
  font-size: 12.5px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

/* Footer Keranjang & Perhitungan */
.cart-footer {
  padding: 14px 16px;
  border-top: 1.5px solid var(--border);
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.03);
}

/* Kartu Ringkasan Total Belanja Hijau Solid & Gold */
.cart-summary-card {
  background: linear-gradient(135deg, #02452D 0%, #035C3C 100%);
  color: #FFFFFF;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(2, 69, 45, 0.22);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.summary-line .price-val {
  color: #FFFFFF;
  font-weight: 600;
}

.total-line {
  font-size: 13.5px;
  font-weight: 700;
  color: #FFFFFF;
  padding-top: 6px;
  margin-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.25);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.total-val {
  color: #FFD166;
  /* Kuning emas menyala sangat tegas */
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* Box Input Pembayaran & Uang Cepat */
.payment-quick-box {
  background: #F4F8F6;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid #DCEBE3;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.payment-quick-box label {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.input-money-wrapper {
  position: relative;
}

.currency-prefix {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: var(--primary);
  font-size: 13px;
}

.input-money-wrapper input {
  width: 100%;
  height: 38px;
  padding: 0 10px 0 34px;
  border: 1.5px solid #C1DFD2;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  color: var(--primary);
  background: #FFFFFF;
  transition: all 0.2s;
}

.input-money-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 69, 45, 0.15);
  outline: none;
}

/* Tombol Cepat Pecahan Uang */
.quick-cash-buttons {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.quick-cash-buttons::-webkit-scrollbar {
  display: none;
}

.btn-quick-cash {
  padding: 4px 8px;
  background: #FFFFFF;
  border: 1.5px solid #D0E4DC;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-quick-cash:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(2, 69, 45, 0.2);
}

.btn-quick-cash[data-amount="pas"] {
  background: #EAF4F0;
  border-color: var(--primary);
  font-weight: 700;
}

.change-line {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 4px;
  border-top: 1px dashed #DCEBE3;
}

.change-val {
  color: #056B47;
  font-size: 14px;
  font-weight: 800;
}

/* Tombol Bayar & Cetak Struk */
.btn-checkout {
  width: 100%;
  padding: 13px 18px;
  background: linear-gradient(135deg, #02452D 0%, #046B46 100%);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 69, 45, 0.3);
  transition: all 0.25s ease;
  letter-spacing: 0.3px;
  font-family: inherit;
}

.btn-checkout:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 69, 45, 0.4);
  background: linear-gradient(135deg, #013321 0%, #035738 100%);
}

.btn-checkout:disabled {
  background: var(--primary) !important;
  color: #FFFFFF !important;
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  pointer-events: none;
  transform: none !important;
}

/* ================= ADMIN VIEW ================= */
#adminView {
  flex-direction: column;
  width: 100%;
  overflow-y: auto;
  background: var(--bg-body);
}

.admin-tab-nav {
  display: flex !important;
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  flex-shrink: 0;
}

.admin-tab-nav::-webkit-scrollbar {
  display: none;
}

.admin-tab-btn {
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
  outline: none;
  box-shadow: none;
}

.admin-tab-btn:focus,
.admin-tab-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.admin-tab-btn i {
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Tab Admin Tidak Aktif: Kancing bundar / kapsul ramping */
.admin-tab-btn:not(.active) {
  min-width: 38px;
  padding: 0 10px;
}

.admin-tab-btn:not(.active) .tab-label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  display: inline-block;
  white-space: nowrap;
  transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.admin-tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #F0F6F3;
  transform: translateY(-1px);
}

/* Tab Admin Aktif: Solid Hijau Alkamart seperti Kasir */
.admin-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  padding: 0 16px;
  box-shadow: 0 3px 8px rgba(2, 69, 45, 0.22);
}

.admin-tab-btn.active .tab-label {
  max-width: 200px;
  opacity: 1;
  display: inline-block;
  white-space: nowrap;
  transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease 0.05s;
}

.admin-tab-btn.active:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #FFFFFF;
}

.badge-alert-count {
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  min-width: 18px;
  height: 18px;
  line-height: 16px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.admin-tab-btn.active .badge-alert-count {
  background: #FFFFFF;
  color: var(--danger);
  font-weight: 800;
}

.admin-tab-content {
  display: none;
  padding: 24px;
  flex: 1;
}

.admin-tab-content.active {
  display: block;
}

.admin-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-action-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
}

.stats-mini-cards {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.stats-mini-cards .admin-search-wrapper {
  margin-left: auto;
}

.mini-card {
  background: var(--surface);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mini-card .card-label {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  white-space: nowrap;
  margin-bottom: 4px;
  font-weight: 500;
}

.mini-card .card-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  display: block;
  line-height: 1.2;
}

.admin-controls-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.action-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.action-buttons-group .btn {
  white-space: nowrap;
}

.action-buttons-group .btn span {
  white-space: nowrap;
}

.admin-search-wrapper {
  min-width: 260px;
}

/* Custom Table */
.table-responsive {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

table th,
.custom-table th {
  background: #E9FAF3;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #064E3B;
  border-bottom: 1px solid #c7f0db;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.custom-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  vertical-align: middle;
}

.custom-table tr:hover {
  background: #F8FAF8;
}

.table-product-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 20px;
}

.table-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.status-tag.in-stock {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status-tag.low-stock {
  background: #fffbeb;
  color: #B45309;
  border: 1px solid #fde68a;
}

.status-tag.out-stock {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

/* Reports Cards */
.reports-overview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.report-card {
  position: relative;
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  min-height: 128px;
  border: 1.5px solid var(--primary);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.report-icon {
  position: relative;
  margin-top: -21.5px;
  margin-left: -21.5px;
  width: 72px;
  height: 68px;
  border-top-left-radius: 12px;
  border-top-right-radius: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  flex-shrink: 0;
  z-index: 1;
}

.report-icon i {
  font-size: 26px;
  color: #FFFFFF !important;
  margin-right: 6px;
  margin-bottom: 6px;
}

.report-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 80px;
}

.report-label {
  font-size: 12px;
  color: var(--text-muted);
}

.report-amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
}

.reports-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

/* Restock Grid */
.alert-info-box {
  background: var(--danger-light);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: #B91C1C;
}

.alert-info-box strong {
  color: #991B1B;
}

.alert-info-box .info-icon {
  font-size: 20px;
  display: flex;
  align-items: center;
  color: #DC2626;
}

.restock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.restock-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.restock-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Settings Cards */
.settings-card {
  background: var(--surface);
  border-radius: 12px;
  border: 1.5px solid var(--border);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.settings-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.settings-header-title {
  flex: 1;
}

.settings-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.settings-title-row h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.settings-actions-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #CBD5E1;
  background-color: #F8FAFC;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: #1E293B;
  transition: all 0.2s ease;
}

.form-input:focus {
  background-color: #FFFFFF;
  border-color: var(--primary);
  outline: none;
}

/* Custom Select Dropdown */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-wrapper.open {
  z-index: 9999;
}

.custom-select-trigger {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #CBD5E1;
  background-color: #F8FAFC;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: #1E293B;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-select-trigger:focus,
.custom-select-wrapper.open .custom-select-trigger {
  background-color: #FFFFFF;
  border-color: var(--primary);
}

.custom-select-value {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.custom-select-value i {
  color: #64748B;
  font-size: 16px;
}

.custom-select-trigger>i {
  pointer-events: none;
}

.custom-select-options {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  margin-top: 4px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  list-style: none;
  padding: 6px 0;
  z-index: 9999;
  display: none;
}

.custom-select-wrapper.open .custom-select-options {
  display: block;
  animation: slideDown 0.15s ease-out;
}

.custom-select-options li {
  padding: 10px 14px;
  font-size: 14px;
  color: #1E293B;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
}

.custom-select-options li i {
  color: #64748B;
  font-size: 16px;
}

.custom-select-options li:hover {
  background: var(--primary);
  color: white;
}

.custom-select-options li:hover i {
  color: white;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#formProductImageUrl {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

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

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.settings-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ================= MODALS ================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active,
.modal-overlay.open {
  display: flex;
}

.modal-dialog {
  background: var(--surface);
  border-radius: 12px;
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  overflow-y: auto;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  padding: 24px 28px;
  position: relative;
  animation: modalFadeIn 0.2s ease-out;
  scrollbar-width: none;
  /* Sembunyikan scrollbar Firefox */
  -ms-overflow-style: none;
  /* Sembunyikan scrollbar IE/Edge */
}

.modal-dialog::-webkit-scrollbar {
  display: none;
  /* Sembunyikan scrollbar Chrome, Safari, Edge */
  width: 0;
  height: 0;
}

.modal-dialog.modal-sm {
  max-width: 400px;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.btn-close-modal,
.modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.btn-close-modal:hover,
.modal-close:hover {
  background: #F1F5F9;
  color: var(--text-dark);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* ================= MODERN CONFIRM & ALERT MODAL ================= */
.modal-confirm-dialog {
  max-width: 410px;
  text-align: center;
  padding: 32px 24px 28px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalBounceIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalBounceIn {
  0% {
    opacity: 0;
    transform: scale(0.85) translateY(10px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.confirm-icon-box {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 18px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  transition: all 0.3s ease;
}

.confirm-icon-box.danger {
  background: #fee2e2;
  color: #dc2626;
  box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.15);
}

.confirm-icon-box.warning {
  background: #fef3c7;
  color: #d97706;
  box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.15);
}

.confirm-icon-box.info {
  background: #e0f2fe;
  color: #0284c7;
  box-shadow: 0 0 0 8px rgba(2, 132, 199, 0.15);
}

.confirm-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.confirm-message {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  word-break: break-word;
}

.confirm-message strong {
  color: var(--text-dark);
}

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

.confirm-actions .btn {
  flex: 1;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
}

/* Stepper Kuantitas Modern */
.qty-stepper-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px 0;
}

.btn-qty-step {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--bg-body);
  border: 1.5px solid var(--border-color);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-dark);
  transition: all 0.2s ease;
}

.btn-qty-step:hover {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary);
  transform: scale(1.05);
}

.btn-qty-step:active {
  transform: scale(0.95);
}


/* Photo Upload Inside Modal */
.photo-upload-container {
  display: flex;
  gap: 16px;
  align-items: center;
}

.photo-preview-box {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  border: 2px dashed #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F8FAFC;
  overflow: hidden;
  flex-shrink: 0;
  color: #94A3B8;
  font-size: 11px;
  text-align: center;
}

.photo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-input-hidden {
  display: none;
}

.or-separator {
  font-size: 11px;
  color: var(--text-light);
  margin: 6px 0;
}

/* ================= STRUK MODAL ================= */
.modal-receipt {
  max-width: 360px;
  padding: 20px;
}

.receipt-container {
  background: white;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  color: #111;
}

.receipt-header {
  text-align: center;
}

.store-name {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 2px;
}

.store-address,
.store-phone {
  font-size: 11px;
}

.dashed-divider {
  border-top: 1px dashed #777;
  margin: 10px 0;
}

.receipt-meta {
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.receipt-item-calc {
  font-size: 11px;
  color: #444;
}

.receipt-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 3px;
}

.receipt-footer {
  text-align: center;
  font-size: 11px;
  margin-top: 10px;
}

.barcode-font {
  letter-spacing: 4px;
  font-size: 14px;
  margin-top: 6px;
}

.modal-actions-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

/* ================= TOAST NOTIFICATION ================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}

.toast {
  background: #1E293B;
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
}

.toast.success {
  background: var(--primary);
}

.toast.error {
  background: var(--danger);
}

.toast.info {
  background: var(--info);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= RESPONSIVE LAYOUT ================= */
.mobile-only {
  display: none !important;
}

@media (max-width: 900px) {
  .mobile-only {
    display: inline-flex !important;
  }

  .cart-sidebar {
    position: fixed;
    top: 64px;
    right: -100%;
    width: 100%;
    max-width: 420px;
    height: calc(100vh - 64px);
    z-index: 90;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .cart-sidebar.open {
    right: 0;
  }

  .btn-cart-toggle {
    background: var(--primary);
    color: white;
    position: relative;
    padding: 8px 12px;
  }

  .cart-badge-count {
    background: var(--danger);
    color: white;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    margin-left: 4px;
    font-weight: 700;
  }

  .admin-stats-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 12px;
  }

  .stats-mini-cards {
    flex-wrap: wrap;
    gap: 10px;
  }

  .stats-mini-cards .admin-search-wrapper {
    margin-left: 0;
    width: 100%;
    grid-column: 1 / -1;
    flex: 1 1 100%;
  }

  .admin-action-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 12px;
  }

  .action-buttons-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
  }

  .action-buttons-group .btn {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .admin-search-wrapper {
    width: 100%;
    min-width: 0;
    position: sticky;
    top: 64px;
    z-index: 25;
    background: var(--bg-body);
    padding: 2px 0;
  }

  .admin-search-wrapper input {
    height: 44px;
    box-shadow: none;
  }
}

/* Modern Vector Icons Styling */
.logo-icon i {
  font-size: 24px;
  color: #FFFFFF !important;
}

.pill i {
  margin-right: 4px;
  font-size: 14px;
}

.btn i {
  font-size: 15px;
}

.report-icon i {
  font-size: 26px;
  color: #FFFFFF !important;
}

.card-img-fallback i {
  font-size: 42px;
  color: var(--text-light);
}

.table-product-thumb i {
  font-size: 22px;
  color: var(--text-light);
}

.cart-empty-icon i {
  font-size: 54px;
  color: var(--text-light);
}

.toast-icon i {
  font-size: 18px;
}

/* Responsif Khusus Layar Smartphone (< 600px) */
@media (max-width: 600px) {
  .catalog-area {
    padding: 10px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    /* Pas 2 kolom rapi di HP */
    gap: 10px;
  }

  .card-img-wrapper {
    height: 115px;
    min-height: 115px;
  }

  .card-body {
    padding: 8px 10px 10px 10px;
  }

  .card-title {
    font-size: 12px;
    min-height: 32px;
    line-height: 1.3;
  }

  .card-price {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .btn-add-cart {
    padding: 6.5px 6px;
    font-size: 12px;
  }

  /* Compact Stats Mini Cards di HP agar menghemat ruang layar */
  .stats-mini-cards {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .stats-mini-cards .admin-search-wrapper {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
  }

  .mini-card {
    padding: 8px 12px;
  }

  .mini-card .card-label {
    font-size: 11px;
  }

  .mini-card .card-number {
    font-size: 16px;
  }

  /* Tabel Produk lebih padat di HP */
  .custom-table th,
  .custom-table td {
    padding: 10px 8px;
    font-size: 12px;
  }
}

/* Sembunyikan Tulisan "ALKAMART" pada Perangkat Mobile (<= 768px) */
@media (max-width: 768px) {

  .brand-text,
  .brand-name {
    display: none !important;
  }

  .brand-logo {
    gap: 0;
  }

  .top-nav {
    padding: 0 12px;
  }
}

/* Sembunyikan Tombol Keranjang Kasir saat Berada di Halaman Admin */
body.role-admin #btnToggleCartMobile,
body:has(#adminView.active) #btnToggleCartMobile {
  display: none !important;
}

/* ================= METODE PEMBAYARAN KASIR (CASH & QRIS) ================= */
.payment-method-selector {
  margin-bottom: 12px;
}

.section-micro-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 6px;
}

.payment-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-pay-method {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pay-method:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-pay-method.active {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.btn-pay-method i {
  font-size: 16px;
}

.qris-notice-box {
  background: #f0fdf4;
  border: 1.5px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  text-align: center;
}

.qris-notice-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--primary);
  font-size: 14px;
  margin-bottom: 4px;
}

.qris-notice-box p {
  font-size: 11.5px;
  color: #166534;
  margin: 0;
  line-height: 1.4;
}

/* ================= KARTU METRIK FINANSIAL & SALDO ================= */
.saldo-breakdown-tags {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.tag-cash,
.tag-qris,
.badge-pay-cash,
.badge-pay-qris {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tag-cash,
.badge-pay-cash {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.tag-cash i,
.tag-cash strong,
.badge-pay-cash i,
.badge-pay-cash strong {
  color: #166534;
}

.tag-qris,
.badge-pay-qris {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
}

.tag-qris i,
.tag-qris strong,
.badge-pay-qris i,
.badge-pay-qris strong {
  color: #ffffff;
}

.report-sublabel {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 3px;
}

/* ================= ESTIMASI LABA PRODUK ================= */
.profit-margin-box {
  background: linear-gradient(145deg, #f0fdf4, #dcfce7);
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: -4px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profit-margin-box .margin-label {
  font-size: 13px;
  color: #166534;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profit-margin-box .margin-value {
  font-size: 14px;
  font-weight: 800;
  color: #15803d;
}

.profit-tag {
  color: #166534;
  font-weight: 700;
  font-size: 13px;
}

/* ================= SELECTOR SUMBER DANA TARIK KAS (TUNAI & QRIS) ================= */
.withdrawal-source-selector {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-source-pill {
  cursor: pointer;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  border: 1.5px solid transparent;
  outline: none;
  box-shadow: none;
}

.btn-source-pill i {
  font-size: 16px;
  line-height: 1;
}

/* Tampilan Tunai (Mirip Gambar 2) */
.btn-source-pill.source-cash {
  background: #f0fdf4;
  color: #166534;
  border-color: #86efac;
}

.btn-source-pill.source-cash i {
  color: #166534;
}

.btn-source-pill.source-cash:not(.active) {
  opacity: 0.45;
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}

.btn-source-pill.source-cash:not(.active) i {
  color: #94a3b8;
}

.btn-source-pill.source-cash.active {
  opacity: 1;
  background: #f0fdf4;
  color: #15803d;
  border-color: #22c55e;
  box-shadow: none;
}

/* Tampilan QRIS (Mirip Gambar 2) */
.btn-source-pill.source-qris {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.btn-source-pill.source-qris i {
  color: #ffffff;
}

.btn-source-pill.source-qris:not(.active) {
  opacity: 0.45;
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}

.btn-source-pill.source-qris:not(.active) i {
  color: #94a3b8;
}

.btn-source-pill.source-qris.active {
  opacity: 1;
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: none;
}

.btn-source-pill:hover:not(.active) {
  opacity: 0.8;
}

/* ================= PREVIEW SISA SALDO DI MODAL TARIK UANG (SENADA GAMBAR 2) ================= */
.withdrawal-saldo-info {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.withdrawal-saldo-card {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.2s ease;
}

.withdrawal-saldo-card .saldo-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.withdrawal-saldo-card .saldo-card-header i {
  font-size: 15px;
}

.withdrawal-saldo-card .saldo-card-amount {
  font-size: 16px;
  font-weight: 800;
  margin-top: 6px;
  display: block;
  letter-spacing: -0.2px;
}

/* Kartu Tunai: Senada Pill Tunai Gambar 2 */
.withdrawal-saldo-card.saldo-cash-card {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
}

.withdrawal-saldo-card.saldo-cash-card .saldo-card-header {
  color: #166534;
}

.withdrawal-saldo-card.saldo-cash-card .saldo-card-header i {
  color: #166534;
}

.withdrawal-saldo-card.saldo-cash-card .saldo-card-amount {
  color: #15803d;
}

/* Kartu QRIS: Senada Pill QRIS Gambar 2 (Solid Alkamart Primary Green) */
.withdrawal-saldo-card.saldo-qris-card {
  background: var(--primary);
  border: 1.5px solid var(--primary);
  box-shadow: 0 2px 6px rgba(0, 107, 67, 0.18);
}

.withdrawal-saldo-card.saldo-qris-card .saldo-card-header {
  color: #ffffff;
}

.withdrawal-saldo-card.saldo-qris-card .saldo-card-header i {
  color: #ffffff;
}

.withdrawal-saldo-card.saldo-qris-card .saldo-card-amount {
  color: #ffffff;
}

/* ================= TOMBOL SIMPAN PENARIKAN (TRANSPARAN VS HIJAU AKTIF) ================= */
#btnSubmitWithdrawal:disabled,
#btnSubmitWithdrawal.btn-disabled {
  background: var(--primary) !important;
  color: #ffffff !important;
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  pointer-events: none;
  transform: none !important;
}

#btnSubmitWithdrawal:not(:disabled):not(.btn-disabled) {
  background: var(--primary) !important;
  color: #ffffff !important;
  opacity: 1 !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(0, 107, 67, 0.28) !important;
  transition: all 0.25s ease;
}

#btnSubmitWithdrawal:not(:disabled):not(.btn-disabled):hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px);
}

/* Penyesuaian Spasi Khusus Modal Tarik Kas */
#withdrawalModal .form-group {
  margin-bottom: 14px;
}

#withdrawalModal .modal-footer {
  margin-top: 18px;
}

/* ================= TOMBOL SIMPAN PENJUALAN MANUAL (TRANSPARAN VS HIJAU AKTIF) ================= */
#btnSaveManualSale:disabled,
#btnSaveManualSale.btn-disabled {
  background: var(--primary) !important;
  color: #ffffff !important;
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  pointer-events: none;
  transform: none !important;
}

#btnSaveManualSale:not(:disabled):not(.btn-disabled) {
  background: var(--primary) !important;
  color: #ffffff !important;
  opacity: 1 !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(0, 107, 67, 0.28) !important;
  transition: all 0.25s ease;
}

#btnSaveManualSale:not(:disabled):not(.btn-disabled):hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px);
}

.custom-select-options li.disabled-option {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  background: transparent !important;
  color: #94a3b8 !important;
}

select,
option {
  accent-color: var(--primary);
}

select option:checked,
select option:hover {
  background-color: var(--primary) !important;
  color: #ffffff !important;
}