@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================================
   iFinance Pro — Premium Claymorphism Light Theme
   Design System: Clean White with 3D Embossed/Debossed Clay Effects
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }

body {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif !important;
    letter-spacing: -0.01em;
}

/* --- Typography --- */
.font-outfit {
    font-family: 'Outfit', sans-serif !important;
}

/* --- Custom Scrollbar (Clay Light) --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================================
   CARDS — 3D Inflated White Claymorphism
   ============================================================ */
.clay-card {
    background: #ffffff !important;
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 0.9),
        inset -2px -2px 4px rgba(0, 0, 0, 0.02),
        4px 4px 12px rgba(100, 116, 139, 0.04),
        8px 16px 32px rgba(100, 116, 139, 0.06) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: default;
}
.clay-card:hover {
    box-shadow:
        inset 3px 3px 6px rgba(255, 255, 255, 1),
        inset -3px -3px 6px rgba(0, 0, 0, 0.03),
        6px 8px 20px rgba(100, 116, 139, 0.07),
        12px 24px 48px rgba(100, 116, 139, 0.1) !important;
    transform: translateY(-2px) !important;
}

/* ============================================================
   INPUT FIELDS — 3D Debossed (Sunken) Claymorphism
   ============================================================ */
.clay-input {
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 16px !important;
    color: #0f172a !important;
    font-weight: 600 !important;
    box-shadow:
        inset 2px 2px 5px rgba(0, 0, 0, 0.04),
        inset -2px -2px 5px rgba(255, 255, 255, 0.9) !important;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.clay-input:focus {
    outline: none !important;
    border-color: #38bdf8 !important;
    background: #ffffff !important;
    box-shadow:
        inset 1px 1px 3px rgba(0, 0, 0, 0.02),
        inset -1px -1px 3px rgba(255, 255, 255, 0.9),
        0 0 0 4px rgba(56, 189, 248, 0.15) !important;
}
.clay-input::placeholder {
    color: #94a3b8 !important;
    font-weight: 500;
}

/* ============================================================
   BUTTONS — 3D Inflated Soft Claymorphism
   ============================================================ */
.clay-btn {
    border-radius: 16px !important;
    font-weight: 800 !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    cursor: pointer !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
}
.clay-btn:active {
    transform: scale(0.96) !important;
}

.clay-blue {
    background: #f0f9ff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
    color: #0369a1 !important;
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 0.9),
        inset -2px -2px 4px rgba(3, 105, 161, 0.08),
        3px 3px 8px rgba(14, 165, 233, 0.08),
        6px 12px 24px rgba(14, 165, 233, 0.12) !important;
}
.clay-blue:hover {
    background: #e0f2fe !important;
    border-color: #bae6fd !important;
    color: #0284c7 !important;
    box-shadow:
        inset 3px 3px 6px rgba(255, 255, 255, 1),
        inset -3px -3px 6px rgba(3, 105, 161, 0.12),
        4px 6px 12px rgba(14, 165, 233, 0.12),
        8px 16px 32px rgba(14, 165, 233, 0.18) !important;
    transform: translateY(-1px) !important;
}

.clay-emerald {
    background: #f0fdf4 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
    color: #15803d !important;
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 0.9),
        inset -2px -2px 4px rgba(21, 128, 61, 0.08),
        3px 3px 8px rgba(34, 197, 94, 0.08),
        6px 12px 24px rgba(34, 197, 94, 0.12) !important;
}
.clay-emerald:hover {
    background: #dcfce7 !important;
    border-color: #bbf7d0 !important;
    color: #16a34a !important;
    box-shadow:
        inset 3px 3px 6px rgba(255, 255, 255, 1),
        inset -3px -3px 6px rgba(21, 128, 61, 0.12),
        4px 6px 12px rgba(34, 197, 94, 0.12),
        8px 16px 32px rgba(34, 197, 94, 0.18) !important;
    transform: translateY(-1px) !important;
}

.clay-rose {
    background: #fff5f5 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
    color: #c53030 !important;
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 0.9),
        inset -2px -2px 4px rgba(197, 48, 48, 0.08),
        3px 3px 8px rgba(239, 68, 68, 0.08),
        6px 12px 24px rgba(239, 68, 68, 0.12) !important;
}
.clay-rose:hover {
    background: #ffe3e3 !important;
    border-color: #ffc9c9 !important;
    color: #e53e3e !important;
    box-shadow:
        inset 3px 3px 6px rgba(255, 255, 255, 1),
        inset -3px -3px 6px rgba(197, 48, 48, 0.12),
        4px 6px 12px rgba(239, 68, 68, 0.12),
        8px 16px 32px rgba(239, 68, 68, 0.18) !important;
    transform: translateY(-1px) !important;
}

