/* ============================================================
   TB ARYA - SISTEM POS KASIR & KEUANGAN MATERIAL BANGUNAN
   Premium Design System, Responsive & High-Fidelity
   ============================================================ */

:root {
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Colors */
  --bg-dark-sidebar: #0b1324;
  --bg-dark-sidebar-sub: #111b33;
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  
  --primary-orange: #ea580c;
  --primary-orange-hover: #c2410c;
  --primary-orange-light: #fff7ed;
  --primary-orange-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  
  --text-dark: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-light: #f8fafc;

  --border-light: #e2e8f0;
  --border-card: #e5e7eb;

  --success-green: #10b981;
  --success-light: #ecfdf5;
  --warning-amber: #f59e0b;
  --warning-light: #fffbeb;
  --danger-red: #ef4444;
  --danger-light: #fef2f2;
  --info-blue: #0284c7;
  --info-light: #f0f9ff;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.12);
  --shadow-orange: 0 8px 20px -4px rgba(234, 88, 12, 0.35);

  --header-height: 66px;
  --sidebar-width: 260px;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
}

/* ============================================================
   APP CONTAINER & LAYOUT
   ============================================================ */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ============================================================
   TOP HEADER BAR
   ============================================================ */
.top-header {
  height: var(--header-height);
  background-color: var(--bg-dark-sidebar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
  z-index: 50;
  flex-shrink: 0;
}

.header-logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 240px;
  flex-shrink: 0;
}

.logo-box {
  width: 38px;
  height: 38px;
  background: var(--primary-orange-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
  color: white;
}

.logo-svg {
  width: 22px;
  height: 22px;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  line-height: 1.1;
}

.brand-sub {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #38bdf8;
  text-transform: uppercase;
}

/* Header Fast Search */
.header-search-area {
  display: none !important;
  flex: 1;
  max-width: 520px;
}

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

.search-input-wrapper input {
  width: 100%;
  height: 38px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  padding: 0 42px 0 16px;
  font-size: 13.5px;
  color: var(--text-dark);
  font-family: var(--font-main);
  outline: none;
  transition: all 0.2s ease;
}

.search-input-wrapper input:focus {
  background: #ffffff;
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.search-input-wrapper .search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: #64748b;
  pointer-events: none;
}

/* Header Right Buttons */
.header-actions-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-header-outline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: #60a5fa;
  border: 1px solid #2563eb;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-header-outline:hover {
  background: rgba(37, 99, 235, 0.15);
}

.btn-header-install {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #059669;
  color: white;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-header-install:hover {
  background: #047857;
}

.live-clock-badge {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
}

.backup-status-pill {
  display: none !important;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
}

/* ============================================================
   MAIN LAYOUT (SIDEBAR + VIEWPORT)
   ============================================================ */
.main-layout {
  display: flex;
  flex: 1;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-dark-sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100%;
}

.sidebar-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px 10px 8px;
  scrollbar-width: thin;
}

.sidebar-scrollable::-webkit-scrollbar {
  width: 4px;
}
.sidebar-scrollable::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.nav-group-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.8px;
  margin: 10px 8px 4px 8px;
  text-transform: uppercase;
}

.nav-group-title:first-child {
  margin-top: 4px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6.5px 11px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.12s ease;
  position: relative;
  cursor: pointer !important;
  user-select: none;
}

.nav-item * {
  pointer-events: none;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-item.active {
  background: var(--primary-orange);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.32);
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
}

.nav-icon svg {
  width: 17px;
  height: 17px;
}

.nav-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13.5px;
  font-weight: 600;
  color: inherit;
}

.nav-badge-key {
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.25);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
}

.nav-counter {
  font-size: 10.5px;
  font-weight: 700;
  background: #1e293b;
  color: #94a3b8;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.nav-counter.red {
  background: #ef4444;
  color: white;
}

