/* ============================================================
   POSMelinda — Design Tokens
   ============================================================ */
:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --ink: #1e2432;
  --muted: #8a94a6;
  --line: #eef0f5;
  --accent: #c8102e;
  --accent-soft: #fdeeee;
  --blue: #3d7bfd;
  --blue-soft: #edf2ff;
  --green: #1faa59;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(30, 36, 50, .05);
  --shadow-md: 0 10px 30px -12px rgba(30, 36, 50, .18);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

[hidden] {
  display: none !important;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================
   Layout shell & Modern Floating Capsule Sidebar
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 340px;
  min-height: 100vh;
  transition: grid-template-columns 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.app.app-single {
  grid-template-columns: 72px minmax(0, 1fr);
}

/* State: sidebar-expanded (terbuka penuh) */
.app.sidebar-expanded {
  grid-template-columns: 240px minmax(0, 1fr) 340px;
}

.app.app-single.sidebar-expanded {
  grid-template-columns: 240px minmax(0, 1fr);
}

/* ---------- Sidebar Rail (Modern Pill Style) ---------- */
.rail {
  background: var(--surface);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  width: 72px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 16px 12px 18px;
  transition: width 220ms cubic-bezier(0.16, 1, 0.3, 1), padding 220ms ease;
  overflow: visible;
  /* Penting agar tombol bulat mengambang di tepi kanan tidak terpotong */
  z-index: 40;
}

.app:not(.sidebar-expanded) .rail {
  cursor: pointer;
}

.app.sidebar-expanded .rail {
  width: 240px;
  padding: 16px 16px 18px;
  cursor: default;
}

/* Tombol bulat mengambang di tepi kanan sidebar (‹ / ›) */
.rail-edge-toggle {
  position: absolute;
  top: 24px;
  right: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(30, 36, 50, 0.16);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 50;
  color: var(--muted);
  transition: transform 140ms ease, background 140ms ease, color 140ms ease, border-color 140ms ease;
  padding: 0;
}

.rail-edge-toggle:hover {
  transform: scale(1.14);
  color: var(--ink);
  background: #fff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(30, 36, 50, 0.2);
}

.rail-edge-toggle:active {
  transform: scale(0.92);
}

.rail-edge-toggle svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-edge-toggle .edge-icon-collapse {
  display: none;
}

.rail-edge-toggle .edge-icon-expand {
  display: block;
}

.app.sidebar-expanded .rail-edge-toggle .edge-icon-collapse {
  display: block;
}

.app.sidebar-expanded .rail-edge-toggle .edge-icon-expand {
  display: none;
}

/* Brand Logo Header (Amar Plastik) */
.rail-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

.app:not(.sidebar-expanded) .rail-brand {
  justify-content: center;
}

.app.sidebar-expanded .rail-brand {
  justify-content: flex-start;
  padding-left: 2px;
}

.rail-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  overflow: hidden;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  padding: 3px;
  box-sizing: border-box;
}

.rail-logo:hover {
  transform: scale(1.05);
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(30, 36, 50, 0.12);
}

.rail-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.rail-brand-text {
  display: none;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.app.sidebar-expanded .rail-brand-text {
  display: flex;
}

.rail-brand-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.rail-brand-sub {
  font-size: 10.5px;
  font-style: italic;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

/* Section Header (UTAMA, KATALOG, LAPORAN, SISTEM) */
.rail-section-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94a3b8;
  text-transform: uppercase;
  padding: 10px 14px 4px;
  display: none;
}

.app.sidebar-expanded .rail-section-label {
  display: block;
}

.rail-section-divider {
  height: 1px;
  background: #edf2f7;
  margin: 5px 12px;
  border-radius: 1px;
}

.app.sidebar-expanded .rail-section-divider {
  display: none;
}

/* Navigasi */
.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.rail-btn {
  width: 44px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: var(--muted);
  text-decoration: none;
  box-sizing: border-box;
  margin: 0 auto;
  position: relative;
  transition: background 140ms ease, color 140ms ease, transform 100ms ease;
}

.rail-btn:active {
  transform: scale(0.96);
}

.rail-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.rail-label {
  display: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: inherit;
}

.app.sidebar-expanded .rail-btn {
  width: 100%;
  padding: 0 12px;
  justify-content: flex-start;
  gap: 12px;
  margin: 0;
}

.app.sidebar-expanded .rail-label {
  display: inline-block;
}

.rail-btn:hover {
  background: var(--bg);
  color: var(--ink);
}

.rail-btn.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

/* Floating Popover Tooltip saat mode collapsed di-hover (persis gambar kanan) */
.app:not(.sidebar-expanded) .rail-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) scale(0.95);
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 9px;
  box-shadow: 0 4px 16px rgba(30, 36, 50, 0.16);
  border: 1px solid #e2e8f0;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 100;
}

.app:not(.sidebar-expanded) .rail-btn:hover::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.rail-spacer {
  flex: 1;
}

/* Profile Area at Bottom (Avatar + Cashier Name) */
.rail-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  width: 100%;
  box-sizing: border-box;
}

.app:not(.sidebar-expanded) .rail-profile {
  justify-content: center;
}

.app.sidebar-expanded .rail-profile {
  justify-content: flex-start;
  padding-left: 2px;
}

.rail-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f7d4d4, #e5a1a1);
  color: #8f1d24;
  font-weight: 800;
  font-size: 13px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(143, 29, 36, 0.15);
}

.rail-profile-info {
  display: none;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.app.sidebar-expanded .rail-profile-info {
  display: flex;
}

.rail-role {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
}

.rail-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Topbar trigger button alternatif */
.topbar-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, transform 100ms ease;
}

.topbar-mobile-toggle {
  display: none;
}

.topbar-toggle-btn:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.topbar-toggle-btn:active {
  transform: scale(0.93);
}

.topbar-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Navigasi */
.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.rail-btn {
  width: 44px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  box-sizing: border-box;
  margin: 0 auto;
  transition: background 140ms ease, color 140ms ease, transform 100ms ease;
}

.rail-btn:active {
  transform: scale(0.96);
}

.rail-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.rail-label {
  display: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: inherit;
}

.app.sidebar-expanded .rail-btn {
  width: 100%;
  padding: 0 12px;
  justify-content: flex-start;
  gap: 12px;
  margin: 0;
}

.app.sidebar-expanded .rail-label {
  display: inline-block;
}

.rail-btn:hover {
  background: var(--bg);
  color: var(--ink);
}

.rail-btn.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.rail-spacer {
  flex: 1;
}

/* Page Header Row dengan hamburger untuk halaman selain kasir */
.page-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.page-header-row .topbar-toggle-btn {
  margin-top: 0;
}

/* Backdrop drawer mobile */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  z-index: 90;
}

.sidebar-backdrop[hidden] {
  display: none;
}

/* ---------- Main column ---------- */
.main {
  padding: 22px 28px 32px;
  min-width: 0;
}

/* ---------- Halaman (multi-view sidebar) ---------- */
.page[hidden] {
  display: none;
}

.page-pad {
  max-width: 860px;
}

.page-pad.page-full,
.page-full {
  max-width: 100%;
  width: 100%;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.page-sub {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 22px;
}

/* Riwayat transaksi */
.trx-list {
  display: grid;
  gap: 12px;
}

.trx-card {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
}

.trx-card .trx-id {
  font-weight: 800;
  font-size: 13px;
}

.trx-card .trx-time {
  color: var(--muted);
  font-size: 11.5px;
  grid-column: 1;
}

.trx-card .trx-total {
  font-weight: 800;
  font-size: 15px;
  grid-row: 1 / span 2;
  align-self: center;
  font-variant-numeric: tabular-nums;
}

.trx-card .trx-meta {
  color: var(--muted);
  font-size: 11.5px;
  grid-column: 1;
}

.trx-empty {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 42px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* Tabel produk & laporan */
.prod-table-wrap {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.prod-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 560px;
}

.prod-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.prod-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}

.prod-table tr:last-child td {
  border-bottom: 0;
}

.prod-table td:first-child {
  font-weight: 700;
}

.prod-table .td-num {
  font-variant-numeric: tabular-nums;
}

.prod-table .p-out {
  color: #e0342b;
  font-weight: 700;
}

.prod-table .p-low {
  color: #f2a30f;
  font-weight: 700;
}

.prod-table .p-ok {
  color: var(--green);
  font-weight: 700;
}

/* ---------- Master data produk ---------- */
.master-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.master-head-top,
.cat-header-top,
.trx-header-top,
.rpt-header-top {
  display: contents;
}

.master-head-left {
  order: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.master-title-row,
.cat-title-row,
.trx-title-row,
.rpt-title-row,
.settings-title-row,
.topbar-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prod-sku-count-pill,
.cat-count-pill,
.trx-count-pill,
.profit-badge-pill,
.settings-version-pill,
.pos-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.master-head-right {
  order: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-add {
  order: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #4f46e5;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 11px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, .32);
  transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-add:hover {
  background: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -4px rgba(79, 70, 229, .45);
}

.rpt-btn-print {
  order: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #4f46e5;
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.32);
  transition: all 150ms ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.rpt-btn-print:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.42);
}

.rpt-btn-print svg {
  width: 16px;
  height: 16px;
}

.btn-text-full {
  display: inline;
}

.btn-text-short {
  display: none;
}

/* Bento KPI Metric Cards (Zero Emoji, Modern 2026 SaaS Density) */
.master-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.mcard {
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 66px;
  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mcard:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.mc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.mc-icon-badge {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mc-icon-badge svg {
  width: 14px;
  height: 14px;
}

.badge-blue {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.badge-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.badge-rose {
  background: rgba(225, 29, 72, 0.12);
  color: #e11d48;
}

.badge-purple {
  background: rgba(147, 51, 234, 0.12);
  color: #9333ea;
}

.mc-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  line-height: 1.2;
}

.mc-tag.tag-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.mc-tag.tag-rose {
  background: rgba(225, 29, 72, 0.12);
  color: #be123c;
}

.mc-tag.tag-purple {
  background: rgba(147, 51, 234, 0.12);
  color: #7e22ce;
}

.mc-body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.mc-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mc-value {
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #0f172a;
}

.mc-value.orange {
  color: #d97706;
}

.mc-value.red {
  color: #e11d48;
}

.mc-value.purple {
  color: #9333ea;
}

/* Master Toolbar: High Information Density */
.master-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.msearch {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  height: 40px;
  padding: 0 14px;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}

.msearch svg {
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  flex-shrink: 0;
}

.msearch input {
  border: 0;
  outline: none;
  width: 100%;
  font: inherit;
  font-size: 13px;
  background: transparent;
}

.mfilter {
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  padding: 0 12px;
  cursor: pointer;
  outline: none;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}

.mexport {
  margin-left: auto;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  padding: 0 16px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, color .15s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-sizing: border-box;
}

.mexport:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 960px) {
  .master-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  /* Unified Mobile Headers (produk, kategori, transaksi, profit, index, pengaturan) */
  .master-head,
  .cat-header,
  .trx-page-header,
  .rpt-header,
  .db-header,
  .topbar {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    align-items: stretch !important;
    width: 100% !important;
    margin-bottom: 12px !important;
    box-sizing: border-box !important;
  }

  .master-head-top,
  .cat-header-top,
  .trx-header-top,
  .rpt-header-top,
  .db-header-top,
  .page-header-row,
  .topbar-top {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    order: 1 !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border-bottom: none !important;
  }

  .topbar-toggle-btn,
  .topbar-mobile-toggle,
  .page-header-row .topbar-toggle-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 9px !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .master-head-left,
  .cat-header-left,
  .trx-header-left,
  .rpt-header-left,
  .db-header-left,
  .topbar-left {
    order: unset !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 36px !important;
    box-sizing: border-box !important;
  }

  .master-head-title-wrap,
  .cat-header-title-wrap,
  .trx-header-title-box,
  .rpt-header-title-wrap,
  .rpt-title-box,
  .db-header-title-group,
  .settings-header-title-wrap,
  .topbar-heading {
    min-width: 0 !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 36px !important;
    box-sizing: border-box !important;
  }

  .master-title-row,
  .cat-title-row,
  .trx-title-row,
  .rpt-title-row,
  .db-header-badge-row,
  .settings-title-row,
  .topbar-title-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
  }

  .master-head-title-wrap .page-title,
  .cat-header-title-wrap .page-title,
  .trx-header-title-box .page-title,
  .trx-title,
  .rpt-header-title-wrap .page-title,
  .rpt-title,
  .db-header .page-title,
  .settings-title-row .page-title,
  .topbar-title-row .page-title,
  .page-title {
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
    letter-spacing: -0.01em !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .prod-sku-count-pill,
  .cat-count-pill,
  .trx-count-pill,
  .profit-badge-pill,
  .settings-version-pill,
  .pos-status-pill,
  .rpt-live-badge,
  .db-store-status-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 18px !important;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    padding: 2px 7px !important;
    border-radius: 999px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
  }

  .master-head-title-wrap .page-sub,
  .cat-header-title-wrap .page-sub,
  .rpt-header-title-wrap .page-sub,
  .trx-subtitle,
  .rpt-subtitle,
  .db-header .page-sub,
  .settings-header-title-wrap .page-sub,
  .topbar-sub {
    display: none !important;
  }

  .btn-add,
  .cat-btn-add,
  .trx-btn-new,
  .db-cta-kasir-btn,
  .rpt-btn-print,
  .rpt-btn-export-pdf {
    order: unset !important;
    width: auto !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 10px !important;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    border-radius: 8px !important;
    border: none !important;
    background: #4f46e5 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28) !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  .btn-add svg,
  .cat-btn-add svg,
  .trx-btn-new svg,
  .db-cta-kasir-btn svg,
  .rpt-btn-print svg,
  .rpt-btn-export-pdf svg {
    width: 13px !important;
    height: 13px !important;
    color: #ffffff !important;
    stroke: currentColor !important;
    flex-shrink: 0 !important;
  }

  .btn-text-full {
    display: none !important;
  }

  .btn-text-short {
    display: inline !important;
  }

  .master-head-right,
  .trx-header-actions,
  .rpt-header-actions,
  .topbar-actions {
    order: 2 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  .master-head-right #prodStoreDropdownWrap,
  .trx-header-actions #trxStoreDropdownWrap,
  .rpt-header-actions #profitStoreDropdownWrap,
  .topbar-actions #posStoreDropdownWrap {
    flex: 1 !important;
    min-width: 0 !important;
    width: auto !important;
  }

  .master-head-right .rpt-store-popover,
  .trx-header-actions .rpt-store-popover,
  .rpt-header-actions .rpt-store-popover,
  .topbar-actions .rpt-store-popover {
    left: 0 !important;
    right: auto !important;
    transform-origin: top left !important;
    width: min(320px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
  }

  .rpt-store-dropdown-wrap .rpt-top-ctrl-box,
  .rpt-top-ctrl-box.rpt-store-dropdown-btn {
    width: 100% !important;
    box-sizing: border-box !important;
    justify-content: flex-start !important;
  }

  .btn-batch-stock,
  .trx-btn-filter,
  .rpt-btn-filter {
    flex-shrink: 0 !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 11px !important;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    border-radius: 9px !important;
    gap: 5px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    color: #334155 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .btn-batch-stock svg,
  .trx-btn-filter svg,
  .rpt-btn-filter svg {
    width: 13px !important;
    height: 13px !important;
    color: #64748b !important;
    stroke: currentColor !important;
    flex-shrink: 0 !important;
  }

  /* 2x2 Bento Stat Cards on Mobile */
  .master-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
    margin: 8px 0;
  }

  .mcard {
    min-height: 52px;
    padding: 7px 9px;
    border-radius: 10px;
  }

  .mc-icon-badge {
    width: 22px;
    height: 22px;
    border-radius: 6px;
  }

  .mc-icon-badge svg {
    width: 12px;
    height: 12px;
  }

  .mc-tag {
    font-size: 9px;
    padding: 1px 5px;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mc-body {
    margin-top: 3px;
  }

  .mc-label {
    font-size: 9.5px;
  }

  .mc-value {
    font-size: 17px;
  }

  /* Mobile Toolbar: Row 1 Search, Row 2 Filters */
  .master-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
  }

  .msearch {
    width: 100%;
    flex: 1 0 100%;
    min-width: 100%;
    height: 36px;
    border-radius: 9px;
    padding: 0 10px;
  }

  .mfilter {
    flex: 1;
    min-width: 0;
    height: 36px;
    font-size: 11px;
    padding: 0 6px;
    border-radius: 9px;
  }

  .prod-view-toggles {
    height: 36px;
    padding: 2px;
    border-radius: 9px;
    flex-shrink: 0;
  }

  .prod-view-btn {
    width: 28px;
    height: 28px;
  }

  .mexport {
    display: none;
  }
}

/* Tabel master: kolom produk dengan emoji + SKU, badge status pill */
.master-table {
  border-radius: 14px;
}

.master-table .prod-table th {
  padding: 13px 16px;
  background: #fafbfd;
}

.master-table .prod-table td {
  padding: 13px 16px;
  vertical-align: middle;
}

.p-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.p-thumb {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.p-name strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
}

.p-name small {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  margin-top: 2px;
}

.p-cat {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.p-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.p-status.ok {
  background: #e7f6ed;
  color: var(--green);
}

.p-status.low {
  background: #fdf3e0;
  color: #d68a00;
}

.p-status.out {
  background: #fdeaea;
  color: #e0342b;
}

.p-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.p-act {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--muted);
  background: transparent;
  transition: background .15s, color .15s;
}

.p-act:hover {
  background: var(--bg);
  color: var(--ink);
}

.p-act.del:hover {
  background: #fdeaea;
  color: #e0342b;
}

.master-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px 0;
  color: var(--muted);
  font-size: 12px;
}

.master-pager {
  display: flex;
  gap: 6px;
}

.master-pager button {
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.master-pager button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.master-pager button:hover:not(.is-active):not(:disabled) {
  color: var(--ink);
}

.master-pager button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* Kartu laporan */
.report-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.report-card {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

.report-card .rc-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.report-card .rc-value {
  font-size: 22px;
  font-weight: 800;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.report-card .rc-value.green {
  color: var(--green);
}

/* Pengaturan */
.settings-card {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 8px 18px;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-label {
  color: var(--muted);
  font-weight: 600;
}

.settings-row strong {
  font-weight: 700;
  text-align: right;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 769px) {
  .topbar-top,
  .topbar-actions {
    display: contents;
  }
  .topbar-left {
    order: 1;
  }
  #posStoreDropdownWrap {
    order: 2;
    margin-left: auto;
  }
  .profile {
    order: 3;
  }
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  width: fit-content;
}

.topbar-sub {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

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

.profile-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.profile-text strong {
  font-size: 13px;
  font-weight: 700;
}

.profile-text small {
  color: var(--muted);
  font-size: 11.5px;
}

.avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f7d4d4, #e5a1a1);
  color: #8f1d24;
  font-weight: 800;
  font-size: 13px;
}

/* ---------- Categories ---------- */
.categories {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.categories::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 96px;
  padding: 14px 12px;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, transform .15s;
}

.cat-chip:hover {
  transform: translateY(-2px);
}

.cat-chip strong {
  font-size: 12.5px;
  font-weight: 700;
}

.cat-chip small {
  color: var(--muted);
  font-size: 10px;
}

.cat-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 10px 20px -8px rgba(200, 16, 46, .55);
}

.cat-chip.is-active .cat-emoji {
  background: rgba(255, 255, 255, .18);
}

.cat-chip.is-active small {
  color: rgba(255, 255, 255, .8);
}

/* ---------- Menu head with Search & Filter ---------- */
.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 16px;
  flex-wrap: wrap;
}

.menu-head h1 {
  font-size: 19px;
  font-weight: 800;
  white-space: nowrap;
}

.menu-head-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 440px;
  justify-content: flex-end;
}

.search {
  flex: 1;
  min-width: 170px;
  max-width: 290px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 12px;
  height: 40px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}

.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, .1);
}

.search svg {
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  flex-shrink: 0;
}

.search input {
  border: 0;
  outline: none;
  width: 100%;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: transparent;
}

.search input::placeholder {
  color: var(--muted);
  font-size: 12.5px;
}

/* Filter Dropdown & Popover */
.filter-dropdown-wrap {
  position: relative;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
  padding: 0 14px;
  height: 40px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: color .15s, border-color .15s, background .15s;
  cursor: pointer;
  white-space: nowrap;
}

.filter-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.filter-btn:hover,
.filter-btn[aria-expanded="true"] {
  color: var(--ink);
  border-color: #cbd5e1;
}

.filter-btn.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: #f7d4d4;
}