.clay-amber {
    background: #fffbeb !important;
    border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
    color: #b45309 !important;
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 0.9),
        inset -2px -2px 4px rgba(180, 83, 9, 0.08),
        3px 3px 8px rgba(245, 158, 11, 0.08),
        6px 12px 24px rgba(245, 158, 11, 0.12) !important;
}
.clay-amber:hover {
    background: #fef3c7 !important;
    border-color: #fde68a !important;
    color: #d97706 !important;
    box-shadow:
        inset 3px 3px 6px rgba(255, 255, 255, 1),
        inset -3px -3px 6px rgba(180, 83, 9, 0.12),
        4px 6px 12px rgba(245, 158, 11, 0.12),
        8px 16px 32px rgba(245, 158, 11, 0.18) !important;
    transform: translateY(-1px) !important;
}

.clay-purple {
    background: #faf5ff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
    color: #6b21a8 !important;
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 0.9),
        inset -2px -2px 4px rgba(107, 33, 168, 0.08),
        3px 3px 8px rgba(168, 85, 247, 0.08),
        6px 12px 24px rgba(168, 85, 247, 0.12) !important;
}
.clay-purple:hover {
    background: #f3e8ff !important;
    border-color: #e9d5ff !important;
    color: #7e22ce !important;
    box-shadow:
        inset 3px 3px 6px rgba(255, 255, 255, 1),
        inset -3px -3px 6px rgba(107, 33, 168, 0.12),
        4px 6px 12px rgba(168, 85, 247, 0.12),
        8px 16px 32px rgba(168, 85, 247, 0.18) !important;
    transform: translateY(-1px) !important;
}

/* ============================================================
   GOLD PREMIUM ACCENT — Headline KPI & Rank #1 Highlight
   ============================================================ */
.clay-card-gold {
    background: linear-gradient(180deg, #FEF9EC 0%, #ffffff 65%) !important;
    border: 1.5px solid #F0DFB4 !important;
    border-radius: 24px !important;
    box-shadow:
        inset 3px 3px 6px rgba(255, 255, 255, 1),
        inset -3px -3px 6px rgba(183, 134, 43, 0.06),
        8px 12px 28px rgba(183, 134, 43, 0.12),
        16px 32px 56px rgba(183, 134, 43, 0.16) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: default;
}
.clay-card-gold:hover {
    transform: translateY(-2px) !important;
    box-shadow:
        inset 4px 4px 8px rgba(255, 255, 255, 1),
        inset -4px -4px 8px rgba(183, 134, 43, 0.08),
        10px 16px 32px rgba(183, 134, 43, 0.16),
        20px 40px 64px rgba(183, 134, 43, 0.2) !important;
}
.text-gold {
    color: #B7862B !important;
}
.bg-gold-badge {
    background: #FEF9EC !important;
    color: #B7862B !important;
    border: 1px solid #F0DFB4 !important;
}
.rank-gold-row {
    background: #FEF9EC !important;
    border: 1px solid #F0DFB4 !important;
}

/* ============================================================
   TABS — Dashboard Chart Panel Switcher
   ============================================================ */
.clay-tab {
    border-radius: 9999px !important;
    padding: 8px 16px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    background: #f8fafc !important;
    color: #64748b !important;
    border: 1.5px solid #e2e8f0 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow:
        inset 1px 1px 3px rgba(255, 255, 255, 0.8),
        inset -1px -1px 3px rgba(0, 0, 0, 0.02) !important;
}
.clay-tab:hover {
    color: #334155 !important;
}
.clay-tab-active.clay-tab-blue {
    background: #e0f2fe !important;
    border-color: #bae6fd !important;
    color: #0369a1 !important;
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 0.8),
        inset -1px -1px 3px rgba(14, 165, 233, 0.08),
        2px 4px 8px rgba(14, 165, 233, 0.1) !important;
}
.clay-tab-active.clay-tab-amber {
    background: #fef3c7 !important;
    border-color: #fde68a !important;
    color: #b45309 !important;
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 0.8),
        inset -1px -1px 3px rgba(180, 83, 9, 0.08),
        2px 4px 8px rgba(245, 158, 11, 0.1) !important;
}
.clay-tab-active.clay-tab-purple {
    background: #f3e8ff !important;
    border-color: #e9d5ff !important;
    color: #7e22ce !important;
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 0.8),
        inset -1px -1px 3px rgba(107, 33, 168, 0.08),
        2px 4px 8px rgba(168, 85, 247, 0.1) !important;
}
.clay-tab-active.clay-tab-emerald {
    background: #dcfce7 !important;
    border-color: #bbf7d0 !important;
    color: #15803d !important;
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 0.8),
        inset -1px -1px 3px rgba(21, 128, 61, 0.08),
        2px 4px 8px rgba(34, 197, 94, 0.1) !important;
}