.sidebar-user-footer {
  padding: 10px 12px;
  background: var(--bg-dark-sidebar-sub);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  line-height: 1.25;
  overflow: hidden;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.btn-logout {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
}

/* Penyesuaian responsif layar laptop kecil agar tetap pas tanpa mengecilkan teks */
@media (max-height: 750px) {
  .nav-item {
    padding: 5px 10px;
    gap: 9px;
  }
  .nav-group-title {
    margin: 6px 8px 3px 8px;
    font-size: 10px;
  }
  .sidebar-scrollable {
    padding: 4px 6px 6px 6px;
  }
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* ============================================================
   VIEWPORT & APP VIEWS
   ============================================================ */
.viewport {
  flex: 1;
  height: 100%;
  overflow: hidden;
  position: relative;
  background: #eef2f6;
}

.app-view {
  display: none;
  height: 100%;
  width: 100%;
  overflow-y: auto;
}

.app-view.active-view {
  display: block;
}

/* ============================================================
   VIEW: POS / KASIR (EXACT SCREENSHOT LAYOUT)
   ============================================================ */
.pos-layout {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
  padding: 14px;
  gap: 14px;
}

/* LEFT/CENTER: CATALOG PANEL */
.pos-catalog-panel {
  flex: 1;
  background: #f1f5f9;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.catalog-top-bar {
  padding: 16px 20px 10px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.catalog-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-dark);
}

.catalog-subtitle {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.catalog-controls-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.catalog-search-box {
  position: relative;
  width: 200px;
}

.catalog-search-box input {
  width: 100%;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 0 10px 0 32px;
  font-size: 12.5px;
  outline: none;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.catalog-search-box input:focus {
  border-color: var(--primary-orange);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.catalog-search-box svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.view-mode-toggle {
  display: flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
}

.toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toggle-btn.active {
  background: #ffffff;
  color: var(--text-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Category Pills Row */
.category-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px 14px 20px;
  background: #f8fafc;
  overflow-x: auto;
  border-bottom: 1px solid #e2e8f0;
}

.category-pills-row::-webkit-scrollbar {
  height: 4px;
}
.category-pills-row::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.pill-btn {
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.pill-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.pill-btn.active {
  background: var(--primary-orange);
  border-color: var(--primary-orange);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
}

/* Product Cards Grid */
.product-cards-grid {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  align-content: start;
  background: #f1f5f9;
}

.product-cards-grid::-webkit-scrollbar {
  width: 6px;
}
.product-cards-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Individual Product Card */
.prod-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.18s ease;
  position: relative;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.prod-card:hover {
  border-color: #fdba74;
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.1);
  transform: translateY(-2px);
}

.prod-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.prod-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
}

.stock-tag-pill {
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 2.5px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.stock-tag-pill.warning {
  color: #d97706;
  background: #fffbeb;
  border-color: #fde68a;
}

.stock-tag-pill.danger {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fecaca;
}

.prod-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 6px;
  min-height: 36px;
}

.prod-tags-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tag-sku {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.tag-cat {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 500;
}

.prod-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-top: 1px dashed #f1f5f9;
  padding-top: 8px;
}

.price-type-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.prod-price-text {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-orange);
  line-height: 1.2;
}

.btn-add-item {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-add-item:hover {
  background: var(--primary-orange);
  border-color: var(--primary-orange);
  color: #ffffff;
  transform: scale(1.08);
}
/* ============================================================
   PRODUCT LIST VIEW (TAMPILAN LIST)
   ============================================================ */
.product-list-view {
  flex: 1;
  overflow-y: auto;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f1f5f9;
}

.product-list-view::-webkit-scrollbar {
  width: 6px;
}
.product-list-view::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.prod-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.prod-list-row:hover {
  border-color: var(--primary-orange);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.1);
  transform: translateX(2px);
}

.prod-list-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.prod-icon-box.sm {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid #f1f5f9;
}

.prod-icon-box.sm svg {
  width: 20px;
  height: 20px;
}

.prod-list-details {
  flex: 1;
  min-width: 0;
}

.prod-list-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.prod-list-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.prod-list-price-box {
  text-align: right;
}

.unit-sub {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.btn-add-list-item {
  background: var(--primary-orange-gradient);
  border: none;
  color: #ffffff;
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25);
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-add-list-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
}

/* ============================================================
   RIGHT PANEL: CART & CHECKOUT
   ============================================================ */
.pos-cart-panel {
  width: 440px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  flex-shrink: 0;
}

.cart-header {
  padding: 10px 14px 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid #f1f5f9;
  background: #ffffff;
  flex-shrink: 0;
}

.cart-title-wrap {
  display: flex;
  flex-direction: column;
}

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

.cart-header-icon {
  font-size: 15px;
}

.cart-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.2px;
}

.cart-count-sub {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  margin-top: 1px;
}

.btn-clear-cart {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-clear-cart:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

/* Cart Items Container */
.cart-items-container {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 10px;
  background: #f8fafc;
}

.cart-items-container::-webkit-scrollbar {
  width: 5px;
}
.cart-items-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.empty-cart-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 10px;
  color: #94a3b8;
  gap: 2px;
}

.empty-cart-icon {
  font-size: 22px;
  opacity: 0.6;
  margin-bottom: 2px;
}

.empty-cart-state p {
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  margin: 0;
}

.empty-cart-state span {
  font-size: 11px;
  color: #94a3b8;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 5px;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.15s ease;
}

.cart-item-row:hover {
  border-color: #fdba74;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.08);
}

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

.cart-item-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-unit-price {
  font-size: 11px;
  color: #64748b;
  margin-top: 1px;
  font-weight: 600;
}

.cart-item-qty-ctrl {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  padding: 1px;
}

.qty-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: none;
  background: #ffffff;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.1s ease;
}

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

.qty-input {
  width: 32px;
  height: 22px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  color: #0f172a;
}

.cart-item-subtotal {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-orange);
  min-width: 72px;
  text-align: right;
  font-family: var(--font-mono);
}

.cart-item-remove {
  background: transparent;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  padding: 2px 5px;
  font-size: 15px;
  border-radius: 4px;
  line-height: 1;
  transition: all 0.15s;
}

.cart-item-remove:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* Cart Footer / Checkout Form */
.cart-footer-section {
  flex-shrink: 0;
  padding: 8px 12px 10px 12px;
  background: #ffffff;
  border-top: 1.5px solid #e2e8f0;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.03);
}

/* Compact Financial Calc Box */
.cart-calc-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #475569;
}

.calc-label {
  font-weight: 600;
}

.calc-val {
  font-weight: 800;
  font-family: var(--font-mono);
  color: #0f172a;
}

.calc-input-wrapper {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 0 6px;
  height: 24px;
}

.calc-input-wrapper:focus-within {
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.12);
}

.input-rp-prefix {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  margin-right: 3px;
}

.input-calc-row input {
  width: 75px;
  height: 22px;
  border: none;
  background: transparent;
  text-align: right;
  padding: 0;
  font-size: 11.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  outline: none;
  color: #0f172a;
}

/* Modern Total Akhir Hero Card */
.cart-grand-total-card {
  background: linear-gradient(135deg, #091e3a 0%, #0f172a 100%);
  border-left: 4px solid var(--primary-orange);
  border-radius: 8px;
  padding: 6px 12px;
  margin: 6px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.15);
}

.gt-label-col {
  display: flex;
  flex-direction: column;
}

.gt-caption {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #94a3b8;
  text-transform: uppercase;
}

.gt-sub {
  font-size: 9px;
  color: #64748b;
  font-weight: 600;
}

.gt-amount-col {
  text-align: right;
}

.gt-value {
  font-size: 19px;
  font-weight: 900;
  color: #10b981;
  font-family: var(--font-mono);
  letter-spacing: -0.3px;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

/* Checkout Form Grid */
.checkout-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 6px;
}

.form-group-item label {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  color: #64748b;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.field-label-row label {
  margin-bottom: 0;
}

.btn-toggle-pelanggan-mode {
  background: none;
  border: none;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--primary-orange);
  cursor: pointer;
  padding: 1px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
  line-height: 1;
}

.btn-toggle-pelanggan-mode:hover {
  background: rgba(234, 88, 12, 0.12);
  text-decoration: underline;
}

.input-with-action {
  display: flex;
  gap: 5px;
  align-items: center;
  width: 100%;
}

.form-input-sm {
  flex: 1;
  width: 100%;
  height: 36px;
  font-size: 13px;
  font-family: var(--font-main);
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #ffffff;
  padding: 0 10px;
  outline: none;
  font-weight: 600;
  color: #1e293b;
  box-sizing: border-box;
}

.form-input-sm:focus {
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.15);
}

.btn-input-back {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  width: 32px;
  height: 36px;
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.btn-input-back:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.form-select-sm {
  width: 100%;
  height: 36px;
  font-size: 13px;
  font-family: var(--font-main);
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc;
  padding: 0 8px;
  outline: none;
  font-weight: 600;
  color: #1e293b;
}

.form-select-sm:focus {
  border-color: var(--primary-orange);
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.15);
}

/* Quick Search Pelanggan in POS Kasir */
.quick-search-pelanggan-wrap {
  position: relative;
  width: 100%;
}

.quick-search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.qs-search-icon {
  position: absolute;
  left: 9px;
  font-size: 13px;
  color: #94a3b8;
  pointer-events: none;
  z-index: 2;
  user-select: none;
}