.filter-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
}

.filter-badge[hidden] {
  display: none !important;
}

/* Popover panel */
.filter-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 16px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: popIn .16s ease;
}

.filter-popover[hidden] {
  display: none;
}

.fp-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fp-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.fp-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.fp-chip {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s, color .15s;
}

.fp-chip:hover {
  border-color: #cbd5e1;
}

.fp-chip.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.fp-select-wrap {
  width: 100%;
}

.fp-select {
  width: 100%;
  height: 38px;
  border-radius: 9px;
  border: 1.5px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  padding: 0 10px;
  outline: none;
  cursor: pointer;
  transition: border-color .15s;
}

.fp-select:focus {
  border-color: var(--accent);
}

.fp-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.fp-reset-btn {
  flex: 1;
  height: 34px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.fp-reset-btn:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.fp-apply-btn {
  flex: 1.3;
  height: 34px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(200, 16, 46, .25);
  transition: opacity .15s, transform .15s;
}

.fp-apply-btn:hover {
  opacity: .92;
}

/* ---------- Menu grid ---------- */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .18s, box-shadow .18s;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: left;
}

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

.card-media {
  position: relative;
  height: 118px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 46px;
  margin-bottom: 11px;
  overflow: hidden;
}

.card-media.has-img {
  background: #f8fafc;
}

.card-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: transform .25s cubic-bezier(.2, 0, 0, 1);
}

.card:hover .card-media-img {
  transform: scale(1.06);
}

.card:disabled .card-media-img,
.card.is-disabled .card-media-img {
  filter: grayscale(1);
  opacity: .45;
}

/* Badge group — menampung beberapa tag sekaligus, wrap jika sempit */
.card-badges {
  position: absolute;
  top: 7px;
  left: 7px;
  right: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-start;
  align-items: flex-start;
  pointer-events: none;
  z-index: 2;
}

.badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .02em;
  padding: 3.5px 7px;
  border-radius: 6px;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(30, 36, 50, .18);
}

.badge.is-blue {
  background: var(--blue);
}

/* diskon */
.badge.is-green {
  background: var(--green);
}

/* ready */
.badge.is-yellow {
  background: #f2a30f;
}

/* stok menipis */
.badge.is-red {
  background: #e0342b;
}

/* stok habis */
.badge.is-gray {
  background: #8a94a6;
}

/* exp */

/* ---------- Kartu stok habis ---------- */
.card:disabled,
.card.is-disabled {
  cursor: not-allowed;
}

.card:disabled:hover {
  transform: none;
  /* matikan efek hover angkat */
  box-shadow: var(--shadow-sm);
  border-color: transparent;
}

.card.is-disabled .media-emoji {
  filter: grayscale(1);
  opacity: .5;
}

.card.is-disabled .card-name,
.card.is-disabled .card-meta {
  opacity: .55;
}

.card.is-disabled .card-price {
  opacity: .75;
}

.media-emoji {
  pointer-events: none;
}

.card-name {
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 5px;
}

.card-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 9px;
  font-variant-numeric: tabular-nums;
}

.card-price s {
  color: var(--muted);
  font-size: 11.5px;
}

.card-price strong {
  color: var(--accent);
  font-size: 14.5px;
  font-weight: 800;
}

.card-price strong.only {
  color: var(--ink);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10.5px;
}

.card-meta .stock {
  color: var(--green);
  font-weight: 600;
}

.card-meta .stock.low {
  color: #e0342b;
}

.menu-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 48px 0;
  font-size: 13px;
}

/* ============================================================
   Order panel
   ============================================================ */
.order {
  background: var(--surface);
  border-left: 1px solid var(--line);
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  /* list yang scroll, bukan seluruh panel */
}

.order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-head h2 {
  font-size: 15px;
  font-weight: 800;
  margin-right: auto;
}

.order-close-btn {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  place-items: center;
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  transition: background .15s, color .15s;
}

.order-close-btn:hover {
  background: #fdeeee;
  color: #e0342b;
}

.clear-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #e0342b;
  padding: 7px 12px;
  border-radius: 9px;
  background: #fdeeee;
  transition: background .15s, transform .15s;
}

.clear-all:hover:not(:disabled) {
  background: #fbdcdc;
  transform: translateY(-1px);
}

.clear-all:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.clear-all:focus-visible {
  outline: 2px solid #e0342b;
  outline-offset: 2px;
}

/* ---------- Order items ---------- */
.order-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-height: 120px;
  overflow-y: auto;
  padding-right: 4px;
  /* ruang scrollbar agar tidak menabrak konten */
  scrollbar-width: thin;
}

.order-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-areas:
    "thumb info price"
    "thumb qty  price";
  column-gap: 12px;
  row-gap: 7px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.order-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.oi-thumb {
  grid-area: thumb;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 20px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.oi-thumb.has-img {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.oi-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.oi-info {
  grid-area: info;
  min-width: 0;
  align-self: end;
}

.oi-info strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oi-info small {
  color: var(--muted);
  font-size: 10.5px;
}

.oi-qty {
  grid-area: qty;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  align-self: start;
}

.oi-qty button {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--ink);
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  transition: background .15s, color .15s;
}

.oi-qty button:hover {
  background: var(--accent);
  color: #fff;
}

.oi-qty button.del:hover {
  background: #e0342b;
}

.oi-qty button.oi-del {
  margin-left: 2px;
  color: var(--muted);
}

.oi-qty button.oi-del:hover {
  background: #fdeeee;
  color: #e0342b;
}

.oi-qty button.oi-del svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.oi-qty button:disabled {
  opacity: .35;
  cursor: not-allowed;
  background: var(--bg);
  color: var(--muted);
}

.oi-qty span {
  min-width: 16px;
  text-align: center;
  font-weight: 700;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.oi-price {
  grid-area: price;
  align-self: center;
  text-align: right;
  font-weight: 800;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.oi-price small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  font-size: 10px;
  white-space: nowrap;
}

.oi-price .oi-save {
  color: var(--green);
  font-weight: 700;
}

.order-empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  padding: 26px 0;
}

.order-empty .big {
  font-size: 30px;
  display: block;
  margin-bottom: 8px;
}

/* ---------- Totals ---------- */
.totals {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.totals div {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
}

.totals dt {
  color: var(--muted);
}

.totals dd {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.totals .is-accent {
  color: var(--accent);
}

.grand-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: 14px;
}

.grand-total strong {
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ---------- Payment ---------- */
.payment p {
  font-weight: 800;
  font-size: 13.5px;
  margin-bottom: 11px;
}

.payment-row {
  display: flex;
  gap: 10px;
}

.pay-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 6px 10px;
  border-radius: 13px;
  border: 1.5px solid var(--line);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  transition: border-color .15s, background .15s, color .15s;
}

.pay-ico {
  font-size: 18px;
}

.pay-btn:hover {
  border-color: #f0b9b9;
}

.pay-btn.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- CTA ---------- */
.cta {
  margin-top: auto;
  height: 52px;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: .01em;
  box-shadow: 0 12px 24px -10px rgba(31, 170, 89, .65);
  transition: transform .15s, box-shadow .15s, opacity .15s;
}

.cta:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px -10px rgba(31, 170, 89, .7);
}

.cta:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
}

/* ---------- Cart FAB (mobile & tablet portrait) ---------- */
.cart-fab {
  display: none;
  align-items: center;
  gap: 8px;
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  padding: 13px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 12px 24px -8px rgba(200, 16, 46, .65);
  transition: opacity .2s, transform .2s;
}

.cart-fab.is-hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.fab-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--accent);
  font-weight: 800;
  border-radius: 999px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 50;
  max-width: 90vw;
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============================================================
   Modal konfirmasi (popup custom, menggantikan confirm())
   ============================================================ */
.modal-backdrop,
.receipt-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 34, .55);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 20px;
}

.modal-backdrop[hidden],
.receipt-backdrop[hidden] {
  display: none;
}

.modal {
  background: #fff;
  border-radius: 18px;
  padding: 26px 24px 20px;
  width: min(360px, 100%);
  text-align: center;
  box-shadow: var(--shadow-md);
  animation: popIn .18s ease;
}

@keyframes popIn {
  from {
    transform: scale(.94);
    opacity: 0;
  }

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

.modal-icon {
  font-size: 34px;
  margin-bottom: 8px;
}

.modal h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
}

.modal p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 18px;
  white-space: pre-line;
}

.modal p:has(+ .cash-box) {
  margin-bottom: 12px;
}

/* ---------- Box pembayaran tunai ---------- */
.cash-box {
  text-align: left;
  background: var(--bg);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 18px;
}

.cash-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

#cashInput {
  width: 100%;
  height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  text-align: right;
  padding: 0 12px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color .15s;
}

#cashInput:focus {
  border-color: var(--green);
}

#cashInput.is-error {
  border-color: #e0342b;
}

.cash-quick {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.cash-btn {
  height: 36px;
  border-radius: 9px;
  background: #fff;
  border: 1.5px solid var(--line);
  font-weight: 800;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}

.cash-btn:hover {
  border-color: var(--green);
  color: var(--green);
}

.cash-btn.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* Dropdown nominal lainnya — menyatu dengan tombol cepat */
.cash-more select {
  width: 100%;
  height: 36px;
  border-radius: 9px;
  background: #fff;
  border: 1.5px solid var(--line);
  font: inherit;
  font-weight: 800;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  padding: 0 6px;
  outline: none;
  transition: border-color .15s, color .15s;
}

.cash-more select:hover {
  border-color: var(--green);
  color: var(--green);
}

.cash-more select:focus {
  border-color: var(--green);
}

/* Kalkulasi tunai — mini tabel rapi: label kiri, nilai kanan, sejajar */
.cash-calc {
  margin-top: 12px;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.cc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.cc-row span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.cc-row strong {
  font-size: 13.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.cc-row.cc-result {
  border-top: 1.5px dashed var(--line);
  padding-top: 8px;
  margin-top: 2px;
}

.cc-row.cc-result span {
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 800;
}

.cc-row.cc-result strong {
  font-size: 19px;
  color: var(--green);
}

.cc-row.cc-result strong.is-short {
  color: #e0342b;
}

.cash-error {
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: #e0342b;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-btn {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13.5px;
  transition: transform .15s, opacity .15s;
}

.modal-btn:hover {
  transform: translateY(-1px);
}

.modal-btn.secondary {
  background: var(--bg);
  color: var(--ink);
}

.modal-btn.danger {
  background: #e0342b;
  color: #fff;
}

.modal-btn.success {
  background: var(--green);
  color: #fff;
}

/* ============================================================
   Popup struk — hitam putih
   ============================================================ */
.receipt {
  background: #fff;
  color: #000;
  width: min(340px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  /* body scroll, footer tetap */
  border-radius: 6px;
  overflow: hidden;
  font-family: "Courier New", monospace;
  box-shadow: var(--shadow-md);
  animation: popIn .18s ease;
  text-align: center;
}

/* Area isi struk — scroll mandiri */
.receipt-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 22px 16px;
  scrollbar-width: thin;
}

/* Footer tombol — selalu terlihat, tidak ikut terscroll */
.receipt-actions {
  display: flex;
  gap: 10px;
  padding: 12px 22px 16px;
  border-top: 1.5px solid #000;
  background: #fff;
  flex-shrink: 0;
}

.receipt-btn {
  flex: 1;
  height: 42px;
  border: 2px solid #000;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .05em;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
  border-radius: 4px;
}

.receipt-btn:hover {
  transform: translateY(-1px);
}

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

.receipt-btn.print {
  background: #fff;
  color: #000;
}

.receipt-btn.print:hover {
  background: #000;
  color: #fff;
}

.receipt-btn.done {
  background: #000;
  color: #fff;
}

.receipt-btn.done:hover {
  opacity: .85;
}

.receipt-logo {
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
  border: 2.5px solid #000;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.receipt-logo svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #000;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.receipt-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .08em;
}

.receipt-tag {
  font-size: 11px;
  margin-top: 2px;
}

.receipt-addr {
  font-size: 11px;
  line-height: 1.5;
  margin-top: 6px;
}

.receipt-sep {
  border-top: 1.5px dashed #000;
  margin: 12px 0;
}

.receipt-info {
  text-align: left;
  display: grid;
  gap: 4px;
}

.receipt-info div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11.5px;
}

.receipt-info span {
  color: #000;
}

.receipt-info strong {
  font-weight: 700;
  text-align: right;
}

.receipt-items {
  text-align: left;
  display: grid;
  gap: 8px;
}

.receipt-items .ri-row {
  font-size: 11.5px;
}

.receipt-items .ri-name {
  font-weight: 700;
}

.receipt-items .ri-line {
  display: flex;
  justify-content: space-between;
}

.receipt-items .ri-disc {
  font-size: 10.5px;
  color: #555;
}

.receipt-items .ri-disc span:first-child {
  text-decoration: line-through;
}

.receipt-totals {
  text-align: left;
  display: grid;
  gap: 4px;
}

.receipt-totals div {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.receipt-totals .rt-total {
  font-size: 14px;
  font-weight: 800;
  border-top: 1.5px solid #000;
  padding-top: 6px;
  margin-top: 4px;
}

.receipt-totals .rt-pay {
  font-weight: 800;
}

.receipt-thanks {
  font-size: 11.5px;
  line-height: 1.6;
}

.receipt-close {
  margin-top: 14px;
  width: 100%;
  height: 42px;
  border: 2px solid #000;
  background: #000;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .05em;
  cursor: pointer;
  transition: opacity .15s;
}

.receipt-close:hover {
  opacity: .85;
}

/* ============================================================
   Responsive
   ============================================================ */
/* Tablet Landscape (1024px): Rapikan grid ruang dan porsi kolom */
@media (max-width: 1080px) {
  .app {
    grid-template-columns: 72px minmax(0, 1fr) 320px;
  }

  .app.sidebar-expanded {
    grid-template-columns: 220px minmax(0, 1fr) 320px;
  }

  .order {
    padding: 18px 16px 20px;
  }
}

/* Tablet Portrait & Mobile (<=768px): Mode Drawer Penuh & Aksesibilitas Touch */
@media (max-width: 768px) {

  .app,
  .app.app-single,
  .app.sidebar-expanded,
  .app.app-single.sidebar-expanded {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .rail {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100vh;
    width: 260px !important;
    padding: 18px 16px !important;
    z-index: 95;
    box-shadow: var(--shadow-md);
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.2, 0, 0, 1);
  }

  .app.sidebar-expanded .rail {
    transform: translateX(0);
  }

  .app.sidebar-expanded .rail-brand-text,
  .app.sidebar-expanded .rail-profile-info,
  .app.sidebar-expanded .rail-label,
  .app.sidebar-expanded .rail-section-label {
    display: flex !important;
  }

  .app.sidebar-expanded .rail-label {
    display: inline-block !important;
  }

  .app.sidebar-expanded .rail-btn {
    width: 100% !important;
    justify-content: flex-start !important;
    padding: 0 12px !important;
    gap: 12px !important;
  }

  /* Sembunyikan floating edge toggle di mobile/tablet agar tidak mengintip di pinggir layar */
  .rail-edge-toggle {
    display: none !important;
  }

  /* Sticky Topbar di mobile/tablet agar tetap terlihat saat scroll */
  .topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(248, 249, 251, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0;
    height: auto;
    min-height: auto;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .topbar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    height: 36px;
    min-height: 36px;
    box-sizing: border-box;
  }

  .topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-shrink: 1;
  }

  /* Sidebar toggle khusus layar <=768px (ikon hamburger garis tiga modern & clean) */
  .topbar-mobile-toggle {
    display: grid !important;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    color: var(--ink);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
    transition: background 140ms ease, color 140ms ease, border-color 140ms ease, transform 100ms ease;
    flex-shrink: 0;
  }

  .topbar-mobile-toggle:active {
    transform: scale(0.92);
    background: var(--bg);
  }

  .topbar-heading {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
  }

  .topbar-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 5px;
    white-space: nowrap;
  }

  .topbar-sub {
    display: none !important;
  }

  .topbar-actions #posStoreDropdownWrap {
    flex: 1;
    width: 100%;
  }

  .topbar-actions #posStoreDropdownWrap .rpt-top-ctrl-box {
    width: 100%;
    height: 34px;
    box-sizing: border-box;
    justify-content: flex-start;
  }

  .profile {
    display: flex;
    align-items: center;
    gap: 0;
  }

  .profile-text {
    display: none !important;
  }

  .avatar {
    width: 32px;
    height: 32px;
    font-size: 11px;
    border-radius: 8px;
    flex-shrink: 0;
  }

  /* Cart FAB tampil di <=768px */
  .cart-fab {
    display: flex;
  }

  .cart-fab.is-hidden,
  body:has(.order.is-open) .cart-fab,
  .app:has(.order.is-open)+.cart-fab,
  .app:has(.order.is-open)~.cart-fab {
    display: none !important;
  }

  /* Order panel drawer */
  .order {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(380px, 92vw);
    z-index: 96;
    transform: translateX(100%);
    transition: transform .28s ease;
    box-shadow: -4px 0 24px rgba(15, 23, 42, .18);
  }

  .order.is-open {
    transform: translateX(0);
  }

  .order-close-btn {
    display: grid;
  }

  /* Backdrop order drawer di mobile/tablet portrait */
  .order-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(3px);
    z-index: 90;
    transition: opacity .2s;
  }

  .order-backdrop[hidden] {
    display: none;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 16px 14px 24px;
  }

  .profile-text {
    display: none;
  }

  .menu-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .menu-head-tools {
    max-width: 100%;
    width: 100%;
  }

  .search {
    min-width: 0;
    max-width: none;
    flex: 1;
  }

  .filter-popover {
    width: calc(100vw - 32px);
    max-width: 320px;
    right: 0;
  }

  .menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
}

/* ============================================================
   Dashboard Utama (UI Sesuai Referensi)
   ============================================================ */
.db-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.db-header-top {
  display: contents;
}