/* Indikator "Realtime" — kedip halus tiap kali grafik dashboard disegarkan */
@keyframes realtime-pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
    100% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}
.realtime-pulse {
    animation: realtime-pulse-ring 0.9s ease-out;
}

/* ============================================================
   DASHBOARD TAB PANELS — stacked, fixed-height, crossfade
   ============================================================ */
.dash-tab-panel {
    position: absolute !important;
    inset: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow-y: auto !important;
    transition: opacity 0.2s ease !important;
}
.dash-tab-panel-active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ============================================================
   KASIR/POS — Cart Item Card & Gold Total (Phase 2)
   ============================================================ */
.clay-cart-item {
    background: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 14px !important;
    box-shadow:
        inset 1px 1px 3px rgba(255, 255, 255, 0.9),
        inset -1px -1px 3px rgba(100, 116, 139, 0.04),
        2px 4px 10px rgba(100, 116, 139, 0.08) !important;
}
.clay-total-gold {
    background: linear-gradient(135deg, #FEF9EC 0%, #ffffff 70%) !important;
    border: 1.5px solid #F0DFB4 !important;
    border-radius: 16px !important;
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 1),
        inset -2px -2px 4px rgba(183, 134, 43, 0.06),
        4px 8px 20px rgba(183, 134, 43, 0.14) !important;
    padding: 12px 16px !important;
}

/* ============================================================
   SIDEBAR & NAVIGATION — Clean 3D White Clay Sidebar
   ============================================================ */
.clay-sidebar {
    background: #ffffff !important;
    border-right: 1.5px solid #e2e8f0 !important;
    box-shadow:
        inset -3px 0 6px rgba(0, 0, 0, 0.005),
        4px 0 24px rgba(100, 116, 139, 0.04) !important;
}

.nav-link {
    transition: all 0.22s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    color: #475569 !important;
    border-radius: 16px !important;
    margin: 4px 0;
    cursor: pointer;
}
.nav-link:hover {
    transform: translateX(4px) !important;
    color: #0284c7 !important;
    background: #f0f9ff !important;
}
.nav-link-active,
.nav-link.clay-blue {
    color: #0369a1 !important;
    background: #e0f2fe !important;
    border: 1.5px solid #bae6fd !important;
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 0.8),
        inset -1px -1px 3px rgba(14, 165, 233, 0.08),
        2px 4px 8px rgba(14, 165, 233, 0.08) !important;
    font-weight: 800 !important;
}

/* ============================================================
   SELECT / DROPDOWN
   ============================================================ */
select {
    color: #0f172a !important;
    font-weight: 600;
}
select option {
    background: #ffffff !important;
    color: #0f172a !important;
}

/* ============================================================
   TABLE — Modern Clean 3D
   ============================================================ */
table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}
thead th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 12px 18px !important;
}
tbody tr {
    border-bottom: 1px solid #f1f5f9 !important;
    transition: background 0.2s !important;
}
tbody tr:hover {
    background: #f8fafc !important;
}
tbody td {
    color: #334155 !important;
    font-size: 12px !important;
    padding: 12px 18px !important;
    font-weight: 500;
}

/* ============================================================
   BADGES & PILLS
   ============================================================ */