.qs-input {
  width: 100%;
  height: 36px;
  padding-left: 28px !important;
  padding-right: 48px !important;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 7px;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.qs-input:focus {
  border-color: #ea580c;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.18);
  background: #ffffff;
}

.qs-clear-btn {
  position: absolute;
  right: 24px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.qs-clear-btn:hover {
  color: #ef4444;
  background: #fee2e2;
}

.qs-dropdown-arrow {
  position: absolute;
  right: 4px;
  background: none;
  border: none;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.qs-dropdown-arrow:hover {
  color: #ea580c;
}

.qs-dropdown-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.18), 0 8px 10px -6px rgba(0, 0, 0, 0.12);
  max-height: 250px;
  overflow-y: auto;
  z-index: 1050;
  padding: 4px 0;
}

.qs-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.1s ease;
  user-select: none;
}

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

.qs-item:hover, .qs-item.active {
  background: #f0fdf4;
}

.qs-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.qs-item-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

.qs-item-name mark {
  background: #fef08a;
  color: #854d0e;
  padding: 0 1px;
  border-radius: 2px;
}

.qs-item-sub {
  font-size: 10.5px;
  color: #64748b;
  display: flex;
  gap: 5px;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qs-item-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #334155;
}

.qs-item-badge.badge-kontraktor {
  background: #e0f2fe;
  color: #0369a1;
}

.qs-item-badge.badge-proyek {
  background: #fef3c7;
  color: #b45309;
}

.qs-item-badge.badge-umum {
  background: #f1f5f9;
  color: #475569;
}

.qs-item-piutang {
  font-size: 10.5px;
  font-weight: 700;
  color: #dc2626;
  white-space: nowrap;
  background: #fee2e2;
  padding: 2px 6px;
  border-radius: 4px;
}

.qs-item-empty {
  padding: 12px;
  text-align: center;
  font-size: 11.5px;
  color: #64748b;
}

.qs-item-action {
  background: #f8fafc;
  color: #0284c7;
  font-weight: 700;
  font-size: 11.5px;
  padding: 7px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px dashed #cbd5e1;
}

.qs-item-action:hover {
  background: #e0f2fe;
  color: #0369a1;
}

/* Cash Payment Input Box */
.cash-input-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 6px 10px;
  margin-bottom: 7px;
}

.cash-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.cash-label-with-icon {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.3px;
}

.cash-icon-tag {
  font-size: 13px;
}

.cash-box-tools {
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-fast-cash {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 700;
  color: #0284c7;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-fast-cash:hover {
  background: #e0f2fe;
  border-color: #38bdf8;
}

.cash-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cash-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 8px;
  height: 32px;
  transition: all 0.15s ease;
}

.cash-input-wrap:focus-within {
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.15);
}

.cash-prefix {
  font-size: 11.5px;
  font-weight: 800;
  color: #94a3b8;
  margin-right: 4px;
  font-family: var(--font-mono);
}

.cash-input-wrap input {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 13.5px;
  font-family: var(--font-mono);
  font-weight: 800;
  color: #0f172a;
  outline: none;
}

.kembalian-badge {
  font-size: 11.5px;
  font-weight: 800;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 5px 8px;
  border-radius: 6px;
  white-space: nowrap;
  font-family: var(--font-mono);
}

.kembalian-badge.text-warning {
  color: #d97706;
  background: #fffbeb;
  border-color: #fde68a;
}

.kembalian-badge.text-danger {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fecaca;
}

/* Primary Checkout Button */
.btn-checkout-primary {
  width: 100%;
  height: 42px;
  background: var(--primary-orange-gradient);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
  transition: all 0.15s ease;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.btn-checkout-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -2px rgba(234, 88, 12, 0.45);
}

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

/* ============================================================
   PAGE CONTAINER & GENERIC VIEWS (DASHBOARD, LAPORAN, DLL)
   ============================================================ */
