/* ============================================================
   assets/css/main.css — v6.6 FLAT PRODUCTION FINAL
   ------------------------------------------------------------
   Changelog v6.6 (2026-10-12):
   • FIX — Section 40: hapus `overflow: hidden` pada
     `.product-img-wrap` (bentrok dengan Section 16). Radius
     visual sudah di-handle oleh `.product-img` sendiri, jadi
     badge legacy di dalam wrapper tidak akan ter-clip.
   • FIX — Section 40: hapus `min-height: 230px` dead-code
     pada `.product-item`. Sec 41 sudah set `min-height: auto`
     untuk `#productGrid`; grid lain tetap 210px dari Sec 16.
   • FIX — Section 09: tambah fallback class `.modal-overlay-large`
     untuk browser tanpa `:has()` (Safari <15.4, FF <121).
   • CLEANUP — Section 41: `flex: unset` → `flex: 0 0 auto`
     untuk maksud yang lebih eksplisit.
   • CLEANUP — Section 33: hapus header kosong (konten sudah
     di-merge ke Section 27).
   • KEPT — semua section 01–42 identik secara fungsional
     dengan v6.5 kecuali 4 perbaikan di atas.

   Changelog v6.5 (2026-10-01):
   • ADD — Section 16: `.badge-discount-info` — info produk
     (isi kemasan / satuan kemasan) di badge diskon.
     Format: "📦 500 Ml / Botol"
     Digunakan oleh: products.js::_renderGridItem().
   • KEPT — semua section 01–38 identik dengan v6.4.

   Changelog v6.4 (2026-09-30):
   • CLEANUP — Hapus duplikasi `.running-text-container` (Sec 28).
   • CLEANUP — Hapus duplikasi `.product-discount-badge` (v1.5).
   • REINFORCE — Section 37: `.reward-item-locked` (Layer 2).
   • ADD — Section 38: `.product-reward-badge`, `.cart-item-reward-*`,
     `.reward-savings-line`.
   ------------------------------------------------------------
   Changelog v6.3: receipt bonus visual.
   Changelog v6.2: watermark single mechanism.
   Changelog v6.1: .worker-photo-preview 56×56.
   Changelog v6.0: FLATTEN partials.

   URUTAN SECTION (JANGAN DIUBAH):
     01. variables.css        22. settings.css
     02. base.css             23. labels.css
     03. utilities.css        24. receipt.css
     04. cards.css            25. slip-gaji.css
     05. buttons.css          26. watermark.css
     06. forms.css            27. loan-info-modal.css
     07. tables.css           28. headers.css
     09. modals.css           29. reports.css
     10. toast.css            30. login.css
     11. scrollbar.css        31. dashboard.css
     12. animations.css       32. scan-popup.css
     13. theme-toggle.css     33. (merged → lihat 27)
     14. running-text.css     34. dark.css
     15. member-list.css      35. responsive.css
     16. product-grid.css     36. print.css
     17. scanner.css          37. reward-locked.css
     18. qr-download.css      38. reward-visual.css
     19. jaminan.css          39. unlimited-stock.css
     20. order-queue.css      40. product-promo-badges.css
     21. payroll.css          41. product-card-compact.css
                              42. member-stats-vertical.css
   ============================================================ */

/* ============================================================
   SECTION 01 — variables.css (Design Tokens)
   ============================================================ */
:root {
    --sp-xs: 0.25rem; --sp-sm: 0.5rem; --sp-md: 1rem;
    --sp-lg: 1.5rem;  --sp-xl: 2rem;   --sp-2xl: 3rem;
    --fs-xs: 0.75rem; --fs-sm: 0.875rem; --fs-base: 1rem;
    --fs-lg: 1.125rem; --fs-xl: 1.25rem; --fs-2xl: 1.5rem;
    --fs-3xl: 2rem;   --fs-4xl: 2.5rem;
    --r-sm: 0.5rem; --r-md: 0.75rem; --r-lg: 1.25rem;
    --r-xl: 1.5rem; --r-2xl: 2rem;   --r-full: 9999px;
    --c-primary: #4f46e5; --c-primary-h: #4338ca; --c-primary-l: #818cf8; --c-primary-bg: #eef2ff;
    --c-success: #22c55e; --c-success-h: #16a34a; --c-success-bg: #d1fae5; --c-success-text: #065f46;
    --c-danger: #ef4444;  --c-danger-h: #dc2626;  --c-danger-bg: #fee2e2;  --c-danger-text: #991b1b;
    --c-warning: #f59e0b; --c-warning-h: #d97706; --c-warning-bg: #fef3c7; --c-warning-text: #92400e;
    --c-info: #0ea5e9;    --c-info-h: #0284c7;    --c-info-bg: #e0f2fe;    --c-info-text: #075985;
    --c-gray-50: #f8fafc; --c-gray-100: #f1f5f9; --c-gray-200: #e2e8f0; --c-gray-300: #cbd5e1;
    --c-gray-400: #94a3b8; --c-gray-500: #64748b; --c-gray-600: #475569; --c-gray-700: #334155;
    --c-gray-800: #1e293b; --c-gray-900: #0f172a;
    --c-white: #ffffff; --c-black: #1e293b;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 35px -12px rgba(0,0,0,0.15);
    --shadow-2xl: 0 30px 60px rgba(0,0,0,0.2);
    --t-fast: 0.15s ease; --t-normal: 0.25s ease; --t-slow: 0.35s cubic-bezier(0.16,1,0.3,1);
    --z-content: 1; --z-header: 50; --z-search-wrapper: 60; --z-search-dropdown: 9000;
    --z-theme-toggle: 100; --z-sticky: 500; --z-modal-small: 1000; --z-modal-large: 2000;
    --z-zoom: 9999; --z-watermark: 99999; --z-toast: 100000; --z-loading: 999999;
}

/* ============================================================
   SECTION 02 — base.css (Reset + Typography)
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: #f8fafc; }
html.dark, html[data-theme="dark"] { background: #0f172a; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    background-attachment: fixed;
    color: var(--c-black);
    min-height: 100vh;
    line-height: 1.5;
    font-size: var(--fs-base);
    transition: background var(--t-normal), color var(--t-normal);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.dark, body[data-theme="dark"] {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    background-attachment: fixed;
    color: #e2e8f0;
}
img, svg, video, canvas { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.2; color: inherit; }
h1 { font-size: var(--fs-3xl); } h2 { font-size: var(--fs-2xl); } h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); } h5 { font-size: var(--fs-base); } h6 { font-size: var(--fs-sm); }
p { line-height: 1.6; }
small { font-size: var(--fs-sm); }
strong, b { font-weight: 700; }
code, pre, .font-mono { font-family: 'Courier New', Consolas, Monaco, monospace; }

/* ============================================================
   SECTION 03 — utilities.css
   ============================================================ */
.truncate-1, .truncate-2, .truncate-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.truncate-1 { -webkit-line-clamp: 1; line-clamp: 1; }
.truncate-2 { -webkit-line-clamp: 2; line-clamp: 2; }
.truncate-3 { -webkit-line-clamp: 3; line-clamp: 3; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.no-select { user-select: none; -webkit-user-select: none; }
.cursor-pointer { cursor: pointer; } .cursor-default { cursor: default; }
.w-full { width: 100%; } .h-full { height: 100%; }
.hidden { display: none !important; }
.relative { position: relative; } .absolute { position: absolute; } .fixed { position: fixed; }
.text-center { text-align: center; } .text-left { text-align: left; } .text-right { text-align: right; }
.income { color: var(--c-success-h); } .outcome { color: var(--c-danger-h); }
body.dark .income { color: #4ade80; } body.dark .outcome { color: #f87171; }
.hide-mobile { display: initial; }
@media (max-width: 640px) { .hide-mobile { display: none !important; } }
.hide-desktop { display: none; }
@media (max-width: 640px) { .hide-desktop { display: initial; } }
*:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; border-radius: var(--r-sm); }
.mt-xs { margin-top: var(--sp-xs); } .mt-sm { margin-top: var(--sp-sm); }
.mt-md { margin-top: var(--sp-md); } .mt-lg { margin-top: var(--sp-lg); }
.mb-xs { margin-bottom: var(--sp-xs); } .mb-sm { margin-bottom: var(--sp-sm); }
.mb-md { margin-bottom: var(--sp-md); } .mb-lg { margin-bottom: var(--sp-lg); }

/* ============================================================
   SECTION 04 — components/cards.css
   ============================================================ */
.app-card, .glass-card {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: var(--r-xl); padding: var(--sp-lg);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: var(--shadow-xl);
    transition: background var(--t-normal), border-color var(--t-normal), box-shadow var(--t-normal);
    color: var(--c-black);
}
body.dark .app-card, body.dark .glass-card {
    background: rgba(30,41,59,0.85); border-color: rgba(255,255,255,0.08);
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.5); color: #e2e8f0;
}
.stat-card {
    background: rgba(255,255,255,0.85); backdrop-filter: blur(8px);
    border-radius: var(--r-lg); padding: var(--sp-md) var(--sp-lg);
    border: 1px solid var(--c-gray-200); cursor: pointer;
    transition: transform var(--t-normal), box-shadow var(--t-normal);
    opacity: 0; animation: fadeSlideUp 0.4s ease-out forwards;
}
body.dark .stat-card { background: rgba(30,41,59,0.85); border-color: var(--c-gray-700); }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-card .stat-label { font-size: var(--fs-sm); color: var(--c-gray-500); }
body.dark .stat-card .stat-label { color: var(--c-gray-400); }
.stat-card .stat-value { font-size: var(--fs-2xl); font-weight: 700; color: var(--c-black); line-height: 1.15; }
body.dark .stat-card .stat-value { color: #f1f5f9; }

/* ============================================================
   SECTION 05 — components/buttons.css
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: var(--sp-sm); padding: 0.6rem 1.2rem;
    border-radius: var(--r-full); font-weight: 600; font-size: var(--fs-sm);
    line-height: 1.4; min-height: 42px; border: none; cursor: pointer;
    transition: all var(--t-fast); white-space: nowrap; user-select: none;
    text-decoration: none; font-family: inherit; color: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn.disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none !important; pointer-events: none; }
.btn-sm { padding: 0.35rem 0.85rem; font-size: var(--fs-xs); min-height: 34px; }
.btn-lg { padding: 0.8rem 1.8rem; font-size: var(--fs-base); min-height: 50px; }
.btn-icon { padding: 0.5rem; min-height: 38px; min-width: 38px; border-radius: var(--r-full); }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-h); box-shadow: 0 4px 12px rgba(79,70,229,0.35); }
.btn-success { background: var(--c-success); color: #fff; }
.btn-success:hover { background: var(--c-success-h); box-shadow: 0 4px 12px rgba(34,197,94,0.35); }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-danger:hover { background: var(--c-danger-h); box-shadow: 0 4px 12px rgba(239,68,68,0.35); }
.btn-warning { background: var(--c-warning); color: #fff; }
.btn-warning:hover { background: var(--c-warning-h); box-shadow: 0 4px 12px rgba(245,158,11,0.35); }
.btn-info { background: var(--c-info); color: #fff; }
.btn-info:hover { background: var(--c-info-h); box-shadow: 0 4px 12px rgba(14,165,233,0.35); }
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1da851; box-shadow: 0 4px 12px rgba(37,211,102,0.35); }
body.dark .btn-whatsapp { background: #1da851; } body.dark .btn-whatsapp:hover { background: #168a3f; }
.btn-pdf { background: #dc2626; color: #fff; }
.btn-pdf:hover { background: #b91c1c; box-shadow: 0 4px 12px rgba(220,38,38,0.35); }
body.dark .btn-pdf { background: #b91c1c; } body.dark .btn-pdf:hover { background: #991b1b; }
.btn-secondary { background: var(--c-gray-200); color: var(--c-gray-700); }
.btn-secondary:hover { background: var(--c-gray-300); }
body.dark .btn-secondary { background: var(--c-gray-600); color: var(--c-gray-200); }
body.dark .btn-secondary:hover { background: var(--c-gray-500); }
.btn-outline { background: transparent; border: 1.5px solid var(--c-primary); color: var(--c-primary); }
.btn-outline:hover { background: var(--c-primary); color: #fff; }
body.dark .btn-outline { border-color: var(--c-primary-l); color: var(--c-primary-l); }
.btn-ghost { background: transparent; color: var(--c-gray-600); }
.btn-ghost:hover { background: var(--c-gray-100); }
body.dark .btn-ghost { color: var(--c-gray-300); }
body.dark .btn-ghost:hover { background: var(--c-gray-800); }
.btn-add-master, .btn-delete-master {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: var(--r-full);
    border: 1px solid var(--c-gray-200); background: #fff;
    color: var(--c-primary); cursor: pointer; transition: all var(--t-fast);
    flex-shrink: 0; padding: 0; min-height: auto;
}
.btn-add-master:hover:not(:disabled) { background: var(--c-primary-bg); transform: scale(1.08); }
.btn-delete-master:hover:not(:disabled) { background: var(--c-danger-bg); color: var(--c-danger); transform: scale(1.08); }
.btn-add-master:disabled, .btn-delete-master:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
body.dark .btn-add-master, body.dark .btn-delete-master { background: var(--c-gray-800); border-color: var(--c-gray-600); color: var(--c-primary-l); }
body.dark .btn-delete-master:hover:not(:disabled) { background: rgba(127,26,26,0.3); color: #f87171; }
.btn-block { width: 100%; }

/* ============================================================
   SECTION 06 — components/forms.css
   ============================================================ */
input, select, textarea, .input-base, .form-control {
    width: 100%; padding: 0.55rem 0.85rem; border-radius: var(--r-md);
    border: 1px solid var(--c-gray-200); background: var(--c-white);
    font-size: var(--fs-base); color: var(--c-black);
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
    min-height: 42px; font-family: inherit; line-height: 1.4;
}
body.dark input, body.dark select, body.dark textarea, body.dark .input-base {
    background: var(--c-gray-800); border-color: var(--c-gray-600); color: #e2e8f0;
}
input:focus, select:focus, textarea:focus, .input-base:focus {
    outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.18);
}
body.dark input:focus, body.dark select:focus, body.dark textarea:focus {
    border-color: var(--c-primary-l); box-shadow: 0 0 0 3px rgba(129,140,248,0.25);
}
input::placeholder, textarea::placeholder { color: var(--c-gray-400); }
body.dark input::placeholder, body.dark textarea::placeholder { color: var(--c-gray-500); }
input:disabled, select:disabled, textarea:disabled, .input-base:disabled { opacity: 0.65; cursor: not-allowed; background: var(--c-gray-100); }
body.dark input:disabled, body.dark select:disabled, body.dark textarea:disabled { background: var(--c-gray-900); }
textarea { min-height: 80px; resize: vertical; }
label { display: block; font-size: var(--fs-sm); font-weight: 500; margin-bottom: var(--sp-xs); color: var(--c-gray-700); }
body.dark label { color: var(--c-gray-300); }
.form-group { margin-bottom: var(--sp-md); }
.form-hint { font-size: var(--fs-xs); color: var(--c-gray-400); margin-top: var(--sp-xs); line-height: 1.4; }
body.dark .form-hint { color: var(--c-gray-500); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
input[type="checkbox"], input[type="radio"] {
    width: 1.15rem; height: 1.15rem; min-height: auto; padding: 0; margin: 0;
    cursor: pointer; accent-color: var(--c-primary); vertical-align: middle; flex-shrink: 0;
}
.checkbox-group { display: flex; align-items: center; gap: var(--sp-sm); margin-bottom: var(--sp-xs); }
.checkbox-group label { margin-bottom: 0; cursor: pointer; font-weight: 500; }
.password-toggle { position: relative; }
.password-toggle input { padding-right: 2.75rem; }
.password-toggle .toggle-icon {
    position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%);
    cursor: pointer; color: var(--c-gray-400); transition: color var(--t-fast);
    font-size: var(--fs-base); user-select: none;
}
.password-toggle button.toggle-icon { border: 0; background: transparent; padding: 0.25rem; }
.password-toggle .toggle-icon:hover { color: var(--c-primary); }
.password-toggle .toggle-icon:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; border-radius: 4px; }
body.dark .password-toggle .toggle-icon { color: var(--c-gray-500); }
body.dark .password-toggle .toggle-icon:hover { color: var(--c-primary-l); }
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 1rem;
    padding-right: 2.5rem; appearance: none; -webkit-appearance: none; -moz-appearance: none;
}
body.dark select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}
body.dark input[type="file"] { color: var(--c-gray-300); }
body.dark input[type="file"]::file-selector-button {
    background: var(--c-gray-700); color: var(--c-gray-100); border: 1px solid var(--c-gray-600);
    border-radius: var(--r-sm); padding: 0.25rem 0.75rem; margin-right: 0.5rem; cursor: pointer;
}
select.payment-method-select { cursor: pointer; }
select.payment-method-select option[disabled],
select.payment-method-select option[data-unavailable="1"] {
    color: #94a3b8 !important; background: #f1f5f9 !important;
    text-decoration: line-through !important; font-style: italic !important; cursor: not-allowed;
}
body.dark select.payment-method-select option[disabled],
body.dark select.payment-method-select option[data-unavailable="1"] {
    color: #64748b !important; background: #1e293b !important;
    text-decoration: line-through !important; font-style: italic !important;
}