.badge-sky    { background: #e0f2fe; color: #0369a1; border: 1.2px solid #bae6fd; font-weight: 700; border-radius: 8px; padding: 4px 8px; }
.badge-green  { background: #d1fae5; color: #065f46; border: 1.2px solid #a7f3d0; font-weight: 700; border-radius: 8px; padding: 4px 8px; }
.badge-rose   { background: #ffe4e6; color: #be123c; border: 1.2px solid #fecdd3; font-weight: 700; border-radius: 8px; padding: 4px 8px; }
.badge-amber  { background: #fef3c7; color: #92400e; border: 1.2px solid #fde68a; font-weight: 700; border-radius: 8px; padding: 4px 8px; }
.badge-violet { background: #ede9fe; color: #5b21b6; border: 1.2px solid #ddd6fe; font-weight: 700; border-radius: 8px; padding: 4px 8px; }

/* ============================================================
   MODAL OVERLAY & POPUPS
   ============================================================ */
.modal-backdrop {
    background: rgba(15, 23, 42, 0.4) !important;
    backdrop-filter: blur(12px) !important;
}

/* ============================================================
   MICRO-ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-up {
    animation: fadeUp 0.45s cubic-bezier(0.25, 1, 0.5, 1) both;
}

@keyframes clickWave {
    0% { box-shadow: 0 0 0 0px rgba(56, 189, 248, 0.4); }
    100% { box-shadow: 0 0 0 10px rgba(56, 189, 248, 0); }
}
.btn-wave:active {
    animation: clickWave 0.3s ease-out;
}

/* ============================================================
   ICON CONTAINERS — Embossed Clay style
   ============================================================ */
.icon-sky    { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; border-radius: 14px; padding: 10px; box-shadow: inset 1px 1px 2px #fff; }
.icon-green  { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; border-radius: 14px; padding: 10px; box-shadow: inset 1px 1px 2px #fff; }
.icon-rose   { background: #ffe4e6; color: #e11d48; border: 1px solid #fecdd3; border-radius: 14px; padding: 10px; box-shadow: inset 1px 1px 2px #fff; }
.icon-amber  { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; border-radius: 14px; padding: 10px; box-shadow: inset 1px 1px 2px #fff; }
.icon-violet { background: #ede9fe; color: #7c3aed; border: 1px solid #ddd6fe; border-radius: 14px; padding: 10px; box-shadow: inset 1px 1px 2px #fff; }
.icon-indigo { background: #e0e7ff; color: #4338ca; border: 1px solid #c7d2fe; border-radius: 14px; padding: 10px; box-shadow: inset 1px 1px 2px #fff; }
.icon-orange { background: #ffedd5; color: #ea580c; border: 1px solid #fed7aa; border-radius: 14px; padding: 10px; box-shadow: inset 1px 1px 2px #fff; }

/* ============================================================
   TABLE ROWS — Kasir Inventory (Clay Row Cards)
   ============================================================ */
.clay-row {
    transition: background 0.15s ease !important;
}
.clay-row:hover {
    background: #f8fafc !important;
}
.clay-row td:first-child {
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
}
.clay-row td:last-child {
    border-top-right-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
}
.clay-avatar {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    box-shadow: inset 1px 1px 2px rgba(255, 255, 255, 0.8), inset -1px -1px 2px rgba(0, 0, 0, 0.04);
}
.clay-avatar-sky    { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.clay-avatar-green  { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }
.clay-avatar-rose   { background: #ffe4e6; color: #e11d48; border: 1px solid #fecdd3; }
.clay-avatar-amber  { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }
.clay-avatar-violet { background: #ede9fe; color: #7c3aed; border: 1px solid #ddd6fe; }
.clay-avatar-indigo { background: #e0e7ff; color: #4338ca; border: 1px solid #c7d2fe; }
.clay-avatar-orange { background: #ffedd5; color: #ea580c; border: 1px solid #fed7aa; }

/* ============================================================
   DRIVER.JS ONBOARDING TOUR — Claymorphism Popover Override
   ============================================================ */
.driver-popover {
    background: #ffffff !important;
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow:
        4px 4px 10px rgba(165, 180, 203, 0.3),
        -4px -4px 10px rgba(255, 255, 255, 0.9) !important;
    padding: 20px !important;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif !important;
}
.driver-popover-title {
    color: #0f172a !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
}
.driver-popover-description {
    color: #475569 !important;
}
.driver-popover-navigation-btns button {
    border-radius: 16px !important;
    font-weight: 800 !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    padding: 8px 16px !important;
    border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
    text-shadow: none !important;
    background: #f0f9ff !important;
    color: #0369a1 !important;
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 0.9),
        inset -2px -2px 4px rgba(3, 105, 161, 0.08) !important;
}
.driver-popover-close-btn {
    color: #94a3b8 !important;
}

/* ============================================================
   MOBILE / iPHONE FOUNDATION — global, hanya aktif ≤ md (767.98px)
   Desktop tidak terpengaruh.
   ============================================================ */

/* Anti overflow horizontal seluruh app */
html, body { max-width: 100%; }
img, video, canvas, svg, table, iframe { max-width: 100%; }

/* Safe-area untuk elemen fixed (notch & home-indicator iPhone) */
@supports (padding: max(0px)) {
  #mobileTopbar {
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
    height: calc(3.5rem + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
  }
  #sidebarDrawer {
    padding-top: max(1.25rem, env(safe-area-inset-top));
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }
}

@media (max-width: 767.98px) {
  /* Konten utama menyesuaikan tinggi topbar + safe-area */
  main.flex-grow {
    padding-top: calc(5rem + env(safe-area-inset-top));
  }

  /* Anti auto-zoom iOS: input minimal 16px hanya di mobile */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Tap target minimal 44px untuk kontrol kecil bertanda */
  .tap-safe { min-height: 44px; min-width: 44px; }
}

/* Elemen tinggi layar penuh: pakai dynamic viewport height (iOS Safari) */
.min-h-screen { min-height: 100vh; min-height: 100dvh; }

/* ============================================================
   RESPONSIVE CARD TABLE — desktop tetap tabel, mobile jadi kartu.
   Aktif hanya < md (767.98px). Butuh: <table class="card-table">,
   <td data-label="Judul Kolom">, opsional <td data-primary>.
   ============================================================ */
@media (max-width: 767.98px) {
  table.card-table,
  table.card-table tbody { display: block; width: 100%; }
  table.card-table thead { display: none; }

  table.card-table tr {
    display: block;
    width: 100%;
    margin-bottom: 14px;
    padding: 14px 16px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow:
      inset 2px 2px 4px rgba(255, 255, 255, 0.9),
      inset -2px -2px 4px rgba(0, 0, 0, 0.02),
      4px 4px 12px rgba(100, 116, 139, 0.05),
      8px 16px 28px rgba(100, 116, 139, 0.06);
  }
  table.card-table tr:last-child { margin-bottom: 0; }

  table.card-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 7px 0;
    text-align: right;
    border: none !important;
  }
  table.card-table td:not(:last-child) {
    border-bottom: 1px solid #f1f5f9 !important;
  }
  table.card-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    margin-right: auto;
    text-align: left;
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
  }

  /* Kolom utama → judul kartu */
  table.card-table td[data-primary] {
    display: block;
    text-align: left;
    padding: 0 0 10px 0;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9 !important;
  }
  table.card-table td[data-primary]::before { display: none; }

  /* Sel aksi → tombol full-width, tap target */
  table.card-table td[data-label="Aksi"],
  table.card-table td[data-label="Tindakan"] {
    display: block;
    text-align: left;
    padding-top: 12px;
  }
  table.card-table td[data-label="Aksi"]::before,
  table.card-table td[data-label="Tindakan"]::before { display: none; }
  table.card-table td[data-label="Aksi"] > *,
  table.card-table td[data-label="Tindakan"] > * {
    width: 100%;
    min-height: 44px;
  }

  /* Baris kosong (colspan) → satu kartu tengah */
  table.card-table td[colspan] {
    display: block;
    text-align: center;
  }
  table.card-table td[colspan]::before { display: none; }
}

/* ============================================================
   KASIR — panel keranjang jadi bottom sheet di < lg (1023.98px).
   Desktop (lg+) tetap sticky panel kanan.
   ============================================================ */
@media (max-width: 1023.98px) {
  #posCartPanel {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    max-height: 85dvh;
    overflow-y: auto;
    border-radius: 24px 24px 0 0;
    transform: translateY(110%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }
  body.pos-cart-open #posCartPanel { transform: translateY(0); }
  #posCartBackdrop {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 55;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease;
  }
  body.pos-cart-open #posCartBackdrop { opacity: 1; visibility: visible; }
  #posCartBar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 24px rgba(100, 116, 139, 0.12);
  }
  body.pos-cart-open #posCartBar { display: none; }
}
@media (min-width: 1024px) {
  #posCartBar, #posCartBackdrop { display: none !important; }
}