.page-container {
  padding: 14px 18px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

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

.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Buttons */
.btn-action-primary {
  background: var(--primary-orange-gradient);
  color: white;
  border: none;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.btn-action-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-action-outline {
  background: white;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-action-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-action-light {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-action-sm {
  background: var(--primary-orange);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-action-download {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-action-download:hover {
  background: linear-gradient(135deg, #0369a1, #075985);
  transform: translateY(-1px);
}

.btn-action-view {
  background: #ffffff;
  color: #0369a1;
  border: 1px solid #7dd3fc;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-action-view:hover {
  background: #f0f9ff;
  border-color: #0284c7;
  transform: translateY(-1px);
}

/* KPI Cards */
.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.kpi-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon-wrap.orange { background: #fff7ed; color: #ea580c; }
.kpi-icon-wrap.green  { background: #ecfdf5; color: #059669; }
.kpi-icon-wrap.blue   { background: #f0f9ff; color: #0284c7; }
.kpi-icon-wrap.red    { background: #fef2f2; color: #dc2626; }

.kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-dark);
  margin: 3px 0;
}

.kpi-card.orange-glow .kpi-value,
.kpi-card.green-glow .kpi-value,
#kpiOmzetTotal,
#kpiLabaKotor,
#metricKasLikuid,
#metricAOV,
#summarySubtotal,
#summaryGrandTotal {
  color: #10b981 !important;
  font-weight: 800 !important;
}

.kpi-card.blue-glow .kpi-value,
.kpi-card.red-glow .kpi-value,
#kpiPiutangAktif {
  color: #ef4444 !important;
  font-weight: 800 !important;
}

.kpi-foot {
  font-size: 11.5px;
  color: #64748b;
}

.text-success { color: #10b981 !important; font-weight: 700; }
.text-warning { color: #f59e0b !important; font-weight: 700; }
.text-danger  { color: #ef4444 !important; font-weight: 700; }
.text-primary { color: #ea580c !important; }

/* Indikator Warna Uang Masuk (Hijau) & Uang Keluar (Merah) */
.money-in {
  color: #10b981 !important;
  font-weight: 800 !important;
}
.money-out {
  color: #ef4444 !important;
  font-weight: 800 !important;
}
.money-tag-in {
  background: #ecfdf5;
  color: #10b981;
  border: 1px solid #a7f3d0;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 11px;
}
.money-tag-out {
  background: #fef2f2;
  color: #ef4444;
  border: 1px solid #fecaca;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 11px;
}

/* Secondary Metrics Strip */
.secondary-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.mini-metric-pill {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease;
}

.mini-metric-pill:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
}

.m-icon {
  font-size: 20px;
}

.m-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.m-val {
  font-size: 14.5px;
  color: var(--text-dark);
  font-weight: 800;
}

/* Dashboard Charts Grid */
.dashboard-charts-grid-primary {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-charts-grid-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

.chart-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}

.chart-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dark);
}

.chart-subtitle {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.chart-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-legend-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.chart-legend-tag.orange {
  background: #fff7ed;
  color: #ea580c;
}

.chart-legend-tag.green {
  background: #ecfdf5;
  color: #059669;
}

.chart-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-canvas-wrapper.doughnut-wrap {
  height: 260px;
}

/* Dashboard Two Columns */
.dashboard-grid-two {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 18px;
}

.data-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  margin-bottom: 20px;
}

.data-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.data-card-header h3 {
  font-size: 15px;
  font-weight: 700;
}

.data-card-header a {
  font-size: 12px;
  color: var(--primary-orange);
  text-decoration: none;
  font-weight: 600;
}

/* Modern Tables */
.table-responsive {
  overflow-x: auto;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.modern-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.modern-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.modern-table tr:hover td {
  background: #fafafa;
}

.table-filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.input-filter {
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 12.5px;
  outline: none;
  flex: 1;
  max-width: 320px;
}

.highlight-summary-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #c2410c;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.highlight-summary-pill.green {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #047857;
}

.highlight-summary-pill.blue {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.highlight-summary-pill.orange {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}

.highlight-summary-pill.red {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.highlight-summary-pill.red strong {
  color: #dc2626;
}

/* Tab Switcher Piutang */
.tab-piutang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 13px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  border-bottom: none;
  background: #f8fafc;
  color: #64748b;
  transition: all 0.2s ease;
}

.tab-piutang-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.tab-piutang-btn.active {
  background: #ffffff;
  color: #0f172a;
  border-top: 3px solid #2563eb;
  border-left: 1px solid #cbd5e1;
  border-right: 1px solid #cbd5e1;
  border-bottom: 2px solid #ffffff;
  margin-bottom: -2px;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.04);
}

.badge-tag-count {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
  background: #cbd5e1;
  color: #334155;
  font-weight: 700;
}

.badge-tag-count.green {
  background: #dcfce7;
  color: #15803d;
}

.tab-piutang-btn.active .badge-tag-count {
  background: #2563eb;
  color: #ffffff;
}

.tab-piutang-btn.active .badge-tag-count.green {
  background: #10b981;
  color: #ffffff;
}

/* Kuitansi Document Styles */
.kuitansi-document {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 24px 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  font-family: inherit;
  color: #1e293b;
}

.kuitansi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.kuitansi-brand h2 {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.kuitansi-brand p {
  font-size: 12px;
  color: #64748b;
}

.kuitansi-title-box {
  text-align: right;
}

.kuitansi-title-box h3 {
  font-size: 15px;
  font-weight: 800;
  color: #1e40af;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.kuitansi-no-text, .kuitansi-date-text {
  font-size: 12px;
  color: #475569;
}

.kuitansi-body-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.kuitansi-row {
  display: grid;
  grid-template-columns: 160px 14px 1fr;
  align-items: baseline;
  font-size: 13px;
  line-height: 1.5;
}

.kuitansi-label {
  font-weight: 600;
  color: #475569;
}

.kuitansi-colon {
  font-weight: 600;
  color: #64748b;
}

.kuitansi-val {
  color: #0f172a;
}

.italic-highlight {
  font-style: italic;
  background: #f8fafc;
  padding: 4px 8px;
  border-left: 3px solid #3b82f6;
  border-radius: 4px;
  color: #1e293b;
  font-weight: 600;
}

.kuitansi-row.highlight-sisa {
  background: #fef2f2;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px dashed #fca5a5;
  margin-top: 4px;
}

.kuitansi-footer-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding: 0 20px;
}

.kuitansi-sig-box {
  text-align: center;
  width: 200px;
}

.kuitansi-sig-box p {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.sig-space {
  height: 60px;
}

.sig-name {
  border-top: 1px solid #cbd5e1;
  padding-top: 4px;
  font-weight: 700;
  color: #0f172a;
}

/* ============================================================
   ACCOUNTING STATEMENTS (LABA RUGI & NERACA KEUANGAN)
   ============================================================ */

/* FULLSCREEN COMPACT NO-SCROLL VIEW: LABA RUGI */
#view-labarugi.app-view {
  height: 100%;
  overflow: hidden !important;
  padding: 8px 12px;
  box-sizing: border-box;
}

.lr-fullscreen-layout {
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.lr-top-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
  gap: 10px;
  flex-wrap: nowrap;
}

.lr-top-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lr-page-title-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lr-title-text {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.lr-active-badge-pill {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0284c7;
  font-size: 11px;
  font-weight: 700;
  padding: 2.5px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.lr-data-counter {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.lr-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.lr-inline-panel {
  display: flex;
  align-items: center;
  gap: 5px;
}

.lr-inline-panel select,
.lr-inline-panel input {
  height: 28px;
  padding: 0 6px;
  font-size: 11.5px;
  border-radius: 6px;
}

.lr-btn-action {
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* KPI 4 Strip */
.lr-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  flex-shrink: 0;
}

.lr-kpi-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lr-kpi-pill.kpi-blue { border-left: 3.5px solid #0284c7; }
.lr-kpi-pill.kpi-amber { border-left: 3.5px solid #d97706; }
.lr-kpi-pill.kpi-red { border-left: 3.5px solid #ef4444; }
.lr-kpi-pill.kpi-green { border-left: 3.5px solid #10b981; }

.lr-kpi-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.lr-kpi-val {
  font-size: 15.5px;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
}

.kpi-blue .lr-kpi-val { color: #0284c7; }
.kpi-amber .lr-kpi-val { color: #d97706; }
.kpi-red .lr-kpi-val { color: #ef4444; }
.kpi-green .lr-kpi-val { color: #10b981; }

/* 3-Column Statement Grid */
.lr-3col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.lr-statement-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 10px 14px;
  box-shadow: 0 1.5px 5px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.lr-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1.5px solid #f1f5f9;
}

.lr-card-num {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--primary-orange);
  color: white;
  font-size: 10.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lr-card-title {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.3px;
}

.lr-rows-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Card Total Boxes at bottom of cards */
.lr-card-total-box {
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.lr-box-left {
  display: flex;
  flex-direction: column;
}

.lr-box-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.lr-box-sub {
  font-size: 9px;
  color: #64748b;
  margin-top: 1px;
}

.lr-box-val {
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  white-space: nowrap;
}

.box-blue {
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
}

.box-emerald {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
}

.box-navy {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.box-navy .text-white { color: #ffffff; }
.box-navy .text-slate { color: #94a3b8; }

.acct-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 4.5px 0;
  font-size: 12.5px;
  color: #334155;
  position: relative;
}

.acct-row::after {
  content: '';
  flex: 1;
  border-bottom: 1px dotted #cbd5e1;
  margin: 0 10px 3px 10px;
  order: 2;
}

.acct-row .acct-label {
  order: 1;
  white-space: nowrap;
}

.acct-row .acct-val {
  order: 3;
  white-space: nowrap;
  font-family: var(--font-mono, monospace);
  font-weight: 600;
  font-size: 12.5px;
}

.grand-val.money-in {
  color: #34d399 !important;
}

.grand-val.money-out {
  color: #f87171 !important;
}

.navy-bg {
  background: #0b1324 !important;
}

/* Neraca Columns */
.neraca-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.neraca-col-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid #cbd5e1;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.neraca-col-header {
  border-bottom: 2px solid #0f172a;
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.neraca-col-header h3 {
  font-size: 15px;
  font-weight: 800;
}

.balance-status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.balance-status-banner.balanced {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.filter-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 18px;
}

.filter-flex-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
}

/* Laba Rugi Segmented Nav Filter */
.lr-segmented-nav {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  gap: 4px;
  border: 1px solid #e2e8f0;
}

.lr-seg-btn {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  outline: none;
}

.lr-seg-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.7);
}

.lr-seg-btn.active {
  background: #ffffff;
  color: #ea580c;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalFadeIn 0.2s ease;
}

.struk-modal-box {
  max-width: 440px;
}

.a4-modal-box {
  max-width: 820px;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
}

.btn-close-modal:hover {
  color: #0f172a;
}

.modal-body {
  padding: 18px;
  overflow-y: auto;
}

.modal-body-scrollable {
  padding: 16px 20px;
  overflow-y: auto;
  max-height: calc(85vh - 120px);
  background: #f8fafc;
}

.modal-footer-actions {
  padding: 12px 18px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: white;
}

/* Thermal Struk Receipt */
.thermal-receipt {
  background: white;
  padding: 20px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #111827;
  max-width: 360px;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.receipt-logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
}

.receipt-sub {
  font-size: 10px;
  font-weight: 700;
}

.receipt-address {
  font-size: 9px;
  color: #4b5563;
  margin-top: 2px;
}

.receipt-divider {
  text-align: center;
  color: #6b7280;
  margin: 6px 0;
  overflow: hidden;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  margin: 2px 0;
  font-size: 11px;
}

.rec-item-row {
  margin: 6px 0;
}

.rec-item-name {
  font-weight: 700;
}

.rec-item-sub {
  display: flex;
  justify-content: space-between;
  color: #374151;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin: 3px 0;
}

.summary-line.total-bold {
  font-weight: 800;
  font-size: 13px;
  border-top: 1px dashed #9ca3af;
  padding-top: 4px;
}

.receipt-footer {
  text-align: center;
  font-size: 9px;
  color: #6b7280;
  margin-top: 6px;
  line-height: 1.3;
}

/* Surat Jalan Document */
.surat-jalan-document {
  background: white;
  padding: 25px 30px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #0f172a;
}

.sj-header-grid {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.sj-corp h2 {
  font-size: 20px;
  font-weight: 800;
}

.sj-corp p {
  font-size: 11px;
  color: #475569;
}

.sj-title-box {
  text-align: right;
}

.sj-title-box h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
}

.sj-no {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-orange);
}

.sj-date {
  font-size: 11.5px;
  color: #64748b;
}

.sj-client-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 12px;
}

.client-name {
  font-size: 14px;
  font-weight: 700;
  margin: 3px 0;
}

.sj-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 24px;
}

.sj-items-table th, .sj-items-table td {
  border: 1px solid #94a3b8;
  padding: 6px 10px;
}

.sj-items-table th {
  background: #f1f5f9;
  font-weight: 700;
}

.sj-signature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  text-align: center;
  font-size: 11px;
  margin-top: 30px;
}

.sig-line {
  height: 50px;
}

/* Form Styles */
.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}

.form-group input, .form-group select {
  width: 100%;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 13px;
  font-family: var(--font-main);
  outline: none;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--primary-orange);
}

.form-group-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.input-readonly {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.modal-btn-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.backup-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 14px;
  border-radius: var(--radius-sm);
}

.backup-box h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.backup-box p {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
}

.danger-box {
  background: #fef2f2;
  border-color: #fecaca;
}

.danger-box h4 {
  color: #dc2626;
}

.btn-danger-outline {
  background: white;
  border: 1px solid #ef4444;
  color: #dc2626;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Toast Notifications (Positioned at the Top) */
.toast-container {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #0f172a;
  color: white;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideToastTop 0.25s ease;
  border-left: 4px solid var(--primary-orange);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.success { border-left-color: #10b981; }
.toast.error   { border-left-color: #ef4444; }
.toast.warning { border-left-color: #f59e0b; }
.toast.info    { border-left-color: #0284c7; }

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

/* Print Rules */
@media print {
  body * {
    visibility: hidden;
  }
  #printableReceipt, #printableReceipt * {
    visibility: visible;
  }
  #printableReceipt {
    position: absolute;
    left: 0;
    top: 0;
    width: 80mm;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
  }
  #printableSuratJalan, #printableSuratJalan * {
    visibility: visible;
  }
  #printableSuratJalan {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
    border: none;
  }
  #printableKuitansi, #printableKuitansi * {
    visibility: visible;
  }
  #printableKuitansi {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
    border: none;
    box-shadow: none;
  }
  #printableLabaRugi, #printableLabaRugi * {
    visibility: visible;
  }
  #printableLabaRugi {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 15px 25px;
    border: none;
    box-shadow: none;
    background: #ffffff !important;
    color: #0f172a !important;
  }
  #printableNeraca, #printableNeraca * {
    visibility: visible;
  }
  #printableNeraca {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 15px 25px;
    border: none;
    box-shadow: none;
    background: #ffffff !important;
    color: #0f172a !important;
  }
  #printableSuratPenagihan, #printableSuratPenagihan * {
    visibility: visible;
  }
  #printableSuratPenagihan {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 15px 25px;
    border: none;
    box-shadow: none;
    background: #ffffff !important;
    color: #0f172a !important;
  }
}

/* SURAT PENAGIHAN BON / PIUTANG DOCUMENT STYLES */
.surat-penagihan-document {
  color: #0f172a;
  line-height: 1.5;
  background: #ffffff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.sp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 3px double #0f172a;
  margin-bottom: 16px;
}
.sp-brand h2 {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 2px 0;
  letter-spacing: 0.5px;
}
.sp-brand .sp-tagline {
  font-size: 11px;
  font-weight: 700;
  color: #0284c7;
  letter-spacing: 1px;
  margin: 0 0 4px 0;
  text-transform: uppercase;
}
.sp-brand p {
  font-size: 11.5px;
  color: #475569;
  margin: 0;
  line-height: 1.4;
}
.sp-doc-info {
  text-align: right;
  font-size: 12px;
}
.sp-doc-info .sp-doc-title {
  font-size: 15px;
  font-weight: 800;
  color: #c2410c;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sp-client-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 12px;
}
.sp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 16px;
}
.sp-table th {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  text-align: left;
}
.sp-table td {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}
.sp-table tr:nth-child(even) td {
  background: #fafafa;
}
.sp-total-box {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.sp-bank-info {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 11.5px;
  color: #14532d;
  margin-bottom: 20px;
  line-height: 1.6;
}
.sp-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 10px;
  font-size: 12px;
}
.sp-sig-col {
  width: 44%;
  text-align: center;
}
.sp-sig-col .sp-sig-space {
  height: 65px;
}
.sp-sig-col .sp-sig-line {
  border-top: 1px dashed #64748b;
  margin-top: 5px;
  padding-top: 4px;
  font-weight: 700;
}

/* ============================================================
   MANAJEMEN STOK & FILTER TOOLBAR
   ============================================================ */
.stok-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.stok-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.stok-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: #94a3b8;
  pointer-events: none;
}

.stok-search-input {
  padding-left: 30px !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
}

.select-filter {
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 12.5px;
  background: #ffffff;
  color: #334155;
  outline: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.select-filter:focus {
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.15);
}

.stok-summary-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.stok-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.stok-chip-label {
  color: #64748b;
  font-weight: 500;
}

.stok-chip-val {
  font-weight: 700;
  color: #1e293b;
}

.stok-chip.chip-warning {
  background: #fff7ed;
  border-color: #fdba74;
}

.stok-chip.chip-warning .stok-chip-val {
  color: #ea580c;
}

/* ============================================================
   PENGATURAN TOKO (SETTINGS VIEW)
   ============================================================ */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 10px;
}

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

.settings-card {
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.settings-card.full-width-card {
  grid-column: 1 / -1;
}

.card-header-styled {
  padding: 16px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.card-header-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  font-size: 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.card-header-title h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 3px 0;
}

.card-header-title p {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}

.card-body-styled {
  padding: 20px;
  flex: 1;
}

.settings-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
}

.custom-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #334155;
  font-weight: 500;
  cursor: pointer;
}

.custom-toggle-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary-orange);
  cursor: pointer;
}