/* ============================================================
   SECTION 07 — components/tables.css
   ============================================================ */
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); color: var(--c-black); }
.data-table thead { background: var(--c-gray-100); }
body.dark .data-table thead { background: var(--c-gray-800); }
.data-table th {
    padding: 0.65rem 0.8rem; text-align: left; font-weight: 600; color: var(--c-black);
    border-bottom: 2px solid var(--c-gray-200); white-space: nowrap;
}
body.dark .data-table th { color: #f1f5f9; border-color: var(--c-gray-700); }
.data-table td { padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--c-gray-200); color: var(--c-black); vertical-align: middle; }
body.dark .data-table td { color: #e2e8f0; border-color: var(--c-gray-700); }
.data-table tbody tr:hover { background: var(--c-gray-50); }
body.dark .data-table tbody tr:hover { background: var(--c-gray-800); }
.data-table .text-right { text-align: right; } .data-table .text-center { text-align: center; }
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-md); }
.table-responsive table { min-width: 720px; }
.mask-toggle-wrap { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; vertical-align: middle; }
.mask-text { transition: background var(--t-fast,0.15s), color var(--t-fast,0.15s), padding var(--t-fast,0.15s); }
.mask-text[data-revealed="1"] {
    background: rgba(79,70,229,0.08); color: var(--c-primary,#4f46e5);
    padding: 1px 5px; border-radius: 3px; font-weight: 600;
}
body.dark .mask-text[data-revealed="1"] { background: rgba(129,140,248,0.18); color: #a5b4fc; }
.mask-eye {
    background: transparent; border: none; color: var(--c-gray-400,#94a3b8); cursor: pointer;
    font-size: 0.78rem; padding: 1px 3px; line-height: 1; display: inline-flex;
    align-items: center; justify-content: center;
    transition: color var(--t-fast,0.15s), transform var(--t-fast,0.15s);
    border-radius: 3px; vertical-align: middle;
}
.mask-eye:hover { color: var(--c-primary,#4f46e5); transform: scale(1.15); }
body.dark .mask-eye { color: var(--c-gray-500,#64748b); }
body.dark .mask-eye:hover { color: var(--c-primary-l,#a5b4fc); }

/* ============================================================
   SECTION 08 — components/badges.css
   ============================================================ */
.badge-status, .badge-payment {
    display: inline-block; padding: 0.2rem 0.65rem; border-radius: var(--r-full);
    font-size: var(--fs-xs); font-weight: 600; text-transform: capitalize;
    line-height: 1.4; white-space: nowrap;
}
.badge-active { background: var(--c-success-bg); color: var(--c-success-text); }
.badge-paid { background: var(--c-gray-200); color: var(--c-gray-600); }
.badge-upcoming { background: #fef3c7; color: #92400e; }
.badge-expired { background: #fee2e2; color: #991b1b; }
.badge-inactive { background: #e2e8f0; color: #475569; }
body.dark .badge-active { background: rgba(6,78,59,0.5); color: #6ee7b7; }
body.dark .badge-paid { background: var(--c-gray-700); color: var(--c-gray-200); }
body.dark .badge-upcoming { background: rgba(120,53,15,0.5); color: #fcd34d; }
body.dark .badge-expired { background: rgba(127,26,26,0.5); color: #fca5a5; }
body.dark .badge-inactive { background: var(--c-gray-700); color: var(--c-gray-300); }
.role-badge {
    display: inline-block; padding: 0.2rem 0.65rem; border-radius: var(--r-full);
    font-size: var(--fs-xs); font-weight: 600; text-transform: capitalize; line-height: 1.4;
}
.role-admin { background: #dbeafe; color: #1e40af; }
.role-kasir { background: var(--c-success-bg); color: var(--c-success-text); }
.role-driver { background: var(--c-warning-bg); color: var(--c-warning-text); }
body.dark .role-admin { background: #1e3a5f; color: #93c5fd; }
body.dark .role-kasir { background: rgba(6,78,59,0.5); color: #6ee7b7; }
body.dark .role-driver { background: #78350f; color: #fcd34d; }
.must-change-badge {
    background: var(--c-danger-bg); color: var(--c-danger-text);
    padding: 0.2rem 0.6rem; border-radius: var(--r-full);
    font-size: var(--fs-xs); font-weight: 600; display: inline-block;
}
body.dark .must-change-badge { background: rgba(127,26,26,0.4); color: #fca5a5; }
.stat-badge {
    display: inline-flex; align-items: center; gap: var(--sp-xs);
    padding: 0.15rem 0.55rem; border-radius: var(--r-full);
    font-size: var(--fs-xs); font-weight: 500;
}
.stat-badge.bg-indigo { background: var(--c-primary-bg); color: var(--c-primary); }
.stat-badge.bg-orange { background: var(--c-warning-bg); color: var(--c-warning-text); }
.stat-badge.bg-blue { background: var(--c-info-bg); color: var(--c-info-text); }
.stat-badge.bg-purple { background: #f5f3ff; color: #7c3aed; }
.stat-badge.bg-green { background: var(--c-success-bg); color: var(--c-success-text); }
.stat-badge.bg-red { background: var(--c-danger-bg); color: var(--c-danger-text); }
body.dark .stat-badge.bg-indigo { background: #312e81; color: var(--c-primary-l); }
body.dark .stat-badge.bg-orange { background: #78350f; color: #fbbf24; }
body.dark .stat-badge.bg-blue { background: #1e3a5f; color: #60a5fa; }
body.dark .stat-badge.bg-purple { background: #2e1065; color: #a78bfa; }
body.dark .stat-badge.bg-green { background: rgba(6,78,59,0.5); color: #34d399; }
body.dark .stat-badge.bg-red { background: rgba(127,26,26,0.4); color: #f87171; }
.badge-block-temporary, .badge-block-permanent {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 0.25rem 0.7rem; border-radius: var(--r-full);
    font-size: var(--fs-xs); font-weight: 700; line-height: 1.4;
    white-space: nowrap; border: 1px solid transparent;
}
.badge-block-temporary { background: #ffedd5; color: #9a3412; border-color: #fdba74; box-shadow: 0 1px 3px rgba(251,146,60,0.15); }
.badge-block-temporary i { color: #ea580c; font-size: 0.7rem; }
body.dark .badge-block-temporary { background: rgba(120,53,15,0.5); color: #fdba74; border-color: rgba(251,146,60,0.5); }
body.dark .badge-block-temporary i { color: #fb923c; }
.badge-block-permanent { background: #fee2e2; color: #991b1b; border-color: #fca5a5; box-shadow: 0 1px 3px rgba(239,68,68,0.15); }
.badge-block-permanent i { color: #dc2626; font-size: 0.7rem; }
body.dark .badge-block-permanent { background: rgba(127,26,26,0.5); color: #fca5a5; border-color: rgba(239,68,68,0.5); }
body.dark .badge-block-permanent i { color: #f87171; }
@keyframes badgeBlockPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.badge-block-temporary .block-countdown { font-family: monospace; font-weight: 600; padding-left: 2px; animation: badgeBlockPulse 2s ease-in-out infinite; }

/* ============================================================
   SECTION 09 — components/modals.css
   ------------------------------------------------------------
   v6.6 — Tambah fallback `.modal-overlay-large` untuk browser
   tanpa dukungan `:has()` (Safari <15.4, Firefox <121).
   Bila HTML menambahkan class tersebut, z-index modal-large
   tetap aktif; tanpa itu, `:has()` yang bekerja di modern browser.
   ============================================================ */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: var(--z-modal-small); display: none;
    align-items: center; justify-content: center;
    padding: var(--sp-md); overflow-y: auto;
    animation: fadeIn var(--t-fast) ease-out;
}
.modal-overlay.flex, .modal-overlay.show { display: flex; }
.modal-overlay:has(.modal-box.w-full.h-full),
.modal-overlay.modal-overlay-large { z-index: var(--z-modal-large); }
.modal-box {
    background: #fff; border-radius: var(--r-xl);
    max-width: 90vw; max-height: 92vh; width: 100%;
    overflow: hidden; box-shadow: var(--shadow-2xl);
    display: flex; flex-direction: column;
    animation: modalPop 0.28s cubic-bezier(0.16,1,0.3,1);
    color: var(--c-black);
}
body.dark .modal-box { background: var(--c-gray-800); border: 1px solid var(--c-gray-600); color: #e2e8f0; }
.modal-box.w-full.h-full { border-radius: 0 !important; max-width: 100% !important; max-height: 100% !important; }
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: var(--sp-md) var(--sp-lg); border-bottom: 1px solid var(--c-gray-200);
    flex-shrink: 0; gap: var(--sp-md); background: inherit;
    border-radius: inherit; border-bottom-left-radius: 0; border-bottom-right-radius: 0;
}
body.dark .modal-header { border-color: var(--c-gray-700); }
.modal-header h3 {
    font-size: var(--fs-lg); font-weight: 700;
    display: flex; align-items: center; gap: var(--sp-sm); color: var(--c-black); margin: 0;
}
body.dark .modal-header h3 { color: #f1f5f9; }
.modal-close-btn {
    background: none; border: none; font-size: 1.75rem; line-height: 1; cursor: pointer;
    color: var(--c-gray-400); transition: color var(--t-fast), transform var(--t-fast);
    padding: 0 var(--sp-sm); border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
}
.modal-close-btn:hover { color: var(--c-danger); transform: rotate(90deg); }
.modal-body { padding: var(--sp-lg); overflow-y: auto; flex: 1 1 auto; -webkit-overflow-scrolling: touch; }
.modal-footer {
    display: flex; gap: var(--sp-sm); padding: var(--sp-md) var(--sp-lg);
    border-top: 1px solid var(--c-gray-200); flex-shrink: 0; flex-wrap: wrap;
    background: inherit; border-radius: inherit;
    border-top-left-radius: 0; border-top-right-radius: 0;
}
body.dark .modal-footer { border-color: var(--c-gray-700); }
.modal-footer .btn { flex: 1; min-width: 100px; justify-content: center; }

/* ============================================================
   SECTION 10 — components/toast.css
   ============================================================ */
.toast-notify {
    position: fixed; bottom: var(--sp-lg); right: var(--sp-lg);
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-left: 4px solid var(--c-primary);
    border-radius: var(--r-md); padding: var(--sp-sm) var(--sp-lg);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    z-index: var(--z-toast); max-width: 380px;
    font-size: var(--fs-sm); color: var(--c-black);
    animation: toastSlideIn 0.35s cubic-bezier(0.16,1,0.3,1);
    font-weight: 500; line-height: 1.4;
}
body.dark .toast-notify { background: var(--c-gray-800); color: #e2e8f0; border-color: var(--c-gray-700); }
@media (max-width: 480px) { .toast-notify { left: var(--sp-md); right: var(--sp-md); max-width: none; bottom: var(--sp-md); } }

/* ============================================================
   SECTION 11 — components/scrollbar.css
   ============================================================ */
.custom-scroll { scrollbar-width: thin; scrollbar-color: var(--c-gray-400) transparent; }
.custom-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.custom-scroll::-webkit-scrollbar-track { background: var(--c-gray-100); border-radius: 10px; }
body.dark .custom-scroll::-webkit-scrollbar-track { background: var(--c-gray-800); }
.custom-scroll::-webkit-scrollbar-thumb {
    background: var(--c-gray-400); border-radius: 10px;
    border: 2px solid transparent; background-clip: padding-box;
}
.custom-scroll::-webkit-scrollbar-thumb:hover { background: var(--c-gray-500); background-clip: padding-box; }
body.dark .custom-scroll::-webkit-scrollbar-thumb { background: var(--c-gray-600); background-clip: padding-box; }
body.dark .custom-scroll::-webkit-scrollbar-thumb:hover { background: var(--c-gray-500); background-clip: padding-box; }

/* ============================================================
   SECTION 12 — components/animations.css
   ============================================================ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalPop { from { opacity: 0; transform: scale(0.94) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes toastSlideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes scanLineMove { 0%, 100% { top: 12%; opacity: 0.4; } 50% { top: 88%; opacity: 1; } }
@keyframes dotPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   SECTION 13 — components/theme-toggle.css
   ============================================================ */
.theme-toggle {
    position: fixed; top: var(--sp-lg); right: var(--sp-lg);
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-radius: var(--r-full); width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.06); color: var(--c-black);
    font-size: var(--fs-lg);
    transition: transform var(--t-fast), background var(--t-normal);
    z-index: var(--z-theme-toggle);
}
body.dark .theme-toggle { background: rgba(30,41,59,0.85); color: #facc15; border-color: rgba(255,255,255,0.1); }
.theme-toggle:hover { transform: scale(1.08) rotate(15deg); }
body.no-theme-toggle .theme-toggle,
body.no-theme-toggle #themeToggleIcon,
body.no-theme-toggle #themeToggle { display: none !important; }

/* ============================================================
   SECTION 14 — components/running-text.css
   ============================================================ */
.running-text-container {
    overflow: hidden; white-space: nowrap;
    border-radius: var(--r-md); padding: var(--sp-sm) var(--sp-md); box-sizing: border-box;
}
.running-text-container marquee { display: block; font-weight: 500; font-size: var(--fs-sm); }

/* ============================================================
   SECTION 15 — components/member-list.css
   ============================================================ */
#memberList { display: grid; grid-template-columns: 1fr; gap: var(--sp-md); }
@media (min-width: 768px)  { #memberList { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1280px) { #memberList { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.member-item {
    background: #fff; border-radius: var(--r-lg); padding: var(--sp-md);
    border: 1px solid var(--c-gray-200);
    transition: box-shadow var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
    display: flex; flex-direction: column; height: 100%; position: relative;
}
.member-item:hover { box-shadow: var(--shadow-md); border-color: var(--c-primary-l); transform: translateY(-2px); }
body.dark .member-item { background: var(--c-gray-800); border-color: var(--c-gray-700); }
.member-item.has-problem { border-left: 4px solid var(--c-danger); }
.member-item.member-blocked { opacity: 0.88; }
.member-photo-preview {
    width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-full);
    border: 2px solid var(--c-primary-l); cursor: pointer; transition: transform var(--t-fast);
}
.member-photo-preview:hover { transform: scale(1.05); }
.member-name-link { color: var(--c-primary); font-weight: 700; cursor: pointer; transition: color var(--t-fast); }
.member-name-link:hover { color: var(--c-primary-h); text-decoration: underline; }
body.dark .member-name-link { color: var(--c-primary-l); }

.worker-photo-preview {
    width: 56px;
    height: 56px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--r-full);
    border: 2px solid var(--c-primary-l);
    background: var(--c-gray-100);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.worker-photo-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(79,70,229,0.25);
}
body.dark .worker-photo-preview {
    background: var(--c-gray-700);
    border-color: var(--c-primary);
}
body.dark .worker-photo-preview:hover {
    box-shadow: 0 4px 12px rgba(129,140,248,0.4);
}

/* ============================================================
   SECTION 16 — components/product-grid.css
   ============================================================ */
#productGrid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--sp-md); }
@media (min-width: 640px)  { #productGrid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (min-width: 768px)  { #productGrid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (min-width: 1024px) { #productGrid { grid-template-columns: repeat(5, minmax(0,1fr)); } }
.product-item {
    background: #fff; border-radius: var(--r-lg); padding: var(--sp-md);
    border: 1px solid var(--c-gray-200); display: flex; flex-direction: column;
    align-items: center; justify-content: space-between; height: 100%; min-height: 210px;
    cursor: pointer;
    transition: transform var(--t-normal), box-shadow var(--t-normal), border-color var(--t-normal);
    position: relative;
}
body.dark .product-item { background: var(--c-gray-800); border-color: var(--c-gray-700); }
.product-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--c-primary-l); }
.product-item.product-inactive, .product-item[data-active="false"] { opacity: 0.55; filter: grayscale(0.5); cursor: not-allowed; }
.product-item.product-inactive:hover, .product-item[data-active="false"]:hover { transform: none; box-shadow: none; }
.product-img-wrap {
    position: relative; display: inline-block; flex-shrink: 0;
    margin: 0 auto var(--sp-sm); line-height: 0;
    border-radius: var(--r-md); overflow: visible; z-index: 1;
}
.product-img-wrap .product-img {
    width: 80px; height: 80px; object-fit: cover; border-radius: var(--r-md);
    border: 1px solid var(--c-gray-200); display: block;
    transition: transform var(--t-fast); background: var(--c-gray-100);
}
body.dark .product-img-wrap .product-img { border-color: var(--c-gray-600); background: var(--c-gray-700); }
.product-item:hover .product-img-wrap .product-img { transform: scale(1.05); }
.product-img-wrap .badge-discount {
    position: absolute; top: -6px; left: -6px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    z-index: 3; pointer-events: none;
    animation: badgePop 0.35s cubic-bezier(0.16,1,0.3,1);
    transition: transform var(--t-fast);
}
.product-img-wrap .badge-discount-pct {
    display: inline-flex; align-items: center; gap: 3px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 0.3px;
    padding: 3px 7px; border-radius: var(--r-full);
    box-shadow: 0 2px 8px rgba(220,38,38,0.45), 0 0 0 2px rgba(255,255,255,0.9);
    line-height: 1.1; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
body.dark .product-img-wrap .badge-discount-pct {
    box-shadow: 0 2px 10px rgba(220,38,38,0.65), 0 0 0 2px rgba(30,41,59,0.95);
}
.product-img-wrap .badge-discount-qty {
    display: inline-block; background: rgba(255,255,255,0.95); color: #991b1b;
    font-size: 9px; font-weight: 700; letter-spacing: 0.2px;
    padding: 1px 6px; border-radius: var(--r-full);
    border: 1px solid rgba(220,38,38,0.35); box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    line-height: 1.3; white-space: nowrap;
}
body.dark .product-img-wrap .badge-discount-qty { background: rgba(30,41,59,0.95); color: #fca5a5; border-color: rgba(220,38,38,0.5); }

/* ============================================================
   ✅ v6.5 — Info produk di badge diskon (isi kemasan / satuan)
   ------------------------------------------------------------
   Format: "📦 500 Ml / Botol"
   Digunakan oleh: products.js::_renderGridItem()
   ============================================================ */
.product-img-wrap .badge-discount-info {
    display: inline-block;
    background: rgba(16, 185, 129, 0.92);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.2px;
    padding: 1px 7px;
    border-radius: var(--r-full);
    border: 1px solid rgba(16, 185, 129, 0.5);
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3);
    line-height: 1.3;
    white-space: nowrap;
    margin-top: 1px;
}
body.dark .product-img-wrap .badge-discount-info {
    background: rgba(6, 95, 70, 0.92);
    color: #a7f3d0;
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 1px 4px rgba(6, 95, 70, 0.6);
}

@keyframes badgePop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.product-item .product-name {
    font-weight: 700; font-size: var(--fs-sm); color: var(--c-black);
    line-height: 1.3; margin-bottom: var(--sp-xs); flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; text-align: center; width: 100%; word-break: break-word;
}
body.dark .product-item .product-name { color: #f1f5f9; }
.product-item .product-price { color: var(--c-primary); font-weight: 600; font-size: var(--fs-sm); text-align: center; margin-top: var(--sp-xs); }
body.dark .product-item .product-price { color: var(--c-primary-l); }
.product-item .product-stock { font-size: var(--fs-xs); color: var(--c-gray-400); text-align: center; margin-top: 2px; }
.product-item .badge-inactive {
    position: absolute; top: 8px; right: 8px; background: var(--c-danger); color: #fff;
    font-size: 10px; padding: 2px 8px; border-radius: var(--r-full);
    font-weight: 700; z-index: 4; letter-spacing: 0.4px;
}
.product-img-preview {
    width: 80px; height: 80px; object-fit: cover; border-radius: var(--r-md);
    border: 1px solid var(--c-gray-200); cursor: pointer;
    transition: transform var(--t-fast); background: var(--c-gray-100);
}
.product-img-preview:hover { transform: scale(1.05); }
body.dark .product-img-preview { border-color: var(--c-gray-600); background: var(--c-gray-700); }

/* ============================================================
   SECTION 17 — components/scanner.css
   ============================================================ */
.scanner-modal {
    max-width: 500px !important; padding: 0 !important; overflow: hidden;
    background: #0f172a; border: 1px solid rgba(99,102,241,0.3);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}
.scanner-header {
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 100%);
    padding: 14px 18px; display: flex; align-items: center; gap: 12px;
    color: #fff; position: relative;
}
.scanner-icon {
    width: 42px; height: 42px; background: rgba(255,255,255,0.15);
    border-radius: var(--r-md); display: flex; align-items: center;
    justify-content: center; font-size: 18px; flex-shrink: 0;
}
.scanner-title { font-size: 15px; font-weight: 700; line-height: 1.2; }
.scanner-subtitle { font-size: 11px; opacity: 0.8; margin-top: 2px; }
.scanner-close {
    background: rgba(255,255,255,0.15); border: none; color: #fff;
    width: 32px; height: 32px; border-radius: 50%; font-size: 20px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    position: absolute; top: 12px; right: 12px;
    transition: background var(--t-fast); line-height: 1;
}
.scanner-close:hover { background: rgba(220,38,38,0.9); }
.camera-container {
    position: relative; width: 100%; aspect-ratio: 4 / 3;
    background: #000; overflow: hidden;
}
.camera-container video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner-overlay {
    position: absolute; inset: 0;
    background: radial-gradient(circle at center, transparent 35%, rgba(0,0,0,0.55) 75%);
    pointer-events: none;
}
.scan-frame-wrapper {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 65%; max-width: 320px; aspect-ratio: 1;
    border-radius: var(--r-lg); pointer-events: none;
    transition: all var(--t-normal);
}
.scan-corner {
    position: absolute; width: 32px; height: 32px;
    border: 4px solid #22d3ee; box-shadow: 0 0 12px rgba(34,211,238,0.8);
    transition: all var(--t-normal);
}
.scan-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; border-top-left-radius: var(--r-lg); }
.scan-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; border-top-right-radius: var(--r-lg); }
.scan-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; border-bottom-left-radius: var(--r-lg); }
.scan-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; border-bottom-right-radius: var(--r-lg); }
.scan-line {
    position: absolute; left: 10%; right: 10%; top: 50%; height: 2px;
    background: linear-gradient(90deg, transparent, #22d3ee, #22d3ee, #22d3ee, transparent);
    box-shadow: 0 0 12px 3px rgba(34,211,238,0.9);
    animation: scanLineMove 2.5s ease-in-out infinite;
}
.scan-frame-wrapper.detected .scan-corner { border-color: var(--c-success); box-shadow: 0 0 16px 4px rgba(34,197,94,0.9); }
.scan-frame-wrapper.detected .scan-line {
    background: linear-gradient(90deg, transparent, var(--c-success), var(--c-success), var(--c-success), transparent);
    box-shadow: 0 0 16px 4px rgba(34,197,94,0.9);
    animation-duration: 0.8s;
}
.scanner-status {
    position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
    background: rgba(15,23,42,0.92); backdrop-filter: blur(6px);
    color: #e2e8f0; padding: 8px 16px; border-radius: var(--r-full);
    font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px;
    white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis;
    border: 1px solid rgba(148,163,184,0.3); pointer-events: none;
}
.scanner-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #22d3ee; box-shadow: 0 0 8px #22d3ee;
    animation: dotPulse 1.4s infinite; flex-shrink: 0;
}
.scanner-dot.warn { background: var(--c-warning); box-shadow: 0 0 8px var(--c-warning); }
.scanner-dot.error { background: var(--c-danger); box-shadow: 0 0 8px var(--c-danger); }
.scanner-loading {
    position: absolute; inset: 0; background: rgba(15,23,42,0.85);
    backdrop-filter: blur(4px); display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: #fff; gap: 12px; font-size: 14px;
}
.spinner-ring {
    width: 40px; height: 40px; border: 3px solid rgba(99,102,241,0.3);
    border-top-color: var(--c-primary-l); border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.scanner-actions {
    display: flex; gap: 10px; padding: 12px 16px;
    background: #0f172a; border-top: 1px solid rgba(148,163,184,0.2); flex-wrap: wrap;
}
.scanner-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 10px 16px; border-radius: var(--r-full);
    font-size: 13px; font-weight: 600; border: none; cursor: pointer;
    transition: all var(--t-fast); min-width: 100px; font-family: inherit;
}
.scanner-btn.upload { background: linear-gradient(135deg, var(--c-primary), #6366f1); color: #fff; }
.scanner-btn.upload:hover { background: linear-gradient(135deg, var(--c-primary-h), var(--c-primary)); }
.scanner-btn.manual { background: var(--c-warning); color: #fff; }
.scanner-btn.manual:hover { background: var(--c-warning-h); }
.scanner-btn.close-btn { background: #334155; color: #e2e8f0; }
.scanner-btn.close-btn:hover { background: #475569; }
.scanner-btn input[type="file"] { display: none; }

/* ============================================================
   SECTION 18 — components/qr-download.css
   ============================================================ */
.qr-cell-wrap { position: relative; display: inline-block; line-height: 0; }
.qr-cell-wrap .qr-preview-img { cursor: pointer; }
.qr-cell-wrap .qr-download-btn {
    position: absolute; right: -6px; bottom: -6px;
    background: var(--c-primary,#4f46e5); color: #fff;
    border: 2px solid #fff; width: 22px; height: 22px;
    border-radius: 50%; font-size: 9px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: transform var(--t-fast,.15s), background var(--t-fast,.15s);
    padding: 0; line-height: 1; z-index: 2;
}
.qr-cell-wrap .qr-download-btn:hover { transform: scale(1.15); background: var(--c-primary-h,#4338ca); }
body.dark .qr-cell-wrap .qr-download-btn { border-color: var(--c-gray-700,#334155); }
.download-member-qr { background: var(--c-info,#0ea5e9) !important; color: #fff !important; }
.download-member-qr:hover { background: var(--c-info-h,#0284c7) !important; }

/* ============================================================
   SECTION 19 — components/jaminan.css
   ============================================================ */
.jaminan-thumb {
    width: 100%; height: 100px; object-fit: cover;
    cursor: zoom-in; transition: transform var(--t-fast); border-radius: var(--r-md);
}
.jaminan-thumb:hover { transform: scale(1.05); }
.jaminan-img {
    cursor: zoom-in; transition: transform var(--t-fast);
    border-radius: var(--r-md); max-width: 120px; max-height: 120px;
    object-fit: cover; border: 1px solid var(--c-gray-200);
}
.jaminan-img:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.jaminan-preview {
    max-width: 200px; max-height: 200px; border-radius: var(--r-md);
    border: 1px solid var(--c-gray-200); margin-top: var(--sp-sm); cursor: zoom-in;
}
body.dark .jaminan-img, body.dark .jaminan-preview { border-color: var(--c-gray-600); }
.fallback-icon { display: flex; align-items: center; justify-content: center; background: var(--c-gray-100); color: var(--c-gray-400); }
body.dark .fallback-icon { background: var(--c-gray-700); color: var(--c-gray-500); }
#globalZoomModal {
    position: fixed; inset: 0; z-index: var(--z-zoom);
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.9); backdrop-filter: blur(6px);
    cursor: zoom-out; padding: var(--sp-md);
}
#globalZoomModal img {
    max-width: 95vw; max-height: 92vh; object-fit: contain;
    border-radius: var(--r-md); box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}

/* ============================================================
   SECTION 20 — components/order-queue.css
   ============================================================ */
.pending-order-item {
    background: #fff; border-radius: var(--r-lg); padding: var(--sp-md);
    border: 1px solid var(--c-gray-200); cursor: pointer;
    transition: transform var(--t-fast), box-shadow var(--t-fast);
}
body.dark .pending-order-item { background: var(--c-gray-800); border-color: var(--c-gray-700); }
.pending-order-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--c-primary-l); }

/* ============================================================
   SECTION 21 — components/payroll.css
   ============================================================ */
.bonus-item, .deduction-item {
    background: #fff; border: 1px solid var(--c-gray-200);
    border-radius: var(--r-md); padding: var(--sp-md);
    position: relative; margin-bottom: var(--sp-sm);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    animation: fadeSlideUp 0.3s ease-out;
}
body.dark .bonus-item, body.dark .deduction-item { background: var(--c-gray-800); border-color: var(--c-gray-600); }
.bonus-item:hover, .deduction-item:hover { border-color: var(--c-primary-l); box-shadow: var(--shadow-sm); }
.bonus-item .remove-bonus-item, .deduction-item .remove-deduction-item {
    position: absolute; top: 8px; right: 8px; width: 26px; height: 26px;
    border-radius: 50%; background: transparent; border: none;
    color: var(--c-danger); font-size: 20px; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all var(--t-fast); font-weight: 700;
}
.bonus-item .remove-bonus-item:hover, .deduction-item .remove-deduction-item:hover { background: var(--c-danger-bg); color: var(--c-danger-h); }
body.dark .bonus-item .remove-bonus-item:hover, body.dark .deduction-item .remove-deduction-item:hover { background: rgba(127,26,26,0.4); color: #fca5a5; }
#deductionForm #totalDeductionAmount, #bonusForm #totalBonusAmount { font-weight: 800; font-size: var(--fs-base); }

/* ============================================================
   SECTION 22 — components/settings.css
   ============================================================ */
#settingsModal .modal-content {
    background: #fff; border-radius: var(--r-xl); max-width: 520px; width: 100%;
    padding: var(--sp-lg); box-shadow: var(--shadow-2xl);
    max-height: 90vh; overflow-y: auto;
}
body.dark #settingsModal .modal-content { background: var(--c-gray-800); color: #f1f5f9; border: 1px solid var(--c-gray-600); }
#settingsModal .setting-group { margin-bottom: var(--sp-sm); }
#settingsModal .setting-group label { display: block; font-weight: 600; font-size: var(--fs-sm); margin-bottom: var(--sp-xs); }
#settingsModal .setting-group select, #settingsModal .setting-group input[type="number"] {
    width: 100%; padding: var(--sp-sm); border: 1px solid var(--c-gray-300);
    border-radius: var(--r-md); background: #fff; font-size: var(--fs-sm); min-height: 40px;
}
body.dark #settingsModal .setting-group select, body.dark #settingsModal .setting-group input[type="number"] {
    background: var(--c-gray-900); border-color: var(--c-gray-600); color: #f1f5f9;
}
.settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-sm); }
@media (max-width: 480px) { .settings-row { grid-template-columns: 1fr; } }
#settingsModal .checkbox-group { display: flex; align-items: center; gap: var(--sp-sm); margin-bottom: var(--sp-xs); }
#settingsModal .checkbox-group input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--c-primary); }

/* ============================================================
   SECTION 23 — components/labels.css
   ============================================================ */
.label-container {
    background: #fff; width: 80mm; max-width: 80mm; margin: 0 auto;
    padding: 2mm 2mm 5mm 2mm; box-shadow: 0 2px 8px rgba(0,0,0,0.08); border-radius: 2px;
    display: flex; flex-direction: column; font-size: 7pt; line-height: 1.3;
    word-break: break-word; overflow: visible; color: #000;
}
body.dark .label-container { background: var(--c-gray-800); color: #e2e8f0; }
.label-header {
    display: flex; align-items: center; justify-content: center;
    border-bottom: 1px dashed #ccc; padding-bottom: 2px; margin-bottom: 3px; gap: 4px;
}
.label-header .logo { width: 16px; height: 16px; object-fit: contain; flex-shrink: 0; }
.label-header .shop-name { font-size: 9pt; font-weight: 900; letter-spacing: 0.3px; color: #000; text-align: center; }
body.dark .label-header .shop-name { color: #f1f5f9; }
.label-body { display: flex; flex-wrap: nowrap; gap: 3px; margin: 2px 0; }
.label-left { flex: 1 1 55%; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.label-right { flex: 0 1 42%; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.label-container .product-name { font-size: 9.5pt; font-weight: 900; line-height: 1.15; text-transform: uppercase; color: #000; margin-bottom: 2px; }
body.dark .label-container .product-name { color: #f1f5f9; }
.label-container .row { display: flex; justify-content: space-between; align-items: baseline; font-size: 7pt; font-weight: 700; line-height: 1.2; margin: 1px 0; color: #000; }
.label-container .row-label { font-weight: 700; color: #000; }
.label-container .row-value { font-weight: 800; text-align: right; color: #000; }
body.dark .label-container .row-label, body.dark .label-container .row-value { color: #f1f5f9; }
.price-total { margin-top: 2px; padding-top: 2px; border-top: 0.5px solid #ccc; font-size: 7pt; font-weight: 800; text-align: right; color: #000; }
body.dark .price-total { color: #f1f5f9; border-color: var(--c-gray-600); }
.qr-code, .product-photo-label { max-width: 26mm; width: 100%; height: auto; display: block; margin: 0 auto; background: transparent; }
.product-photo-label { max-height: 26mm; object-fit: contain; border: 0.5px solid #ccc; border-radius: 2px; }
.product-code { font-family: monospace; font-size: 7pt; font-weight: 700; text-align: center; letter-spacing: 0.4px; margin-top: 2px; width: 100%; color: #000; }
body.dark .product-code { color: #f1f5f9; }
.footer-note { text-align: center; font-size: 6.5pt; font-weight: 700; border-top: 0.5px dotted #ccc; margin-top: 4px; padding-top: 3px; padding-bottom: 5px; margin-bottom: 3px; letter-spacing: 0.3px; color: #000; line-height: 1.35; overflow: visible; }
body.dark .footer-note { color: var(--c-gray-400); border-color: var(--c-gray-600); }

/* ============================================================
   SECTION 24 — components/receipt.css
   ============================================================ */
.receipt-wrapper { max-width: 80mm; margin: 0 auto; padding: var(--sp-md); }
.receipt {
    background: #fff; padding: 4mm 2mm; font-family: 'Courier New', monospace;
    font-size: 9pt; line-height: 1.35; color: #000;
    box-shadow: var(--shadow-md); border-radius: 4px;
}
.receipt pre { margin: 0; padding: 0; white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: inherit; line-height: inherit; background: transparent; color: inherit; }
body.dark .receipt { background: var(--c-gray-800); color: #e2e8f0; }

.receipt-table { width: 100%; border-collapse: collapse; }
.receipt-table th,
.receipt-table td { padding: 3px 4px; vertical-align: middle; }
.receipt-table thead th {
    border-bottom: 1px dashed var(--c-gray-300);
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--c-gray-600);
}
body.dark .receipt-table thead th {
    border-bottom-color: var(--c-gray-600);
    color: var(--c-gray-300);
}

.receipt-table tbody tr.receipt-bonus-row {
    background: linear-gradient(90deg, rgba(245,158,11,0.12) 0%, rgba(251,191,36,0.04) 100%);
    border-left: 3px solid #f59e0b;
    position: relative;
}
body.dark .receipt-table tbody tr.receipt-bonus-row {
    background: linear-gradient(90deg, rgba(245,158,11,0.22) 0%, rgba(251,191,36,0.08) 100%);
    border-left-color: #fbbf24;
}

.receipt-table .receipt-bonus-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    text-align: left;
}

.receipt-table .receipt-bonus-icon {
    font-size: 12px;
    line-height: 1;
    flex-shrink: 0;
}

.receipt-table .receipt-bonus-label {
    font-weight: 800;
    color: #92400e;
    letter-spacing: 0.2px;
    font-family: 'Courier New', 'Consolas', monospace;
    word-break: break-word;
}
body.dark .receipt-table .receipt-bonus-label {
    color: #fcd34d;
}

.receipt-table .receipt-bonus-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 1px 6px;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(16,185,129,0.35);
    text-transform: uppercase;
    flex-shrink: 0;
    line-height: 1.4;
    margin-left: 2px;
}

.receipt-table .receipt-bonus-qty {
    color: #92400e;
    font-weight: 700;
    font-family: 'Courier New', 'Consolas', monospace;
}
body.dark .receipt-table .receipt-bonus-qty {
    color: #fcd34d;
}

.receipt-table .receipt-bonus-total {
    color: #10b981;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 1px;
}
body.dark .receipt-table .receipt-bonus-total {
    color: #34d399;
}

@media print {
    .receipt-table tbody tr.receipt-bonus-row {
        background: transparent !important;
        border-left: 2px solid #000 !important;
    }
    .receipt-table .receipt-bonus-label,
    .receipt-table .receipt-bonus-qty,
    .receipt-table .receipt-bonus-total {
        color: #000 !important;
    }
    .receipt-table .receipt-bonus-badge {
        background: transparent !important;
        color: #000 !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

/* ============================================================
   SECTION 25 — components/slip-gaji.css
   ============================================================ */
.slip-gaji-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff !important; padding: var(--sp-xl); border-radius: var(--r-md);
    max-width: 800px; margin: 0 auto; box-shadow: var(--shadow-2xl);
    position: relative; z-index: 1;
}
.slip-gaji-container * { color: #fff !important; }
.slip-gaji-container .header-print {
    border-bottom: 2px solid rgba(255,255,255,0.2) !important;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: var(--sp-md); margin-bottom: var(--sp-lg); padding-bottom: var(--sp-md);
}
.slip-gaji-container .header-print .logo-wrap { display: flex; align-items: center; gap: var(--sp-sm); }
.slip-gaji-container .header-print .logo-box {
    width: 50px; height: 50px; background: rgba(255,255,255,0.1);
    border-radius: var(--r-md); display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.slip-gaji-container .header-print .logo-box img { width: 100%; height: 100%; object-fit: cover; }
.slip-gaji-container .header-print h1 { font-size: 18pt; font-weight: 700; margin: 0; }
.slip-gaji-container .header-print .sub { font-size: 10pt; color: #94a3b8 !important; }
.slip-gaji-container .header-print .shop-info { text-align: right; font-size: 9pt; color: #94a3b8 !important; line-height: 1.5; }
.slip-gaji-container .title { font-size: 20pt; font-weight: 700; text-align: center; margin: 10px 0 5px; }
.slip-gaji-container .subtitle { color: #94a3b8 !important; text-align: center; font-size: 11pt; margin-bottom: 15px; }
.slip-gaji-container .info-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 10pt; }
.slip-gaji-container .info-table td { padding: 6px 10px; border: none; }
.slip-gaji-container .info-table .label { font-weight: 600; width: 30%; color: #94a3b8 !important; }
.slip-gaji-container .info-table .value { font-weight: 500; }
.slip-gaji-container .detail-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 10pt; }
.slip-gaji-container .detail-table th {
    background: rgba(255,255,255,0.1) !important; padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.15) !important;
    text-align: center; font-weight: 600;
}
.slip-gaji-container .detail-table td { padding: 6px 12px; border: 1px solid rgba(255,255,255,0.1) !important; }
.slip-gaji-container .detail-table .text-right { text-align: right; }
.slip-gaji-container .detail-table .total-row { font-weight: 700; background: rgba(79,70,229,0.3) !important; }
.slip-gaji-container .detail-table .text-green-600 { color: #4ade80 !important; }
.slip-gaji-container .detail-table .text-red-600 { color: #f87171 !important; }
.slip-gaji-container .bonus-header { font-weight: 600; color: #4ade80 !important; }
.slip-gaji-container .potongan-header { font-weight: 600; color: #f87171 !important; }
.slip-gaji-container .footer-print {
    margin-top: 15px; border-top: 1px solid rgba(255,255,255,0.2) !important;
    padding-top: 10px; text-align: center; font-size: 8pt; color: #94a3b8 !important;
}
.slip-gaji-container .ttd-section { margin-top: 30px; display: flex; justify-content: space-between; gap: var(--sp-md); }
.slip-gaji-container .ttd-section > div { text-align: center; }
.slip-gaji-container .ttd-section .ttd-label { color: #94a3b8 !important; font-size: 10pt; }
.slip-gaji-container .ttd-section .ttd-name { font-weight: 600; margin-top: 30px; }

/* ============================================================
   SECTION 26 — components/watermark.css
   ============================================================ */
.watermark {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.watermark-print {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
.watermark-svg {
    display: none;
}

/* ============================================================
   SECTION 27 — components/loan-info-modal.css
   ------------------------------------------------------------
   v6.6 — Section 33 (loan-info-window.css) sudah di-merge ke
   sini sejak v6.4. Header Section 33 dihapus untuk mencegah
   ambiguitas indeks.
   ============================================================ */
.loan-hero {
    position: relative; overflow: hidden; border-radius: 20px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
    color: #fff; padding: 22px 22px 26px;
    box-shadow: 0 20px 40px -12px rgba(79,70,229,0.45);
}
.loan-hero::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 15%, rgba(255,255,255,0.18) 0%, transparent 40%),
                radial-gradient(circle at 85% 80%, rgba(255,255,255,0.12) 0%, transparent 45%);
    pointer-events: none;
}
.loan-hero .hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; position: relative; z-index: 1; }
.loan-hero .hero-icon {
    width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,0.22);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; backdrop-filter: blur(6px);
}
.loan-hero h1 { font-size: 22px; font-weight: 800; margin: 0; line-height: 1.15; color: #fff; }
.loan-hero .loan-no { font-family: monospace; font-size: 12px; opacity: 0.9; }
.loan-hero .hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.hero-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.28);
    padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
    backdrop-filter: blur(6px);
}
.hero-chip.ok { background: rgba(34,197,94,0.28); border-color: rgba(34,197,94,0.5); }
.hero-chip.warn { background: rgba(245,158,11,0.28); border-color: rgba(245,158,11,0.5); }
.hero-chip.danger { background: rgba(239,68,68,0.28); border-color: rgba(239,68,68,0.5); }
.ring-wrap { display: flex; align-items: center; gap: 18px; position: relative; z-index: 1; margin-top: 18px; }
.ring-svg { width: 100px; height: 100px; flex-shrink: 0; }
.ring-svg circle { transition: stroke-dashoffset 0.8s ease; }
.ring-label { display: flex; flex-direction: column; gap: 4px; }
.ring-label .pct { font-size: 32px; font-weight: 900; line-height: 1; }
.ring-label .pct-sub { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.85; }
.ring-label .money { margin-top: 4px; font-size: 15px; font-weight: 700; }
.ring-label .money-sub { font-size: 11px; opacity: 0.8; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.info-tile {
    background: rgba(255,255,255,0.7); border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px; padding: 12px 14px; backdrop-filter: blur(8px);
    display: flex; flex-direction: column; gap: 4px;
}
body.dark .info-tile { background: rgba(30,41,59,0.7); border-color: rgba(255,255,255,0.08); }
.info-tile .tile-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700; color: var(--c-gray-500); }
body.dark .info-tile .tile-label { color: var(--c-gray-400); }
.info-tile .tile-value { font-size: 15px; font-weight: 700; color: var(--c-black); word-break: break-word; }
body.dark .info-tile .tile-value { color: #f1f5f9; }
.info-tile .tile-value.mono { font-family: monospace; font-size: 13px; }
.info-tile .tile-value.big { font-size: 20px; font-weight: 800; }
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
    content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px;
    width: 2px; background: linear-gradient(to bottom, #4f46e5 0%, #e2e8f0 100%); border-radius: 2px;
}
body.dark .timeline::before { background: linear-gradient(to bottom, #818cf8 0%, #334155 100%); }
.tl-item {
    position: relative; margin-bottom: 12px;
    background: rgba(255,255,255,0.72); border: 1px solid rgba(0,0,0,0.05);
    border-radius: 14px; padding: 12px 14px; backdrop-filter: blur(6px);
}
body.dark .tl-item { background: rgba(30,41,59,0.72); border-color: rgba(255,255,255,0.06); }
.tl-item::before {
    content: ""; position: absolute; left: -26px; top: 16px;
    width: 16px; height: 16px; border-radius: 50%;
    background: #fff; border: 3px solid #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}
body.dark .tl-item::before { background: #0f172a; }
.tl-item.paid::before { border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.18); }
.tl-item.partial::before { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.18); }
.tl-item.late::before { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.18); }
.tl-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.tl-head .tl-num { font-weight: 800; font-size: 13px; color: var(--c-primary); }
body.dark .tl-head .tl-num { color: #a5b4fc; }
.tl-head .tl-due { font-size: 12px; font-family: monospace; color: var(--c-gray-500); }
body.dark .tl-head .tl-due { color: var(--c-gray-400); }
.tl-head .tl-status { font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.6px; }
.st-paid { background: #d1fae5; color: #065f46; }
.st-partial { background: #fef3c7; color: #92400e; }
.st-pending { background: #fee2e2; color: #991b1b; }
body.dark .st-paid { background: rgba(6,78,59,0.6); color: #6ee7b7; }
body.dark .st-partial { background: rgba(120,53,15,0.6); color: #fcd34d; }
body.dark .st-pending { background: rgba(127,26,26,0.6); color: #fca5a5; }
.tl-amounts { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; }
.tl-amounts .amt-box { display: flex; flex-direction: column; gap: 2px; }
.tl-amounts .amt-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--c-gray-500); }
body.dark .tl-amounts .amt-label { color: var(--c-gray-400); }
.tl-amounts .amt-value { font-weight: 800; font-size: 13px; }
.tl-amounts .amt-value.ok { color: #16a34a; } .tl-amounts .amt-value.warn { color: #d97706; } .tl-amounts .amt-value.bad { color: #dc2626; }
body.dark .tl-amounts .amt-value.ok { color: #4ade80; }
body.dark .tl-amounts .amt-value.warn { color: #fbbf24; }
body.dark .tl-amounts .amt-value.bad { color: #f87171; }
.jaminan-wrap { position: relative; display: inline-block; border-radius: 14px; overflow: hidden; border: 2px solid rgba(79,70,229,0.2); }
.jaminan-wrap img { width: 160px; height: 160px; object-fit: cover; cursor: zoom-in; transition: transform 0.25s ease; }
.jaminan-wrap img:hover { transform: scale(1.05); }
body[data-embed="1"] { padding: 16px !important; }
body[data-embed="1"] .loan-info-container { max-width: 100% !important; }

/* ============================================================
   SECTION 28 — components/headers.css
   ------------------------------------------------------------
   NOTE v6.4: `.running-text-container` DIHAPUS dari section ini
   karena sudah didefinisikan di SECTION 14.
   ============================================================ */
.app-header-bar { position: relative; z-index: var(--z-header,50); transition: z-index var(--t-fast,0.15s ease); }
body.modal-open .app-header-bar { z-index: 1; }
.nav-header {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: var(--r-xl,1.5rem);
    padding: var(--sp-md,1rem) var(--sp-lg,1.5rem);
    margin-bottom: var(--sp-lg,1.5rem);
    border: 1px solid rgba(0,0,0,0.06);
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-md,1rem);
    position: relative; z-index: var(--z-content,1);
}
body.dark .nav-header { background: rgba(30,41,59,0.85); border-color: rgba(255,255,255,0.08); }
.nav-header .logo-box {
    background: #e0e7ff; border-radius: var(--r-md,0.75rem);
    width: 3.5rem; height: 3.5rem;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
body.dark .nav-header .logo-box { background: #312e81; }
.nav-header .logo-box img { width: 100%; height: 100%; object-fit: cover; }
.nav-header .nav-title { flex: 1; min-width: 0; }
.nav-header .nav-title h1 { font-size: var(--fs-xl,1.25rem); font-weight: 700; color: var(--c-black,#1e293b); line-height: 1.2; }
body.dark .nav-header .nav-title h1 { color: #f1f5f9; }
.nav-header .nav-title p { color: var(--c-gray-500,#64748b); font-size: var(--fs-sm,0.875rem); margin-top: 2px; }
body.dark .nav-header .nav-title p { color: var(--c-gray-400,#94a3b8); }
.nav-header .nav-links { display: flex; gap: var(--sp-sm,0.5rem); flex-wrap: wrap; }
.nav-header .nav-links a {
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--c-gray-200,#e2e8f0);
    border-radius: var(--r-full,9999px);
    padding: 0.4rem 1rem; color: var(--c-gray-700,#334155);
    transition: all var(--t-fast,0.15s ease);
    font-size: var(--fs-sm,0.875rem);
    display: inline-flex; align-items: center; gap: var(--sp-sm,0.5rem);
    font-weight: 500; text-decoration: none;
}
body.dark .nav-header .nav-links a {
    background: rgba(30,41,59,0.8); border-color: var(--c-gray-600,#475569); color: var(--c-gray-200,#e2e8f0);
}
.nav-header .nav-links a:hover { background: var(--c-primary-bg,#eef2ff); color: var(--c-primary,#4f46e5); transform: translateY(-1px); }
body.dark .nav-header .nav-links a:hover { background: var(--c-primary,#4f46e5); color: #fff; }
.header-print {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: var(--sp-md,1rem); padding-bottom: var(--sp-md,1rem);
    margin-bottom: var(--sp-lg,1.5rem); border-bottom: 2px solid var(--c-gray-200,#e2e8f0);
}
body.dark .header-print { border-bottom-color: var(--c-gray-700,#334155); }
.header-print .logo-wrap { display: flex; align-items: center; gap: var(--sp-sm,0.5rem); }
.header-print .logo-box {
    width: 3.5rem; height: 3.5rem; background: #e0e7ff;
    border-radius: var(--r-md,0.75rem);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
body.dark .header-print .logo-box { background: #312e81; }
.header-print .logo-box img { width: 100%; height: 100%; object-fit: cover; }
.header-print h1 { font-size: var(--fs-xl,1.25rem); font-weight: 800; color: var(--c-black,#1e293b); line-height: 1.15; margin: 0; }
body.dark .header-print h1 { color: #f1f5f9; }
.header-print .sub { font-size: var(--fs-sm,0.875rem); color: var(--c-gray-500,#64748b); line-height: 1.2; }
body.dark .header-print .sub { color: var(--c-gray-400,#94a3b8); }
.header-print .shop-info { text-align: right; font-size: var(--fs-sm,0.875rem); color: var(--c-gray-500,#64748b); line-height: 1.5; }
body.dark .header-print .shop-info { color: var(--c-gray-400,#94a3b8); }
.clickable-header {
    cursor: pointer; transition: opacity var(--t-fast,0.15s ease), transform var(--t-fast,0.15s ease);
    text-decoration: none; color: inherit;
    display: inline-flex; align-items: center; gap: var(--sp-sm,0.5rem);
}
.clickable-header:hover { opacity: 0.88; transform: translateY(-1px); }
.clickable-header:active { transform: translateY(0); }
.clickable-header button, .clickable-header a, .clickable-header input, .clickable-header select, .clickable-header .no-header-click { cursor: default; transform: none; }
.clickable-header a, .clickable-header button { cursor: pointer; }
.member-search-wrapper { position: relative; z-index: var(--z-search-wrapper,60); }
.member-search-wrapper input { transition: background var(--t-fast,0.15s ease); }
.member-search-results, #memberSearchResults {
    position: absolute; top: 100%; left: 0; margin-top: 4px;
    min-width: 280px; width: max-content; max-width: min(90vw,480px);
    max-height: 320px; overflow-y: auto; background: #ffffff;
    border: 1px solid var(--c-gray-200,#e2e8f0);
    border-radius: var(--r-md,0.75rem);
    box-shadow: 0 20px 45px -8px rgba(0,0,0,0.25), 0 0 0 1px rgba(79,70,229,0.05);
    z-index: var(--z-search-dropdown,9000); pointer-events: auto;
    animation: fadeIn var(--t-fast,0.15s ease) ease-out;
}
body.dark .member-search-results, body.dark #memberSearchResults {
    background: var(--c-gray-800,#1e293b);
    border-color: var(--c-gray-600,#475569);
    box-shadow: 0 20px 45px -8px rgba(0,0,0,0.6), 0 0 0 1px rgba(129,140,248,0.15);
}
.member-search-results .search-item, #memberSearchResults .search-item {
    padding: 8px 12px; cursor: pointer; font-size: var(--fs-sm,0.875rem);
    transition: background var(--t-fast,0.15s ease);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
    color: var(--c-black,#1e293b); text-decoration: none;
}
body.dark .member-search-results .search-item, body.dark #memberSearchResults .search-item {
    border-bottom-color: rgba(255,255,255,0.05); color: #e2e8f0;
}
.member-search-results .search-item:last-child, #memberSearchResults .search-item:last-child { border-bottom: none; }
.member-search-results .search-item:hover, #memberSearchResults .search-item:hover { background: var(--c-primary-bg,#eef2ff); }
body.dark .member-search-results .search-item:hover, body.dark #memberSearchResults .search-item:hover { background: #312e81; color: #f1f5f9; }
#memberSearchResults.hidden { display: none !important; }

/* ============================================================
   SECTION 29 — components/reports.css
   ============================================================ */
.report-toolbar {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: var(--r-lg); padding: var(--sp-md) var(--sp-lg);
    margin-bottom: var(--sp-lg); border: 1px solid var(--c-gray-200);
    box-shadow: 0 4px 12px -4px rgba(0,0,0,0.06);
}
body.dark .report-toolbar { background: rgba(30,41,59,0.92); border-color: var(--c-gray-700); }
.report-toolbar-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-sm); }
.report-toolbar-row + .report-toolbar-row { margin-top: var(--sp-sm); padding-top: var(--sp-sm); border-top: 1px dashed var(--c-gray-200); }
body.dark .report-toolbar-row + .report-toolbar-row { border-color: var(--c-gray-700); }
.report-preset-group {
    display: inline-flex; flex-wrap: wrap; gap: 4px;
    background: var(--c-gray-100); padding: 4px; border-radius: var(--r-full);
}
body.dark .report-preset-group { background: var(--c-gray-800); }
.report-preset-btn {
    padding: 0.35rem 0.9rem; border-radius: var(--r-full);
    font-size: var(--fs-xs); font-weight: 600;
    color: var(--c-gray-600); background: transparent; border: none;
    cursor: pointer; transition: all var(--t-fast);
    white-space: nowrap; font-family: inherit;
}
body.dark .report-preset-btn { color: var(--c-gray-300); }
.report-preset-btn:hover { background: var(--c-gray-200); color: var(--c-gray-800); }
body.dark .report-preset-btn:hover { background: var(--c-gray-700); color: #fff; }
.report-preset-btn.active { background: var(--c-primary); color: #fff; box-shadow: 0 2px 8px rgba(79,70,229,0.35); }
.report-toolbar-actions { display: inline-flex; flex-wrap: wrap; gap: var(--sp-xs); margin-left: auto; }
.report-meta { display: flex; align-items: center; gap: var(--sp-sm); font-size: var(--fs-xs); color: var(--c-gray-500); padding: var(--sp-xs) 0; }
body.dark .report-meta { color: var(--c-gray-400); }
.report-meta .report-meta-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--c-success); box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
    animation: reportPulse 2.5s ease-in-out infinite;
}
.report-meta .report-meta-label { font-weight: 500; }
.report-meta .report-meta-time { font-family: monospace; font-weight: 600; color: var(--c-gray-700); }
body.dark .report-meta .report-meta-time { color: var(--c-gray-200); }
@keyframes reportPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(34,197,94,0.25); }
    50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(34,197,94,0.05); }
}
.report-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-md); margin-bottom: var(--sp-lg); }
.report-stat {
    position: relative; overflow: hidden; background: #fff;
    border-radius: var(--r-lg); padding: var(--sp-md) var(--sp-lg);
    border: 1px solid var(--c-gray-200);
    transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
    cursor: pointer; text-decoration: none; color: inherit; display: block;
}
body.dark .report-stat { background: var(--c-gray-800); border-color: var(--c-gray-700); color: #e2e8f0; }
.report-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--c-primary-l); }
.report-stat.is-static { cursor: default; }
.report-stat.is-static:hover { transform: none; box-shadow: none; border-color: var(--c-gray-200); }
.report-stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c-primary); opacity: 0.85; }
.report-stat.accent-success::before { background: var(--c-success); }
.report-stat.accent-warning::before { background: var(--c-warning); }
.report-stat.accent-danger::before { background: var(--c-danger); }
.report-stat.accent-info::before { background: var(--c-info); }
.report-stat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-sm); margin-bottom: var(--sp-xs); }
.report-stat-icon {
    width: 36px; height: 36px; border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
    background: var(--c-primary-bg); color: var(--c-primary);
}
.report-stat.accent-success .report-stat-icon { background: var(--c-success-bg); color: var(--c-success-h); }
.report-stat.accent-warning .report-stat-icon { background: var(--c-warning-bg); color: var(--c-warning-h); }
.report-stat.accent-danger .report-stat-icon { background: var(--c-danger-bg); color: var(--c-danger-h); }
.report-stat.accent-info .report-stat-icon { background: var(--c-info-bg); color: var(--c-info-h); }
.report-stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700; color: var(--c-gray-500); margin-bottom: 2px; }
body.dark .report-stat-label { color: var(--c-gray-400); }
.report-stat-value { font-size: 1.4rem; font-weight: 800; color: var(--c-black); line-height: 1.1; word-break: break-word; }
body.dark .report-stat-value { color: #fff; }
.report-stat-hint { font-size: 11px; color: var(--c-gray-400); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
body.dark .report-stat-hint { color: var(--c-gray-500); }
.report-charts-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--sp-md); margin-bottom: var(--sp-lg); }
@media (max-width: 768px) { .report-charts-grid { grid-template-columns: 1fr; } }
.report-chart-card {
    background: #fff; border-radius: var(--r-lg);
    padding: var(--sp-md) var(--sp-lg); border: 1px solid var(--c-gray-200);
    display: flex; flex-direction: column; min-height: 320px;
    width: 100%; overflow: hidden;
}
body.dark .report-chart-card { background: var(--c-gray-800); border-color: var(--c-gray-700); }
.report-chart-card.is-full-width { grid-column: 1 / -1; }
.report-chart-head { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-sm); margin-bottom: var(--sp-md); }
.report-chart-title { font-size: var(--fs-base); font-weight: 700; color: var(--c-black); display: flex; align-items: center; gap: var(--sp-xs); }
body.dark .report-chart-title { color: #f1f5f9; }
.report-chart-title i { color: var(--c-primary); }
.report-chart-body { flex: 1 1 auto; position: relative; min-height: 220px; width: 100%; display: block; overflow: hidden; }
.report-chart-body canvas { display: block !important; width: 100% !important; height: 100% !important; max-height: 260px !important; }
.report-chart-empty { text-align: center; color: var(--c-gray-400); font-size: var(--fs-sm); padding: var(--sp-lg); }
.report-chart-empty i { display: block; font-size: 2rem; margin-bottom: var(--sp-sm); opacity: 0.4; }
.report-table-wrap {
    background: #fff; border-radius: var(--r-lg);
    border: 1px solid var(--c-gray-200); overflow: hidden; margin-bottom: var(--sp-lg);
}
body.dark .report-table-wrap { background: var(--c-gray-800); border-color: var(--c-gray-700); }
.report-table-head {
    padding: var(--sp-md) var(--sp-lg);
    border-bottom: 1px solid var(--c-gray-200);
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: var(--sp-sm);
}
body.dark .report-table-head { border-color: var(--c-gray-700); }
.report-table-title { font-weight: 700; display: flex; align-items: center; gap: var(--sp-xs); color: var(--c-black); }
body.dark .report-table-title { color: #f1f5f9; }
.report-table-title i { color: var(--c-primary); }
.sortable-th { cursor: pointer; user-select: none; white-space: nowrap; position: relative; padding-right: 22px !important; }
.sortable-th:hover { color: var(--c-primary); }
.sortable-th .sort-indicator { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); opacity: 0.35; font-size: 10px; transition: opacity var(--t-fast); }
.sortable-th[data-sort-dir] .sort-indicator { opacity: 1; color: var(--c-primary); }
.report-loading {
    position: fixed; inset: 0; z-index: 9998;
    background: rgba(15,23,42,0.35); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
}
.report-loading.is-active { display: flex; }
.report-loading-box {
    background: #fff; border-radius: var(--r-lg);
    padding: var(--sp-lg) var(--sp-xl); box-shadow: var(--shadow-2xl);
    text-align: center; min-width: 200px;
}
body.dark .report-loading-box { background: var(--c-gray-800); color: #fff; }
.report-loading-spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--c-primary-bg); border-top-color: var(--c-primary);
    border-radius: 50%; margin: 0 auto var(--sp-sm);
    animation: reportSpin 0.8s linear infinite;
}
.report-loading-text { font-size: var(--fs-sm); font-weight: 500; color: var(--c-gray-600); }
body.dark .report-loading-text { color: var(--c-gray-300); }
@keyframes reportSpin { to { transform: rotate(360deg); } }
.btn-refresh-pulse { position: relative; }
.btn-refresh-pulse.is-refreshing { pointer-events: none; opacity: 0.7; }
.btn-refresh-pulse.is-refreshing i { animation: reportSpin 0.8s linear infinite; }
.report-live-meta {
    display: inline-flex; align-items: center; gap: 6px;
    margin-left: 12px; padding: 3px 10px;
    background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3);
    border-radius: 999px; font-size: 11px; font-weight: 500; color: #16a34a;
}
body.dark .report-live-meta { background: rgba(34,197,94,0.15); border-color: rgba(34,197,94,0.4); color: #4ade80; }
.report-live-meta .live-dot {
    display: inline-block; width: 6px; height: 6px; background: #22c55e;
    border-radius: 50%; box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
    animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.85); } }
.report-live-meta .live-text { font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; font-size: 10px; }
.report-live-meta .live-sep { opacity: 0.4; }
.report-live-meta .live-time { font-family: monospace; font-weight: 600; }

/* ============================================================
   SECTION 30 — pages/login.css
   ============================================================ */
.login-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: var(--r-2xl);
    box-shadow: 0 25px 70px -18px rgba(79,70,229,0.3);
    border: 1px solid rgba(79,70,229,0.1);
    padding: var(--sp-xl);
}
body.dark .login-card {
    background: rgba(30,41,59,0.95);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 25px 70px -18px rgba(0,0,0,0.7);
}
body.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(ellipse at 18% 12%, rgba(99,102,241,0.16), transparent 42%),
        radial-gradient(ellipse at 85% 88%, rgba(20,184,166,0.13), transparent 40%),
        #f1f5f9;
    color: #1e293b;
}
body.auth-page.dark {
    background:
        radial-gradient(ellipse at 18% 12%, rgba(79,70,229,0.2), transparent 42%),
        radial-gradient(ellipse at 85% 88%, rgba(13,148,136,0.15), transparent 40%),
        #0f172a;
    color: #e2e8f0;
}
.auth-shell { width: min(100%, 28rem); flex: 0 1 28rem; }
.auth-shell .login-card { width: 100%; }
body.auth-page .theme-toggle:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 3px; }
@media (max-width: 480px) {
    body.auth-page { padding: 16px; }
    .auth-shell .login-card { padding: 1.5rem; }
}

/* ============================================================
   SECTION 31 — pages/dashboard.css
   ============================================================ */
.filter-payment-btn, .filter-status-btn {
    cursor: pointer; border-radius: var(--r-md); padding: var(--sp-sm) var(--sp-md);
    background: #fff; border: 1px solid var(--c-gray-200);
    transition: all var(--t-fast);
    display: flex; justify-content: space-between; align-items: center;
    gap: var(--sp-sm); font-size: var(--fs-sm); color: var(--c-black);
}
body.dark .filter-payment-btn, body.dark .filter-status-btn {
    background: var(--c-gray-800); border-color: var(--c-gray-600); color: var(--c-gray-200);
}
.filter-payment-btn:hover, .filter-status-btn:hover { border-color: var(--c-primary); background: var(--c-primary-bg); }
body.dark .filter-payment-btn:hover, body.dark .filter-status-btn:hover { background: var(--c-gray-700); }
.filter-payment-btn.active, .filter-status-btn.active { background: var(--c-primary-bg); border-color: var(--c-primary); color: var(--c-primary); font-weight: 600; }
body.dark .filter-payment-btn.active, body.dark .filter-status-btn.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.pagination { display: flex; justify-content: center; align-items: center; gap: var(--sp-sm); margin-top: var(--sp-md); flex-wrap: wrap; }
.pagination button, .pagination .page-btn {
    background: var(--c-gray-200); color: var(--c-gray-700); border: none;
    padding: 0.4rem 0.9rem; border-radius: var(--r-full);
    font-size: var(--fs-sm); cursor: pointer;
    transition: all var(--t-fast); font-weight: 500;
    min-height: 34px; font-family: inherit;
}
.pagination button:hover { background: var(--c-primary-bg); color: var(--c-primary); }
body.dark .pagination button, body.dark .pagination .page-btn { background: var(--c-gray-700); color: var(--c-gray-200); }
body.dark .pagination button:hover { background: var(--c-primary); color: #fff; }
.empty-state {
    text-align: center; padding: 2.5rem 1rem; color: var(--c-gray-400);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-sm);
}
.empty-state i, .empty-state .empty-icon { font-size: 2.5rem; display: block; opacity: 0.5; }
.empty-state p { font-size: var(--fs-sm); margin: 0; }
body.dark .empty-state { color: var(--c-gray-500); }
.action-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: var(--sp-xl); padding: var(--sp-md); }
.action-bar .btn { min-width: 140px; }
.product-manager-modal .product-manager-body { padding: 0.75rem !important; overflow-x: hidden !important; }
.product-manager-modal .table-responsive-full { width: 100%; overflow-x: visible !important; border-radius: var(--r-md); }
.product-manager-modal .data-table-compact { width: 100%; table-layout: auto; border-collapse: collapse; font-size: 11px; color: var(--c-black); }
body.dark .product-manager-modal .data-table-compact { color: #e2e8f0; }
.product-manager-modal .data-table-compact thead { background: var(--c-gray-100); }
body.dark .product-manager-modal .data-table-compact thead { background: var(--c-gray-800); }
.product-manager-modal .data-table-compact th, .product-manager-modal .data-table-compact td {
    padding: 4px 5px !important; white-space: normal !important; word-break: break-word;
    font-size: 11px; line-height: 1.3; vertical-align: middle;
    border-bottom: 1px solid var(--c-gray-200);
}
body.dark .product-manager-modal .data-table-compact th, body.dark .product-manager-modal .data-table-compact td { border-bottom-color: var(--c-gray-700); }
.product-manager-modal .data-table-compact th { white-space: nowrap !important; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; text-align: center; color: var(--c-black); }
body.dark .product-manager-modal .data-table-compact th { color: #f1f5f9; }
.product-manager-modal .data-table-compact img { max-width: 32px !important; max-height: 32px !important; width: 32px; height: 32px; object-fit: cover; border-radius: var(--r-sm); display: block; margin: 0 auto; }
.product-manager-modal .data-table-compact .qr-cell-wrap img { max-width: 28px !important; max-height: 28px !important; width: 28px; height: 28px; }
.product-manager-modal .data-table-compact .qr-download-btn { width: 16px; height: 16px; font-size: 8px; right: -4px; bottom: -4px; }

/* ============================================================
   SECTION 32 — pages/scan-popup.css
   ============================================================ */
.scan-popup-body { background: #0f172a; display: flex; align-items: center; justify-content: center; min-height: 100vh; margin: 0; padding: var(--sp-md); }
.scan-popup-container {
    background: #1e293b; border-radius: var(--r-xl); padding: var(--sp-lg);
    max-width: 500px; width: 100%; box-shadow: var(--shadow-2xl);
    border: 1px solid rgba(99,102,241,0.25);
}
.scan-popup-container video { width: 100%; border-radius: var(--r-md); background: #000; aspect-ratio: 4 / 3; object-fit: cover; }
.scan-popup-container .status { color: var(--c-gray-400); text-align: center; margin-top: var(--sp-md); font-size: var(--fs-sm); }
.scan-popup-container .result { color: var(--c-success); font-weight: 700; text-align: center; margin-top: var(--sp-md); font-size: var(--fs-lg); font-family: monospace; }
.scan-popup-container .controls { display: flex; justify-content: center; gap: var(--sp-sm); margin-top: var(--sp-md); flex-wrap: wrap; }
.scan-popup-container .file-upload-label {
    background: var(--c-primary); color: #fff; padding: 0.5rem 1.2rem;
    border-radius: var(--r-full); cursor: pointer; font-size: var(--fs-sm);
    font-weight: 500; display: inline-flex; align-items: center; gap: var(--sp-sm);
    transition: background var(--t-fast);
}
.scan-popup-container .file-upload-label:hover { background: var(--c-primary-h); }
.scan-popup-container input[type="file"] { display: none; }
.scan-popup-container .btn-close-popup {
    background: var(--c-danger); color: #fff; border: none;
    padding: 0.5rem 1.2rem; border-radius: var(--r-full);
    cursor: pointer; font-size: var(--fs-sm); font-weight: 500;
    display: inline-flex; align-items: center; gap: var(--sp-sm);
    transition: background var(--t-fast);
}
.scan-popup-container .btn-close-popup:hover { background: var(--c-danger-h); }
.btn-manual-input {
    background: var(--c-warning); color: #fff; padding: 0.5rem 1.2rem;
    border-radius: var(--r-full); border: none; cursor: pointer;
    font-weight: 500; transition: all var(--t-fast);
    display: inline-flex; align-items: center; gap: var(--sp-sm); font-size: var(--fs-sm);
}
.btn-manual-input:hover { background: var(--c-warning-h); }
.manual-input-box { background: #1e293b; padding: var(--sp-md); border-radius: var(--r-md); margin-top: var(--sp-sm); }

/* ============================================================
   SECTION 33 — pages/loan-info-window.css
   ------------------------------------------------------------
   v6.6 — Section ini KOSONG (no-op). Konten sudah di-merge
   ke Section 27 (loan-info-modal.css) sejak v6.4.
   Header dipertahankan HANYA sebagai penanda urutan indeks;
   tidak ada rule di sini. Jangan tambahkan rule baru —
   tambahkan ke Section 27.
   ============================================================ */

/* ============================================================
   SECTION 34 — themes/dark.css
   ============================================================ */
body.dark .bg-white { background-color: var(--c-gray-800) !important; }
body.dark .bg-slate-50 { background-color: var(--c-gray-800) !important; }
body.dark .bg-slate-100 { background-color: var(--c-gray-700) !important; }
body.dark .bg-slate-200 { background-color: var(--c-gray-600) !important; }
body.dark .bg-slate-700 { background-color: var(--c-gray-700) !important; }
body.dark .bg-slate-800 { background-color: var(--c-gray-800) !important; }
body.dark .bg-slate-900 { background-color: var(--c-gray-900) !important; }
body.dark .text-slate-800 { color: #f1f5f9 !important; }
body.dark .text-slate-700 { color: #e2e8f0 !important; }
body.dark .text-slate-600 { color: var(--c-gray-300) !important; }
body.dark .text-slate-500 { color: var(--c-gray-400) !important; }
body.dark .text-slate-400 { color: var(--c-gray-500) !important; }
body.dark .text-white { color: #ffffff !important; }
body.dark .border-gray-100 { border-color: var(--c-gray-700) !important; }
body.dark .border-gray-200 { border-color: var(--c-gray-600) !important; }
body.dark .border-gray-700 { border-color: var(--c-gray-500) !important; }
body.dark .btn-primary, body.dark .btn-success, body.dark .btn-danger,
body.dark .btn-warning, body.dark .btn-info { color: #fff !important; }

/* ============================================================
   SECTION 35 — responsive.css
   ============================================================ */
@media screen and (max-width: 1024px) { .container-app { padding: var(--sp-sm); } }
@media screen and (max-width: 768px) {
    :root { --fs-base: 0.9375rem; --fs-lg: 1.0625rem; }
    .nav-header { flex-direction: column; align-items: stretch; }
    .nav-header .nav-links { justify-content: center; }
    .header-print { flex-direction: column; align-items: center; text-align: center; }
    .header-print .shop-info { text-align: center; }
    #memberList { grid-template-columns: 1fr; }
}
@media screen and (max-width: 640px) {
    :root { --fs-base: 0.875rem; --fs-lg: 1rem; --fs-xl: 1.125rem; --fs-2xl: 1.25rem; --fs-3xl: 1.5rem; --sp-lg: 1rem; --sp-xl: 1.25rem; }
    .app-card, .glass-card { border-radius: var(--r-lg); padding: var(--sp-md); }
    .btn { padding: 0.5rem 0.95rem; font-size: var(--fs-sm); min-height: 38px; }
    .btn-sm { min-height: 32px; padding: 0.3rem 0.7rem; }
    input, select, textarea, .input-base { min-height: 38px; padding: 0.4rem 0.65rem; font-size: var(--fs-sm); }
    .stat-card .stat-value { font-size: var(--fs-xl); }
    .modal-box { max-width: 96vw; border-radius: var(--r-lg); }
    .scanner-modal { max-width: 96vw !important; }
    .modal-header, .modal-footer { padding: var(--sp-sm) var(--sp-md); }
    .modal-body { padding: var(--sp-md); }
    .data-table th, .data-table td { padding: var(--sp-xs) var(--sp-sm); font-size: var(--fs-xs); }
    .theme-toggle { top: var(--sp-md); right: var(--sp-md); width: 40px; height: 40px; }
    .action-bar .btn { min-width: 100%; }
    #memberList { grid-template-columns: 1fr; }
    .worker-photo-preview { width: 48px; height: 48px; }
}
@media screen and (max-width: 480px) {
    .stat-card { padding: var(--sp-sm); }
    .stat-card .stat-value { font-size: var(--fs-lg); }
    .slip-gaji-container .title { font-size: 16pt; }
    .slip-gaji-container .detail-table { font-size: 8pt; }
    .label-container { width: 100% !important; max-width: 100% !important; }
}

/* ============================================================
   SECTION 36 — print.css (WAJIB PALING AKHIR)
   ============================================================ */
@media print {
    *, *::before, *::after { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    @page { size: A4 portrait; margin: 0; }

    html { background: #fff !important; margin: 0 !important; padding: 0 !important; height: auto !important; overflow: visible !important; }
    body {
        margin: 0 !important; padding: 0 !important;
        background: transparent !important; color: #000 !important;
        overflow: visible !important; position: relative !important;
        height: auto !important; min-height: 297mm !important;
        width: 210mm !important; min-width: 210mm !important; max-width: 210mm !important;
    }
    body.dark, body[data-theme="dark"] { background: transparent !important; color: #000 !important; }

    .print-report-container, .slip-gaji-container, .loan-info-container,
    .preview-page-wrap, .info-window, .print-container {
        max-width: 100% !important; width: 100% !important;
        margin: 0 !important; padding: 5mm !important;
        box-shadow: none !important; border-radius: 0 !important;
        background: transparent !important;
    }

    .watermark-svg {
        display: block !important;
        position: fixed !important;
        top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
        width: 100vw !important; height: 100vh !important;
        margin: 0 !important; padding: 0 !important; border: 0 !important;
        opacity: 0.08 !important;
        z-index: -1 !important;
        pointer-events: none !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .watermark, .watermark-print { display: none !important; visibility: hidden !important; }

    .no-print, .btn, .btn-group, .btn-print, .btn-settings,
    .btn-print-browser, .btn-print-bluetooth, .btn-close, .btn-pdf,
    .theme-toggle, .action-bar, .nav-header, .running-text-container,
    .modal-overlay, .modal-photo, #memberSearchResults, #memberSearchWrapper,
    #settingsModal, #statusMessage, .print-controls, .pagination, .toggle-icon,
    .report-toolbar, .report-loading, .preview-actions {
        display: none !important;
    }

    .header-print {
        display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important;
        align-items: center !important; justify-content: space-between !important;
        text-align: left !important; gap: 12px !important;
        border-bottom: 2px solid #000 !important; padding-bottom: 10px !important;
        margin-bottom: 14px !important; cursor: default !important;
        page-break-inside: avoid !important; page-break-after: avoid !important;
    }
    .header-print .logo-wrap { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; text-align: left !important; gap: 10px !important; flex-shrink: 0 !important; }
    .header-print .logo-wrap > div { text-align: left !important; }
    .header-print h1, .header-print .sub { text-align: left !important; color: #000 !important; text-shadow: none !important; }
    .header-print .shop-info { text-align: right !important; margin-left: auto !important; color: #000 !important; text-shadow: none !important; flex-shrink: 0 !important; line-height: 1.4 !important; }
    .header-print .logo-box { background: #fff !important; border: 1px solid #000 !important; box-shadow: none !important; }

    .receipt-wrapper { max-width: 80mm !important; margin: 0 auto !important; padding: 0 !important; }
    .receipt {
        width: 80mm !important; max-width: 80mm !important;
        height: auto !important; min-height: 0 !important; max-height: none !important;
        margin: 0 !important; padding: 0.2mm 0.5mm !important;
        box-shadow: none !important; border-radius: 0 !important;
        background: transparent !important; color: #000 !important;
        font-size: 7pt !important; line-height: 1.3 !important;
        overflow: visible !important; page-break-inside: avoid !important;
    }
    .receipt pre { white-space: pre-wrap !important; word-break: break-word !important; font-size: 7pt !important; line-height: 1.3 !important; color: #000 !important; background: transparent !important; }

    .label-container {
        width: 80mm !important; max-width: 80mm !important;
        margin: 0 !important; padding: 2mm !important;
        background: transparent !important; color: #000 !important;
        box-shadow: none !important; border: none !important; border-radius: 0 !important;
        font-size: 7pt !important; line-height: 1.2 !important;
        page-break-inside: avoid !important;
    }
    .label-container * { color: #000 !important; box-shadow: none !important; }
    .label-header { border-bottom-color: #000 !important; }
    .label-header .shop-name { color: #000 !important; }
    .label-container .row, .label-container .product-name { color: #000 !important; }
    .qr-code { width: 26mm !important; max-width: 26mm !important; max-height: 26mm !important; }
    .product-photo-label { max-width: 26mm !important; max-height: 26mm !important; border: 0.5px solid #000 !important; }
    .product-code { color: #000 !important; background: transparent !important; }
    .footer-note { border-top-color: #000 !important; color: #000 !important; }

    .print-report-container .title { color: #000 !important; font-size: 16pt !important; }
    .print-report-container .subtitle { color: #333 !important; }
    .print-report-container .summary-table .label { background: var(--c-gray-100) !important; color: #000 !important; border: 1px solid #000 !important; }
    .print-report-container .summary-table .value { background: #fff !important; color: #000 !important; border: 1px solid #000 !important; }
    .print-report-container .summary-table .total-row .label,
    .print-report-container .summary-table .total-row .value { background: #dbeafe !important; color: #000 !important; }
    .print-report-container .data-table th { background: #e2e8f0 !important; color: #000 !important; border: 1px solid #000 !important; }
    .print-report-container .data-table td { border: 1px solid #000 !important; color: #000 !important; background: transparent !important; }
    .print-report-container .data-table tbody tr:nth-child(even) { background: transparent !important; }
    .print-report-container .footer-print { border-top: 1px solid #000 !important; color: #333 !important; }

    .stat-card-print, .stat-card { background: transparent !important; border: 1px solid #000 !important; color: #000 !important; box-shadow: none !important; transform: none !important; }
    .stat-card-print *, .stat-card * { color: #000 !important; }
    .stat-value-large, .stat-card .stat-value { color: #000 !important; }
    .stat-label-sm, .stat-card .stat-label { color: #333 !important; }
    .data-table { width: 100% !important; page-break-inside: auto !important; }
    .data-table thead { display: table-header-group; }
    .data-table tr { page-break-inside: avoid !important; }
    .data-table th { background: #e2e8f0 !important; color: #000 !important; border: 1px solid #000 !important; }
    .data-table td { border: 1px solid #000 !important; color: #000 !important; background: transparent !important; }
    .badge-status, .role-badge, .stat-badge, .badge-active, .badge-paid, .badge-payment { border: 1px solid #000 !important; color: #000 !important; background: transparent !important; }

    .slip-gaji-container { background: transparent !important; color: #000 !important; padding: 5mm !important; border-radius: 0 !important; box-shadow: none !important; }
    .slip-gaji-container * { color: #000 !important; }
    .slip-gaji-container .header-print { border-bottom: 2px solid #000 !important; }
    .slip-gaji-container .detail-table th { background: transparent !important; color: #000 !important; border: 1px solid #000 !important; }
    .slip-gaji-container .detail-table td { color: #000 !important; border: 1px solid #ccc !important; }
    .slip-gaji-container .detail-table .total-row { background: transparent !important; }
    .slip-gaji-container .detail-table .text-green-600 { color: var(--c-success-h) !important; }
    .slip-gaji-container .detail-table .text-red-600 { color: var(--c-danger-h) !important; }
    .slip-gaji-container .header-print .sub,
    .slip-gaji-container .header-print .shop-info,
    .slip-gaji-container .subtitle,
    .slip-gaji-container .info-table .label,
    .slip-gaji-container .ttd-section .ttd-label { color: #333 !important; }

    .chart-wrap, canvas { display: none !important; }
    .preview-page-wrap canvas { display: block !important; }

    .app-card, .glass-card, .stat-card, .member-item, .product-item, .pending-order-item,
    .loan-hero, .info-tile, .tl-item, .jaminan-wrap, .print-report-container, .slip-gaji-container {
        box-shadow: none !important; border-radius: 0 !important;
        background: transparent !important; color: #000 !important;
        border: 1px solid #ccc !important;
    }
    .loan-hero::before { display: none !important; }
    .info-tile, .tl-item { backdrop-filter: none !important; }
    .tl-item::before { background: #fff !important; }
    .mask-eye { display: none !important; }
    .mask-toggle-wrap { gap: 0 !important; }
    .mask-text[data-revealed="1"] { background: transparent !important; color: inherit !important; padding: 0 !important; font-weight: inherit !important; }
}

/* Screen: sembunyikan watermark SVG */
.watermark-svg { display: none; }

/* ============================================================
   SECTION 37 — components/reward-locked.css — v6.4
   ------------------------------------------------------------
   Layer 2 dari defense-in-depth untuk reward panel.

   Tujuan: MEMASTIKAN reward yang belum memenuhi syarat TIDAK
   BISA diinteraksi (klik/tap/focus) dengan cara apapun.

   Layer lain (defense-in-depth):
     - Layer 1 (HTML):  rewards.js render <span> icon, bukan <input>.
     - Layer 3 (JS):    events.js capture-phase blocker + re-verify.
     - Layer 4 (observer): childList observer memaksa lock.

   ⚠️ JANGAN hapus — kalau butuh toggle, override per-child.
   ============================================================ */
.reward-item-locked,
.reward-item-locked * {
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

.reward-item-locked {
    cursor: not-allowed;
}

.reward-item-locked:focus,
.reward-item-locked *:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* ============================================================
   SECTION 38 — components/reward-visual.css — v6.4
   ------------------------------------------------------------
   Integrasi VISUAL HADIAH di seluruh UI:
     • Badge reward di etalase produk (🎁 SYARAT / HADIAH)
     • Indikator reward di item keranjang
     • Baris "Anda hemat" dari hadiah aktif
     • Layout panel reward (multi-badge, scroll, dsb.)
   ------------------------------------------------------------
   Dipakai oleh:
     - products.js::_renderGridItem() → .product-reward-badge
     - cart.js::_renderCartItemHtml() → .cart-item-reward-*
     - cart.js::updateTotals() → #rewardSavingsRow
     - rewards.js::renderRewardPanel() → .reward-savings-line
   ============================================================ */

.product-img-wrap .product-badges-wrap {
    position: absolute;
    top: -6px; left: -6px;
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 4px;
    z-index: 3;
    pointer-events: none;
    max-width: 140%;
}

.product-reward-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 7px;
    border-radius: 9999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.4px;
    line-height: 1.1;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15), 0 0 0 2px rgba(255,255,255,0.9);
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
    animation: badgePop 0.35s cubic-bezier(0.16,1,0.3,1);
}

.product-reward-badge-hadiah {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.product-reward-badge-syarat {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #ffffff;
}

body.dark .product-reward-badge-hadiah {
    box-shadow: 0 2px 10px rgba(16,185,129,0.5), 0 0 0 2px rgba(30,41,59,0.95);
}
body.dark .product-reward-badge-syarat {
    box-shadow: 0 2px 10px rgba(139,92,246,0.5), 0 0 0 2px rgba(30,41,59,0.95);
}

.cart-item {
    transition: border-color var(--t-fast, 0.15s ease),
                background var(--t-fast, 0.15s ease);
    padding-left: 10px !important;
}

.cart-item-reward-eligible {
    background: linear-gradient(90deg, rgba(16,185,129,0.06) 0%, transparent 40%);
}
body.dark .cart-item-reward-eligible {
    background: linear-gradient(90deg, rgba(16,185,129,0.12) 0%, transparent 40%);
}

.cart-item-reward-pending {
    background: linear-gradient(90deg, rgba(245,158,11,0.05) 0%, transparent 40%);
}
body.dark .cart-item-reward-pending {
    background: linear-gradient(90deg, rgba(245,158,11,0.10) 0%, transparent 40%);
}

.cart-item-reward-badge {
    line-height: 1;
    border: 1px solid transparent;
}

.reward-savings-line {
    animation: fadeSlideUp 0.3s ease-out;
}

.reward-panel {
    max-height: 320px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #f59e0b transparent;
}
.reward-panel::-webkit-scrollbar { width: 6px; }
.reward-panel::-webkit-scrollbar-thumb {
    background: #f59e0b;
    border-radius: 999px;
    opacity: 0.6;
}
.reward-panel::-webkit-scrollbar-thumb:hover { background: #d97706; }

.reward-item-eligible {
    transition: background-color var(--t-fast, 0.15s ease);
}
.reward-item-eligible:has(input:checked) {
    background: rgba(16,185,129,0.06);
}
body.dark .reward-item-eligible:has(input:checked) {
    background: rgba(16,185,129,0.12);
}

/* ============================================================
   SECTION 39 — components/unlimited-stock.css — v1.0
   ------------------------------------------------------------
   Styling untuk checkbox "♾️ Tidak Terbatas" di modal master.
   Hanya muncul untuk tipe `jumlah_produk` & `isi_kemasan`.

   Dipakai oleh:
     - modals/modals.php  → #masterUnlimitedWrapper
     - master.js v7.1     → toggle + handler visual name wrapper
   ============================================================ */

.unlimited-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 1rem;
    border: 2px dashed #a5b4fc;
    background: linear-gradient(135deg,
        #eef2ff 0%,
        #f5f3ff 50%,
        #fdf2f8 100%);
    cursor: pointer;
    user-select: none;
    transition: border-color .2s ease,
                box-shadow .2s ease,
                transform .2s ease,
                background .2s ease;
    position: relative;
    overflow: hidden;
}

body.dark .unlimited-card {
    border-color: #4f46e5;
    background: linear-gradient(135deg,
        rgba(30, 27, 75, 0.55) 0%,
        rgba(59, 7, 100, 0.45) 50%,
        rgba(80, 7, 36, 0.35) 100%);
}

.unlimited-card:hover {
    border-color: #6366f1;
    box-shadow: 0 10px 25px -8px rgba(79, 70, 229, 0.35),
                0 0 0 1px rgba(99, 102, 241, 0.15);
    transform: scale(1.01);
}

body.dark .unlimited-card:hover {
    border-color: #818cf8;
    box-shadow: 0 10px 25px -8px rgba(129, 140, 248, 0.4),
                0 0 0 1px rgba(129, 140, 248, 0.25);
}

.unlimited-checkbox:checked ~ .unlimited-content .unlimited-title {
    color: #4338ca;
}

body.dark .unlimited-checkbox:checked ~ .unlimited-content .unlimited-title {
    color: #c7d2fe;
}

.unlimited-card:has(.unlimited-checkbox:checked) {
    border-color: #4f46e5;
    border-style: solid;
    box-shadow: 0 8px 20px -6px rgba(79, 70, 229, 0.4),
                0 0 0 3px rgba(99, 102, 241, 0.15);
}

body.dark .unlimited-card:has(.unlimited-checkbox:checked) {
    border-color: #818cf8;
    box-shadow: 0 8px 20px -6px rgba(129, 140, 248, 0.5),
                0 0 0 3px rgba(129, 140, 248, 0.25);
}

.unlimited-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #4f46e5;
}

.unlimited-content {
    flex: 1 1 auto;
    min-width: 0;
}

.unlimited-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.unlimited-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: inline-block;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.5));
}

.unlimited-title {
    font-weight: 800;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    color: #4338ca;
    transition: color .2s ease;
}

body.dark .unlimited-title {
    color: #a5b4fc;
}

.unlimited-card:hover .unlimited-title {
    color: #312e81;
}

body.dark .unlimited-card:hover .unlimited-title {
    color: #c7d2fe;
}

.unlimited-badge {
    margin-left: auto;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: #4f46e5;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
    letter-spacing: 0.05em;
    white-space: nowrap;
    flex-shrink: 0;
}

.unlimited-hint {
    font-size: 0.75rem;
    color: #475569;
    line-height: 1.5;
    margin: 0;
}

body.dark .unlimited-hint {
    color: #94a3b8;
}

.unlimited-hint-strong {
    color: #4338ca;
    font-weight: 700;
}

body.dark .unlimited-hint-strong {
    color: #a5b4fc;
}

.master-name-wrapper {
    transition: opacity .25s ease, filter .25s ease;
}

.master-name-wrapper.master-name-dimmed {
    opacity: 0.35;
    pointer-events: none;
    filter: grayscale(0.6);
    user-select: none;
}

@keyframes pulseSoft {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
        filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.5));
    }
    50% {
        transform: scale(1.15) rotate(-3deg);
        opacity: 0.85;
        filter: drop-shadow(0 0 12px rgba(129, 140, 248, 0.85));
    }
}

.animate-pulse-soft {
    animation: pulseSoft 2.2s ease-in-out infinite;
    transform-origin: center;
}

@media (prefers-reduced-motion: reduce) {
    .animate-pulse-soft {
        animation: none;
    }
}

/* ============================================================
   SECTION 40 — components/product-promo-badges.css — v1.1
   ------------------------------------------------------------
   Badges promo (diskon & hadiah) pada kartu produk etalase.

   Sebelumnya (v6.5):
     Diposisikan sebagai overlay `position: absolute` di dalam
     `.product-img-wrap` (top-left -6px, z-index 3)
     → sebagian foto produk TERTUTUP.

   Sejak (v1.0 / products.js v9.1):
     Badges dirender DI LUAR `.product-img-wrap`, sebagai baris
     horizontal (flex-wrap) di BAWAH gambar, sebelum nama produk.
     Foto produk 100% terlihat.

   Struktur HTML baru (products.js v9.1):
     .product-item
       ├── .badge-inactive        (absolute, top-right) — nonaktif
       ├── .product-img-wrap      (foto saja, tidak tertutup)
       ├── .product-badges-wrap   ← section ini men-style ini
       ├── .product-name
       ├── .product-price
       └── .product-stock

   Ruang lingkup:
     Selector di sini menggunakan prefix `.product-badges-wrap`
     (TIDAK `.product-img-wrap`) karena badges sudah keluar dari
     wrapper lama. Section 16 & 38 tetap ada untuk BC — bila ada
     halaman lain yang masih merender badge di dalam img-wrap.

   v6.6 FIX:
     • Hapus `overflow: hidden` pada `.product-img-wrap` —
       TIDAK menimpa Section 16. Radius visual sudah di-handle
       oleh `.product-img` sendiri (border-radius: var(--r-md)).
       Dengan `overflow: visible`, badge legacy (Section 16) yang
       dirender DI DALAM img-wrap tidak akan ter-clip.
     • Hapus `min-height: 230px` pada `.product-item` — dead-code.
       Section 41 sudah set `min-height: auto` untuk #productGrid,
       grid lain tetap 210px dari Section 16.
   ============================================================ */

.product-badges-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    margin: 2px 0 var(--sp-xs, 0.25rem);
    pointer-events: none;
    animation: badgePop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-badges-wrap .badge-discount {
    position: static;
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 3px;
    top: auto;
    left: auto;
    z-index: auto;
    max-width: 100%;
    pointer-events: none;
    animation: none;
    transition: none;
}

.product-badges-wrap .badge-discount-pct,
.product-badges-wrap .badge-discount-qty,
.product-badges-wrap .badge-discount-info {
    position: static;
    margin: 0;
}

.product-badges-wrap .badge-discount-pct {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.3px;
    padding: 3px 7px;
    border-radius: var(--r-full, 9999px);
    box-shadow: 0 1px 4px rgba(220, 38, 38, 0.28);
    line-height: 1.1;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

body.dark .product-badges-wrap .badge-discount-pct {
    box-shadow: 0 1px 6px rgba(220, 38, 38, 0.55);
}

.product-badges-wrap .badge-discount-qty {
    display: inline-block;
    background: rgba(255, 255, 255, 0.95);
    color: #991b1b;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.2px;
    padding: 1px 6px;
    border-radius: var(--r-full, 9999px);
    border: 1px solid rgba(220, 38, 38, 0.35);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    line-height: 1.3;
    white-space: nowrap;
}

body.dark .product-badges-wrap .badge-discount-qty {
    background: rgba(30, 41, 59, 0.95);
    color: #fca5a5;
    border-color: rgba(220, 38, 38, 0.5);
}

.product-badges-wrap .badge-discount-info {
    display: inline-block;
    background: rgba(16, 185, 129, 0.92);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.2px;
    padding: 1px 7px;
    border-radius: var(--r-full, 9999px);
    border: 1px solid rgba(16, 185, 129, 0.5);
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.28);
    line-height: 1.3;
    white-space: nowrap;
}

body.dark .product-badges-wrap .badge-discount-info {
    background: rgba(6, 95, 70, 0.92);
    color: #a7f3d0;
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 1px 4px rgba(6, 95, 70, 0.6);
}

.product-badges-wrap .product-reward-badge {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 7px;
    border-radius: var(--r-full, 9999px);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.4px;
    line-height: 1.1;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: none;
}

.product-badges-wrap .product-reward-badge-hadiah {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.product-badges-wrap .product-reward-badge-syarat {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #ffffff;
}

body.dark .product-badges-wrap .product-reward-badge-hadiah {
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.5);
}
body.dark .product-badges-wrap .product-reward-badge-syarat {
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.5);
}

/* ---- Responsive: beri jarak lebih kecil pada layar sempit ---- */
@media (max-width: 640px) {
    .product-badges-wrap {
        gap: 3px;
        margin-top: 1px;
    }
    .product-badges-wrap .badge-discount-pct,
    .product-badges-wrap .product-reward-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
    .product-badges-wrap .badge-discount-qty,
    .product-badges-wrap .badge-discount-info {
        font-size: 8px;
        padding: 1px 5px;
    }
}

/* ============================================================
   SECTION 41 — components/product-card-compact.css — v1.0
   ------------------------------------------------------------
   Layout kartu produk etalase (#productGrid) — COMPACT GROUP.

   Masalah (v6.5 / Section 16):
     .product-item pakai `justify-content: space-between`
     + `.product-name` pakai `flex: 1` + `min-height: 210px`.

     Akibat: untuk produk dengan nama pendek (mis. "Madu Hutan
     Asli 500ml"), elemen-elemen kartu di-PUSH ke tepi atas &
     tepi bawah → muncul RUANG KOSONG BESAR di tengah kartu.
     Foto, nama, harga, dan stok terlihat "terpisah jauh".

   Solusi (Section 41):
     • `justify-content: flex-start` — semua elemen mengalir
       dari atas, tidak dipaksa menyebar.
     • `gap: 6px` — spacing seragam antar elemen (foto, badges,
       nama, harga, stok).
     • Hilangkan `flex: 1` pada .product-name → nama tidak
       menyerap ruang kosong.
     • `min-height: auto` — biarkan tinggi mengikuti konten.
     • `height: 100%` tetap → agar grid tetap sejajar antar baris.

   Hasil: foto + badges + nama + harga + stok membentuk SATU
   kelompok rapat. Ruang kosong vertikal hanya jika ada elemen
   lain (mis. badges) yang mengisi.

   Ruang lingkup: HANYA #productGrid → .product-item.
   Halaman lain (stock table, manager modal) tidak terpengaruh.
   ============================================================ */

#productGrid .product-item {
    justify-content: flex-start;
    gap: 6px;
    min-height: auto;
    height: 100%;
    padding: var(--sp-md);
}

#productGrid .product-item .product-name {
    flex: 0 0 auto;
    margin-bottom: 0;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
    width: 100%;
    word-break: break-word;
}

#productGrid .product-item .product-price {
    margin-top: 0;
}

#productGrid .product-item .product-stock {
    margin-top: 0;
}

#productGrid .product-item .product-img-wrap {
    margin-bottom: 0;
}

#productGrid .product-item .product-badges-wrap {
    margin-top: 0;
    margin-bottom: 0;
}

@media (max-width: 640px) {
    #productGrid .product-item {
        gap: 4px;
        padding: var(--sp-sm);
    }
    #productGrid .product-item .product-name {
        min-height: 2.4em;
    }
}

/* ============================================================
   SECTION 42 — MEMBER STATS VERTICAL GROUP
   ------------------------------------------------------------
   Layout: Bln:/Thn: label di atas, 2 baris stats di bawahnya.
   Digunakan oleh: assets/js/modules/members.js::_renderCard()

   Struktur HTML:
     .member-stats-group
       ├── .member-stats-label  (Bln: / Thn:)
       └── .member-stats-lines
             ├── .member-stat-line.stat-tx   (🛒 N / Rp X)
             └── .member-stat-line.stat-loan (📉 N / Rp Y)
   ============================================================ */
.member-stats-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(241, 245, 249, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.04);
    min-width: 0;
}

body.dark .member-stats-group {
    background: rgba(30, 41, 59, 0.55);
    border-color: rgba(255, 255, 255, 0.05);
}

.member-stats-group .member-stats-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--c-gray-600, #475569);
    line-height: 1;
    margin-bottom: 1px;
}

body.dark .member-stats-group .member-stats-label {
    color: #94a3b8;
}

.member-stats-group .member-stats-lines {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.member-stats-group .member-stat-line {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 10.5px;
    line-height: 1.35;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-stats-group .member-stat-line strong {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.member-stats-group .member-stat-line.stat-tx {
    background: rgba(79, 70, 229, 0.10);
    color: #4338ca;
}

.member-stats-group .member-stat-line.stat-loan {
    background: rgba(239, 68, 68, 0.10);
    color: #b91c1c;
}

body.dark .member-stats-group .member-stat-line.stat-tx {
    background: rgba(129, 140, 248, 0.16);
    color: #a5b4fc;
}

body.dark .member-stats-group .member-stat-line.stat-loan {
    background: rgba(248, 113, 113, 0.16);
    color: #fca5a5;
}

/* ============================================================
   ORDER QUEUE — RICH VISUAL CARD (v2.0)
   ------------------------------------------------------------
   Styling untuk modules/order-queue.js v2.0.
   Load via renderAppHeadAssets() — sudah include main.css.
   ============================================================ */

#orderQueueBadge.order-badge-active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: orderBadgePulse 1.6s ease-in-out infinite;
}
@keyframes orderBadgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    50%      { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.order-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 9999px;
    border: 1px solid var(--c-gray-200, #e2e8f0);
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: var(--c-gray-600, #475569);
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
    font-family: inherit;
}
body.dark .order-filter-btn {
    background: var(--c-gray-800, #1e293b);
    border-color: var(--c-gray-600, #475569);
    color: var(--c-gray-300, #cbd5e1);
}
.order-filter-btn:hover {
    border-color: var(--c-primary, #4f46e5);
    color: var(--c-primary, #4f46e5);
    transform: translateY(-1px);
}
body.dark .order-filter-btn:hover {
    background: var(--c-gray-700, #334155);
    color: #a5b4fc;
}
.order-filter-btn.order-filter-active {
    background: var(--c-primary, #4f46e5);
    border-color: var(--c-primary, #4f46e5);
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}
body.dark .order-filter-btn.order-filter-active {
    background: var(--c-primary, #4f46e5);
    color: #fff;
    box-shadow: 0 2px 8px rgba(129, 140, 248, 0.4);
}

.order-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--c-gray-200, #e2e8f0);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all .18s ease;
    overflow: hidden;
}
body.dark .order-card {
    background: var(--c-gray-800, #1e293b);
    border-color: var(--c-gray-700, #334155);
}
.order-card:hover {
    border-color: var(--c-primary-l, #818cf8);
    box-shadow: 0 6px 18px -6px rgba(79, 70, 229, 0.25);
    transform: translateY(-1px);
}
.order-card.order-card-new {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(90deg,
        rgba(245, 158, 11, 0.04) 0%,
        transparent 40%);
}
body.dark .order-card.order-card-new {
    background: linear-gradient(90deg,
        rgba(245, 158, 11, 0.10) 0%,
        transparent 40%);
}

.order-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.order-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: var(--c-primary, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
body.dark .order-card-icon {
    background: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%);
    color: #a5b4fc;
}

.order-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}
.order-chip-new {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}
.order-chip-verified {
    background: #d1fae5;
    color: #065f46;
}
body.dark .order-chip-verified {
    background: rgba(6, 78, 59, 0.5);
    color: #6ee7b7;
}
.order-chip-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: orderChipDot 1.2s ease-in-out infinite;
}
@keyframes orderChipDot {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

.order-card-customer {
    padding: 8px 10px;
    background: rgba(248, 250, 252, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}
body.dark .order-card-customer {
    background: rgba(15, 23, 42, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
}

.order-card-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(241, 245, 249, 0.6);
    border-radius: 10px;
}
body.dark .order-card-items {
    background: rgba(15, 23, 42, 0.35);
}
.order-card-items > div {
    line-height: 1.4;
}

.order-card-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    padding-top: 6px;
    border-top: 1px dashed rgba(0, 0, 0, 0.06);
}
body.dark .order-card-foot {
    border-top-color: rgba(255, 255, 255, 0.08);
}
.order-card-total {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.order-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.order-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all .15s ease;
    line-height: 1.2;
    min-height: 32px;
    font-family: inherit;
    white-space: nowrap;
}
.order-action:hover  { transform: translateY(-1px); }
.order-action:active { transform: translateY(0); }

.order-action-view {
    background: rgba(241, 245, 249, 1);
    color: var(--c-gray-700, #334155);
    border: 1px solid var(--c-gray-200, #e2e8f0);
}
.order-action-view:hover {
    background: var(--c-primary-bg, #eef2ff);
    color: var(--c-primary, #4f46e5);
    border-color: var(--c-primary, #4f46e5);
}
body.dark .order-action-view {
    background: var(--c-gray-700, #334155);
    color: var(--c-gray-200, #e2e8f0);
    border-color: var(--c-gray-600, #475569);
}
body.dark .order-action-view:hover {
    background: #312e81;
    color: #c7d2fe;
    border-color: #4f46e5;
}

.order-action-verify {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}
.order-action-verify:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5);
}

.order-action-reject {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
    min-width: 32px;
    padding: 6px 9px;
}
.order-action-reject:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.5);
}

.cash-payment-slide,
.cash-payment-rate {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--c-gray-600, #475569);
    font-size: 10px;
    font-weight: 700;
    text-align: left;
}
.cash-payment-slide {
    min-width: 190px;
    padding: 7px 10px 6px;
    border: 1px solid rgba(16, 185, 129, .28);
    border-radius: 12px;
    background: rgba(16, 185, 129, .07);
}
.cashier-payment-slider {
    width: 100%;
    height: 24px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 9999px;
    outline: none;
    cursor: grab;
    background: linear-gradient(90deg, #10b981 var(--cash-slide-progress, 0%), #d1d5db var(--cash-slide-progress, 0%));
    transition: background .15s ease, opacity .2s ease;
}
.cashier-payment-slider:active { cursor: grabbing; }
.cashier-payment-slider::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    appearance: none;
    -webkit-appearance: none;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #059669;
    box-shadow: 0 2px 7px rgba(5, 150, 105, .35);
}
.cashier-payment-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #059669;
    box-shadow: 0 2px 7px rgba(5, 150, 105, .35);
}
.cashier-payment-slider:disabled { opacity: .6; cursor: wait; }
.cash-payment-rate { min-width: 125px; }
.cash-payment-rate input { width: 100%; min-height: 34px; font-size: 12px; }
body.dark .cash-payment-slide {
    color: var(--c-gray-200, #e2e8f0);
    border-color: rgba(52, 211, 153, .24);
    background: rgba(16, 185, 129, .12);
}
body.dark .cashier-payment-slider {
    background: linear-gradient(90deg, #059669 var(--cash-slide-progress, 0%), #475569 var(--cash-slide-progress, 0%));
}

#orderQueueList:has(.order-card) {
    animation: none;
}

@media (max-width: 480px) {
    .order-card-foot {
        flex-direction: column;
        align-items: stretch;
    }
    .order-card-actions {
        justify-content: stretch;
    }
    .order-action-view,
    .order-action-verify {
        flex: 1;
    }
    .order-action-reject {
        flex-shrink: 0;
    }
}

@media print {
    #orderQueueContainer { display: none !important; }
}

/* ============================================================
   SECTION 44 — CART ITEM LAYOUT (v11.4 FIX)
   ------------------------------------------------------------
   Root cause "produk tidak tampil di keranjang":
     `.cart-item` di Section 38 hanya punya `transition` +
     `padding-left: 10px` — TIDAK ADA `display: flex`,
     TIDAK ADA sizing untuk anak-anaknya.

   Akibat:
     • `.cart-item-img` block penuh lebar → `<img src="">`
       (broken) tampil sebagai block besar tanpa constraint.
     • `.cart-item-qty`, `.cart-remove-btn` stack vertikal.
     • Setiap item bisa setinggi 200-400px → container
       `max-h-[380px]` hanya cukup untuk 1 item, sisanya
       tersembunyi di scroll (user persepsikan "tidak muncul").

   Fix:
     • `.cart-item` → `display: flex` (row, align-center, gap).
     • `.cart-item-img` → fixed 48×48, object-cover, overflow-hidden.
     • `.cart-item-body` → flex-1 min-w-0 (fill sisa).
     • `.cart-item-qty` + `.cart-remove-btn` → shrink-0.
     • Responsive: <480px → wrap body ke bawah, qty row sendiri.

   Scoped selector `#cartItemsContainer` → tidak bocor ke
   halaman lain yang mungkin render `.cart-item` legacy.
   ============================================================ */

#cartItemsContainer {
    display: block !important;
    min-height: 80px;
}

.cart-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 12px !important;
    background: #ffffff;
    border: 1px solid var(--c-gray-200, #e2e8f0);
    border-radius: 10px;
    margin-bottom: 8px;
    position: relative;
    transition: border-color var(--t-fast, 0.15s ease),
                background var(--t-fast, 0.15s ease),
                box-shadow var(--t-fast, 0.15s ease);
}

.cart-item:last-child {
    margin-bottom: 0;
}

body.dark .cart-item,
body[data-theme="dark"] .cart-item {
    background: var(--c-gray-800, #1e293b);
    border-color: var(--c-gray-700, #334155);
}

.cart-item:hover {
    border-color: var(--c-primary-l, #818cf8);
    box-shadow: 0 2px 8px -2px rgba(79, 70, 229, 0.15);
}

/* ── Image slot (48×48 fixed) ── */
.cart-item-img {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--c-gray-100, #f1f5f9);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

body.dark .cart-item-img,
body[data-theme="dark"] .cart-item-img {
    background: var(--c-gray-700, #334155);
    border-color: rgba(255, 255, 255, 0.05);
}

/* ── Body (fill remaining space) ── */
.cart-item-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-item-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--c-black, #1e293b);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
}

body.dark .cart-item-name,
body[data-theme="dark"] .cart-item-name {
    color: #f1f5f9;
}

.cart-item-price {
    font-size: 11px;
    color: var(--c-gray-500, #64748b);
    line-height: 1.2;
}

body.dark .cart-item-price,
body[data-theme="dark"] .cart-item-price {
    color: var(--c-gray-400, #94a3b8);
}

.cart-item-packinfo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
}

.cart-item-subtotal {
    font-weight: 800;
    color: var(--c-success-h, #16a34a);
    font-size: 13px;
    margin-top: 3px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

body.dark .cart-item-subtotal,
body[data-theme="dark"] .cart-item-subtotal {
    color: #4ade80;
}

/* ── Qty stepper ── */
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.cart-qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--c-gray-100, #f1f5f9);
    border: 1px solid var(--c-gray-200, #e2e8f0);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--c-gray-700, #334155);
    padding: 0;
    transition: all var(--t-fast, 0.15s ease);
    line-height: 1;
    font-family: inherit;
}

.cart-qty-btn:hover {
    background: var(--c-primary-bg, #eef2ff);
    color: var(--c-primary, #4f46e5);
    border-color: var(--c-primary, #4f46e5);
    transform: scale(1.08);
}

.cart-qty-btn:active {
    transform: scale(0.92);
}

body.dark .cart-qty-btn,
body[data-theme="dark"] .cart-qty-btn {
    background: var(--c-gray-700, #334155);
    border-color: var(--c-gray-600, #475569);
    color: #cbd5e1;
}

body.dark .cart-qty-btn:hover,
body[data-theme="dark"] .cart-qty-btn:hover {
    background: #312e81;
    color: #a5b4fc;
    border-color: #4f46e5;
}

.cart-qty-input {
    width: 34px;
    height: 26px;
    text-align: center;
    border: 1px solid var(--c-gray-200, #e2e8f0);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    padding: 0;
    background: #ffffff;
    color: var(--c-black, #1e293b);
    font-family: inherit;
    -moz-appearance: textfield;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

body.dark .cart-qty-input,
body[data-theme="dark"] .cart-qty-input {
    background: var(--c-gray-900, #0f172a);
    border-color: var(--c-gray-600, #475569);
    color: #f1f5f9;
}

/* ── Remove button ── */
.cart-remove-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--c-danger, #ef4444);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    padding: 0;
    transition: all var(--t-fast, 0.15s ease);
    line-height: 1;
    font-family: inherit;
}

.cart-remove-btn:hover {
    background: var(--c-danger-bg, #fee2e2);
    color: var(--c-danger-h, #dc2626);
    transform: scale(1.12);
}

body.dark .cart-remove-btn:hover,
body[data-theme="dark"] .cart-remove-btn:hover {
    background: rgba(127, 26, 26, 0.4);
    color: #fca5a5;
}

/* ── Empty state ── */
.cart-empty {
    text-align: center;
    padding: 24px 16px;
    color: var(--c-gray-400, #94a3b8);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 100px;
}

.cart-empty i {
    font-size: 32px;
    opacity: 0.5;
    display: block;
}

.cart-empty p {
    margin: 0;
    font-weight: 500;
    color: inherit;
}

.cart-empty small {
    display: block;
    font-size: 11px;
    margin-top: 2px;
    line-height: 1.4;
    word-break: break-word;
}

/* ── Responsive: 2-row layout on narrow phones ── */
@media (max-width: 480px) {
    .cart-item {
        flex-wrap: wrap;
        padding: 10px !important;
    }

    .cart-item-body {
        flex: 1 1 calc(100% - 60px);
        min-width: 0;
    }

    .cart-item-qty {
        margin-left: 58px;
        margin-top: 2px;
    }

    .cart-remove-btn {
        position: absolute;
        top: 8px;
        right: 8px;
    }
}

/* ============================================================
   SECTION 99 — IMG SIZE FALLBACK (v1.0)
   ------------------------------------------------------------
   Defensive CSS: pastikan gambar dengan class Tailwind populer
   TIDAK oversize, meski tailwind-built.css gagal load sebagian.

   Ini "redundant safety net" — kalau Tailwind build lengkap,
   rule ini di-override oleh utility class (specificity sama,
   file tailwind di-load lebih dulu).
   ============================================================ */

img.w-8   { width: 2rem !important;     height: 2rem !important;     object-fit: cover; }
img.w-10  { width: 2.5rem !important;   height: 2.5rem !important;   object-fit: cover; }
img.w-12  { width: 3rem !important;     height: 3rem !important;     object-fit: cover; }
img.w-14  { width: 3.5rem !important;   height: 3.5rem !important;   object-fit: cover; }
img.w-16  { width: 4rem !important;     height: 4rem !important;     object-fit: cover; }
img.w-20  { width: 5rem !important;     height: 5rem !important;     object-fit: cover; }

img.member-photo-preview,
img.worker-photo-preview,
img.photo-preview {
    width: 56px !important;
    height: 56px !important;
    object-fit: cover;
    border-radius: 50%;
}

img.product-img-preview {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover;
}

.label-container img.product-photo-label {
    max-width: 26mm !important;
    max-height: 26mm !important;
    object-fit: contain;
}

img.jaminan-img,
img.jaminan-thumb {
    max-width: 120px !important;
    max-height: 120px !important;
    object-fit: cover;
}

.header-print .logo-box img,
.nav-header .logo-box img,
.app-header-bar .logo-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

img:not([data-zoom-skip]) {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   SECTION 43 — V10.0 ENHANCEMENTS (FIX #2, #5, #6)
   ------------------------------------------------------------
   • FIX #2 — Price unit label (.price-unit)
   • FIX #5 — (no CSS change — resolved di JS)
   • FIX #6 — Enhanced reward badge (.product-reward-badge-pulse)
              + detail line (.product-reward-detail)
   ============================================================ */

/* ============================================================
   FIX #2 — LABEL HARGA + SATUAN
   ------------------------------------------------------------
   Contoh output:
     Rp 50.000 / Ml
     Rp 15.000 / Botol
     Rp 2.500 / Bungkus
   ============================================================ */
.product-item .product-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    flex-wrap: wrap;
    line-height: 1.2;
}
.product-item .product-price .price-unit {
    display: inline-block;
    font-size: 0.72em;
    font-weight: 500;
    color: var(--c-gray-500);
    opacity: 0.9;
    letter-spacing: 0.15px;
    white-space: nowrap;
}
body.dark .product-item .product-price .price-unit {
    color: var(--c-gray-400);
    opacity: 0.85;
}

/* ============================================================
   FIX #6 — ENHANCED REWARD BADGE
   ------------------------------------------------------------
   Pulse animation halus + detail line di bawah badge.
   ============================================================ */

/* ---- Pulse halus untuk badge hadiah (hijau) ---- */
@keyframes rewardBadgePulseHijau {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(16,185,129,0.35),
                    0 0 0 0 rgba(16,185,129,0.55);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 14px rgba(16,185,129,0.55),
                    0 0 0 7px rgba(16,185,129,0);
    }
}

/* ---- Pulse halus untuk badge syarat (ungu) ---- */
@keyframes rewardBadgePulseUngu {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(139,92,246,0.35),
                    0 0 0 0 rgba(139,92,246,0.55);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 14px rgba(139,92,246,0.55),
                    0 0 0 7px rgba(139,92,246,0);
    }
}

.product-reward-badge.product-reward-badge-pulse.product-reward-badge-hadiah {
    animation: rewardBadgePulseHijau 2.4s ease-in-out infinite;
    transform-origin: center;
}
.product-reward-badge.product-reward-badge-pulse.product-reward-badge-syarat {
    animation: rewardBadgePulseUngu 2.4s ease-in-out infinite;
    transform-origin: center;
}

/* Aksesibilitas: matikan animasi saat user prefer reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .product-reward-badge-pulse { animation: none !important; }
}

/* ---- Detail line di bawah badge ---- */
.product-reward-detail {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    padding: 2px 8px;
    border-radius: var(--r-full, 9999px);
    line-height: 1.35;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: fadeSlideUp 0.4s ease-out;
}
.product-reward-detail i {
    font-size: 9px;
    flex-shrink: 0;
}
.product-reward-detail strong {
    font-weight: 800;
}

/* ---- Varian HADIAH (hijau) ---- */
.product-reward-detail.product-reward-detail-hadiah {
    background: linear-gradient(90deg,
        rgba(16,185,129,0.15) 0%,
        rgba(16,185,129,0.05) 100%);
    color: #047857;
    border: 1px solid rgba(16,185,129,0.35);
    box-shadow: 0 1px 3px rgba(16,185,129,0.15);
}
body.dark .product-reward-detail.product-reward-detail-hadiah {
    background: linear-gradient(90deg,
        rgba(6,95,70,0.35) 0%,
        rgba(6,95,70,0.15) 100%);
    color: #6ee7b7;
    border-color: rgba(16,185,129,0.4);
}

/* ---- Varian SYARAT (ungu) ---- */
.product-reward-detail.product-reward-detail-syarat {
    background: linear-gradient(90deg,
        rgba(139,92,246,0.15) 0%,
        rgba(139,92,246,0.05) 100%);
    color: #6d28d9;
    border: 1px solid rgba(139,92,246,0.35);
    box-shadow: 0 1px 3px rgba(139,92,246,0.15);
}
body.dark .product-reward-detail.product-reward-detail-syarat {
    background: linear-gradient(90deg,
        rgba(76,29,149,0.35) 0%,
        rgba(76,29,149,0.15) 100%);
    color: #c4b5fd;
    border-color: rgba(139,92,246,0.4);
}

/* ---- Print: netral ---- */
@media print {
    .product-reward-badge-pulse { animation: none !important; }
    .product-reward-detail {
        background: transparent !important;
        border-color: #000 !important;
        color: #000 !important;
        box-shadow: none !important;
    }
}

/* ============================================================
   SECTION 55 — PHOTO OVERLAY BADGES (DISCOUNT & REWARD)
   ------------------------------------------------------------
   Overlay langsung di atas foto produk etalase.
   ============================================================ */
.product-img-wrap {
    position: relative !important;
}

.photo-badge {
    position: absolute !important;
    z-index: 30 !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    padding: 3px 6px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    max-width: 92% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.45) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3.5px !important;
    pointer-events: none !important;
    letter-spacing: 0.2px !important;
}

.photo-badge-discount {
    top: 4px !important;
    left: 4px !important;
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.9) !important;
}

.photo-badge-reward {
    bottom: 4px !important;
    left: 4px !important;
    max-width: calc(100% - 8px) !important;
    font-size: 8.5px !important;
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.9) !important;
    pointer-events: auto !important;
    cursor: default !important;
}

body.dark .photo-badge-discount {
    border-color: rgba(254,202,202,0.6);
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

body.dark .photo-badge-reward {
    border-color: rgba(167,243,208,0.6);
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}