.db-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  order: 1;
}

.db-header .page-title {
  margin: 0;
  line-height: 1.2;
}

.db-header .page-sub {
  margin: 3px 0 0;
}

.db-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  order: 2;
}

.db-cta-kasir-btn {
  order: 3;
}
}

/* Time Filter Segment Controls */
.db-time-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 4px;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.db-filter-chips {
  display: flex;
  align-items: center;
  gap: 4px;
}

.db-chip {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.db-chip:hover {
  color: var(--ink);
}

.db-chip.is-active {
  background: #ffffff;
  color: #4f46e5;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

/* Custom Date Range Pop/Inline Picker */
.db-custom-date {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 8px;
  border-left: 1px solid #e2e8f0;
}

.db-custom-date[hidden] {
  display: none;
}

.db-date-input {
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 8px;
  outline: none;
  transition: border-color 140ms ease;
}

.db-date-input:focus {
  border-color: #4f46e5;
}

.db-date-sep {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.db-date-apply-btn {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  background: #4f46e5;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 140ms ease;
}

.db-date-apply-btn:hover {
  background: #4338ca;
}

.db-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  background: #4f46e5;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.db-btn-primary:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.45);
}

.db-btn-primary:active {
  transform: scale(0.97);
}

.db-btn-primary svg {
  width: 16px;
  height: 16px;
}

.db-header-title-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.db-header-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.db-store-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #059669;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.db-store-status-pill .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
  animation: pulseStatus 2s infinite;
}

@keyframes pulseStatus {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }

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

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

.db-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.db-cta-kasir-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #4f46e5;
  color: #ffffff;
  padding: 9px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.32);
  transition: all 150ms ease;
  white-space: nowrap;
}

.db-cta-kasir-btn:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.42);
}

.db-cta-kasir-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

/* ============================================================
   1. 4 BENTO KPI CARDS (Financial & Operational Essentials)
   ============================================================ */
.db-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.db-kpi-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 18px;
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  transition: all 160ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.db-kpi-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.db-kpi-card.is-primary {
  border-color: #e0e7ff;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfe 100%);
}

.db-kpi-card.is-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4f46e5, #818cf8);
}

.db-kpi-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.db-kpi-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.db-kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.db-kpi-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  width: fit-content;
  white-space: nowrap;
}

.db-kpi-tag svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.db-kpi-tag.green {
  background: #ecfdf5;
  color: #059669;
}

.db-kpi-tag.blue {
  background: #eff6ff;
  color: #2563eb;
}

.db-kpi-tag.amber {
  background: #fffbeb;
  color: #d97706;
}

.db-kpi-tag.purple {
  background: #f5f3ff;
  color: #7c3aed;
}

.db-kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.db-kpi-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.db-kpi-icon.indigo {
  background: #eef2ff;
  color: #4f46e5;
}

.db-kpi-icon.emerald {
  background: #ecfdf5;
  color: #059669;
}

.db-kpi-icon.blue {
  background: #eff6ff;
  color: #2563eb;
}

.db-kpi-icon.amber {
  background: #fffbeb;
  color: #d97706;
}

.db-kpi-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.db-kpi-value {
  display: block;
  font-size: clamp(20px, 1.8vw, 27px);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.db-kpi-value.text-emerald {
  color: #059669;
}

.db-kpi-sub {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.3;
}

.db-kpi-sub strong {
  color: #334155;
}

.db-kpi-alert-text {
  font-size: 11.5px;
  font-weight: 700;
  color: #d97706;
}

.db-kpi-alert-text.is-ok {
  color: #059669;
}

/* ============================================================
   2. MIDDLE SECTION: ANALYTICS & PAYMENT (2 Col Grid)
   ============================================================ */
.db-analytics-grid {
  display: grid;
  grid-template-columns: 1.85fr 1.15fr;
  gap: 20px;
  margin-bottom: 24px;
}

.db-panel {
  background: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.db-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.db-panel-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.db-panel-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.db-panel-icon-wrap svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.db-panel-icon-wrap.purple {
  background: #f5f3ff;
  color: #7c3aed;
}

.db-panel-icon-wrap.green {
  background: #ecfdf5;
  color: #059669;
}

.db-panel-icon-wrap.emerald {
  background: #ecfdf5;
  color: #059669;
}

.db-panel-icon-wrap.amber {
  background: #fffbeb;
  color: #d97706;
}

.db-panel-icon-wrap.blue {
  background: #eff6ff;
  color: #2563eb;
}

.db-panel-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.db-panel-sub {
  font-size: 11.5px;
  color: #64748b;
}

.db-panel-link {
  font-size: 12px;
  font-weight: 700;
  color: #4f46e5;
  text-decoration: none;
  white-space: nowrap;
  transition: color 140ms ease;
}

.db-panel-link:hover {
  color: #3730a3;
  text-decoration: underline;
}

/* Chart Container & Legends */
.db-chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
}

.db-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.purple {
  background: #4f46e5;
}

.db-chart-container {
  margin-top: 10px;
  position: relative;
  width: 100%;
}

.db-chart-wrap {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  height: 200px;
  align-items: stretch;
}

.db-chart-y-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: right;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
  padding-bottom: 28px;
  height: 100%;
  box-sizing: border-box;
}

.db-chart-area-box {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  min-width: 0;
}

.db-chart-svg {
  width: 100%;
  height: calc(100% - 24px);
  overflow: visible;
  display: block;
}

.chart-grid-line {
  stroke: #f1f5f9;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.db-chart-x-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 22px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  padding-top: 6px;
}

.db-chart-footer {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-top: 14px;
  margin-top: 18px;
  border-top: 1px solid #f1f5f9;
}

.db-chart-stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.db-chart-stat-lbl {
  color: #64748b;
}

.db-chart-stat-val {
  color: #0f172a;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.db-chart-stat-sep {
  width: 1px;
  height: 16px;
  background: #e2e8f0;
}

/* Payment Mix Multi-Bar */
.db-pay-multi-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #f1f5f9;
  margin-bottom: 16px;
  gap: 2px;
}

.db-pay-seg {
  height: 100%;
  transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.db-pay-seg.cash {
  background: #10b981;
}

.db-pay-seg.qris {
  background: #7c3aed;
}

.db-pay-seg.debit {
  background: #0284c7;
}

.db-pay-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.db-pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
}

.db-pay-row-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.db-pay-badge {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}

.db-pay-desc {
  font-size: 10.5px;
  color: #94a3b8;
}

.db-pay-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex-shrink: 0;
  text-align: right;
}

.db-pay-amount {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.db-pay-percent {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.db-cash-drawer-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  margin-top: auto;
}

.db-cash-drawer-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.db-cash-drawer-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 11.5px;
  color: #065f46;
}

.db-cash-drawer-text strong {
  font-size: 15px;
  font-weight: 800;
  color: #047857;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   3. OPERATIONAL FEEDS: BEST SELLERS, TOP PROFIT & TRANSACTIONS
   ============================================================ */
.db-operations-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.db-top-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.db-top-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  transition: all 140ms ease;
}

.db-top-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
}

.db-top-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.db-top-rank {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.db-top-rank.is-profit {
  background: #ecfdf5;
  color: #059669;
}

.db-top-emoji {
  font-size: 18px;
  flex-shrink: 0;
}

.db-top-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.db-top-item-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.db-top-bar-wrap {
  width: 100%;
  height: 5px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.db-top-bar-fill {
  height: 100%;
  background: #4f46e5;
  border-radius: 999px;
  transition: width 300ms ease;
}

.db-top-bar-fill.is-profit {
  background: linear-gradient(90deg, #10b981, #059669);
}

.db-top-item-sales {
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.db-top-item-right {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.db-top-item-right strong {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.db-top-profit-val {
  font-size: 13.5px;
  font-weight: 800;
  color: #059669 !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.db-top-share-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #6366f1;
}

.db-top-share-tag.is-profit {
  color: #059669;
}

/* Recent Transactions List */
.db-recent-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.db-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  transition: all 140ms ease;
}

.db-recent-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
}

.db-recent-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.db-recent-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.db-recent-code {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.db-trx-pay-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 6px;
}

.db-trx-pay-badge.cash {
  background: #ecfdf5;
  color: #059669;
}

.db-trx-pay-badge.qris {
  background: #f5f3ff;
  color: #7c3aed;
}

.db-trx-pay-badge.debit {
  background: #eff6ff;
  color: #2563eb;
}

.db-recent-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.db-recent-cashier {
  color: #94a3b8;
}

.db-recent-right {
  flex-shrink: 0;
  text-align: right;
}

.db-recent-right strong {
  font-size: 13.5px;
  font-weight: 800;
  color: #4f46e5;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ============================================================
   4. INVENTORY RESTOCK ALERT BANNER
   ============================================================ */
.db-stock-alert-section {
  margin-bottom: 24px;
}

.db-stock-alert-card {
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.db-stock-alert-card.is-healthy {
  border-color: #a7f3d0;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.05);
}

.db-stock-alert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.db-stock-alert-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff7ed;
  color: #ea580c;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.db-stock-alert-card.is-healthy .db-stock-alert-icon-box {
  background: #ecfdf5;
  color: #059669;
}

.db-stock-alert-icon-box svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.db-stock-alert-title-wrap {
  flex: 1;
  min-width: 220px;
}

.db-stock-alert-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
}

.db-stock-alert-sub {
  font-size: 11.5px;
  color: #64748b;
}

.db-stock-alert-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 140ms ease;
  white-space: nowrap;
}

.db-stock-alert-btn:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #4f46e5;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.db-stock-alert-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.db-stock-badge-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fffaf0;
  border: 1px solid #fed7aa;
}

.db-stock-badge-item.is-out {
  background: #fef2f2;
  border-color: #fecaca;
}

.db-stock-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.db-stock-emoji {
  font-size: 18px;
}

.db-stock-names {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.db-stock-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.db-stock-sku {
  font-size: 10.5px;
  color: #94a3b8;
}

.db-stock-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.db-stock-pill.low {
  background: #ffedd5;
  color: #c2410c;
}

.db-stock-pill.out {
  background: #fee2e2;
  color: #b91c1c;
}

/* ============================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ============================================================ */
@media (max-width: 1180px) {
  .db-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .db-analytics-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .db-operations-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .db-operations-grid>.db-panel:nth-child(3) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {

  /* 1. Modern Mobile Header: Multi-Row Mobile Layout */
  .db-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
    width: 100%;
    box-sizing: border-box;
  }

  .db-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .db-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
    order: 1 !important;
  }

  .db-header-title-group {
    min-width: 0;
  }

  .db-header-badge-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    min-width: 0;
  }

  .db-header .page-title {
    font-size: 14px !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
    line-height: 1.2 !important;
  }

  .db-header .page-sub {
    display: none !important;
  }

  .db-store-status-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 2px 6px !important;
    font-size: 10px !important;
    border-radius: 999px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  .db-store-status-pill .pulse-dot {
    width: 5px !important;
    height: 5px !important;
  }

  .db-cta-kasir-btn {
    padding: 0 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    gap: 4px !important;
    white-space: nowrap !important;
    align-self: center !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    height: 32px !important;
    order: 2 !important;
    box-sizing: border-box !important;
  }

  .db-cta-kasir-btn svg {
    width: 14px;
    height: 14px;
  }

  .db-header-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  #dbStoreDropdownWrap {
    width: 100%;
  }

  #dbStoreDropdownWrap .rpt-top-ctrl-box {
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
  }

  /* 2. Ultra-Sleek 1-Row iOS-Style Segmented Time Filter */
  .db-time-filter {
    width: 100%;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 11px;
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .db-filter-chips {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2px;
    width: 100%;
    box-sizing: border-box;
  }

  .db-chip {
    width: 100%;
    padding: 5px 0 !important;
    font-size: 11px !important;
    font-weight: 700;
    border-radius: 8px;
    text-align: center;
    white-space: nowrap;
  }
    text-align: center;
    justify-content: center;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: #64748b;
    box-shadow: none;
    transition: all 140ms ease;
  }

  .db-chip.is-active {
    background: #ffffff;
    color: #4f46e5;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  }

  .db-custom-date {
    flex-direction: column;
    gap: 6px;
  }

  /* 3. Compact Bento KPI Layout: Hero (Full Width) + 2 Stat Badges (50/50) + Stock Strip (Full Width) */
  .db-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }

  /* Card 1: Master Financial Hero Card */
  .db-kpi-card.is-primary {
    grid-column: 1 / -1;
    padding: 16px 18px 14px;
    background: linear-gradient(135deg, #ffffff 0%, #f9faff 100%);
    border: 1px solid #e0e7ff;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.05);
    border-radius: 16px;
  }

  .db-kpi-card.is-primary .db-kpi-head {
    margin-bottom: 2px;
  }

  .db-kpi-card.is-primary .db-kpi-label {
    font-size: 10px;
    letter-spacing: 0.06em;
  }

  .db-kpi-card.is-primary .db-kpi-value {
    font-size: clamp(24px, 7.5vw, 32px);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 3px 0 2px;
    line-height: 1.15;
  }

  .db-kpi-card.is-primary .db-kpi-sub {
    font-size: 11px;
    color: #94a3b8;
  }

  /* Card 2 & 3: Compact Side-by-Side Stat Cards (Pixel-Perfect Horizontal Alignment) */
  .db-kpi-card.is-stat-card {
    padding: 12px 11px;
    gap: 8px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 124px;
  }

  .db-kpi-card.is-stat-card .db-kpi-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
    min-height: 42px;
    margin-bottom: 2px;
  }

  .db-kpi-card.is-stat-card .db-kpi-label-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
  }

  .db-kpi-card.is-stat-card .db-kpi-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    flex-shrink: 0;
  }

  .db-kpi-card.is-stat-card .db-kpi-icon svg {
    width: 13px;
    height: 13px;
  }

  .db-kpi-card.is-stat-card .db-kpi-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
  }

  .db-kpi-card.is-stat-card .db-kpi-tag {
    font-size: 9px;
    font-weight: 700;
    padding: 1.5px 6px;
    height: 18px;
    line-height: 1;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    width: fit-content;
  }

  .db-kpi-card.is-stat-card .db-kpi-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: flex-end;
  }

  .db-kpi-card.is-stat-card .db-kpi-value {
    font-size: clamp(13.5px, 3.8vw, 18px);
    font-weight: 800;
    min-height: 24px;
    display: flex;
    align-items: center;
    line-height: 1.2;
    white-space: nowrap;
    letter-spacing: -0.03em;
  }

  .db-kpi-card.is-stat-card .db-kpi-sub {
    font-size: 10px;
    line-height: 16px;
    min-height: 16px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-top: 2px;
  }

  .db-kpi-card.is-stat-card .db-kpi-sub-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Card 4: Inventory Health Alert Strip */
  .db-kpi-card.is-inventory {
    grid-column: 1 / -1;
    padding: 10px 14px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 12px;
  }

  .db-kpi-card.is-inventory .db-kpi-head {
    display: none;
  }

  .db-kpi-card.is-inventory .db-kpi-body {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
  }

  .db-kpi-card.is-inventory .db-kpi-value {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .db-kpi-card.is-inventory .db-kpi-value::before {
    content: "📦";
    font-size: 14px;
  }

  .db-kpi-card.is-inventory .db-kpi-sub {
    font-size: 11px;
  }

  /* 4. Panels & Chart Fine-Tuning on Mobile */
  .db-panel {
    padding: 16px;
    border-radius: 16px;
  }

  .db-panel-head {
    margin-bottom: 12px;
  }

  .db-panel-title {
    font-size: 14px;
  }

  .db-panel-sub {
    font-size: 11px;
  }

  .db-chart-wrap {
    grid-template-columns: 55px 1fr;
    gap: 8px;
    height: 170px;
  }

  .db-chart-y-labels {
    font-size: 9px;
    padding-bottom: 22px;
  }

  .db-chart-svg {
    height: calc(100% - 20px);
  }

  .db-chart-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    margin-top: 12px;
  }

  .db-chart-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .db-chart-stat-item:last-child {
    text-align: right;
    align-items: flex-end;
  }

  .db-chart-stat-lbl {
    font-size: 10px;
    color: #64748b;
  }

  .db-chart-stat-val {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
  }

  .db-chart-stat-sep {
    display: block;
    width: 1px;
    height: 24px;
    background: #e2e8f0;
  }

  /* 5. Feeds & Lists on Mobile: Top Products & Recent Transactions */
  .db-operations-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px;
  }

  .db-operations-grid>.db-panel:nth-child(3) {
    grid-column: auto !important;
  }

  .db-top-item,
  .db-recent-item {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    gap: 8px;
  }

  .db-top-item-left {
    min-width: 0;
    gap: 8px;
    flex: 1;
  }

  .db-top-rank {
    width: 24px;
    height: 24px;
    font-size: 11px;
    border-radius: 6px;
    flex-shrink: 0;
  }

  .db-top-emoji {
    font-size: 16px;
    flex-shrink: 0;
  }

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

  .db-top-item-name {
    font-size: 12px;
  }

  .db-top-item-sales {
    font-size: 10px;
    flex-wrap: wrap;
    white-space: normal;
  }

  .db-top-item-right {
    flex-shrink: 0;
    text-align: right;
  }

  .db-top-item-right strong {
    font-size: 12.5px;
    white-space: nowrap;
  }

  .db-recent-left {
    min-width: 0;
    flex: 1;
  }

  .db-recent-code {
    font-size: 11.5px;
  }

  .db-recent-meta {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .db-recent-right {
    flex-shrink: 0;
  }

  .db-recent-right strong {
    font-size: 12.5px;
    white-space: nowrap;
  }

  /* 6. Stock Alert Header on Mobile */
  .db-stock-alert-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .db-stock-alert-btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}

/* =========================================================
   HALAMAN MASTER KATEGORI (MATCHING REFERENCE UI)
   ========================================================= */

.cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.cat-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-btn-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #4f46e5;
  color: #ffffff;
  border: none;
  border-radius: 11px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  transition: all 160ms ease;
}

.cat-btn-add:hover {
  background: #4338ca;
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.45);
}

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

.cat-btn-add svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

/* Category Toolbar: Search + View Toggles */
.cat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.cat-search-wrap {
  position: relative;
  width: min(340px, 100%);
}

.cat-search-input {
  width: 100%;
  height: 44px;
  padding: 10px 42px 10px 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  transition: all 150ms ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cat-search-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.cat-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: #94a3b8;
  stroke-width: 2.2;
  fill: none;
  pointer-events: none;
}

.cat-view-toggles {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: #f1f5f9;
  border-radius: 10px;
}

.cat-view-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 140ms ease;
}

.cat-view-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.cat-view-btn:hover {
  color: #1e293b;
  background: rgba(255, 255, 255, 0.6);
}

.cat-view-btn.is-active {
  background: #e0e7ff;
  color: #4f46e5;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.15);
}

/* Category Grid & Cards (Matching reference styling) */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.cat-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #edf2f7;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 180ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  border-color: #e2e8f0;
}

.cat-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f8fafc;
  overflow: hidden;
}