.database-stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.db-stat-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  transition: all 0.2s ease;
}

.db-stat-item:hover {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

.db-stat-num {
  font-size: 20px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 2px;
}

.db-stat-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.database-actions-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.btn-action-danger {
  background: #fef2f2;
  border: 1px solid #f87171;
  color: #dc2626;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-danger:hover {
  background: #dc2626;
  color: #ffffff;
}

/* Sembunyikan tombol header sesuai permintaan */
#btnRefreshCache,
#btnInstallApp {
  display: none !important;
}

/* ============================================================
   DASHBOARD DATE FILTER & QUICK BUTTONS
   ============================================================ */
.dashboard-date-filter-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s ease;
}

.dashboard-date-filter-box:hover {
  border-color: #ea580c;
}

.dashboard-date-filter-box input[type="date"] {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.dashboard-date-filter-box input[type="date"]:focus,
.dashboard-date-filter-box input[type="date"]:active {
  border-color: #ea580c !important;
  outline: none !important;
  background-color: #fff7ed !important;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2) !important;
}

.dash-quick-btn,
.lr-quick-btn {
  background: #ffffff !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  font-weight: 600 !important;
}

.dash-quick-btn:hover,
.lr-quick-btn:hover {
  background: #fff7ed !important;
  color: #ea580c !important;
  border-color: #fdba74 !important;
}

.dash-quick-btn.active,
.lr-quick-btn.active {
  background: linear-gradient(135deg, #f97316, #ea580c) !important;
  color: #ffffff !important;
  border-color: #ea580c !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 4px rgba(234, 88, 12, 0.35) !important;
}

#badgeHutangSupplier {
  display: none !important;
}

/* ============================================================
   DISABLE BROWSER TRANSLATE BANNERS, BUBBLES & POPUPS
   ============================================================ */
.notranslate, [translate="no"] {
  -webkit-transform: none;
}
.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-te-banner,
.skiptranslate,
#goog-gt-tt * {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
body {
  top: 0px !important;
}

/* ============================================================
   RESPONSIVE DESIGN SYSTEM (DESKTOP, LAPTOP, TABLET & SMARTPHONE)
   ============================================================ */

/* Mobile Hamburger Toggle Button */
.btn-sidebar-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f8fafc;
  padding: 6px 9px;
  border-radius: 6px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.btn-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Mobile Sidebar Backdrop Overlay */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  top: var(--header-height);
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(3px);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile POS Tab Navigation */
.pos-mobile-nav {
  display: none;
  gap: 8px;
  width: 100%;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.pos-mobile-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}
.pos-mobile-tab-btn.active {
  background: #ea580c;
  color: #ffffff;
  border-color: #c2410c;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25);
}

/* Wide Desktop Screens (> 1400px) */
@media (min-width: 1401px) {
  .product-cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Laptops & Standard Desktops (1025px - 1400px) */
@media (max-width: 1400px) {
  .product-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .pos-cart-panel {
    width: 430px;
  }
}

/* Tablet Landscape & Below (<= 1024px) */
@media (max-width: 1024px) {
  .btn-sidebar-toggle {
    display: inline-flex;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    bottom: 0;
    width: 270px;
    max-width: 85vw;
    height: calc(100vh - var(--header-height)) !important;
    height: calc(100dvh - var(--header-height)) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    z-index: 1200;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar-scrollable {
    flex: 1 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .sidebar-user-footer {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #0b1324 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding: 10px 14px !important;
    z-index: 10 !important;
  }
  .main-layout {
    width: 100%;
  }
  .viewport {
    width: 100%;
    max-width: 100%;
  }
  .pos-cart-panel {
    width: 380px;
  }
  .stats-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-charts-grid-primary,
  .dashboard-charts-grid-secondary,
  .dashboard-grid-two {
    grid-template-columns: 1fr;
  }
  .secondary-metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile & Tablet Portrait (<= 850px) */
@media (max-width: 850px) {
  .pos-layout {
    flex-direction: column;
    padding: 10px;
    gap: 10px;
    overflow-y: auto;
    height: auto;
    min-height: 100%;
  }
  .pos-mobile-nav {
    display: flex;
  }
  .pos-catalog-panel {
    width: 100%;
    min-height: 380px;
  }
  .pos-cart-panel {
    width: 100%;
    max-width: 100%;
  }
  /* POS Tab Switching */
  .pos-layout.view-mode-catalog .pos-cart-panel {
    display: none !important;
  }
  .pos-layout.view-mode-cart .pos-catalog-panel {
    display: none !important;
  }
  .product-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* Smartphone & Narrow Screens (<= 768px) */
@media (max-width: 768px) {
  :root {
    --header-height: 54px;
  }
  .top-header {
    height: 54px;
    padding: 0 10px;
    gap: 6px;
  }
  .brand-sub {
    display: none;
  }
  .brand-title {
    font-size: 15px;
  }
  .header-actions-area {
    gap: 6px;
  }
  .header-kas-pill {
    padding: 4px 8px !important;
    font-size: 11px !important;
    gap: 4px !important;
  }
  .header-kas-pill span:nth-child(2) {
    display: none; /* Hide label text on mobile so only icon + value shows */
  }
  #btnSupabaseCloudStatus span:nth-child(2) {
    display: none; /* Hide 'Supabase:' text on mobile to prevent header overflow */
  }
  #btnSupabaseCloudStatus {
    padding: 4px 8px !important;
    font-size: 11px !important;
    gap: 4px !important;
  }
  .live-clock-badge {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }
  .header-user-btn {
    padding: 2px 6px !important;
    gap: 4px !important;
  }
  .header-user-text {
    display: none !important;
  }
  .header-user-avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 11px !important;
  }

  /* Page View Content */
  .page-container {
    padding: 10px 12px;
  }
  .page-title {
    font-size: 18px;
  }
  .page-subtitle {
    font-size: 11.5px;
  }
  .page-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 12px;
  }
  .page-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }
  .page-actions button {
    width: 100%;
  }

  /* Filter bars */
  .table-filter-bar, .stok-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
  }
  .stok-search-wrap {
    max-width: 100%;
    width: 100%;
  }
  .select-filter {
    width: 100%;
    height: 38px;
  }
  .stok-summary-chips {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
  .btn-action-primary, .btn-action-outline {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 9px 12px;
  }

  /* Table horizontal scroll wrapper across all menus */
  .data-card {
    padding: 10px;
    border-radius: 8px;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modern-table {
    min-width: 600px;
  }

  /* Dialog & Modals */
  .modal-backdrop {
    padding: 8px;
  }
  .modal-content {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 94vh;
    border-radius: 8px;
  }
  .form-row-two, .form-grid-2, .checkout-form-grid {
    grid-template-columns: 1fr !important;
  }
  .struk-modal-box, .a4-modal-box {
    max-width: 100% !important;
  }

  /* ============================================================
     LAYOUT MOBILE / HP: PRODUCT LIST VIEW DI POS
     Mencegah teks bertumpuk, tata letak rapi & tombol mudah disentuh
     ============================================================ */
  .product-list-view {
    padding: 10px 10px 18px 10px;
    gap: 10px;
  }

  .prod-list-row {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 12px 14px !important;
    gap: 10px !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  }

  .prod-list-left {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .prod-icon-box.sm {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }

  .prod-list-details {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .prod-list-name {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-height: 1.35 !important;
    margin-bottom: 6px !important;
  }

  .prod-tags-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 5px !important;
    margin-bottom: 0 !important;
  }

  .tag-sku {
    white-space: nowrap !important;
    font-size: 10.5px !important;
    padding: 2px 7px !important;
  }

  .tag-cat {
    white-space: nowrap !important;
    font-size: 11px !important;
  }

  .stock-tag-pill {
    white-space: nowrap !important;
    font-size: 11px !important;
    padding: 2.5px 8px !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  .prod-list-right {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding-top: 10px !important;
    border-top: 1px dashed #e2e8f0 !important;
    gap: 10px !important;
  }

  .prod-list-price-box {
    text-align: left !important;
  }

  .price-type-label {
    font-size: 9.5px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    margin-bottom: 1px !important;
  }

  .prod-price-text {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: var(--primary-orange) !important;
    line-height: 1.2 !important;
  }

  .unit-sub {
    font-size: 11.5px !important;
    color: #64748b !important;
    font-weight: 600 !important;
  }

  .btn-add-list-item {
    padding: 8px 18px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }
}

/* Extra Small Phones (<= 480px) */
@media (max-width: 480px) {
  .live-clock-badge {
    display: none !important;
  }
  .product-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 10px 8px;
  }
  .prod-card {
    padding: 10px;
  }
  .prod-name {
    font-size: 12.5px;
    min-height: 32px;
  }
  .prod-price-text {
    font-size: 14px;
  }
  .product-list-view {
    padding: 8px 8px 16px 8px;
    gap: 8px;
  }
  .prod-list-row {
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  .prod-list-name {
    font-size: 13.5px !important;
  }
  .prod-price-text {
    font-size: 15px !important;
  }
  .btn-add-list-item {
    padding: 7px 15px !important;
    font-size: 12.5px !important;
  }
  .stats-cards-grid {
    grid-template-columns: 1fr;
  }
  .secondary-metrics-row {
    grid-template-columns: 1fr;
  }
  .mini-metric-pill {
    width: 100%;
  }
  .kpi-card {
    padding: 12px;
  }
  .catalog-top-bar {
    padding: 10px;
  }
  .catalog-controls-group {
    width: 100%;
    justify-content: space-between;
  }
  .catalog-search-box {
    flex: 1;
    width: auto;
  }
}

/* ============================================================
   RESPONSIVE UNTUK LAYAR DESKTOP MENENGAH & 20 INCH
   (Resolusi 1600x900, 1440x900, 1366x768, 1280x720)
   ============================================================ */
@media (min-width: 851px) and (max-width: 1400px) {
  :root {
    --sidebar-width: 230px;
  }
  .pos-cart-panel {
    width: 390px;
  }
  .product-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    padding: 12px;
  }
}

/* Penyesuaian Viewport Tinggi Terbatas (Layar 20" dengan rasio 16:9 / resolusi 900p) */
@media (max-height: 900px) {
  :root {
    --header-height: 54px;
  }
  .top-header {
    padding: 0 16px;
  }
  .pos-layout {
    padding: 8px 10px;
    gap: 10px;
  }
  .catalog-top-bar {
    padding: 8px 14px 6px 14px;
  }
  .catalog-title {
    font-size: 17px;
  }
  .category-pills-row {
    padding: 6px 14px;
    gap: 5px;
  }
  .pill-btn {
    padding: 4px 10px;
    font-size: 11.5px;
  }
  .cart-header {
    padding: 8px 14px 6px 14px;
  }
  .cart-items-container {
    padding: 4px 8px;
  }
  .cart-footer-section {
    padding: 8px 12px 10px 12px;
  }
  .cart-calc-rows {
    gap: 2px;
    margin-bottom: 4px;
  }
  .calc-row {
    font-size: 11.5px;
  }
  .input-calc-row input {
    height: 24px;
    font-size: 11.5px;
    width: 90px;
  }
  .total-row {
    padding-top: 4px;
    margin-top: 2px;
    margin-bottom: 4px;
  }
  .total-label {
    font-size: 12px;
  }
  .total-val {
    font-size: 18px;
  }
  .checkout-form-grid {
    gap: 4px;
    margin-bottom: 4px;
  }
  .form-group-item label {
    font-size: 10px;
    margin-bottom: 2px;
  }
  .form-select-sm, .qs-input, #inputPelangganManual {
    height: 30px !important;
    font-size: 11.5px !important;
  }
  .cash-input-box {
    padding: 5px 8px;
    margin-bottom: 5px;
  }
  .cash-input-wrap {
    height: 28px;
  }
  .cash-input-wrap input {
    height: 100%;
    font-size: 12px;
  }
  .cart-grand-total-card {
    padding: 5px 10px;
    margin: 4px 0;
  }
  .gt-caption {
    font-size: 9.5px;
  }
  .gt-value {
    font-size: 17px;
  }
  .btn-checkout-primary {
    height: 38px;
    font-size: 12.5px;
  }
}

/* Penyesuaian Viewport Layar Komputer Sangat Terbatas (Resolusi 768p / 720p) */
@media (max-height: 768px) {
  :root {
    --header-height: 48px;
  }
  .top-header {
    padding: 0 12px;
  }
  .brand-title {
    font-size: 14px;
  }
  .brand-sub {
    font-size: 8.5px;
  }
  .pos-layout {
    padding: 6px 8px;
    gap: 8px;
  }
  .catalog-top-bar {
    padding: 6px 10px;
  }
  .cart-header {
    padding: 6px 10px 4px 10px;
  }
  .cart-title {
    font-size: 14px;
  }
  .cart-items-container {
    padding: 3px 6px;
  }
  .cart-footer-section {
    padding: 5px 8px 6px 8px;
  }
  .cart-calc-box {
    padding: 4px 6px;
    gap: 2px;
  }
  .calc-row {
    font-size: 11px;
  }
  .cart-grand-total-card {
    padding: 4px 8px;
    margin: 3px 0;
  }
  .gt-caption {
    font-size: 9px;
  }
  .gt-sub {
    display: none;
  }
  .gt-value {
    font-size: 15px;
  }
  .form-select-sm, .qs-input, #inputPelangganManual {
    height: 26px !important;
    font-size: 10.5px !important;
  }
  .cash-input-box {
    padding: 4px 6px;
    margin-bottom: 4px;
  }
  .cash-box-tools {
    margin-bottom: 2px;
  }
  .btn-fast-cash {
    padding: 1px 5px;
    font-size: 10px;
  }
  .kembalian-badge {
    font-size: 10.5px;
    padding: 3px 6px;
  }
  .cash-input-wrap {
    height: 26px;
  }
  .cash-input-wrap input {
    height: 100%;
    font-size: 11.5px;
  }
  .btn-checkout-primary {
    height: 34px;
    font-size: 11.5px;
    border-radius: 6px;
  }
}

/* ============================================================
   AUTHENTICATION & LOGIN OVERLAY
   ============================================================ */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 20%, #1e293b 0%, #0b1324 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(12px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

html.is-logged-in #loginOverlay,
.login-overlay.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  animation: loginCardPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginCardPop {
  0% { transform: scale(0.92) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.login-header {
  background: linear-gradient(135deg, #0b1324 0%, #1e293b 100%);
  padding: 28px 24px 22px;
  text-align: center;
  color: #ffffff;
  position: relative;
  border-bottom: 3px solid var(--primary-orange);
}

.login-logo-circle {
  width: 54px;
  height: 54px;
  background: var(--primary-orange-gradient);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  box-shadow: 0 8px 16px rgba(234, 88, 12, 0.4);
}

.login-logo-circle svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
}

.login-brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.login-brand-tagline {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}

.login-body {
  padding: 24px 26px 26px;
}

.login-welcome-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  margin-bottom: 4px;
}

.login-welcome-sub {
  font-size: 12px;
  color: #64748b;
  text-align: center;
  margin-bottom: 18px;
}

/* Quick User Switcher Chips */
.quick-users-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: block;
}

.quick-users-row {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.quick-user-chip {
  flex: 1;
  min-width: 105px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.quick-user-chip:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.quick-user-chip.selected {
  background: #fff7ed;
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 1.5px var(--primary-orange);
}

.quick-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quick-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
}

.quick-user-name {
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-user-role {
  font-size: 9.5px;
  color: #64748b;
  font-weight: 600;
}

.login-input-group {
  margin-bottom: 14px;
  position: relative;
}

.login-input-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 5px;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.login-input-wrap input {
  width: 100%;
  height: 42px;
  padding: 8px 12px 8px 38px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  font-size: 13.5px;
  font-family: inherit;
  color: #0f172a;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.login-input-wrap input:focus {
  outline: none;
  border-color: var(--primary-orange);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.btn-toggle-pwd {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-toggle-pwd:hover {
  color: #0f172a;
}

.login-error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  display: none;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.btn-login-submit {
  width: 100%;
  height: 44px;
  background: var(--primary-orange-gradient);
  border: none;
  border-radius: 9px;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  margin-top: 6px;
}

.btn-login-submit:hover {
  background: var(--primary-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.45);
}

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

.login-footer-hint {
  display: none !important;
  margin-top: 16px;
  border-top: 1px dashed #e2e8f0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.5;
  text-align: center;
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px;
}

/* ============================================================
   USER MANAGEMENT VIEW & ROLE BADGES
   ============================================================ */
.badge-role {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-role-owner {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.badge-role-admin {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.badge-role-kasir {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.badge-role-gudang {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.user-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.user-status-active {
  background: #ecfdf5;
  color: #10b981;
}

.user-status-active::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.user-status-inactive {
  background: #f1f5f9;
  color: #94a3b8;
}

.user-status-inactive::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-cell-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.user-cell-meta {
  display: flex;
  flex-direction: column;
}

.user-cell-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 13px;
}

.user-cell-username {
  font-size: 11px;
  color: #64748b;
  font-family: var(--font-mono, monospace);
}

/* Header User Pill */
.header-user-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.header-user-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.header-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-orange);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-user-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.1;
}

.header-user-name {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-user-role {
  font-size: 9px;
  font-weight: 600;
  color: #fdba74;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-item.nav-item-locked {
  opacity: 0.45;
  cursor: not-allowed;
  position: relative;
}

.nav-item.nav-item-locked::after {
  content: '🔒';
  position: absolute;
  right: 12px;
  font-size: 11px;
}

/* User Management Table & Badge Polishing */
.modern-table tbody tr:hover td {
  background-color: #f8fafc;
}

.badge-role {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3.5px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-role-owner {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-role-admin {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-role-kasir {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-role-gudang {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.user-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3.5px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s ease;
  user-select: none;
}

.user-status-pill:hover {
  transform: scale(1.04);
}

.user-status-active {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.user-status-active::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
}

.user-status-inactive {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.user-status-inactive::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  display: inline-block;
}