.cat-card-media svg,
.cat-card-placeholder {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Hover Action Pill Buttons (Edit & Delete floating on card top right) */
/* Category card action buttons — centered in card image, white square rounded boxes */
.cat-card-actions {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 180ms ease;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(2px);
  z-index: 2;
  border-radius: inherit;
}

.cat-card:hover .cat-card-actions,
.cat-card:focus-within .cat-card-actions {
  opacity: 1;
}

.cat-action-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.cat-action-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.cat-action-btn.edit {
  color: #4f46e5;
}

.cat-action-btn.edit:hover {
  background: #eef2ff;
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.3);
}

.cat-action-btn.delete {
  color: #ef4444;
}

.cat-action-btn.delete:hover {
  background: #fee2e2;
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.3);
}

/* Card Body */
.cat-card-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cat-card-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

.cat-card-desc {
  font-size: 12.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

/* List View Variant */
.cat-grid.is-list-view {
  grid-template-columns: 1fr;
  gap: 12px;
}

.cat-grid.is-list-view .cat-card {
  flex-direction: row;
  align-items: center;
  border-radius: 14px;
}

.cat-grid.is-list-view .cat-card-media {
  width: 140px;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
}

.cat-grid.is-list-view .cat-card-body {
  flex: 1;
  padding: 14px 18px;
}

.cat-grid.is-list-view .cat-card-actions {
  position: static;
  opacity: 1;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  margin-right: 14px;
  border-radius: 0;
  gap: 6px;
}

.cat-grid.is-list-view .cat-action-btn {
  width: 34px;
  height: 34px;
  background: #f8fafc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Empty State */
.cat-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px dashed #cbd5e1;
}

.cat-empty-state svg {
  width: 48px;
  height: 48px;
  stroke: #94a3b8;
  stroke-width: 1.5;
  fill: none;
  margin-bottom: 12px;
}

.cat-empty-state h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}

.cat-empty-state p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* ============================================================
   2026 ENTERPRISE MASTER KATEGORI STYLES (Zero-Emoji Standard)
   ============================================================ */

/* Bento KPI Grid */
.cat-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.cat-kpi-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.cat-kpi-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.cat-kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.cat-kpi-icon svg {
  width: 22px;
  height: 22px;
}

.cat-kpi-icon.indigo {
  background: #eef2ff;
  color: #4f46e5;
}

.cat-kpi-icon.emerald {
  background: #ecfdf5;
  color: #059669;
}

.cat-kpi-icon.amber {
  background: #fffbeb;
  color: #d97706;
}

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

.cat-kpi-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #64748b;
  text-transform: uppercase;
}

.cat-kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
}

/* Category Grid 2026 */
.cat-grid-2026 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.cat-card-2026 {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.cat-card-2026:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
}

.cat-card-2026.is-inactive {
  opacity: 0.72;
  border-style: dashed;
  background: #fafafa;
}

.cat-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cat-stamp-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cat-glass-stamp {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 180ms ease;
}

.cat-card-2026:hover .cat-glass-stamp {
  transform: scale(1.05);
}

.cat-card-svg {
  width: 24px;
  height: 24px;
}

/* Color Themes for Glassmorphism Stamp */
.cat-card-2026.amber .cat-glass-stamp { background: linear-gradient(135deg, #fffbeb, #fef3c7); color: #d97706; border: 1px solid #fde68a; }
.cat-card-2026.blue .cat-glass-stamp  { background: linear-gradient(135deg, #eff6ff, #dbeafe); color: #2563eb; border: 1px solid #bfdbfe; }
.cat-card-2026.emerald .cat-glass-stamp { background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: #059669; border: 1px solid #a7f3d0; }
.cat-card-2026.purple .cat-glass-stamp { background: linear-gradient(135deg, #faf5ff, #f3e8ff); color: #9333ea; border: 1px solid #e9d5ff; }
.cat-card-2026.rose .cat-glass-stamp   { background: linear-gradient(135deg, #fff1f2, #ffe4e6); color: #e11d48; border: 1px solid #fecdd3; }
.cat-card-2026.indigo .cat-glass-stamp { background: linear-gradient(135deg, #eef2ff, #e0e7ff); color: #4f46e5; border: 1px solid #c7d2fe; }

.cat-title-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cat-code-badge {
  display: inline-block;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 6px;
  width: fit-content;
  letter-spacing: 0.03em;
}

.cat-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
}

.cat-card-desc {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Quick Action Buttons */
.cat-card-quick-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-act-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 140ms ease;
}

.cat-act-btn svg {
  width: 14px;
  height: 14px;
}

.cat-act-btn.edit:hover {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

.cat-act-btn.del:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
}

/* Meta row: SKU count + POS status switch */
.cat-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.cat-sku-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.cat-pos-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-pos-text {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

/* Mini Toggle Switch */
.cat-mini-toggle {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}

.cat-mini-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cat-mini-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 200ms ease;
  border-radius: 20px;
}

.cat-mini-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 200ms ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cat-mini-toggle input:checked + .cat-mini-slider {
  background-color: #10b981;
}

.cat-mini-toggle input:checked + .cat-mini-slider:before {
  transform: translateX(14px);
}

/* Card Footer Link */
.cat-card-footer {
  padding-top: 4px;
}

.cat-link-manage {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: all 140ms ease;
}

.cat-link-manage:hover {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

/* List View Variant */
.cat-grid-2026.is-list-view {
  grid-template-columns: 1fr;
  gap: 12px;
}

.cat-grid-2026.is-list-view .cat-card-2026 {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}

.cat-grid-2026.is-list-view .cat-card-header {
  flex: 1;
  align-items: center;
}

.cat-grid-2026.is-list-view .cat-card-desc {
  max-width: 320px;
}

.cat-grid-2026.is-list-view .cat-card-meta {
  border-top: none;
  padding-top: 0;
  gap: 20px;
}

.cat-grid-2026.is-list-view .cat-card-footer {
  padding-top: 0;
}

/* Modal Form Styles */
.cat-modal {
  max-width: 540px;
}

.cat-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 14px;
}

.cat-modal-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.cat-modal-sub {
  margin: 0;
  font-size: 12.5px;
  color: #64748b;
}

.cat-modal-close {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: all 140ms ease;
}

.cat-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

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

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

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

.cat-input {
  width: 100%;
  padding: 9px 13px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 13.5px;
  color: #0f172a;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  box-sizing: border-box;
}

.cat-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* Icon Picker Tiles */
.cat-icon-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-icon-opt {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 140ms ease;
}

.cat-icon-opt svg {
  width: 18px;
  height: 18px;
}

.cat-icon-opt:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #0f172a;
}

.cat-icon-opt.is-selected {
  border-color: #4f46e5;
  background: #eef2ff;
  color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

/* Full Width Toggle Switch */
.cat-form-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  margin-bottom: 18px;
}

.cat-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.cat-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cat-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 200ms ease;
  border-radius: 24px;
}

.cat-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 200ms ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cat-toggle-switch input:checked + .cat-toggle-slider {
  background-color: #10b981;
}

.cat-toggle-switch input:checked + .cat-toggle-slider:before {
  transform: translateX(20px);
}

.cat-toggle-info strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
}

.cat-toggle-info span {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.35;
}

/* Live Preview Capsule */
.cat-preview-box {
  border: 1px dashed #cbd5e1;
  background: #fafafa;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-preview-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.cat-preview-tab {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  width: fit-content;
}

.cat-preview-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef2ff;
  color: #4f46e5;
  display: grid;
  place-items: center;
}

.cat-preview-icon svg {
  width: 16px;
  height: 16px;
}

.cat-preview-text strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
}

.cat-preview-text small {
  font-size: 11px;
  color: #64748b;
}

.cat-empty-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 20px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px dashed #cbd5e1;
  color: #64748b;
}

/* Category Modal Form */
.cat-modal {
  width: min(440px, 94vw);
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: popIn .18s ease;
}

.cat-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.cat-modal-head h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

.cat-modal-close {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  color: #64748b;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 140ms ease;
}

.cat-modal-close:hover {
  background: #fee2e2;
  color: #ef4444;
}

.cat-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cat-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.cat-form-group label {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
}

.cat-input {
  height: 42px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  background: #ffffff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.cat-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

@media (max-width: 640px) {
  .cat-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .cat-search-wrap {
    width: 100%;
  }

  .cat-view-toggles {
    align-self: flex-end;
  }

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

/* =========================================================
   PRODUK MASTER: CARDS VIEW (MATCHING USER REFERENCE)
   ========================================================= */

.prod-view-toggles {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow-sm);
  height: 42px;
  box-sizing: border-box;
}

.prod-view-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 140ms ease;
}

.prod-view-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.prod-view-btn:hover {
  color: var(--ink);
  background: #f1f5f9;
}

.prod-view-btn.is-active {
  background: #e0e7ff;
  color: #4f46e5;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.15);
}

/* Grid Container for Product Cards */
.prod-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

/* Individual Product Card */
.prod-card-item {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #edf2f7;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 180ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.prod-card-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  border-color: #e2e8f0;
}

/* Top Media Area with Stock Badge & Hover Actions */
.prod-card-top {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.prod-card-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.prod-card-emoji {
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.08));
  transition: transform 200ms ease;
}

.prod-card-item:hover .prod-card-emoji {
  transform: scale(1.08);
}

/* Stock Badge in Card Top-Right (dark pill: "Stok: 69") */
.prod-card-stock {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(30, 41, 59, 0.78);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.prod-card-stock.low {
  background: rgba(217, 119, 6, 0.88);
}

.prod-card-stock.out {
  background: rgba(220, 38, 38, 0.88);
}

/* Hover Action Pill Buttons (Edit & Delete on Card) */
/* Product card action buttons — centered in card image, white square rounded boxes */
.prod-card-actions {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 180ms ease;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(2px);
  z-index: 3;
  border-radius: inherit;
}

.prod-card-item:hover .prod-card-actions,
.prod-card-item:focus-within .prod-card-actions {
  opacity: 1;
}

.prod-card-act-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.prod-card-act-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.prod-card-act-btn.edit {
  color: #4f46e5;
}

.prod-card-act-btn.edit:hover {
  background: #eef2ff;
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.3);
}

.prod-card-act-btn.del {
  color: #ef4444;
}

.prod-card-act-btn.del:hover {
  background: #fee2e2;
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.3);
}

/* Card Content / Details */
.prod-card-details {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Category Pill Badge (Light blue/purple subtle pill) */
.prod-card-cat {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 6px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

/* Product Name */
.prod-card-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
  margin: 0 0 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 36px;
}

/* Product SKU Code */
.prod-card-sku {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Price Section: Two columns - Harga Beli (kiri) vs Harga Jual (kanan, bold blue/purple) */
.prod-card-prices {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.prod-price-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prod-price-col.buy {
  text-align: left;
}

.prod-price-col.sell {
  text-align: right;
}

.prod-price-label {
  font-size: 10.5px;
  color: #94a3b8;
  font-weight: 600;
}

.prod-price-val {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.prod-price-val.sell {
  font-size: 14.5px;
  font-weight: 800;
  color: #4f46e5;
}

@media (max-width: 640px) {
  .prod-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   RIWAYAT TRANSAKSI — Modern Redesign matching reference UI
   ============================================================ */
.trx-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.trx-header-top {
  display: contents;
}

.trx-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  order: 1;
}

.trx-header-title-box {
  display: flex;
  flex-direction: column;
}

.trx-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trx-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #4f46e5;
}

.trx-title-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.trx-title {
  font-size: 23px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

.trx-subtitle {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
  margin: 4px 0 0 42px;
}

.trx-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  order: 2;
}

.trx-filter-wrapper {
  position: relative;
}

.trx-btn-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 140ms ease;
}

.trx-btn-filter:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

.trx-btn-filter svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.trx-btn-new {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  border: none;
  background: #4f46e5;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 140ms ease;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
  order: 3;
}

.trx-btn-new:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.38);
}

.trx-btn-new svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

/* Filter Dropdown */
.trx-filter-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 16px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trx-filter-dropdown[hidden] {
  display: none !important;
}

.trx-filter-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-bottom: 6px;
  display: block;
}

.trx-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trx-chip {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
}

.trx-chip.is-active,
.trx-chip:hover {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
}

.trx-filter-search {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 140ms ease;
}

.trx-filter-search:focus {
  border-color: #4f46e5;
}

/* Table Card Container */
.trx-table-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
  overflow: hidden;
  margin-top: 4px;
}

.trx-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.trx-table thead tr {
  border-bottom: 1px solid #f1f5f9;
}

.trx-table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  padding: 16px 20px;
  white-space: nowrap;
}

.trx-table tbody tr {
  border-bottom: 1px solid #f8fafc;
  transition: background 120ms ease;
}

.trx-table tbody tr:hover {
  background: #fbfcfe;
}

.trx-table td {
  padding: 18px 20px;
  font-size: 13px;
  vertical-align: middle;
  white-space: nowrap;
}

.trx-col-no {
  color: #94a3b8;
  font-weight: 600;
  font-size: 13px;
}

.trx-col-invoice {
  font-weight: 800;
  color: #0f172a;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.trx-col-date {
  color: #64748b;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.trx-col-cashier {
  color: #475569;
  font-size: 13px;
  font-weight: 500;
}

.trx-badge-customer {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
}

.trx-badge-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e0e7ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 700;
}

.trx-col-total {
  font-weight: 800;
  color: #0f172a;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.trx-col-profit {
  font-weight: 800;
  color: #10b981;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.trx-btn-print {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 140ms ease;
}

.trx-btn-print:hover {
  background: #f1f5f9;
  color: #4f46e5;
  transform: scale(1.08);
}

.trx-btn-print svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.trx-footer-note {
  text-align: center;
  padding: 20px 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: 0.04em;
}

.trx-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
}

/* Badge Metode Pembayaran di Transaksi */
.trx-badge-pay {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.trx-badge-pay.cash {
  background: #ecfdf5;
  color: #047857;
}

.trx-badge-pay.qris {
  background: #f5f3ff;
  color: #6d28d9;
}

.trx-badge-pay.debit {
  background: #eff6ff;
  color: #1d4ed8;
}

.trx-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #ecfdf5;
  color: #059669;
  white-space: nowrap;
}

/* Tabel Laporan Penjualan per Produk (Sales by Item) */
.rpt-prod-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rpt-prod-emoji {
  font-size: 20px;
  flex-shrink: 0;
}

.rpt-prod-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rpt-prod-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 13px;
  white-space: nowrap;
}

.rpt-prod-sku {
  font-size: 10.5px;
  color: #94a3b8;
}

.rpt-cat-badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.rpt-cat-badge.kue {
  background: #fef3c7;
  color: #b45309;
}

.rpt-cat-badge.plastik {
  background: #e0f2fe;
  color: #0369a1;
}

.rpt-cat-badge.kemasan {
  background: #f3e8ff;
  color: #7e22ce;
}

.rpt-qty-badge {
  display: inline-flex;
  font-weight: 800;
  font-size: 12.5px;
  color: #1e293b;
  padding: 3px 10px;
  background: #f1f5f9;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

.rpt-share-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}

.rpt-share-bar-wrap {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.rpt-share-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #6366f1);
  border-radius: 999px;
}

.rpt-share-pct {
  font-size: 11px;
  font-weight: 700;
  color: #4f46e5;
  min-width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rpt-share-bar-wrap.profit {
  background: #d1fae5;
}

.rpt-share-bar-fill.profit {
  background: linear-gradient(90deg, #10b981, #059669);
}

.rpt-share-pct.profit {
  color: #059669;
}

.rpt-table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #f8fafc;
  border-top: 1px solid #edf2f7;
  font-size: 12.5px;
  color: #475569;
  flex-wrap: wrap;
  gap: 16px;
}

.rpt-footer-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.rpt-fstat-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rpt-fstat-lbl {
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.rpt-fstat-val {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.rpt-fstat-val.val-profit {
  color: #059669;
  font-weight: 800;
}

.rpt-fstat-val.muted {
  color: #64748b;
}

.rpt-footer-grand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rpt-fgrand-lbl {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.rpt-fgrand-val {
  font-size: 16px;
  font-weight: 800;
  color: #4f46e5;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   REPORT PAGINATION BAR (2026 Enterprise Standards)
   ============================================================ */
.rpt-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #ffffff;
  border-top: 1px solid #edf2f7;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #475569;
}

.rpt-pager-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rpt-pager-lbl {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.rpt-pager-perpage-select {
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background-color: #f8fafc;
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.rpt-pager-perpage-select:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  background-color: #ffffff;
}

.rpt-pager-info {
  font-size: 12px;
  color: #64748b;
}

.rpt-pager-info strong {
  color: #0f172a;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rpt-pager-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rpt-pager-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
}

.rpt-pager-btn:hover:not(.is-active):not(:disabled) {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.rpt-pager-btn.is-active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3);
}

.rpt-pager-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: #e2e8f0;
}

.rpt-pager-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  color: #94a3b8;
  font-weight: 700;
}

/* ============================================================
   LAPORAN PENJUALAN — Modern Analytics & Sales Summary (2026 Bento UI)
   ============================================================ */
.rpt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.rpt-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rpt-title-box {
  display: flex;
  flex-direction: column;
}

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

.rpt-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef2ff;
  color: #4f46e5;
  flex-shrink: 0;
}

.rpt-title-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.3;
  fill: none;
}

.rpt-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1.2;
}

.rpt-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.rpt-subtitle {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  margin: 3px 0 0 0;
  max-width: 320px;
  line-height: 1.35;
}

.rpt-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rpt-btn-print {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  border: none;
  background: #4f46e5;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 140ms ease;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
}

.rpt-btn-print:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.36);
}

.rpt-btn-print svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.rpt-btn-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 140ms ease;
}

.rpt-btn-filter:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

.rpt-btn-filter svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.rpt-filter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4f46e5;
  display: inline-block;
  margin-left: 2px;
}

.rpt-mobile-scroll-hint {
  display: none;
}

/* ============================================================
   2026 AI SMART DECISION & EXECUTIVE INSIGHT BAR
   Decision-First UI Trend: surfaces actionable summaries in seconds
   ============================================================ */
.rpt-ai-insight-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, #f8faff 0%, #ffffff 50%, #f0fdf4 100%);
  border: 1px solid #e0e7ff;
  border-radius: 14px;
  padding: 10px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.04);
  transition: all 160ms ease;
}

.rpt-ai-insight-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rpt-ai-sparkle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.rpt-ai-sparkle svg {
  width: 15px;
  height: 15px;
  animation: rptSparklePulse 3s ease-in-out infinite;
}

@keyframes rptSparklePulse {

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

  50% {
    transform: scale(1.1);
    opacity: 0.85;
  }
}

.rpt-ai-insight-text {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rpt-ai-tag {
  color: #4f46e5;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.04em;
  margin-right: 6px;
}

.rpt-ai-insight-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.rpt-ai-health-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.rpt-pulse-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: rptPulseDot 2s infinite;
}

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

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

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

/* ============================================================
   2026 ULTRA-MODERN LUXURY BENTO ANALYTICS ARCHITECTURE
   Fintech Luxury (Linear / Stripe / Mercury aesthetic)
   Deep obsidian typography, refined frosted glass & subtle jewelry glow
   ============================================================ */
.rpt-bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
}

.rpt-bento-card {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 18px;
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 116px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 18px -4px rgba(15, 23, 42, 0.04);
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  box-sizing: border-box;
}

.rpt-bento-card:hover {
  transform: translateY(-3px);
  border-color: rgba(203, 213, 225, 0.95);
  box-shadow: 0 14px 32px -6px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.03);
}

/* Card 1: Master Omzet (Deep Obsidian & Subtle Royal Indigo Accent) */
.rpt-bento-card.is-primary {
  background: linear-gradient(175deg, #ffffff 0%, #fafbff 65%, #f2f5ff 100%);
  border-color: rgba(99, 102, 241, 0.18);
}

.rpt-bento-card.is-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4338ca, #6366f1, #a5b4fc);
}

.rpt-bento-card.is-primary:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 14px 32px -6px rgba(67, 56, 202, 0.12), 0 4px 12px rgba(67, 56, 202, 0.04);
}

/* Card 2: Profit (Rich Forest Emerald Accent) */
.rpt-bento-card.is-profit {
  background: linear-gradient(175deg, #ffffff 0%, #fafdfb 65%, #f0fdf4 100%);
  border-color: rgba(5, 150, 105, 0.18);
}

.rpt-bento-card.is-profit::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #047857, #10b981, #6ee7b7);
}

.rpt-bento-card.is-profit:hover {
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: 0 14px 32px -6px rgba(4, 120, 87, 0.12), 0 4px 12px rgba(4, 120, 87, 0.04);
}

/* Card 3: Volume Penjualan (Sophisticated Slate Sky Blue Accent) */
.rpt-bento-card.is-volume {
  background: linear-gradient(175deg, #ffffff 0%, #fafcfe 65%, #f0f9ff 100%);
  border-color: rgba(2, 132, 199, 0.18);
}

.rpt-bento-card.is-volume::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0369a1, #0ea5e9, #7dd3fc);
}

.rpt-bento-card.is-volume:hover {
  border-color: rgba(2, 132, 199, 0.35);
  box-shadow: 0 14px 32px -6px rgba(2, 132, 199, 0.12), 0 4px 12px rgba(2, 132, 199, 0.04);
}

/* Card 4: Top Performer (Burnished Bronze & Champagne Gold) */
.rpt-bento-card.is-top-performer {
  background: linear-gradient(175deg, #ffffff 0%, #fffdf8 65%, #fffbeb 100%);
  border-color: rgba(217, 119, 6, 0.18);
}

.rpt-bento-card.is-top-performer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #b45309, #d97706, #fde68a);
}

.rpt-bento-card.is-top-performer:hover {
  border-color: rgba(217, 119, 6, 0.35);
  box-shadow: 0 14px 32px -6px rgba(180, 83, 9, 0.12), 0 4px 12px rgba(180, 83, 9, 0.04);
}

.rpt-bento-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.rpt-bento-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.rpt-bento-label {
  font-size: 10px;
  font-weight: 750;
  color: #64748b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.rpt-bento-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 650;
  padding: 2.5px 8px;
  border-radius: 999px;
  width: fit-content;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.rpt-bento-tag svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  flex-shrink: 0;
}

.rpt-bento-tag.indigo {
  background: rgba(238, 242, 255, 0.85);
  color: #4338ca;
  border-color: rgba(199, 210, 254, 0.65);
}

.rpt-bento-tag.emerald {
  background: rgba(236, 253, 245, 0.85);
  color: #047857;
  border-color: rgba(167, 243, 208, 0.65);
}

.rpt-bento-tag.blue {
  background: rgba(239, 246, 255, 0.85);
  color: #0369a1;
  border-color: rgba(186, 230, 253, 0.65);
}

.rpt-bento-tag.amber {
  background: rgba(254, 243, 199, 0.85);
  color: #92400e;
  border-color: rgba(253, 230, 138, 0.65);
}

.rpt-bento-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.rpt-bento-card:hover .rpt-bento-icon {
  transform: scale(1.06);
}

.rpt-bento-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.rpt-bento-icon.indigo {
  background: linear-gradient(135deg, #f5f7ff, #e0e7ff);
  color: #4338ca;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.rpt-bento-icon.emerald {
  background: linear-gradient(135deg, #f0fdf4, #d1fae5);
  color: #047857;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.rpt-bento-icon.blue {
  background: linear-gradient(135deg, #f0f9ff, #dbeafe);
  color: #0369a1;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.2);
}

.rpt-bento-icon.amber {
  background: linear-gradient(135deg, #fffdf2, #fef3c7);
  color: #b45309;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.rpt-bento-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.rpt-bento-val-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.rpt-bento-sparkline {
  width: 54px;
  height: 22px;
  flex-shrink: 0;
  opacity: 0.85;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.05));
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.rpt-bento-card:hover .rpt-bento-sparkline {
  transform: scale(1.08);
  opacity: 1;
}

.rpt-bento-value {
  display: block;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(20px, 1.65vw, 25px);
  font-weight: 850;
  color: #0f172a;
  letter-spacing: -0.04em;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "tnum";
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.15;
}

.rpt-bento-value.text-emerald {
  color: #047857;
}

.rpt-bento-value.text-amber {
  color: #92400e;
}

.rpt-bento-value.rpt-top-name {
  font-size: clamp(15px, 1.25vw, 17.5px);
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.rpt-bento-sub {
  font-size: 11px;
  font-weight: 450;
  color: #64748b;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.rpt-bento-sub-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Legacy rpt-cards-grid retained for profit.html or other usages */
.rpt-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.rpt-card {
  position: relative;
  border-radius: 16px;
  padding: 20px 20px 18px;
  color: #ffffff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 130px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.rpt-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.rpt-card.card-revenue {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

.rpt-card.card-profit {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.rpt-card.card-items {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.rpt-card.card-discount {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.rpt-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  z-index: 1;
}

.rpt-card-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
}

.rpt-card-badge-icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.rpt-card-value {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin: 10px 0 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.1;
  z-index: 1;
}

.rpt-card-footer {
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  z-index: 1;
}

.rpt-card-watermark {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
}

.rpt-card-watermark svg {
  width: 86px;
  height: 86px;
  stroke: #ffffff;
  stroke-width: 1.6;
  fill: none;
}

/* Panel Filter Penjualan */
.rpt-filter-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
  padding: 22px 24px;
  margin-bottom: 24px;
}

.rpt-filter-card[hidden] {
  display: none !important;
}

.rpt-filter-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1.4fr 1.4fr 1.4fr;
  gap: 16px;
  align-items: flex-end;
}

.rpt-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rpt-field-label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

/* Controls di Header Laporan (Filter Toko & Periode Bulanan/Mingguan) */
.rpt-header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

/* Filter Lokasi Toko Segmented Capsule & Custom Popover (2026 Enterprise) */
.rpt-store-dropdown-wrap {
  position: relative;
  display: inline-flex;
}

.rpt-top-ctrl-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 4px 28px 4px 8px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  position: relative;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  user-select: none;
}

.rpt-top-ctrl-box:hover {
  border-color: #cbd5e1;
  background: #fbfcfe;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.rpt-top-ctrl-box.is-open {
  border-color: #4f46e5;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12), 0 4px 12px rgba(15, 23, 42, 0.08);
}

.rpt-top-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.rpt-top-icon-badge svg {
  width: 14px;
  height: 14px;
}

.rpt-top-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.rpt-top-mini-label {
  font-size: 8.5px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.rpt-top-select-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 140ms ease;
}

.rpt-name-full {
  display: inline;
}

.rpt-name-short {
  display: none;
}

.rpt-top-ctrl-box.is-open .rpt-top-select-name {
  color: #4f46e5;
}

.rpt-select-chevron {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #94a3b8;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.16s ease;
}

.rpt-select-chevron svg {
  width: 13px;
  height: 13px;
}

.rpt-top-ctrl-box.is-open .rpt-select-chevron {
  transform: translateY(-50%) rotate(180deg);
  color: #4f46e5;
}

/* Custom Store Popover Menu */
.rpt-store-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 310px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(0, 0, 0, 0.04);
  z-index: 1050;
  padding: 6px;
  animation: storePopoverIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top left;
}

@keyframes storePopoverIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.rpt-store-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 6px 10px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 4px;
}

.rpt-store-popover-title {
  font-size: 9.5px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rpt-store-popover-badge {
  font-size: 10px;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 6px;
}

.rpt-store-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  line-height: 1.3;
}
.rpt-store-badge.all { background: #f1f5f9; color: #475569; }
.rpt-store-badge.pusat { background: #e0e7ff; color: #4338ca; }
.rpt-store-badge.cabang2 { background: #d1fae5; color: #047857; }
.rpt-store-badge.cabang3 { background: #fef3c7; color: #b45309; }

.rpt-store-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rpt-store-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.14s ease;
  font-family: inherit;
  position: relative;
}

.rpt-store-opt:hover {
  background: #f8fafc;
  border-color: #f1f5f9;
}

.rpt-store-opt.is-selected {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.rpt-store-opt-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.14s ease;
}

.rpt-store-opt:hover .rpt-store-opt-icon {
  transform: scale(1.05);
}

.rpt-store-opt-icon svg {
  width: 16px;
  height: 16px;
}

.rpt-store-opt-icon.all {
  background: #f1f5f9;
  color: #475569;
}

.rpt-store-opt-icon.pusat {
  background: #e0e7ff;
  color: #4338ca;
}

.rpt-store-opt-icon.cabang2 {
  background: #d1fae5;
  color: #047857;
}

.rpt-store-opt-icon.cabang3 {
  background: #fef3c7;
  color: #b45309;
}

.rpt-store-opt-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 1px;
}

.rpt-store-opt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.rpt-store-opt-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.rpt-store-opt.is-selected .rpt-store-opt-name {
  color: #4338ca;
}

.rpt-store-opt-sub {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rpt-store-opt-check {
  display: none;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  color: #4f46e5;
  flex-shrink: 0;
}

.rpt-store-opt.is-selected .rpt-store-opt-check {
  display: flex;
}

.rpt-store-opt-check svg {
  width: 16px;
  height: 16px;
}

.rpt-store-badge.all {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.rpt-period-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 4px 10px 4px 6px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  position: relative;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.rpt-period-group:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.rpt-period-type-pills {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 9px;
  gap: 2px;
  flex-shrink: 0;
}

.rpt-type-pill {
  border: none;
  background: transparent;
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  font-family: inherit;
  transition: all 140ms ease;
}

.rpt-type-pill:hover {
  color: #1e293b;
}

.rpt-type-pill.is-active {
  background: #ffffff;
  color: #4f46e5;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.rpt-period-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.rpt-period-select {
  height: 28px;
  padding: 0 20px 0 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
}

.rpt-period-select optgroup {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  background: #f8fafc;
  padding: 4px 6px;
  letter-spacing: 0.02em;
}

.rpt-period-select option {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
  padding: 6px 10px;
}

.rpt-period-select-wrap .rpt-select-chevron {
  right: 4px;
}

/* ================================================================
   MODERN DATEPICKER TRIGGER & CALENDAR POPOVER (2026 UX Architecture)
   ================================================================ */
.rpt-datepicker-trigger-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rpt-dp-step-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.rpt-dp-step-btn:hover:not(:disabled) {
  background: #eef2ff;
  color: #4f46e5;
  border-color: #c7d2fe;
}

.rpt-dp-step-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.rpt-dp-step-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: #f8fafc;
  color: #cbd5e1;
}

.rpt-dp-step-btn svg {
  width: 14px;
  height: 14px;
}

.rpt-datepicker-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  height: 28px;
  width: 268px; /* Fixed stable desktop width to eliminate width jumping across daily/weekly/monthly */
  box-sizing: border-box;
  justify-content: space-between;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.rpt-datepicker-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #4f46e5;
}

.rpt-datepicker-btn.is-active {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: #ffffff;
}

.rpt-dp-icon {
  width: 14px;
  height: 14px;
  color: #6366f1;
  flex-shrink: 0;
}

.rpt-dp-label {
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.rpt-dp-chevron {
  width: 13px;
  height: 13px;
  color: #94a3b8;
  flex-shrink: 0;
}

/* ==========================================================================
   EXPORT PDF ACTION BUTTON (Header Controls & Filter Bar 2026)
   ========================================================================== */
.rpt-btn-export-pdf {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 4px 14px;
  border-radius: 12px;
  color: #0f172a;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  height: 38px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.rpt-btn-export-pdf:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08);
}

.rpt-btn-export-pdf:active {
  transform: scale(0.97);
}

.rpt-btn-export-pdf svg {
  width: 15px;
  height: 15px;
  color: #dc2626;
  flex-shrink: 0;
}

.rpt-header-top .rpt-btn-export-pdf,
.rpt-header-top .rpt-btn-print {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  border: none;
  background: #4f46e5;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 140ms ease;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
  order: 3;
}

.rpt-header-top .rpt-btn-export-pdf:hover,
.rpt-header-top .rpt-btn-print:hover {
  background: #4338ca;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.36);
}

.rpt-header-top .rpt-btn-export-pdf svg,
.rpt-header-top .rpt-btn-print svg {
  width: 15px;
  height: 15px;
  color: #ffffff;
  stroke: currentColor;
}

.rpt-btn-tab-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.14s ease;
  height: 32px;
  box-sizing: border-box;
  margin-left: auto;
  user-select: none;
}

.rpt-btn-tab-export:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.08);
}

.rpt-btn-tab-export svg {
  width: 14px;
  height: 14px;
  color: #dc2626;
}

/* Calendar Popover Box (Top-Anchored: Tinggi menyesuaikan hanya ke arah bawah) */
.rpt-calendar-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.06);
  padding: 14px 16px 12px;
  z-index: 1200;
  box-sizing: border-box;
  transform-origin: top right;
  animation: rptPopSlide 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes rptPopSlide {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.rpt-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.rpt-cal-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rpt-cal-mode-badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 6px;
  background: #eef2ff;
  color: #4f46e5;
  text-transform: uppercase;
}

.rpt-cal-month-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

.rpt-cal-nav-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rpt-cal-nav-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
}

.rpt-cal-nav-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.rpt-cal-nav-btn svg {
  width: 14px;
  height: 14px;
}

.rpt-cal-hint {
  font-size: 11px;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 8px;
  padding: 5px 8px;
  margin-bottom: 10px;
  line-height: 1.35;
}

/* Calendar Days Grid (6 Baris Konsisten agar tinggi kalender tidak bergetar/lompat) */
.rpt-cal-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 6px;
}

.rpt-cal-grid-header .is-weekend {
  color: #e11d48;
}

.rpt-cal-grid-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 36px);
  gap: 3px;
  margin-bottom: 12px;
  min-height: 231px;
}

.rpt-cal-day-cell {
  position: relative;
  height: 36px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  padding: 0;
  box-sizing: border-box;
  transition: all 0.12s ease;
}

.rpt-cal-day-cell:hover:not(.is-disabled) {
  background: #f1f5f9;
  color: #4f46e5;
  border-color: #c7d2fe;
}

.rpt-cal-day-cell.is-today {
  color: #4f46e5;
  font-weight: 800;
  border-color: #a5b4fc;
  background: #eef2ff;
}

.rpt-cal-day-cell.is-selected {
  background: #4f46e5 !important;
  color: #ffffff !important;
  border-color: #4338ca !important;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}

.rpt-cal-day-cell.is-in-week-range {
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 4px;
}

.rpt-cal-day-cell.is-week-start {
  background: #4f46e5 !important;
  color: #ffffff !important;
  border-top-left-radius: 9px;
  border-bottom-left-radius: 9px;
}

.rpt-cal-day-cell.is-week-end {
  border-top-right-radius: 9px;
  border-bottom-right-radius: 9px;
}

.rpt-cal-day-cell.is-disabled {
  color: #cbd5e1;
  background: transparent;
  cursor: not-allowed;
  opacity: 0.45;
  text-decoration: line-through;
}

.rpt-cal-day-cell.is-empty {
  cursor: default;
  pointer-events: none;
}

.rpt-cal-day-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #4f46e5;
  margin-top: 1px;
}

.rpt-cal-day-cell.is-selected .rpt-cal-day-dot {
  background: #ffffff;
}

/* ================================================================
   MODERN MONTH PICKER GRID (12 Bulan Elegan untuk Mode Bulanan)
   ================================================================ */
.rpt-cal-grid-months {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
  min-height: 231px;
}

.rpt-cal-month-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 52px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 4px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}

.rpt-cal-month-cell:hover:not(.is-disabled) {
  background: #f1f5f9;
  border-color: #c7d2fe;
  color: #4f46e5;
  transform: translateY(-1px);
}

.rpt-cal-month-cell.is-current {
  border-color: #a5b4fc;
  background: #eef2ff;
}

.rpt-cal-month-cell.is-selected {
  background: #4f46e5 !important;
  color: #ffffff !important;
  border-color: #4338ca !important;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}

.rpt-cal-month-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
}

.rpt-cal-month-cell.is-selected .rpt-cal-month-name {
  color: #ffffff;
}

.rpt-cal-month-sub {
  font-size: 9.5px;
  font-weight: 600;
  color: #94a3b8;
}

.rpt-cal-month-cell.is-selected .rpt-cal-month-sub {
  color: rgba(255, 255, 255, 0.85);
}

.rpt-cal-month-cell.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
  background: #f8fafc;
}

.rpt-cal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}

.rpt-cal-quick-btn {
  border: none;
  background: #f8fafc;
  color: #4f46e5;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.rpt-cal-quick-btn:hover {
  background: #eef2ff;
  color: #3730a3;
}

.rpt-cal-close-btn {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.rpt-cal-close-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

/* Badge Toko di Tabel Log Penjualan */
.rpt-store-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.rpt-store-badge.pusat {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.rpt-store-badge.cabang2 {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.rpt-store-badge.cabang3 {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* Filter Bar Dropdown & Modern 2026 Mobile Chip Filter */
.rpt-table-filters {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  width: 100%;
}

.rpt-desktop-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.rpt-mobile-chip-row {
  display: none;
}

.rpt-filter-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.rpt-filter-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rpt-filter-label svg {
  width: 14px;
  height: 14px;
  stroke: #64748b;
  flex-shrink: 0;
}

.rpt-filter-select {
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background-color: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 140ms ease;
}

.rpt-filter-select:hover {
  border-color: #94a3b8;
  background-color: #ffffff;
}

.rpt-filter-select:focus {
  border-color: #4f46e5;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.rpt-input,
.rpt-select {
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  font-size: 13px;
  font-family: inherit;
  color: #1e293b;
  background: #ffffff;
  outline: none;
  transition: border-color 140ms ease;
  width: 100%;
}

.rpt-input:focus,
.rpt-select:focus {
  border-color: #4f46e5;
}

.rpt-filter-actions-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.rpt-btn-reset {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  transition: all 140ms ease;
}

.rpt-btn-reset:hover {
  background: #f8fafc;
  color: #ef4444;
  border-color: #fca5a5;
}

.rpt-btn-reset svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.rpt-btn-apply {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border-radius: 10px;
  border: none;
  background: #4f46e5;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 140ms ease;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
}

.rpt-btn-apply:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.38);
}

.rpt-btn-apply svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

@media (max-width: 1024px) {
  .rpt-bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
  }

  .rpt-bento-card {
    padding: 14px 16px 12px;
    min-height: 98px;
  }

  .rpt-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rpt-filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {

  /* Header Laporan Mobile: Compact & Space Efficient */
  .rpt-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  .rpt-header-top {
    order: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    gap: 8px !important;
  }

  .rpt-header-left {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    flex: 1 !important;
    width: auto !important;
    gap: 8px !important;
    height: 36px !important;
  }

  .rpt-title-box {
    flex: 1;
    min-width: 0;
    height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .rpt-title-row {
    gap: 6px;
    flex-wrap: nowrap;
    min-width: 0;
    display: flex;
    align-items: center;
  }

  .rpt-title {
    font-size: 14px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
    letter-spacing: -0.01em !important;
    color: #0f172a !important;
    line-height: 1.2 !important;
  }

  .rpt-live-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 18px !important;
    padding: 2px 7px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    flex-shrink: 0 !important;
  }

  .rpt-subtitle {
    display: none !important;
  }

  .rpt-header-controls {
    order: 2 !important;
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .rpt-header-controls .rpt-store-dropdown-wrap,
  .db-header .rpt-store-dropdown-wrap {
    width: 100%;
  }

  .rpt-name-full {
    display: none;
  }

  .rpt-name-short {
    display: inline;
  }

  .rpt-store-dropdown-wrap {
    position: relative;
    max-width: 100%;
  }

  .rpt-top-ctrl-box {
    box-sizing: border-box;
    padding: 4px 24px 4px 6px;
    border-radius: 9px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    gap: 6px;
    height: 34px;
    justify-content: flex-start;
  }

  .rpt-top-icon-badge {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    flex-shrink: 0;
  }

  .rpt-top-icon-badge svg {
    width: 13px;
    height: 13px;
  }

  .rpt-top-select-wrap {
    flex: 1;
    min-width: 0;
  }

  .rpt-top-mini-label {
    display: none;
  }

  .rpt-top-select-name {
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.1;
  }

  .rpt-store-popover {
    left: auto;
    right: 0;
    min-width: unset;
    width: calc(100vw - 28px);
    max-width: 310px;
    box-sizing: border-box;
    box-shadow: 0 20px 40px -4px rgba(15, 23, 42, 0.2);
  }

  .rpt-store-opt {
    padding: 8px 10px;
  }

  .rpt-select-chevron {
    right: 7px;
  }

  .rpt-select-chevron svg {
    width: 11px;
    height: 11px;
  }

  .rpt-period-group {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
  }

  .rpt-period-type-pills {
    width: 100%;
    display: flex;
    padding: 3px;
    gap: 3px;
    box-sizing: border-box;
    background: #f1f5f9;
    border-radius: 9px;
  }

  .rpt-type-pill {
    flex: 1;
    text-align: center;
    padding: 6px 0;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 7px;
  }

  .rpt-period-select-wrap {
    width: 100%;
    min-width: 0;
    position: relative;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 4px 28px 4px 10px;
    box-sizing: border-box;
  }

  .rpt-period-select-wrap .rpt-period-select {
    width: 100%;
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    padding: 0;
    height: 24px;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: none;
    background: transparent;
  }

  .rpt-period-select-wrap .rpt-select-chevron {
    right: 10px;
  }

  .rpt-datepicker-trigger-wrap {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .rpt-dp-step-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .rpt-datepicker-btn {
    flex: 1;
    width: auto;
    min-width: 0;
    justify-content: space-between;
    height: 32px;
    font-size: 12px;
    padding: 0 10px;
  }

  .rpt-header-top .rpt-btn-export-pdf,
  .rpt-header-top .rpt-btn-print {
    width: auto !important;
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    border: none !important;
    background: #4f46e5 !important;
    color: #ffffff !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28) !important;
  }

  .rpt-header-top .rpt-btn-export-pdf svg,
  .rpt-header-top .rpt-btn-print svg {
    width: 13px !important;
    height: 13px !important;
    color: #ffffff !important;
    stroke: currentColor !important;
  }

  .rpt-btn-tab-export {
    display: none;
  }

  .rpt-calendar-popover {
    position: absolute;
    top: calc(100% + 8px);
    bottom: auto;
    left: auto;
    right: 0;
    width: 320px;
    max-width: calc(100vw - 24px);
    margin: 0;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.28);
    border: 1px solid #cbd5e1;
    z-index: 9999;
    transform-origin: top right;
  }

  /* 2026 AI Insight Bar on Mobile */
  .rpt-ai-insight-bar {
    padding: 8px 10px;
    margin-bottom: 10px;
    gap: 8px;
  }

  .rpt-ai-sparkle {
    width: 24px;
    height: 24px;
    border-radius: 6px;
  }

  .rpt-ai-sparkle svg {
    width: 13px;
    height: 13px;
  }

  .rpt-ai-insight-text {
    font-size: 11px;
    line-height: 1.3;
  }

  .rpt-ai-tag {
    font-size: 10px;
  }

  .rpt-ai-health-pill {
    font-size: 10px;
    padding: 2.5px 7px;
  }

  /* Hide secondary sparklines on mobile 50/50 cards to preserve spacing, keep on primary card */
  .rpt-bento-card.is-profit .rpt-bento-sparkline,
  .rpt-bento-card.is-volume .rpt-bento-sparkline {
    display: none;
  }

  .rpt-bento-card.is-primary .rpt-bento-sparkline {
    width: 44px;
    height: 18px;
  }

  /* 2026 Mobile Bento Architecture:
     Card 1: Master Omzet (Full width hero, ~70px)
     Card 2 & 3: Profit & Volume side-by-side (2 columns 50/50, ~80px)
     Card 4: Top Performer (Full width sleek showcase, ~42px)
     Total height: ~200px! Gives immediate visibility to tabs, filters, and table data above-the-fold! */
  /* ============================================================
     2026 MOBILE SINGLE UNIFIED MASTER ANALYTICS CARD ARCHITECTURE
     (Ultra-Clean Luxury Monochromatic & High-End Minimalist Fintech)
     ============================================================ */
  .rpt-bento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 16px 16px 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03), 0 8px 24px -6px rgba(15, 23, 42, 0.05);
    position: relative;
    overflow: hidden;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  }

  /* No loud gradient top border, just a clean, calm accent indicator */
  .rpt-bento-grid::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #64748b 100%);
  }

  /* Card 1: Master Financial Hero (Seamless Upper Section) */
  .rpt-bento-card.is-primary {
    grid-column: 1 / -1;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0 0 14px 0;
    min-height: auto;
    gap: 4px;
    border-bottom: 1px solid #f1f5f9;
  }

  .rpt-bento-card.is-primary::before {
    display: none;
  }

  .rpt-bento-card.is-primary .rpt-bento-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .rpt-bento-card.is-primary .rpt-bento-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #64748b;
    text-transform: uppercase;
  }

  .rpt-bento-card.is-primary .rpt-bento-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
  }

  .rpt-bento-card.is-primary .rpt-bento-icon {
    display: none; /* Hide icon on mobile for maximum clean elegance */
  }

  .rpt-bento-card.is-primary .rpt-bento-val-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
  }

  .rpt-bento-card.is-primary .rpt-bento-value {
    font-family: "Inter", -apple-system, sans-serif;
    font-size: clamp(24px, 6.8vw, 28px);
    font-weight: 850;
    color: #0f172a;
    letter-spacing: -0.05em;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11", "tnum";
    font-variant-numeric: tabular-nums;
    margin: 0;
    line-height: 1.1;
  }

  .rpt-bento-card.is-primary .rpt-bento-sparkline {
    width: 54px;
    height: 22px;
    opacity: 0.85;
  }

  .rpt-bento-card.is-primary .rpt-bento-sub {
    font-size: 11px;
    font-weight: 450;
    color: #64748b;
    letter-spacing: -0.01em;
  }

  /* Cards 2 & 3: Clean Metric Columns (No noisy colored boxes) */
  .rpt-bento-card.is-profit,
  .rpt-bento-card.is-volume {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 12px 6px 12px;
    min-height: auto;
    gap: 3px;
    box-shadow: none;
    border-bottom: 1px solid #f1f5f9;
  }

  .rpt-bento-card.is-profit {
    grid-column: 1 / 2;
    padding-right: 12px;
    border-right: 1px solid #f1f5f9;
  }

  .rpt-bento-card.is-volume {
    grid-column: 2 / 3;
    padding-left: 12px;
  }

  .rpt-bento-card.is-profit::before,
  .rpt-bento-card.is-volume::before {
    display: none;
  }

  .rpt-bento-card.is-profit .rpt-bento-head,
  .rpt-bento-card.is-volume .rpt-bento-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: auto;
    margin-bottom: 3px;
  }

  .rpt-bento-card.is-profit .rpt-bento-label,
  .rpt-bento-card.is-volume .rpt-bento-label {
    font-size: 9.5px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .rpt-bento-card.is-profit .rpt-bento-tag {
    font-size: 9px;
    font-weight: 650;
    padding: 1px 5px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    border-radius: 6px;
  }

  .rpt-bento-card.is-volume .rpt-bento-tag {
    font-size: 9px;
    font-weight: 650;
    padding: 1px 5px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    border-radius: 6px;
  }

  .rpt-bento-card.is-profit .rpt-bento-icon,
  .rpt-bento-card.is-volume .rpt-bento-icon {
    display: none;
  }

  .rpt-bento-card.is-profit .rpt-bento-value {
    font-family: "Inter", -apple-system, sans-serif;
    font-size: clamp(15px, 4.2vw, 17px);
    font-weight: 850;
    color: #047857;
    letter-spacing: -0.035em;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
  }

  .rpt-bento-card.is-volume .rpt-bento-value {
    font-family: "Inter", -apple-system, sans-serif;
    font-size: clamp(15px, 4.2vw, 17px);
    font-weight: 850;
    color: #0f172a;
    letter-spacing: -0.035em;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
  }

  .rpt-bento-card.is-profit .rpt-bento-sub,
  .rpt-bento-card.is-volume .rpt-bento-sub {
    font-size: 9.5px;
    color: #64748b;
    letter-spacing: -0.01em;
  }

  /* Card 4: Top Performer (Clean Minimalist Monochromatic Row) */
  .rpt-bento-card.is-top-performer {
    grid-column: 1 / -1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    padding: 8px 12px;
    margin-top: 10px;
    min-height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    box-shadow: none;
  }

  .rpt-bento-card.is-top-performer::before {
    display: none;
  }

  .rpt-bento-card.is-top-performer .rpt-bento-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .rpt-bento-card.is-top-performer .rpt-bento-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
  }

  .rpt-bento-card.is-top-performer .rpt-bento-icon svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 2;
  }

  .rpt-bento-card.is-top-performer .rpt-bento-label-wrap {
    display: none;
  }

  .rpt-bento-card.is-top-performer .rpt-bento-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .rpt-bento-card.is-top-performer .rpt-bento-val-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .rpt-bento-card.is-top-performer .rpt-bento-value.rpt-top-name {
    font-family: "Inter", -apple-system, sans-serif;
    font-size: 12.5px;
    font-weight: 750;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.02em;
  }

  .rpt-bento-card.is-top-performer .rpt-bento-sub {
    font-size: 10px;
    color: #64748b;
    letter-spacing: -0.01em;
  }

  .rpt-bento-card.is-top-performer .rpt-bento-sub-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Compact Tabs & Filters on Mobile */
  .rpt-tabs-bar {
    margin-bottom: 12px;
    padding: 3px;
    border-radius: 10px;
  }

  .rpt-tab-btn {
    padding: 6px 10px;
    font-size: 11.5px;
  }

  .rpt-table-filters {
    margin-bottom: 10px;
    gap: 6px;
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .rpt-filter-item {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 10px;
    border-radius: 8px;
  }

  .rpt-filter-item .rpt-filter-select {
    flex: 1;
    min-width: 0;
    height: 30px;
    font-size: 12px;
    padding: 0 8px;
  }
}

@media (max-width: 640px) {
  .rpt-cards-grid {
    grid-template-columns: 1fr;
  }

  .rpt-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* Tab Switcher antara Laporan Penjualan & Laporan Keuntungan */
.rpt-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.rpt-tab-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #64748b;
  background: #f1f5f9;
  transition: all 140ms ease;
}

.rpt-tab-link:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.rpt-tab-link.is-active {
  background: #4f46e5;
  color: #ffffff;
}

.rpt-tab-link svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

/* Footer Total Profit di bawah tabel */
.profit-table-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 32px;
  padding: 18px 24px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.profit-footer-label {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.profit-footer-val {
  font-size: 15px;
  font-weight: 800;
  color: #10b981;
  font-variant-numeric: tabular-nums;
}

.rpt-title-icon.green {
  color: #00a86b;
}

.rpt-card-value.trx-code {
  font-size: 19px;
  letter-spacing: 0.02em;
}

/* ============================================================
   Laporan Penjualan: Tab Navigasi & Log Penjualan Item (Itemized)
   ============================================================ */
.rpt-tabs-bar {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 20px;
  gap: 4px;
  border: 1px solid #e2e8f0;
}

.rpt-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.rpt-tab-btn:hover {
  color: #1e293b;
  background: rgba(255, 255, 255, 0.6);
}

.rpt-tab-btn.is-active {
  background: #ffffff;
  color: #4f46e5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.rpt-tab-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.rpt-tab-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  transition: all 160ms ease;
}

.rpt-tab-btn.is-active .rpt-tab-pill {
  background: #eef2ff;
  color: #4f46e5;
}

.rpt-view-panel {
  display: block;
}

.rpt-view-panel[hidden] {
  display: none !important;
}

.rpt-log-time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
}

.rpt-log-invoice {
  font-family: monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: #4f46e5;
  background: #eef2ff;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-block;
  white-space: nowrap;
}

.rpt-log-cashier {
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}

.trx-col-profit,
.rpt-col-profit {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #059669;
  white-space: nowrap;
}

.rpt-table-log-items th,
.rpt-table-log-items td {
  padding: 14px 10px;
}

/* ============================================================
   MOBILE CARD ACCORDION VIEW (Laporan Penjualan)
   - Tampil di mobile (<= 640px) menggantikan tabel lebar
   - Informasi utama terlihat ringkas di header kartu
   - Klik kartu untuk expand rincian lengkap (akordion)
   ============================================================ */
.rpt-mobile-cards {
  display: none;
}

@media (max-width: 640px) {
  .rpt-tabs-bar {
    display: flex;
    width: 100%;
  }

  .rpt-tab-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
    font-size: 12px;
    gap: 6px;
  }

  .rpt-tab-btn svg {
    display: none;
  }

  /* Di mobile: sembunyikan dropdown classic desktop, tampilkan 2026 scrollable filter chips */
  .rpt-desktop-filters {
    display: none;
  }

  .rpt-mobile-chip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 2px;
  }

  .rpt-chip-scroll {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0 4px;
    flex: 1;
    min-width: 0;
  }

  .rpt-chip-scroll::-webkit-scrollbar {
    display: none;
  }

  .rpt-mchip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    font-family: inherit;
    flex-shrink: 0;
  }

  .rpt-mchip:active {
    transform: scale(0.96);
  }

  .rpt-mchip.is-active {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.28);
  }

  /* Quick Sort / Action Pill on Mobile Filter */
  .rpt-mchip-sort-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
  }

  .rpt-mchip-sort-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    pointer-events: none;
    transition: background 0.15s ease, border-color 0.15s ease;
  }

  .rpt-mchip-sort-btn svg {
    width: 15px;
    height: 15px;
  }

  .rpt-mchip-sort-select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    -webkit-appearance: none;
  }

  .rpt-mchip-sort-wrap:focus-within .rpt-mchip-sort-btn {
    border-color: #4f46e5;
    color: #4f46e5;
    background: #eef2ff;
  }

  /* Di mobile: sembunyikan horizontal scroll hint dan tabel biasa, tampilkan card view */
  .rpt-mobile-scroll-hint {
    display: none;
  }

  .rpt-table-responsive,
  .trx-table-responsive {
    display: none;
  }

  .rpt-mobile-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .rpt-card-empty {
    text-align: center;
    padding: 32px 16px;
    background: #f8fafc;
    border-radius: 12px;
    color: #64748b;
    font-size: 13px;
    border: 1px dashed #e2e8f0;
  }

  .rpt-mcard {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    outline: none;
  }

  .rpt-mcard:active {
    transform: scale(0.99);
  }

  .rpt-mcard.is-open {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07), 0 1px 3px rgba(15, 23, 42, 0.04);
  }

  /* Header Card */
  .rpt-mcard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .rpt-mcard-primary {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
  }

  .rpt-mcard-tag-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  .rpt-mcard-rank {
    font-size: 10.5px;
    font-weight: 800;
    padding: 1.5px 6px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
  }

  .rpt-mcard-rank.top-1 {
    background: #fef3c7;
    color: #b45309;
  }

  .rpt-mcard-rank.top-2 {
    background: #f1f5f9;
    color: #334155;
  }

  .rpt-mcard-rank.top-3 {
    background: #ffedd5;
    color: #c2410c;
  }

  .rpt-mcard-title-row {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
  }

  .rpt-mcard-title-row .rpt-prod-emoji {
    font-size: 19px;
    flex-shrink: 0;
  }

  .rpt-mcard-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rpt-mcard-chevron {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s;
  }

  .rpt-mcard-chevron svg {
    width: 16px;
    height: 16px;
    transition: transform 0.25s ease;
  }

  .rpt-mcard.is-open .rpt-mcard-chevron {
    background: #eff6ff;
    color: #2563eb;
  }

  .rpt-mcard.is-open .rpt-mcard-chevron svg {
    transform: rotate(180deg);
  }

  /* Metrik Utama (Row) */
  .rpt-mcard-metrics {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 8px 10px;
    margin-top: 10px;
  }

  .rpt-mmetric {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .rpt-mmetric-lbl {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }

  .rpt-mmetric-val {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
  }

  .rpt-mmetric-val.val-omzet {
    color: #0f172a;
    font-weight: 800;
  }

  .rpt-mmetric-val.val-profit {
    color: #059669;
    font-weight: 700;
  }

  .rpt-mmetric-val.val-qty {
    color: #334155;
    font-weight: 600;
  }

  .rpt-mmetric-unit {
    font-size: 10px;
    font-weight: normal;
    color: #64748b;
  }

  /* Collapse / Expand Container */
  .rpt-mcard-collapse {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .rpt-mcard.is-open .rpt-mcard-collapse {
    grid-template-rows: 1fr;
  }

  .rpt-mcard-collapse-inner {
    overflow: hidden;
  }

  .rpt-mdetail-grid {
    border-top: 1px dashed #e2e8f0;
    margin-top: 10px;
    padding-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
  }

  .rpt-mdetail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .rpt-mdetail-item.full-col {
    grid-column: 1 / -1;
  }

  .rpt-mdetail-lbl {
    font-size: 10.5px;
    color: #64748b;
    font-weight: 500;
  }

  .rpt-mdetail-val {
    font-size: 12px;
    color: #0f172a;
    font-weight: 600;
  }

  .rpt-mdetail-val.mono {
    font-family: monospace;
    font-size: 11px;
    color: #475569;
  }

  .rpt-mdetail-val.profit {
    color: #059669;
    font-weight: 700;
  }

  .rpt-mdetail-val.muted {
    color: #64748b;
    font-weight: 500;
  }

  .rpt-mdetail-bar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
  }

  .rpt-mbar-wrap {
    height: 5px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
  }

  .rpt-mbar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
  }

  .rpt-mbar-fill.revenue {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
  }

  .rpt-mbar-fill.profit {
    background: linear-gradient(90deg, #10b981, #059669);
  }

  .trx-table-card {
    border-radius: 14px;
    margin-top: 2px;
  }

  /* Modern Enterprise 2026 Card Footer on Mobile */
  .rpt-table-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 14px 14px;
    font-size: 11.5px;
  }

  .rpt-footer-grand {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: 10px;
    padding: 10px 14px;
    width: 100%;
    box-sizing: border-box;
    order: 2;
  }

  .rpt-fgrand-lbl {
    font-size: 11.5px;
    font-weight: 700;
    color: #4338ca;
  }

  .rpt-fgrand-val {
    font-size: 16.5px;
    font-weight: 800;
    color: #3730a3;
    letter-spacing: -0.01em;
  }

  .rpt-footer-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
    order: 1;
  }

  .rpt-fstat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 9px;
    padding: 8px 10px;
    box-sizing: border-box;
  }

  .rpt-footer-stats > .rpt-fstat-item:nth-child(3):last-child {
    grid-column: span 2;
  }

  .rpt-fstat-lbl {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.1;
  }

  .rpt-fstat-val {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
  }

  .rpt-fstat-val.val-profit {
    color: #059669;
    font-weight: 800;
  }

  .rpt-fstat-val.muted {
    color: #64748b;
  }

  /* Mobile Pagination */
  .rpt-pagination-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
  }

  .rpt-pager-left {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .rpt-pager-info {
    text-align: center;
    font-size: 11.5px;
    color: #64748b;
  }

  .rpt-pager-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 100%;
    flex-wrap: wrap;
  }

  .rpt-pager-btn {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
  }

  /* ============================================================
     RIWAYAT TRANSAKSI — 2026 Mobile Header (360x740)
     ============================================================ */
  .trx-page-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
    width: 100%;
    box-sizing: border-box;
  }

  .trx-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    order: 1;
  }

  .trx-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
  }

  .trx-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }

  .trx-title-icon {
    display: none;
  }

  .trx-title {
    font-size: 14px !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
  }

  .trx-count-pill {
    flex-shrink: 0 !important;
    font-size: 10px !important;
    padding: 2px 6px !important;
    border-radius: 999px !important;
  }

  .trx-subtitle {
    display: none !important;
  }

  .trx-btn-new {
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
    order: 2 !important;
    box-sizing: border-box !important;
  }

  .trx-btn-new svg {
    width: 13px !important;
    height: 13px !important;
  }

  .trx-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    order: 2;
    box-sizing: border-box;
  }

  .trx-header-actions #trxStoreDropdownWrap {
    flex: 1;
    min-width: 0;
  }

  .trx-header-actions #trxStoreDropdownWrap .rpt-top-ctrl-box {
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
  }

  .trx-header-actions #trxStoreDropdownWrap .rpt-store-popover {
    left: 0;
    right: auto;
  }

  .trx-filter-wrapper {
    flex-shrink: 0;
  }

  .trx-btn-filter {
    height: 34px;
    padding: 0 11px;
    font-size: 11.5px;
    border-radius: 9px;
    gap: 5px;
    box-sizing: border-box;
  }

  .trx-btn-filter svg {
    width: 13px;
    height: 13px;
  }

  .trx-filter-dropdown {
    width: calc(100vw - 28px);
    max-width: 300px;
    right: 0;
    left: auto;
    box-sizing: border-box;
  }

  /* Global mobile viewport containment */
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .app, .main, .page-pad {
    max-width: 100vw;
    box-sizing: border-box;
  }
}

/* Print Stylesheet */
@media print {

  .rail,
  .rail-edge-toggle,
  .topbar-toggle-btn,
  .sidebar-backdrop,
  .rpt-header-actions,
  .rpt-filter-card {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .app {
    display: block !important;
  }

  .main {
    margin: 0 !important;
    padding: 0 !important;
  }

  .page-pad {
    padding: 0 !important;
  }

  .rpt-cards-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
  }

  .rpt-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
  }

  .trx-table-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

/* ============================================================
   Interactive Sortable Table Headers (Ascending & Descending)
   ============================================================ */
.th-sortable {
  cursor: pointer;
  user-select: none;
  transition: color 140ms ease, background-color 140ms ease;
  position: relative;
}

.th-sortable:hover {
  color: #4f46e5;
  background-color: rgba(248, 250, 252, 0.8);
}

.th-sort-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.th-sort-icon {
  width: 13px;
  height: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), color 140ms ease;
  flex-shrink: 0;
}

.th-sort-icon svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2.2;
}

.th-sortable.is-active {
  color: #4f46e5;
}

.th-sortable.is-active .th-sort-icon {
  color: #4f46e5;
}

.th-sortable.is-active.is-desc .th-sort-icon {
  transform: rotate(180deg);
}

/* ============================================================
   2026 Enterprise Search & Filter Toolbar (Laporan Penjualan)
   Clean, Minimalist, Precision-Aligned (No clutter / No emojis)
   ============================================================ */
.rpt-toolbar-2026 {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  box-sizing: border-box;
}

/* Micro Lead Label (Kategori: / Urutkan:) */
.rpt-ctrl-lead {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 2px;
  user-select: none;
}

/* 1. Fast Live Search Box */
.rpt-search-box-2026 {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  height: 36px;
  flex: 1;
  min-width: 240px;
  max-width: 380px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  box-sizing: border-box;
}

.rpt-search-box-2026:focus-within {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.rpt-search-box-2026 svg {
  width: 14px;
  height: 14px;
  color: #94a3b8;
  flex-shrink: 0;
}

.rpt-search-input-2026 {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: #0f172a;
  width: 100%;
}

.rpt-search-input-2026::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.rpt-search-clear-btn {
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  font-size: 10px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.rpt-search-clear-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* 2. Scalable Category Combobox */
.rpt-cat-combobox-wrap {
  position: relative;
  display: inline-block;
}

.rpt-cat-combobox-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 11px;
  height: 36px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  color: #0f172a;
  transition: all 140ms ease;
  user-select: none;
  white-space: nowrap;
  box-sizing: border-box;
}

.rpt-cat-combobox-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.rpt-cat-combobox-btn.is-active,
.rpt-cat-combobox-btn:focus-visible {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
  outline: none;
  background: #ffffff;
}

.rpt-cat-btn-label {
  font-weight: 600;
  color: #0f172a;
}

.rpt-cat-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rpt-cat-chevron {
  width: 12px;
  height: 12px;
  color: #64748b;
  margin-left: 2px;
  transition: transform 150ms ease;
}

.rpt-cat-combobox-btn.is-active .rpt-cat-chevron {
  transform: rotate(180deg);
  color: #4f46e5;
}

/* Category Popover Dropdown */
.rpt-cat-popover {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 250px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.1), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  z-index: 1050;
  overflow: hidden;
  animation: rptPopFadeIn 120ms ease;
}

.rpt-cat-popover-header {
  padding: 8px;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}

.rpt-cat-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 8px;
  height: 30px;
}

.rpt-cat-search-wrap:focus-within {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.08);
}

.rpt-cat-search-wrap svg {
  width: 12px;
  height: 12px;
  color: #94a3b8;
  flex-shrink: 0;
}

.rpt-cat-search-input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-family: inherit;
  font-size: 11.5px;
  color: #0f172a;
}

.rpt-cat-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.rpt-cat-list::-webkit-scrollbar {
  width: 5px;
}

.rpt-cat-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.rpt-cat-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  transition: all 120ms ease;
  user-select: none;
}

.rpt-cat-item-btn:hover {
  background: #f8fafc;
}

.rpt-cat-item-btn.is-selected {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 600;
}

.rpt-cat-item-info {
  display: flex;
  align-items: center;
}

.rpt-cat-item-name {
  color: inherit;
}

.rpt-cat-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rpt-cat-item-badge {
  font-size: 10.5px;
  font-weight: 500;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}

.rpt-cat-item-btn.is-selected .rpt-cat-item-badge {
  background: #dbeafe;
  color: #1e40af;
}

.rpt-cat-item-check svg {
  width: 13px;
  height: 13px;
  color: #2563eb;
  flex-shrink: 0;
}

.rpt-cat-empty-msg {
  padding: 14px 10px;
  font-size: 11.5px;
  color: #64748b;
  text-align: center;
}

/* 3. Enterprise Dual-Action Sort Group (Clean Segmented Controller) */
.rpt-sort-group-2026 {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  height: 36px;
  box-sizing: border-box;
  padding: 0 4px 0 10px;
  gap: 4px;
  margin-left: auto;
}

.rpt-sort-metric-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 100%;
}

.rpt-sort-metric-wrap select {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  padding-right: 4px;
}

/* Dedicated Clean Direction Toggle Button */
.rpt-sort-dir-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0 8px;
  height: 28px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  transition: all 140ms ease;
  user-select: none;
}

.rpt-sort-dir-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.rpt-sort-dir-btn[data-dir="asc"] {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.rpt-sort-dir-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rpt-sort-dir-icon svg {
  width: 12px;
  height: 12px;
  color: #475569;
}

.rpt-sort-dir-tag {
  font-size: 11px;
}

/* Responsive Mobile Rules Toolbar 2026 */
.rpt-search-row-2026 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 420px;
}

/* Tombol Trigger Filter Mobile (Disembunyikan di Desktop >768px) */
.rpt-mfilter-trigger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 36px;
  height: 36px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #334155;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 140ms ease;
}

.rpt-mfilter-trigger-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.rpt-mfilter-trigger-btn svg {
  width: 16px;
  height: 16px;
}

.rpt-mfilter-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: #4f46e5;
  border: 1.5px solid #ffffff;
  border-radius: 50%;
}

@media (max-width: 768px) {
  .rpt-toolbar-2026 {
    padding: 8px 10px;
    gap: 0;
    border-radius: 12px;
  }

  .rpt-search-row-2026 {
    width: 100%;
    max-width: 100%;
  }

  .rpt-search-box-2026 {
    flex: 1;
    min-width: 0;
    height: 36px;
  }

  .rpt-mfilter-trigger-btn {
    display: inline-flex;
  }

  /* Sembunyikan combobox & sort group desktop di mobile agar toolbar mobile super bersih */
  .rpt-cat-combobox-wrap,
  .rpt-sort-group-2026 {
    display: none !important;
  }
}

/* ============================================================
   MOBILE FILTER BOTTOM SHEET DIALOG (2026 Enterprise Slide-up)
   ============================================================ */
.rpt-mfilter-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: rptBackdropFadeIn 160ms ease;
}

@keyframes rptBackdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.rpt-mfilter-sheet {
  background: #ffffff;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: rptSheetSlideUp 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes rptSheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.rpt-mfilter-sheet-handle {
  width: 36px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 999px;
  margin: 10px auto 4px auto;
  flex-shrink: 0;
}

.rpt-mfilter-sheet-header {
  padding: 8px 18px 12px 18px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.rpt-mfilter-sheet-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rpt-mfilter-sheet-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
}

.rpt-mfilter-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: none;
  color: #64748b;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  transition: all 120ms ease;
}

.rpt-mfilter-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.rpt-mfilter-sheet-desc {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.rpt-mfilter-sheet-body {
  padding: 14px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.rpt-mfilter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rpt-mfilter-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rpt-mfilter-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rpt-mfilter-count-hint {
  font-size: 11.5px;
  color: #4f46e5;
  font-weight: 600;
}

/* Quick Search Kategori di Mobile Sheet */
.rpt-mfilter-cat-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  height: 34px;
}

.rpt-mfilter-cat-search svg {
  width: 13px;
  height: 13px;
  color: #94a3b8;
  flex-shrink: 0;
}

.rpt-mfilter-cat-search input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 12px;
  color: #0f172a;
  width: 100%;
}

.rpt-mfilter-cat-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 4px;
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.rpt-mfilter-cat-list::-webkit-scrollbar {
  width: 4px;
}

.rpt-mfilter-cat-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.rpt-mfilter-cat-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  color: #334155;
  text-align: left;
  transition: all 120ms ease;
}

.rpt-mfilter-cat-btn:hover {
  background: #f8fafc;
}

.rpt-mfilter-cat-btn.is-selected {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
}

.rpt-mfilter-cat-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rpt-mfilter-cat-badge {
  font-size: 11px;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
}

.rpt-mfilter-cat-btn.is-selected .rpt-mfilter-cat-badge {
  background: #dbeafe;
  color: #1e40af;
}

.rpt-mfilter-cat-radio {
  width: 14px;
  height: 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.rpt-mfilter-cat-btn.is-selected .rpt-mfilter-cat-radio {
  border-color: #2563eb;
  background: #2563eb;
}

.rpt-mfilter-cat-btn.is-selected .rpt-mfilter-cat-radio::after {
  content: "";
  position: absolute;
  top: 3.5px;
  left: 3.5px;
  width: 5px;
  height: 5px;
  background: #ffffff;
  border-radius: 50%;
}

/* Metrik Urut Select */
.rpt-mfilter-select-wrap {
  position: relative;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  height: 38px;
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.rpt-mfilter-select-wrap:focus-within {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.08);
}

.rpt-mfilter-select {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
}

/* Arah Urutan Pills (Segmented) */
.rpt-mfilter-dir-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
}

.rpt-mfilter-dir-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #64748b;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 140ms ease;
  user-select: none;
}

.rpt-mfilter-dir-pill.is-active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* Footer Bottom Sheet */
.rpt-mfilter-sheet-footer {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  padding: 12px 18px 18px 18px;
  border-top: 1px solid #f1f5f9;
  background: #ffffff;
  flex-shrink: 0;
}

.rpt-mfilter-btn-reset {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 11px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 140ms ease;
}

.rpt-mfilter-btn-reset:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.rpt-mfilter-btn-apply {
  background: #4f46e5;
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 11px;
  border-radius: 9px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
  transition: all 140ms ease;
}

.rpt-mfilter-btn-apply:hover {
  background: #4338ca;
}

/* ============================================================
   2026 ENTERPRISE MULTI-STORE PRODUCT & STOCK MANAGEMENT STYLES
   ============================================================ */

/* Store Selection Capsule in Product Page */
.master-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.master-head-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.master-head-right .rpt-store-popover {
  left: auto;
  right: 0;
  transform-origin: top right;
}

/* Branch breakdown pill in product table/card */
.prod-stock-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prod-stock-qty-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.prod-branch-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 140ms ease;
}

.prod-branch-pill:hover {
  background: #e0e7ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

.prod-branch-pill svg {
  width: 12px;
  height: 12px;
}

.prod-pill-chevron {
  width: 10px !important;
  height: 10px !important;
  opacity: 0.7;
}

/* Action button in table */
.p-act.stock {
  color: #0284c7;
}

.p-act.stock:hover {
  background: #e0f2fe;
  border-color: #bae6fd;
}

/* Stock Breakdown Modal / Drawer */
.breakdown-modal {
  max-width: 500px;
}

.breakdown-header-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.breakdown-item-info strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
}

.breakdown-item-info small {
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  color: #64748b;
}

.breakdown-total-pill {
  text-align: right;
}

.breakdown-total-pill span {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
}

.breakdown-total-pill strong {
  font-size: 18px;
  color: #0f172a;
}

.breakdown-search-wrap {
  position: relative;
  margin-bottom: 12px;
}

.breakdown-search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #94a3b8;
}

.breakdown-search-input {
  width: 100%;
  padding: 7px 10px 7px 32px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 12.5px;
  box-sizing: border-box;
}

.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  transition: all 140ms ease;
}

.breakdown-row:hover {
  border-color: #cbd5e1;
  background: #fbfcfe;
}

.breakdown-store-col {
  display: flex;
  align-items: center;
  gap: 10px;
}

.breakdown-store-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.breakdown-store-icon.pusat { background: #eff6ff; color: #2563eb; }
.breakdown-store-icon.cabang2 { background: #fdf4ff; color: #c026d3; }
.breakdown-store-icon.cabang3 { background: #f0fdf4; color: #16a34a; }

.breakdown-store-icon svg {
  width: 16px;
  height: 16px;
}

.breakdown-store-meta strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
}

.breakdown-store-meta small {
  font-size: 11px;
  color: #64748b;
}

.breakdown-stock-col {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breakdown-stock-qty {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  min-width: 48px;
  text-align: right;
}

.breakdown-stock-qty.out { color: #ef4444; }
.breakdown-stock-qty.low { color: #f59e0b; }

/* Stock Adjustment Modal Styles */
.adjust-modal {
  max-width: 520px;
}

.adjust-target-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
}

.adjust-target-details h4 {
  margin: 0 0 2px;
  font-size: 15px;
  color: #0f172a;
}

.adjust-target-details span {
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  color: #64748b;
}

.adjust-curr-stock {
  text-align: right;
}

.adjust-curr-stock small {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.adjust-curr-stock strong {
  font-size: 20px;
  color: #0f172a;
}

.adjust-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 18px;
}

.adjust-tab-btn {
  border: none;
  background: transparent;
  padding: 8px 6px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 140ms ease;
}

.adjust-tab-btn svg {
  width: 14px;
  height: 14px;
}

.adjust-tab-btn.is-active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.adjust-calc-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  margin-bottom: 16px;
}

.adjust-calc-box.negative {
  background: #fef2f2;
  border-color: #fecaca;
}

.adjust-calc-label {
  font-size: 12px;
  font-weight: 600;
  color: #166534;
}

.adjust-calc-box.negative .adjust-calc-label {
  color: #991b1b;
}

.adjust-calc-formula {
  font-size: 13px;
  font-weight: 700;
  color: #15803d;
}

.adjust-calc-box.negative .adjust-calc-formula {
  color: #b91c1c;
}

/* Product CRUD Modal */
.prod-form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.prod-stocks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
}

.prod-stock-input-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prod-stock-input-box label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.prod-stock-input-box input {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 13px;
  font-weight: 600;
}

/* Product Image Uploader & Responsive Modal Layout 2026 */
.prod-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(85vh - 130px);
  overflow-y: auto;
  padding-right: 4px;
}

.prod-modal-top-section {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
  align-items: start;
}

.prod-img-uploader {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prod-img-uploader label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.prod-img-dropzone {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 160ms ease;
  user-select: none;
}

.prod-img-dropzone:hover,
.prod-img-dropzone.is-dragover {
  border-color: #4f46e5;
  background: #eef2ff;
}

.prod-img-dropzone svg {
  width: 34px;
  height: 34px;
  color: #94a3b8;
  margin-bottom: 8px;
  transition: transform 160ms ease, color 160ms ease;
}

.prod-img-dropzone:hover svg {
  transform: scale(1.1);
  color: #4f46e5;
}

.prod-img-dropzone strong {
  font-size: 12px;
  color: #334155;
  line-height: 1.35;
}

.prod-img-dropzone small {
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 4px;
}

.prod-img-preview-box {
  position: absolute;
  inset: 0;
  background: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.prod-img-preview-box.has-preview {
  display: flex;
}

.prod-img-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prod-img-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.prod-img-remove-btn:hover {
  background: #ef4444;
  transform: scale(1.08);
}

.prod-img-remove-btn svg {
  width: 14px;
  height: 14px;
}

.prod-img-url-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.prod-img-url-input {
  font-size: 11.5px !important;
  padding: 6px 10px !important;
}

/* Image Thumbnails in Product Table and Cards */
.p-thumb.has-img {
  padding: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.p-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prod-card-top.has-img {
  background: #f8fafc;
  overflow: hidden;
  position: relative;
}

.prod-card-full-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
  position: absolute;
  inset: 0;
  z-index: 1;
}

.prod-card-top.has-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, transparent 45%, rgba(15, 23, 42, 0.35) 100%);
  pointer-events: none;
  z-index: 2;
}

.prod-card-top.has-img .prod-card-actions,
.prod-card-top.has-img .prod-card-stock {
  position: relative;
  z-index: 3;
}

.prod-card-top.has-img .prod-card-act-btn {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Tablet & Mobile Layout Refinements for Product Modal */
@media (max-width: 840px) {
  .prod-modal-top-section {
    grid-template-columns: 180px 1fr;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .prod-modal-top-section {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .prod-img-dropzone {
    aspect-ratio: 16 / 9;
    max-height: 180px;
  }
  .prod-form-row-3 {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .cat-form-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ============================================================
   WAC (WEIGHTED AVERAGE COSTING) & BATCH RESTOCK MODAL 2026
   ============================================================ */

/* Batch Stock Button in Master Head */
.btn-batch-stock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #4f46e5;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 11px;
  box-shadow: 0 6px 16px -4px rgba(79, 70, 229, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-batch-stock:hover {
  background: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -6px rgba(79, 70, 229, 0.5);
}

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

.btn-batch-stock svg {
  flex-shrink: 0;
}

/* Single Stock Adjustment WAC Indicators */
.adjust-cost-hint {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 600;
  font-family: var(--font-mono, monospace);
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.adjust-calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.adjust-hpp-row {
  padding-top: 8px;
  margin-top: 6px;
  border-top: 1px dashed rgba(22, 101, 52, 0.25);
}

.adjust-calc-box.negative .adjust-hpp-row {
  border-top-color: rgba(185, 28, 28, 0.25);
}

.adjust-hpp-calc-detail {
  display: flex;
  align-items: center;
  gap: 8px;
}

.adjust-hpp-formula {
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #15803d;
  font-family: var(--font-mono, monospace);
}

.adjust-hpp-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.adjust-hpp-badge.up {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.adjust-hpp-badge.down {
  background: #fefce8;
  color: #854d0e;
  border-color: #fef08a;
}

/* Batch Restock Modal */
.batch-modal {
  background: #ffffff;
  border-radius: 20px;
  padding: 22px 24px 18px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 32px);
  max-width: 1140px;
  width: min(1140px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
}

.batch-modal .cat-modal-head {
  flex-shrink: 0;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.batch-form-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.batch-form-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.batch-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.batch-tag-badge {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  background: #e0e7ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.batch-doc-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.9fr 1.1fr;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 0;
}

.batch-doc-grid .cat-form-group {
  margin-bottom: 0;
}

.batch-doc-grid label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
  display: block;
}

.batch-add-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 12px;
  position: relative;
}

/* Modern Searchable Combobox for Batch Product Picker */
.batch-combobox-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.batch-combobox-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 14px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  transition: all 140ms ease;
  text-align: left;
  outline: none;
}

.batch-combobox-trigger:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.batch-combobox-trigger[aria-expanded="true"] {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  background: #ffffff;
}

.batch-combobox-trigger-main {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.batch-search-icon {
  color: #64748b;
  flex-shrink: 0;
}

.batch-combobox-placeholder {
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-combobox-trigger-extra {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.batch-combobox-count {
  font-size: 11px;
  font-weight: 700;
  background: #e0e7ff;
  color: #4338ca;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #c7d2fe;
}

.batch-chevron-icon {
  color: #94a3b8;
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.batch-combobox-trigger[aria-expanded="true"] .batch-chevron-icon {
  transform: rotate(180deg);
}

/* Combobox Dropdown Popover */
.batch-combobox-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 120;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 310px;
  animation: batchDropIn 140ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes batchDropIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.batch-combobox-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.batch-combobox-search-box svg {
  color: #64748b;
  flex-shrink: 0;
}

.batch-combobox-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  padding: 0;
}

.batch-combobox-search-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.batch-combobox-search-clear {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  transition: all 120ms ease;
}

.batch-combobox-search-clear:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.batch-combobox-list {
  flex: 1;
  overflow-y: auto;
  max-height: 245px;
  padding: 6px;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.batch-combobox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  user-select: none;
  border: 1px solid transparent;
}

.batch-combobox-item:hover,
.batch-combobox-item:focus-visible {
  background: #f1f5f9;
  border-color: #cbd5e1;
  outline: none;
}

.batch-combobox-item-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.batch-combobox-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.batch-combobox-item-fallback {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.batch-combobox-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.batch-combobox-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.batch-combobox-item-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-combobox-item-price {
  font-size: 11.5px;
  font-weight: 700;
  color: #4f46e5;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.batch-combobox-item-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  flex-wrap: wrap;
}

.batch-combobox-item-sku {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
}

.batch-combobox-item-sep {
  color: #cbd5e1;
}

.batch-combobox-item-stock strong {
  color: #0f172a;
}

.batch-combobox-item-hpp strong {
  color: #059669;
}

.batch-combobox-item-add-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 5px 9px;
  border-radius: 7px;
  flex-shrink: 0;
  transition: all 120ms ease;
}

.batch-combobox-item:hover .batch-combobox-item-add-tag {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.batch-combobox-empty {
  padding: 24px 16px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.batch-combobox-empty svg {
  color: #94a3b8;
}

/* Toolbar Actions & Clear All Button */
.batch-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-batch-clear-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #dc2626;
  border: 1.5px solid #fecaca;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 13px;
  border-radius: 9px;
  white-space: nowrap;
  transition: all 140ms ease;
  cursor: pointer;
}

.btn-batch-clear-all:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #f87171;
  color: #b91c1c;
  transform: translateY(-1px);
}

.btn-batch-clear-all:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: #e2e8f0;
  color: #94a3b8;
  background: #f8fafc;
  transform: none !important;
  box-shadow: none !important;
  pointer-events: none;
}

.batch-table-wrap {
  min-height: 150px;
  max-height: 320px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.batch-table {
  width: 100%;
  min-width: 960px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.batch-table thead {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 10;
  box-shadow: 0 1px 0 #e2e8f0;
}

.batch-table th {
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  background: #f8fafc;
  white-space: nowrap;
}

.batch-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.batch-table tr:hover td {
  background: #fafbfc;
}

.batch-prod-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.batch-prod-thumb {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.batch-prod-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.batch-prod-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.batch-prod-title {
  font-weight: 700;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 185px;
}

.batch-prod-meta-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}

.batch-prod-sku {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  color: #64748b;
}

.batch-prod-dot {
  color: #cbd5e1;
}

.batch-prod-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: #4338ca;
  background: #eef2ff;
  border: 1px solid #e0e7ff;
  padding: 1px 7px;
  border-radius: 5px;
}

/* Remove number spinners from batch inputs */
.batch-input-qty::-webkit-inner-spin-button,
.batch-input-qty::-webkit-outer-spin-button,
.batch-input-price::-webkit-inner-spin-button,
.batch-input-price::-webkit-outer-spin-button,
.batch-input-selling-price::-webkit-inner-spin-button,
.batch-input-selling-price::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.batch-input-qty,
.batch-input-price,
.batch-input-selling-price {
  -moz-appearance: textfield;
}

.batch-input-qty {
  width: 68px;
  min-width: 68px;
  padding: 8px 6px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
  outline: none;
  text-align: center;
  font-variant-numeric: tabular-nums;
  margin: 0 auto;
  display: block;
  transition: border-color 140ms, box-shadow 140ms;
}

.batch-input-qty:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* Cost Input Mode Toggles (Satuan vs Subtotal) */
.batch-th-cost-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.batch-global-cost-toggle {
  display: inline-flex;
  align-items: center;
  background: #e2e8f0;
  padding: 2px;
  border-radius: 6px;
}

.batch-cost-mode-btn {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 120ms ease;
  line-height: 1.2;
}

.batch-cost-mode-btn:hover {
  color: #0f172a;
}

.batch-cost-mode-btn.active {
  background: #ffffff;
  color: #4f46e5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.batch-cost-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.batch-row-mode-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.batch-row-mode-title {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.batch-mini-mode-pills {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 1.5px;
  border-radius: 5px;
}

.batch-mini-pill {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 3.5px;
  cursor: pointer;
  transition: all 120ms ease;
  line-height: 1.2;
}

.batch-mini-pill:hover {
  color: #0f172a;
}

.batch-mini-pill.active {
  background: #4f46e5;
  color: #ffffff;
}

.batch-cost-sub-hint {
  font-size: 10.5px;
  color: #64748b;
  margin-top: 1px;
  display: block;
  white-space: nowrap;
}

.batch-cost-sub-hint strong {
  color: #0f172a;
}

.batch-input-price-wrap {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  min-width: 135px;
  transition: border-color 140ms, box-shadow 140ms;
}

.batch-input-price-wrap:focus-within {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.batch-price-prefix {
  padding: 0 9px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border-right: 1px solid #cbd5e1;
  height: 34px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  user-select: none;
}

.batch-input-price,
.batch-input-selling-price {
  width: 100%;
  min-width: 0;
  flex: 1;
  padding: 7px 10px;
  border: none;
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
  outline: none;
  font-variant-numeric: tabular-nums;
}

.batch-impact-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 250px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
}

.batch-proj-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  line-height: 1.35;
}

.batch-proj-lbl {
  color: #64748b;
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
}

.batch-proj-val {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.batch-proj-curr {
  color: #94a3b8;
  font-weight: 500;
  font-size: 11px;
}

.batch-proj-arrow {
  color: #94a3b8;
  flex-shrink: 0;
}

.batch-proj-after {
  color: #0f172a;
  font-weight: 700;
  font-size: 11.5px;
}

.batch-proj-stock .batch-proj-after {
  color: #15803d;
  font-weight: 800;
}

.batch-proj-delta-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 0 4px;
  border-radius: 4px;
}

/* HPP Projection Colors: Naik = Merah (#dc2626), Turun = Hijau (#059669), Tetap = Netral (#475569) */
.batch-proj-after.hpp-after-up {
  color: #dc2626 !important;
  font-weight: 800 !important;
}

.batch-proj-hpp-badge.badge-up {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border: 1px solid #fca5a5 !important;
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  padding: 0 5px;
  border-radius: 4px;
}

.batch-proj-after.hpp-after-down {
  color: #059669 !important;
  font-weight: 800 !important;
}

.batch-proj-hpp-badge.badge-down {
  background: #dcfce7 !important;
  color: #166534 !important;
  border: 1px solid #bbf7d0 !important;
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  padding: 0 5px;
  border-radius: 4px;
}

.batch-proj-after.hpp-after-same {
  color: #475569 !important;
  font-weight: 700 !important;
}

.batch-proj-hpp-badge.badge-same {
  background: #f1f5f9 !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 4px;
}

.batch-selling-margin-hint {
  font-size: 10.5px;
  margin-top: 2px;
  display: block;
  white-space: nowrap;
}

.batch-impact-subtotal {
  font-weight: 800;
  font-size: 12.5px;
  color: #4f46e5;
  font-variant-numeric: tabular-nums;
}

.batch-btn-remove {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  display: grid;
  place-items: center;
  transition: all 140ms ease;
  cursor: pointer;
  border: none;
}

.batch-btn-remove:hover {
  background: #fee2e2;
  color: #dc2626;
}

.batch-empty-state {
  padding: 32px 16px;
  text-align: center;
  color: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 160px;
}

.batch-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #f1f5f9;
  color: #94a3b8;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
}

.batch-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 18px;
  margin-top: 0;
  flex-shrink: 0;
}

.batch-summary-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.batch-summary-stat.primary .batch-stat-val {
  color: #4f46e5;
  font-size: 16px;
}

.batch-stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.batch-stat-val {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.batch-summary-divider {
  width: 1px;
  height: 28px;
  background: #e2e8f0;
}

.batch-modal-actions {
  flex-shrink: 0;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  gap: 10px;
}

/* Responsive adjustments for Batch Modal */
@media (max-width: 860px) {
  .batch-doc-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .batch-add-toolbar {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .modal-backdrop {
    padding: 8px !important;
  }

  .batch-modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 16px) !important;
    padding: 14px 12px 10px !important;
    border-radius: 16px !important;
  }

  .batch-title-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .batch-title-row h3 {
    font-size: 15px !important;
  }

  .cat-modal-sub {
    font-size: 11px !important;
    margin-bottom: 0 !important;
    line-height: 1.35 !important;
  }

  .batch-doc-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 10px !important;
    margin-bottom: 0 !important;
  }

  .batch-add-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px !important;
    margin-bottom: 0 !important;
  }

  .batch-toolbar-actions {
    display: flex !important;
    width: 100% !important;
  }

  .btn-batch-clear-all {
    width: 100% !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    font-size: 11.5px !important;
  }

  .batch-combobox-trigger {
    padding: 8px 10px !important;
  }

  .batch-combobox-placeholder {
    font-size: 11.5px !important;
  }

  .batch-combobox-count {
    font-size: 10px !important;
    padding: 1px 6px !important;
  }

  .batch-combobox-dropdown {
    max-height: 240px !important;
  }

  .batch-table-wrap {
    min-height: 130px !important;
    max-height: 200px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .batch-table {
    min-width: 960px !important;
  }

  .batch-summary-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding: 10px 12px !important;
    margin-top: 0 !important;
  }

  .batch-summary-divider {
    display: none !important;
  }

  .batch-modal-actions {
    margin-top: 8px !important;
    padding-top: 8px !important;
    gap: 8px !important;
  }

  .batch-modal-actions .modal-btn {
    height: 40px !important;
    font-size: 12.5px !important;
  }

  .adjust-modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 16px) !important;
    overflow-y: auto !important;
    padding: 14px 12px 10px !important;
    border-radius: 16px !important;
  }
}

/* ============================================================
   MULTI-SATUAN / MULTI-PACKAGING STYLES (OPTION B POPUP MODAL)
   ============================================================ */
.badge.is-multi {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.card.is-multi-unit {
  position: relative;
}

.card-unit-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 5px 9px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
  line-height: 1;
  transition: all 140ms ease;
}

.card:hover .card-unit-indicator {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

/* Modal Popup Satuan / Kemasan (Option B) */
.unit-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: unitFadeIn 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.unit-picker-backdrop[hidden] {
  display: none !important;
}

@keyframes unitFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes unitModalPop {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.unit-picker-modal {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: unitModalPop 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.unit-picker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  gap: 12px;
}

.unit-picker-prod-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.unit-picker-thumb {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.unit-picker-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.unit-picker-meta {
  min-width: 0;
}

.unit-picker-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 6px;
  background: #e0e7ff;
  color: #4338ca;
  margin-bottom: 3px;
}

.unit-picker-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unit-picker-stock {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin: 3px 0 0;
}

.unit-picker-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 120ms ease;
}

.unit-picker-close:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

.unit-picker-body {
  padding: 16px 20px 20px;
  max-height: calc(85vh - 120px);
  overflow-y: auto;
}

.unit-picker-instruction {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin: 0 0 12px;
}

.unit-picker-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Kartu Pilihan Satuan / Kemasan */
.unit-option-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: all 140ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  gap: 12px;
}

.unit-option-card:hover:not(:disabled) {
  border-color: #6366f1;
  background: #fbfbfe;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.12);
}

.unit-option-card:active:not(:disabled) {
  transform: scale(0.99);
}

.unit-option-card.is-disabled,
.unit-option-card:disabled {
  opacity: 0.55;
  background: #f8fafc;
  border-color: #e2e8f0;
  cursor: not-allowed;
  box-shadow: none;
}

.unit-option-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.unit-option-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.unit-option-name {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
}

.unit-default-pill {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

.unit-option-ratio {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.unit-option-pricing {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.unit-option-old {
  font-size: 11.5px;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 500;
}

.unit-option-final-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.unit-option-discount-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: #fee2e2;
  color: #ef4444;
  letter-spacing: 0.02em;
}

.unit-option-final {
  font-size: 15px;
  font-weight: 800;
  color: #059669;
}

.unit-option-out-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #dc2626;
  background: #fef2f2;
  border-radius: 6px;
  padding: 2px 6px;
  margin-top: 2px;
}

.oi-variant-tag {
  display: inline-block;
  color: #4338ca !important;
  font-weight: 700 !important;
  background: #eef2ff;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 11px !important;
  margin-top: 2px;
}

/* Mobile responsive unit picker modal */
@media (max-width: 640px) {
  .unit-picker-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .unit-picker-modal {
    max-width: 100%;
    border-radius: 22px 22px 0 0;
    max-height: 82vh;
    animation: unitSheetSlideUp 240ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes unitSheetSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .unit-picker-header {
    padding: 16px 16px 12px;
  }

  .unit-picker-body {
    padding: 14px 16px 24px;
  }

  .unit-option-card {
    padding: 12px 14px;
  }

  .unit-option-name {
    font-size: 13.5px;
  }

  .unit-option-final {
    font-size: 14px;
  }
}

/* ============================================================
   Variasi Jual & Kemasan Eceran Repeater (Modal Tambah/Edit Produk)
   ============================================================ */
.prod-var-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 10px;
  margin-bottom: 8px;
}

.prod-var-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.prod-var-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
}

.prod-var-title svg {
  color: #059669;
}

.prod-var-subtitle {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.btn-add-var {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #047857;
  border: 1.5px solid #a7f3d0;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-add-var:hover {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.prod-var-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  padding: 16px;
  color: #64748b;
}

.prod-var-empty-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}

.prod-var-empty-text strong {
  color: #334155;
  font-size: 13px;
}

.prod-var-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prod-var-row {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease;
}

.prod-var-row:hover {
  border-color: #cbd5e1;
}

.cat-input-prefix-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.cat-input-prefix {
  position: absolute;
  left: 9px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  pointer-events: none;
  z-index: 2;
}

.cat-input-prefix-wrap .cat-input {
  padding-left: 28px !important;
  width: 100%;
}

.prod-var-fields {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr 1.15fr 1.25fr 1.2fr 36px;
  gap: 8px;
  align-items: flex-end;
}

.prod-var-row .cat-input {
  height: 38px;
  padding: 6px 8px;
  font-size: 12px;
}

.prod-var-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prod-var-label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.prod-var-measure-combo {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4px;
}

.prod-var-measure-combo .cat-input,
.prod-var-disc-combo .cat-input {
  padding: 6px 5px;
  font-size: 11.5px;
}

.prod-var-disc-combo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.prod-var-final-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 38px;
}

.prod-var-final-num {
  font-size: 13px;
  font-weight: 800;
  color: #15803d;
  line-height: 1.1;
}

.prod-var-final-sub {
  font-size: 9.5px;
  font-weight: 600;
  color: #64748b;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prod-var-final-sub.has-disc {
  color: #b45309;
}

.btn-del-var {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 38px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-del-var:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #ef4444;
}

@media (max-width: 768px) {
  .prod-var-fields {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .prod-var-col.col-name {
    grid-column: 1 / -1;
  }
  .prod-var-col.col-final {
    grid-column: 1 / -1;
  }
  .prod-var-col.col-del {
    grid-column: 1 / -1;
    align-items: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}