:root {
  --primary: #0d6efd;
  --primary-light: #e7f1ff;
  --bg-main: #f4f7f6;
  --bg-card: #ffffff;
  --text-main: #212529;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --transition-fast: 0.2s ease;
  
  --surface-card: var(--bg-card);
  --surface-bg: var(--bg-main);
  --text-primary: var(--text-main);
  --text-secondary: var(--text-muted);
  --border-subtle: var(--border-color);
  --accent: var(--primary);
  --accent-light: var(--primary-light);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.soft-shadow {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03) !important;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.soft-shadow:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

.rounded-card {
  border-radius: 12px !important;
  border: none !important;
}

/* Loading Skeleton */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: loadingSkeleton 1.5s infinite;
  border-radius: 0.5rem;
}
@keyframes loadingSkeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Global Loading Overlay */
#global-loading {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(3px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.loading-spinner-wrapper {
  background: #ffffff;
  padding: 24px 48px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.fade-in {
  animation: fadeIn 0.4s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Desktop Sidebar */
#sidebar-wrapper {
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden;
  overflow-y: auto;
  background: linear-gradient(180deg, #132B78 0%, #0E235F 50%, #081A45 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
}
#wrapper {
  max-width: 100%;
  overflow-x: hidden;
}
#page-content-wrapper {
  min-width: 0;
}
.sidebar-expanded {
  width: 250px !important;
}
.sidebar-collapsed {
  width: 70px !important;
}
.sidebar-collapsed .sidebar-text,
.sidebar-collapsed .sidebar-heading-text {
  display: none;
  opacity: 0;
}

/* --- OVERRIDES UNTUK SIDEBAR COLLAPSED (WIDTH 70px) --- */
.sidebar-collapsed .sidebar-item {
  margin: 4px 10px !important; /* Perkecil margin agar muat 70px */
  padding: 12px 0 !important; /* Buang padding horizontal agar icon center */
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 50px !important;
}
.sidebar-collapsed .sidebar-item i {
  margin-right: 0 !important; /* Hapus me-2 */
}
.sidebar-collapsed .sidebar-item:hover {
  transform: none !important; /* Matikan animasi geser */
}
.sidebar-collapsed hr {
  margin-left: 10px !important;
  margin-right: 10px !important;
}
.sidebar-collapsed .profile-card-wrapper {
  padding: 10px !important;
}
.sidebar-collapsed .profile-card {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  justify-content: center !important;
}
.sidebar-collapsed .profile-info {
  display: none !important;
}
.sidebar-collapsed .profile-avatar {
  margin-right: 0 !important; /* Hapus me-3 */
}
/* ------------------------------------------------------ */
.sidebar-item {
  white-space: nowrap;
  overflow: hidden;
  transition: all 0.25s ease;
  border-radius: 50rem !important; /* rounded penuh (pill) */
  margin: 4px 16px !important;
  padding: 12px 20px !important;
  font-weight: 500;
  background: transparent !important;
  color: #94a3b8 !important;
  width: auto !important; /* Mencegah overflow 100% Bootstrap */
}
.sidebar-item i {
  color: #94a3b8;
  transition: all 0.25s ease;
}
.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  transform: translateX(4px);
}
.sidebar-item:hover i {
  color: #fff !important;
}
.sidebar-item.active {
  background: linear-gradient(90deg, #3b82f6, #1d4ed8) !important; /* Gradient Biru terang */
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  border-left: none !important;
}
.sidebar-item.active i {
  color: #fff !important;
}

.logout-btn {
  color: #f87171 !important;
}
.logout-btn i {
  color: #f87171 !important;
}
.logout-btn:hover {
  background: #ef4444 !important;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}
.logout-btn:hover i {
  color: #fff !important;
}

@media (min-width: 992px) {
  #sidebar-wrapper.sidebar-expanded {
    width: 250px !important;
    min-width: 250px;
  }
  #sidebar-wrapper.sidebar-collapsed {
    width: 70px !important;
    min-width: 70px;
  }
  .sidebar-overlay {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  #sidebar-wrapper {
    position: fixed;
    top: 0; left: 0; width: 280px !important; height: 100vh;
    z-index: 1045; box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
  }
  #sidebar-wrapper.sidebar-expanded { transform: translateX(0); }
  #sidebar-wrapper.sidebar-collapsed { transform: translateX(-100%); }
  .sidebar-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.5); z-index: 1040;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .sidebar-overlay.show { opacity: 1; visibility: visible; }
}

/* MOBILE SPECIFIC */
@media (max-width: 767.98px) {
  /* Legacy mobile overrides disabled to allow responsive desktop UI */
  
  .bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: calc(60px + var(--safe-bottom));
    background: var(--surface-card);
    border-top: 1px solid var(--border-subtle);
    display: flex; align-items: flex-start; justify-content: space-around;
    z-index: 1030; box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.08);
    padding-top: 8px; padding-bottom: var(--safe-bottom);
    transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.25s ease;
  }
  .bottom-nav.nav-hidden {
    transform: translateY(100%) !important; opacity: 0 !important;
  }
  .bottom-nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    flex: 1; cursor: pointer; border: none; background: transparent;
    color: var(--text-secondary); font-size: 10px; font-weight: 600;
    transition: color 0.2s ease; text-decoration: none; min-height: 48px;
    padding: 2px 4px; position: relative;
    -webkit-tap-highlight-color: transparent; letter-spacing: 0.3px;
  }
  .bottom-nav-item i { font-size: 18px; transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); position: relative; z-index: 1; }
  .bottom-nav-item span { position: relative; z-index: 1; }
  .bottom-nav-item.active { color: var(--accent); }
  .bottom-nav-item.active i { transform: scale(1.1); }
  .bottom-nav-item.active::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 40px; height: 28px; background: var(--accent-light); border-radius: 10px; z-index: 0;
  }

  /* FAB */
  .fab-container {
    position: fixed; bottom: calc(72px + var(--safe-bottom)); right: 16px;
    z-index: 1035; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 10px;
  }
  .fab-main {
    width: 52px; height: 52px; border-radius: 14px; background: var(--accent);
    color: white; border: none; display: flex; align-items: center; justify-content: center;
    font-size: 20px; box-shadow: 0 4px 18px rgba(13, 110, 253, 0.45); cursor: pointer;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, border-radius 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .fab-main.open {
    transform: rotate(45deg); border-radius: 50%; background: #e53e3e; box-shadow: 0 4px 18px rgba(229, 62, 62, 0.4);
  }
  .fab-menu {
    display: flex; flex-direction: column-reverse; gap: 10px; align-items: flex-end; pointer-events: none;
  }
  .fab-item {
    display: flex; align-items: center; gap: 10px; opacity: 0; transform: scale(0.7) translateY(20px);
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); pointer-events: none;
  }
  .fab-menu.open, .fab-menu.open .fab-item { pointer-events: auto; }
  .fab-menu.open .fab-item { opacity: 1; transform: scale(1) translateY(0); }
  .fab-item-label { background: var(--surface-card); color: var(--text-primary); font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 20px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14); }
  .fab-item-btn { width: 42px; height: 42px; border-radius: 12px; border: none; display: flex; align-items: center; justify-content: center; font-size: 16px; color: white; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22); }
  .fab-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); z-index: 1034; opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s ease; }
  .fab-backdrop.show { opacity: 1; visibility: visible; }

  /* Mobile Top Bar */
  .mobile-top-bar {
    position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; justify-content: space-between;
    padding: 0 14px; height: 54px; background: var(--surface-card); border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  }
  .mobile-top-bar-title { font-size: 16px; font-weight: 800; color: var(--text-primary); }

  /* Bottom Sheet */
  .bottom-sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 1060; opacity: 0; visibility: hidden; transition: opacity 0.28s ease, visibility 0.28s ease; }
  .bottom-sheet-backdrop.show { opacity: 1; visibility: visible; }
  .bottom-sheet { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface-card); border-radius: 24px 24px 0 0; z-index: 1061; transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1); box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12); display: flex; flex-direction: column; max-height: 90vh; }
  .bottom-sheet.show { transform: translateY(0); }
  .bottom-sheet-handle { width: 36px; height: 4px; background: #e2e8f0; border-radius: 4px; margin: 12px auto; }
  .bottom-sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 4px 20px 16px; border-bottom: 1px solid var(--border-subtle); }
  .bottom-sheet-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
  .bottom-sheet-close { background: #f1f5f9; border: none; width: 28px; height: 28px; border-radius: 50%; color: var(--text-secondary); display: flex; align-items: center; justify-content: center; }
  .bottom-sheet-body { padding: 20px; overflow-y: auto; overscroll-behavior: contain; }
}

.offline-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2000; padding: 9px 16px; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; gap: 8px; justify-content: center; transform: translateY(-100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1); pointer-events: none;
}
.offline-banner.show { transform: translateY(0); pointer-events: auto; }
.offline-banner.offline { background: #dc2626; color: white; }
.offline-banner.online-back { background: #16a34a; color: white; }

/* Desktop overrides for mobile-only elements */
@media (min-width: 768px) {
  .bottom-nav,
  .fab-container,
  .fab-backdrop,
  .bottom-sheet-backdrop,
  .bottom-sheet,
  .mobile-top-bar {
    display: none !important;
  }
}

/* Login Page overrides */
body.login-page #sidebar-wrapper,
body.login-page #sidebar-overlay,
body.login-page #top-navbar,
body.login-page .mobile-top-bar,
body.login-page .bottom-nav,
body.login-page .fab-container,
body.login-page .bottom-sheet-backdrop,
body.login-page .bottom-sheet {
  display: none !important;
}

body.login-page #page-content-wrapper {
  width: 100% !important;
}

/* Shift Focus Mode overrides */
body.shift-mode #sidebar-wrapper,
body.shift-mode #sidebar-overlay,
body.shift-mode #top-navbar,
body.shift-mode .mobile-top-bar,
body.shift-mode .bottom-nav,
body.shift-mode .fab-container,
body.shift-mode .bottom-sheet-backdrop,
body.shift-mode .bottom-sheet {
  display: none !important;
}

body.shift-mode #page-content-wrapper {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ========================================================================== */
/* HEPIRELOAD LITE V2 — MODERN UI REFRESH                                     */
/* UI-only layer: intentionally keeps existing IDs / JS contracts unchanged. */
/* ========================================================================== */

:root {
  --hepi-primary: #4f46e5;
  --hepi-primary-strong: #4338ca;
  --hepi-primary-soft: #eef2ff;
  --hepi-accent: #06b6d4;
  --hepi-success: #10b981;
  --hepi-warning: #f59e0b;
  --hepi-danger: #ef4444;
  --hepi-ink: #172033;
  --hepi-muted: #77839a;
  --hepi-bg: #f6f8fc;
  --hepi-card: rgba(255,255,255,.96);
  --hepi-border: #e8edf5;
  --hepi-sidebar: #0f172a;
  --hepi-sidebar-2: #111c34;
  --hepi-radius: 18px;
  --hepi-radius-sm: 12px;
  --hepi-shadow: 0 10px 30px rgba(23,32,51,.065);
  --hepi-shadow-hover: 0 18px 48px rgba(23,32,51,.11);
  --primary: var(--hepi-primary);
  --primary-light: var(--hepi-primary-soft);
  --bg-main: var(--hepi-bg);
  --text-main: var(--hepi-ink);
  --text-muted: var(--hepi-muted);
}

body.hepi-modern-ui,
body.hepi-modern-ui.bg-light {
  background:
    radial-gradient(circle at 86% 4%, rgba(79,70,229,.055), transparent 28rem),
    var(--hepi-bg) !important;
  color: var(--hepi-ink);
  letter-spacing: -.01em;
}

/* Shell */
#wrapper { min-height: 100vh; }
#page-content-wrapper { background: transparent !important; }
.hepi-app-content { padding: 24px 28px 44px; max-width: 1680px; margin: 0 auto; }

#sidebar-wrapper {
  background:
    radial-gradient(circle at 15% 0%, rgba(79,70,229,.35), transparent 14rem),
    linear-gradient(180deg, var(--hepi-sidebar-2), var(--hepi-sidebar)) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: 18px 0 50px rgba(15,23,42,.10) !important;
}
.sidebar-expanded { width: 238px !important; }
@media (min-width: 992px) {
  #sidebar-wrapper.sidebar-expanded { width: 238px !important; min-width: 238px; }
}

.hepi-brand {
  height: 88px;
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.hepi-brand-mark {
  width: 42px; height: 42px; flex: 0 0 42px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  color: white;
  box-shadow: 0 8px 24px rgba(79,70,229,.35);
}
.hepi-brand-copy { display:flex; flex-direction:column; min-width:0; color:white; line-height:1.15; }
.hepi-brand-copy strong { font-size:17px; letter-spacing:-.03em; }
.hepi-brand-copy small { margin-top:4px; font-size:10px; color:#94a3b8; letter-spacing:.11em; text-transform:uppercase; font-weight:700; }
.sidebar-section-label { color:#64748b; font-size:10px; font-weight:800; letter-spacing:.16em; padding: 4px 25px 8px; }

.sidebar-item {
  min-height: 46px;
  border-radius: 13px !important;
  margin: 3px 12px !important;
  padding: 12px 14px !important;
  color: #9aa8bd !important;
  font-size: 13.5px;
  font-weight: 650 !important;
}
.sidebar-item i { color:#8291aa !important; font-size:15px; width:22px !important; }
.sidebar-item:hover { background: rgba(255,255,255,.065) !important; transform:none !important; color:#fff !important; }
.sidebar-item.active {
  background: linear-gradient(135deg, rgba(99,102,241,.98), rgba(79,70,229,.98)) !important;
  box-shadow: 0 8px 20px rgba(79,70,229,.28) !important;
}
.sidebar-item.active i { color:white !important; }
.profile-card-wrapper { padding: 12px !important; }
.profile-card {
  background: rgba(255,255,255,.055) !important;
  color: white !important;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: none !important;
}
.profile-avatar { background: rgba(255,255,255,.10) !important; }

/* Topbar */
.hepi-topbar {
  height: 76px;
  padding: 0 !important;
  background: rgba(255,255,255,.88) !important;
  border-bottom: 1px solid rgba(226,232,240,.85) !important;
  box-shadow: 0 8px 30px rgba(23,32,51,.035) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.hepi-topbar .container-fluid { padding-left: 26px !important; padding-right: 26px !important; }
.hepi-icon-btn {
  width: 40px; height: 40px; display:grid; place-items:center;
  border:1px solid var(--hepi-border); border-radius:12px;
  color:#536078; background:white;
  transition:.2s ease;
}
.hepi-icon-btn:hover { color:var(--hepi-primary); background:var(--hepi-primary-soft); border-color:#d9ddff; }
.hepi-page-heading { display:flex; flex-direction:column; min-width:0; line-height:1.15; }
.hepi-page-heading small { color:#94a3b8; font-size:9px; text-transform:uppercase; letter-spacing:.16em; font-weight:800; }
.hepi-page-heading span { margin-top:4px; color:var(--hepi-ink); font-size:19px; font-weight:800; letter-spacing:-.035em; }
.hepi-topbar-date { align-items:center; gap:8px; color:#7c879b; font-size:12px; padding:0 16px; }
.hepi-user-chip { display:flex; align-items:center; gap:12px; padding:6px 7px 6px 14px; border:1px solid var(--hepi-border); border-radius:15px; background:white; box-shadow:0 4px 14px rgba(23,32,51,.035); }
.hepi-user-copy { display:flex; flex-direction:column; align-items:flex-end; line-height:1.2; max-width:180px; }
.hepi-user-copy small { color:#9aa5b7; font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.hepi-user-copy strong { margin-top:3px; font-size:12px; color:#3b465c; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:180px; }
.hepi-avatar { width:36px; height:36px; display:grid; place-items:center; border-radius:11px; background:linear-gradient(135deg,#4f46e5,#22c1dc); color:white; box-shadow:0 6px 16px rgba(79,70,229,.20); }

/* Cards / surfaces */
.card,
.rounded-card {
  border: 1px solid var(--hepi-border) !important;
  border-radius: var(--hepi-radius) !important;
  background: var(--hepi-card);
}
.card.soft-shadow,
.soft-shadow {
  box-shadow: var(--hepi-shadow) !important;
}
.card.soft-shadow:hover { box-shadow: var(--hepi-shadow-hover) !important; }
.card-header {
  border-bottom-color: var(--hepi-border) !important;
  border-radius: var(--hepi-radius) var(--hepi-radius) 0 0 !important;
}
.card-header.bg-white, .card-header.bg-light { background: transparent !important; }

/* Modern financial / KPI cards */
.card.bg-primary.text-white { background: linear-gradient(135deg,#4f46e5,#6366f1) !important; border:0 !important; }
.card.bg-info.text-white { background: linear-gradient(135deg,#0891b2,#22b8cf) !important; border:0 !important; }
.card.bg-success.text-white { background: linear-gradient(135deg,#059669,#10b981) !important; border:0 !important; }
.card.bg-warning { background: linear-gradient(135deg,#f59e0b,#fbbf24) !important; border:0 !important; }

/* Forms */
.form-label { color:#475569; font-size:12.5px; margin-bottom:7px; }
.form-control,
.form-select,
.input-group-text {
  min-height: 46px;
  border-color: #e3e9f2 !important;
  border-radius: 12px;
  background-color: #fbfcfe !important;
  color: #27334a;
  box-shadow:none !important;
}
.form-control:focus,
.form-select:focus {
  background:#fff !important;
  border-color:#a9afff !important;
  box-shadow:0 0 0 4px rgba(79,70,229,.09) !important;
}
.input-group > .input-group-text { border-radius:12px 0 0 12px; background:#f5f7fb !important; color:#738098; font-weight:700; }
.input-group > .form-control:not(:first-child), .input-group > .form-select:not(:first-child) { border-radius:0 12px 12px 0; }
.form-text { color:#96a0b2; font-size:11px; }

/* Buttons */
.btn { border-radius: 12px; font-weight: 700; letter-spacing:-.01em; }
.btn-primary {
  border-color: transparent !important;
  background: linear-gradient(135deg,var(--hepi-primary),#6366f1) !important;
  box-shadow:0 7px 18px rgba(79,70,229,.18);
}
.btn-primary:hover { transform:translateY(-1px); box-shadow:0 10px 24px rgba(79,70,229,.25); }
.btn-light { background:#f6f8fc; border-color:#eef1f6; color:#516078; }
.btn-outline-primary { color:var(--hepi-primary); border-color:#cfd4ff; }
.btn-outline-primary:hover { background:var(--hepi-primary-soft); color:var(--hepi-primary-strong); border-color:#b9c0ff; }

/* Tabs / segmented control */
.nav.nav-pills {
  gap:6px;
  padding:6px !important;
  margin-bottom:22px !important;
  background:#eef2f7;
  border:1px solid #e6eaf1;
  border-radius:15px;
  width:max-content;
  max-width:100%;
}
.nav-pills .nav-link {
  min-height:40px;
  padding:9px 14px;
  border-radius:10px !important;
  color:#64748b;
  font-size:12.5px;
  font-weight:750;
}
.nav-pills .nav-link.active {
  color:#302e7d !important;
  background:#fff !important;
  box-shadow:0 5px 14px rgba(36,43,73,.08);
}
.nav-pills .nav-link.text-danger:not(.active) { color:#dc4b5c !important; }

/* Tables */
.table-responsive { border-radius:14px; }
.table { --bs-table-bg: transparent; margin-bottom:0; }
.table thead th {
  background:#f7f9fc !important;
  color:#7b879c !important;
  border-bottom:1px solid var(--hepi-border) !important;
  font-size:10.5px !important;
  font-weight:800 !important;
  text-transform:uppercase;
  letter-spacing:.07em;
  white-space:nowrap;
  padding-top:13px !important;
  padding-bottom:13px !important;
}
.table tbody td { border-color:#edf1f6; padding-top:14px !important; padding-bottom:14px !important; color:#435068; vertical-align:middle; }
.table-hover > tbody > tr:hover > * { background:#fafbfe !important; }

/* Alerts, badges, modal */
.badge { border-radius:999px; font-weight:750; letter-spacing:.01em; }
.alert { border:0; border-radius:14px !important; }
.modal-content { border-radius:20px !important; border:1px solid var(--hepi-border) !important; box-shadow:0 30px 80px rgba(15,23,42,.18) !important; }
.modal-header { border-bottom:1px solid #eef1f5 !important; }

/* Transaction-specific polish */
#pane-ppob > .row > [class*="col-"] > .card { max-width: 1000px; margin-inline:auto; }
#lite_profit_card { background:linear-gradient(135deg,#fafbff,#f5f7ff); border-color:#e3e6ff !important; }
#paymentRowsContainer > * { transition:.2s ease; }
#kasir-shift-banner .card { background:linear-gradient(135deg,#4338ca,#2563eb) !important; border:0 !important; }
#btnSubmitLiteTrx { min-height:52px; border-radius:14px; font-size:14px; }

/* Mobile dashboard classes already in the project — normalize them into one visual language */
.mobile-hero-card {
  border-radius:22px !important;
  background:linear-gradient(135deg,#4f46e5,#4338ca) !important;
  box-shadow:0 16px 40px rgba(79,70,229,.22) !important;
}
.mobile-stat-card, .quick-action-btn, .trx-card-mobile {
  border:1px solid var(--hepi-border) !important;
  border-radius:16px !important;
  box-shadow:0 7px 22px rgba(23,32,51,.045) !important;
  background:#fff !important;
}
.quick-action-btn { transition:.2s ease; }
.quick-action-btn:active { transform:scale(.98); }
.mobile-section-title { color:var(--hepi-ink) !important; font-weight:800 !important; letter-spacing:-.025em; }

/* Make old page-specific headings feel current without changing DOM */
#app h2, #app h3, #app h4, #app h5 { letter-spacing:-.028em; }
#app .text-primary { color:var(--hepi-primary) !important; }
#app .bg-light { background-color:#f7f9fc !important; }

/* Loading UI */
#global-loading { background:rgba(246,248,252,.76) !important; backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
.loading-spinner-wrapper { min-width:160px; padding:24px 30px; border-radius:20px; border:1px solid rgba(255,255,255,.8); box-shadow:0 24px 70px rgba(23,32,51,.15); }
#global-loading .spinner-border { color:var(--hepi-primary) !important; width:2.3rem !important; height:2.3rem !important; border-width:.22em; }
#loading-text { font-size:14px; color:#3b465c !important; }

@media (max-width: 991.98px) {
  #sidebar-wrapper { width:268px !important; border-radius:0 22px 22px 0 !important; }
  .hepi-app-content { padding:18px 16px 34px; }
  .hepi-topbar { height:68px; }
  .hepi-topbar .container-fluid { padding-left:14px !important; padding-right:14px !important; }
  .hepi-user-copy { display:none; }
  .hepi-user-chip { padding:5px; border:0; background:transparent; box-shadow:none; }
  .hepi-page-heading small { display:none; }
  .hepi-page-heading span { margin-top:0; font-size:17px; }
  .nav.nav-pills { width:100%; overflow:auto; flex-wrap:nowrap; }
  .nav-pills .nav-link { white-space:nowrap; }
}

@media (max-width: 575.98px) {
  .hepi-app-content { padding:14px 12px 28px; }
  .card { border-radius:16px !important; }
  .card-body.p-4, .card-body.p-lg-5 { padding:18px !important; }
  #kasir-shift-banner .card-body { padding:12px 14px !important; }
  .form-control, .form-select, .input-group-text { min-height:44px; }
  .table tbody td { font-size:12px; }
}

/* ==========================================================
   HEPIRELOAD LITE V1.6 — SIMPLE OPERATIONS UI
   ========================================================== */
.simple-page,
.simple-page-intro {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}
.simple-stat-card {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 104px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.simple-stat-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #f8fafc;
  font-size: 1.05rem;
}
.simple-stat-label {
  color: #64748b;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.simple-stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}
.simple-stat-value.small-value { font-size: 1.15rem; }
.simple-balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eef2f7;
  color: #475569;
}
.simple-balance-row strong { color: #0f172a; }
.simple-balance-row.total {
  margin-top: 4px;
  padding-top: 16px;
  border-bottom: 0;
  font-size: 1.03rem;
  color: #0f172a;
}
.simple-details {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
}
.simple-details > summary {
  cursor: pointer;
  font-weight: 700;
  color: #334155;
  list-style: none;
}
.simple-details > summary::-webkit-details-marker { display: none; }
.simple-details > summary::after {
  content: '+';
  float: right;
  color: #64748b;
}
.simple-details[open] > summary::after { content: '−'; }
.danger-details { border-color: #fecaca; background: #fffafa; }
.simple-kas-awal {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 14px;
  color: #64748b;
}
.simple-kas-awal strong { color: #0f172a; margin-left: 6px; }
.simple-periods .btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 12px;
  font-weight: 600;
}
.simple-periods .btn:hover { background: #f8fafc; border-color: #cbd5e1; }

/* Finance / Settings: tabs dibuat lebih ringan */
#financeTabs,
#settingTabs {
  gap: 6px;
  background: #eef2f7;
  padding: 6px;
  border-radius: 14px;
  width: fit-content;
  max-width: 100%;
}
#financeTabs .nav-link,
#settingTabs .nav-link {
  border-radius: 10px;
  color: #64748b;
  font-weight: 650;
  padding: 9px 14px;
}
#financeTabs .nav-link.active,
#settingTabs .nav-link.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

@media (max-width: 767.98px) {
  .simple-stat-card { padding: 15px; min-height: 88px; border-radius: 15px; }
  .simple-stat-icon { width: 36px; height: 36px; min-width: 36px; border-radius: 11px; }
  .simple-stat-label { font-size: .68rem; }
  .simple-stat-value { font-size: 1.1rem; }
  .simple-stat-value.small-value { font-size: .92rem; }
  #financeTabs, #settingTabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  #financeTabs .nav-link, #settingTabs .nav-link { white-space: nowrap; }
}


/* ==========================================================
   HEPIRELOAD LITE V1.7 — SMARTPHONE STABILITY FIX
   ========================================================== */
html { -webkit-text-size-adjust: 100%; }
body, #wrapper, #page-content-wrapper, #app { width: 100%; min-width: 0; }
body { min-height: 100dvh; }
#wrapper, #page-content-wrapper { min-height: 100dvh; }
#app, .hepi-app-content, .card, .card-body, .tab-content, .tab-pane { min-width: 0; }
.table-responsive { max-width: 100%; -webkit-overflow-scrolling: touch; }
.nav.nav-pills { -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.nav.nav-pills::-webkit-scrollbar { display: none; }

@media (max-width: 991.98px) {
  #sidebar-wrapper {
    height: 100dvh !important;
    max-height: 100dvh;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  body.sidebar-open { overflow: hidden !important; touch-action: none; }
  .sidebar-overlay { height: 100dvh; }
}

@media (max-width: 575.98px) {
  .hepi-topbar { height: 62px; }
  .hepi-topbar .container-fluid { padding-left: 10px !important; padding-right: 10px !important; }
  .hepi-icon-btn { width: 38px; height: 38px; flex: 0 0 38px; }
  .hepi-page-heading span { font-size: 16px; max-width: 165px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hepi-avatar { width: 34px; height: 34px; }
  .hepi-app-content { padding: 12px 10px 24px; }

  /* Avoid crushed values in 2-column KPI cards. */
  .simple-stat-card > div:last-child { min-width: 0; width: 100%; }
  .simple-stat-value { font-size: clamp(.95rem, 4.6vw, 1.08rem); overflow-wrap: anywhere; line-height: 1.2; }

  /* Transaction summary is easier to read as rows on phones. */
  .payment-summary-row > [class*="col-"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .payment-summary-row small { margin-bottom: 0 !important; }
  .payment-summary-row .text-sm-end { text-align: left !important; }

  /* Dynamic payment row: never let the amount field push outside the viewport. */
  #paymentRowsContainer .row > .col { min-width: 0; }
  #paymentRowsContainer .input-group { flex-wrap: nowrap; min-width: 0; }
  #paymentRowsContainer .form-control { min-width: 0; }

  /* QRIS modal header and confirmation controls fit narrow phones. */
  #qrisModal .modal-header { flex-wrap: wrap; gap: 10px; padding: 16px !important; }
  #qrisModal .modal-header .ms-auto { margin-left: 0 !important; }
  #qrisModal .modal-body { padding: 16px !important; }
  #qrisModal .row.g-5 { --bs-gutter-y: 1.25rem; }
  #qrisModal .slider-container span { font-size: 12px; padding-left: 52px; padding-right: 8px; text-align: center; }

  /* Long action/header groups should wrap instead of being clipped. */
  .card-header.d-flex { min-width: 0; }
  .simple-balance-row { gap: 12px; }
  .simple-balance-row span, .simple-balance-row strong { min-width: 0; }
}

/* ========================================================================== */
/* HEPIRELOAD LITE V1.8 — MOCKUP MATCH / MOBILE-FIRST                         */
/* Smartphone UI mengikuti desain mockup: simpel, bersih, card-based, native. */
/* ========================================================================== */

.hepi-mobile-brand { display:none; }

@media (max-width: 767.98px) {
  :root {
    --mobile-purple: #5546f6;
    --mobile-purple-2: #6d5dfc;
    --mobile-purple-soft: #f0efff;
    --mobile-ink: #172033;
    --mobile-muted: #7a879d;
    --mobile-line: #e9edf5;
    --mobile-bg: #f7f9fe;
    --mobile-card-shadow: 0 10px 28px rgba(55, 65, 110, .075);
    --mobile-radius: 20px;
  }

  html, body { background: var(--mobile-bg) !important; }
  body.hepi-modern-ui { background: var(--mobile-bg) !important; padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
  body.sheet-open { overflow:hidden !important; }

  /* Native-app shell: sidebar tidak dipakai di smartphone. */
  #sidebar-wrapper,
  #sidebar-overlay { display:none !important; }
  #page-content-wrapper { width:100% !important; margin:0 !important; }

  .hepi-topbar {
    height:66px !important;
    background:rgba(255,255,255,.96) !important;
    box-shadow:0 1px 0 rgba(226,232,240,.9) !important;
    border-bottom:0 !important;
    backdrop-filter:blur(18px);
  }
  .hepi-topbar .container-fluid { padding:0 16px !important; }
  .hepi-page-head-wrap { min-width:0; flex:1; }
  .hepi-mobile-brand { display:flex; align-items:center; gap:10px; min-width:0; }
  .hepi-mobile-brand-mark {
    width:36px; height:36px; border-radius:11px; flex:0 0 36px;
    display:grid; place-items:center; color:#fff; font-weight:900; font-size:17px;
    background:linear-gradient(135deg,var(--mobile-purple),#6b8cff);
    box-shadow:0 8px 18px rgba(85,70,246,.22);
  }
  .hepi-mobile-brand-copy { display:flex; flex-direction:column; min-width:0; line-height:1.08; }
  .hepi-mobile-brand-copy strong { color:#152048; font-size:15px; letter-spacing:-.035em; white-space:nowrap; }
  .hepi-mobile-brand-copy em { color:var(--mobile-purple); font-style:italic; font-weight:700; }
  .hepi-mobile-brand-copy small { margin-top:3px; color:#8390a6; font-size:10px; font-weight:600; }
  .hepi-user-chip { padding:0 !important; background:transparent !important; box-shadow:none !important; cursor:pointer; }
  .hepi-user-copy { display:none !important; }
  .hepi-avatar {
    width:38px !important; height:38px !important; border-radius:50% !important;
    background:linear-gradient(135deg,#eff4ff,#dfe7ff) !important;
    color:var(--mobile-purple) !important; border:2px solid #fff;
    box-shadow:0 5px 15px rgba(72,84,130,.12) !important;
  }

  .hepi-app-content {
    padding:16px 14px calc(96px + env(safe-area-inset-bottom, 0px)) !important;
    max-width:680px !important;
    margin:0 auto !important;
  }

  /* Bottom navigation sama seperti mockup. */
  .bottom-nav {
    display:flex !important;
    height:calc(68px + env(safe-area-inset-bottom, 0px)) !important;
    padding:7px 8px env(safe-area-inset-bottom, 0px) !important;
    background:rgba(255,255,255,.97) !important;
    border-top:1px solid #e8edf5 !important;
    box-shadow:0 -10px 30px rgba(30,41,75,.08) !important;
    backdrop-filter:blur(18px);
    align-items:flex-start !important;
  }
  .bottom-nav-item {
    min-width:0; min-height:52px; padding:5px 2px !important; gap:3px !important;
    color:#8290a6 !important; font-size:9.5px !important; font-weight:700 !important;
    border-radius:12px; text-decoration:none !important;
  }
  .bottom-nav-item i { font-size:17px !important; }
  .bottom-nav-item.active { color:var(--mobile-purple) !important; }
  .bottom-nav-item.active::before { display:none !important; }
  .bottom-nav-item.active i { transform:none !important; }

  /* Bottom account sheet. */
  .bottom-sheet-backdrop,
  .sheet-backdrop {
    display:block !important; position:fixed; inset:0; z-index:1060;
    background:rgba(15,23,42,.34); opacity:0; visibility:hidden;
    transition:.22s ease;
  }
  .bottom-sheet-backdrop.show,
  .sheet-backdrop.show { opacity:1; visibility:visible; }
  .bottom-sheet {
    display:flex !important; position:fixed; left:0; right:0; bottom:0; z-index:1061;
    max-height:82dvh; transform:translateY(105%); transition:transform .3s cubic-bezier(.22,.8,.3,1);
    border-radius:24px 24px 0 0 !important; box-shadow:0 -18px 60px rgba(15,23,42,.18) !important;
    padding-bottom:calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .bottom-sheet.show { transform:translateY(0); }

  /* Typography / page intro. */
  .simple-page-intro { margin-bottom:14px !important; }
  .simple-page-intro h4,
  .simple-page > .d-flex h4 { font-size:22px !important; color:var(--mobile-ink); }
  .simple-page-intro p,
  .simple-page > .d-flex p { font-size:13px !important; line-height:1.45; }
  #app h4 { font-size:22px; }

  /* Segmented tabs. */
  .nav.nav-pills,
  #financeTabs,
  #settingTabs,
  #trxTabs {
    width:100% !important; max-width:100% !important;
    display:flex; flex-wrap:nowrap !important; overflow-x:auto !important;
    padding:5px !important; gap:4px !important; margin-bottom:16px !important;
    border-radius:17px !important; background:#f0f3f8 !important; border:1px solid #e7ebf2 !important;
  }
  .nav-pills .nav-item { flex:1 0 auto; }
  .nav-pills .nav-link {
    min-height:42px !important; padding:10px 13px !important; border-radius:13px !important;
    font-size:12px !important; font-weight:750 !important; color:#708097 !important; white-space:nowrap;
  }
  .nav-pills .nav-link.active {
    color:#342d84 !important; background:#fff !important;
    box-shadow:0 7px 18px rgba(38,45,85,.10) !important;
  }
  #financeTabs #tab-pengeluaran,
  #financeTabs #tab-penyesuaian { display:none !important; }

  /* Generic cards. */
  .card,
  .rounded-card,
  .simple-stat-card,
  .mobile-card {
    border:1px solid var(--mobile-line) !important;
    border-radius:var(--mobile-radius) !important;
    background:#fff !important;
    box-shadow:var(--mobile-card-shadow) !important;
  }
  .card.soft-shadow:hover { box-shadow:var(--mobile-card-shadow) !important; }
  .card-body.p-4, .card-body.p-lg-5, .card-body.p-3 { padding:17px !important; }
  .card-header { padding-left:17px !important; padding-right:17px !important; }

  .form-label { font-size:12px !important; color:#334155 !important; font-weight:700 !important; }
  .form-control,
  .form-select,
  .input-group-text {
    min-height:48px !important; border-radius:13px !important; background:#fbfcff !important;
    border-color:#e5eaf3 !important; font-size:14px;
  }
  .input-group > .input-group-text { border-radius:13px 0 0 13px !important; }
  .input-group > .form-control:not(:first-child) { border-radius:0 13px 13px 0 !important; }
  .form-text { font-size:10px !important; }
  .btn { min-height:42px; border-radius:13px !important; }
  .btn-primary { background:linear-gradient(135deg,var(--mobile-purple),var(--mobile-purple-2)) !important; }

  /* Dashboard */
  .hepi-mobile-greeting { display:flex !important; align-items:center; justify-content:space-between; padding:2px 2px 3px; }
  .hepi-mobile-hello { font-size:22px; font-weight:850; color:#152048; letter-spacing:-.04em; }
  .hepi-mobile-greeting-sub { font-size:12px; color:#8290a6; margin-top:2px; }
  .hepi-mobile-sun { color:#f7b718; font-size:26px; }
  .dashboard-intro { margin-bottom:10px !important; }
  .dashboard-intro h4 { font-size:16px !important; }
  .dashboard-intro p { display:none; }
  .dashboard-intro .btn { min-height:34px !important; padding:6px 10px; font-size:11px; }
  .hepi-mobile-kpi-grid {
    margin-left:0 !important; margin-right:0 !important; padding:12px !important;
    border-radius:22px; background:linear-gradient(135deg,#5546f6,#6f61ff);
    box-shadow:0 16px 36px rgba(85,70,246,.20);
  }
  .hepi-mobile-kpi-grid > [class*="col-"] { padding:5px !important; }
  .hepi-mobile-kpi-grid .simple-stat-card {
    min-height:92px !important; padding:13px !important; border:0 !important; box-shadow:none !important;
    align-items:flex-start !important;
  }
  .hepi-mobile-kpi-grid .simple-stat-icon { width:32px; height:32px; min-width:32px; border-radius:10px; font-size:13px; }
  .hepi-mobile-kpi-grid .simple-stat-label { font-size:9px !important; }
  .hepi-mobile-kpi-grid .simple-stat-value { font-size:16px !important; white-space:nowrap; }
  #content-dashboard > .row.g-3:not(.hepi-mobile-kpi-grid) { --bs-gutter-y:14px; }
  #cashier-activity-list { padding-top:8px !important; }
  #content-dashboard .simple-balance-row { padding:11px 0; }

  /* Transaction */
  #pane-ppob > .row > [class*="col-"] > .card,
  #pane-withdraw .card,
  #pane-history .card { max-width:100% !important; }
  #pane-ppob .card-body { padding:18px !important; }
  #pane-ppob .card-body > .d-flex.align-items-center.gap-3.mb-4 { margin-bottom:18px !important; }
  #pane-ppob .card-body > .d-flex.align-items-center.gap-3.mb-4 > div:first-child { width:42px !important; height:42px !important; }
  #pane-ppob h4 { font-size:19px !important; }
  #pane-ppob h4 + p { font-size:11px !important; }
  .lite-price-col { width:50% !important; }
  .lite-price-col .form-text { display:none; }
  #btnReloadLiteSupplier { width:34px; min-height:34px !important; padding:0 !important; border-radius:50% !important; font-size:0; }
  #btnReloadLiteSupplier i { font-size:12px; margin:0 !important; }
  #lite_profit_card { margin:14px 0 !important; padding:13px !important; }
  #lite_profit_card #lite_laba_display { font-size:18px !important; }
  #pane-ppob .border.rounded-4.p-3.p-md-4.mb-4 { background:#fafbff; border-color:#e7eaff !important; }
  #paymentRowsContainer .payment-row,
  #paymentRowsContainer > div { border-radius:13px; }
  #btnSubmitLiteTrx { width:100%; min-height:50px !important; }
  #pane-ppob form > .d-flex.flex-column.flex-md-row { flex-direction:column-reverse !important; }
  #pane-ppob form > .d-flex.flex-column.flex-md-row .btn-light { min-height:40px; }

  /* Withdraw */
  #pane-withdraw .card-body { padding:18px !important; }
  #pane-withdraw h3, #pane-withdraw h4 { font-size:20px !important; }
  #pane-withdraw .row.g-3 > .col-4 .btn { min-height:132px; border-radius:17px !important; padding:14px 6px !important; }
  #pane-withdraw .row.g-3 > .col-4 .btn i { font-size:22px !important; }
  #qrisModal .modal-dialog { margin:10px !important; }
  #qrisModal .modal-content { border-radius:22px !important; }

  /* Finance summary */
  .finance-mobile-total {
    position:relative; overflow:hidden; padding:18px; border-radius:20px;
    color:#fff; background:linear-gradient(135deg,#5546f6,#725dff);
    box-shadow:0 14px 34px rgba(85,70,246,.20);
  }
  .finance-mobile-total > i { position:absolute; right:18px; top:22px; opacity:.55; font-size:22px; }
  .finance-balance-grid { --bs-gutter-x:10px; --bs-gutter-y:10px; }
  .finance-balance-grid > div { width:50% !important; flex:0 0 50% !important; }
  .finance-balance-grid > div:last-child { width:100% !important; flex-basis:100% !important; }
  .finance-balance-grid .card { background:#fff !important; color:#172033 !important; min-height:108px; }
  .finance-balance-grid .card-body { padding:15px !important; }
  .finance-balance-grid h5 { color:#7a879d !important; opacity:1 !important; font-size:11px !important; margin-bottom:10px !important; }
  .finance-balance-grid h2 { color:#172033 !important; font-size:18px !important; }
  #pane-sumber .card-header { padding-top:16px !important; }
  #pane-sumber .card-header .d-flex.gap-2 { width:100%; }
  #pane-sumber .card-header .btn-primary { flex:1; }
  #pane-sumber .card-header .input-group { max-width:none !important; width:100% !important; }
  #pane-mutasi .card-header h5 { font-size:17px; }
  .sticky-search { margin-left:0 !important; margin-right:0 !important; padding:0 14px; }

  /* Proper mobile cards for all list/table content. */
  .mobile-card {
    padding:14px !important; margin-bottom:12px !important; overflow:hidden;
  }
  .mc-header { display:flex; align-items:center; gap:11px; min-width:0; }
  .mc-icon {
    width:38px; height:38px; min-width:38px; display:grid; place-items:center;
    border-radius:12px; font-size:15px;
  }
  .mc-body { min-width:0; flex:1; }
  .mc-title { color:#172033; font-weight:800; font-size:14px; line-height:1.25; overflow-wrap:anywhere; }
  .mc-subtitle { color:#8490a3; font-size:10.5px; margin-top:3px; line-height:1.3; overflow-wrap:anywhere; }
  .mc-actions {
    display:flex; gap:7px !important; flex-wrap:wrap; border-top:1px dashed #e8edf4 !important;
    margin-top:12px !important; padding-top:10px !important;
  }
  .mc-btn {
    min-height:34px; padding:7px 10px; border:1px solid #e5eaf2; border-radius:10px !important;
    background:#fff; color:#526078; font-size:10.5px; font-weight:750; flex:1 1 auto;
  }
  .mc-btn.edit { color:#4438b8; background:#f7f6ff; border-color:#e2ddff; }
  .mc-btn.delete { color:#d6455d; background:#fff7f8; border-color:#ffe0e5; }
  .mc-btn.print { color:#4b5870; background:#f8fafc; }
  .border-top-dashed { border-top:1px dashed #e8edf4 !important; }

  /* Tabel desktop diubah menjadi kartu list di HP. */
  #reportTableBody,
  #table-sumber,
  #table-mutasi,
  #table-tariffs,
  #table-trx-today { display:block; width:100%; }
  #reportTableBody > tr,
  #table-sumber > tr,
  #table-mutasi > tr,
  #table-tariffs > tr,
  #table-trx-today > tr { display:block; width:100%; }
  #reportTableBody > tr > td,
  #table-sumber > tr > td,
  #table-mutasi > tr > td,
  #table-tariffs > tr > td,
  #table-trx-today > tr > td { display:block; width:100%; }
  #reportTableBody ~ *, #table-sumber ~ * { min-width:0; }
  #pane-history table,
  #pane-sumber table,
  #pane-mutasi table,
  #tarif-pane table,
  .simple-page table:has(#reportTableBody) { display:block; width:100%; }
  #pane-history thead,
  #pane-sumber thead,
  #pane-mutasi thead,
  #tarif-pane thead,
  table:has(#reportTableBody) thead { display:none !important; }
  #pane-history .table-responsive,
  #pane-sumber .table-responsive,
  #pane-mutasi .table-responsive,
  #tarif-pane .table-responsive,
  .simple-page .table-responsive { overflow:visible !important; }

  /* Report */
  .simple-periods { width:100%; display:grid !important; grid-template-columns:repeat(3,1fr); gap:6px !important; }
  .simple-periods .btn { min-width:0; padding:8px 5px; font-size:11px; }
  .report-summary-grid > div { padding:5px !important; }
  .report-summary-grid .simple-stat-card { min-height:86px !important; padding:13px !important; }
  .report-summary-grid .simple-stat-icon { width:34px; height:34px; min-width:34px; }
  .report-summary-grid .simple-stat-value { font-size:14px !important; }
  .simple-page > .card.mb-4 .row.g-3 > [class*="col-"] { margin-top:8px; }

  /* Settings */
  #settingTabs .nav-link i { margin-right:5px !important; }
  #settingTabsContent .card { box-shadow:var(--mobile-card-shadow) !important; }
  #tarif-pane .mobile-card .d-flex.justify-content-between { gap:8px; }

  /* Shift forms also inherit compact native card language. */
  #cashier-shift-page .simple-stat-card,
  #shift-monitor-page .simple-stat-card { border-radius:16px !important; box-shadow:none !important; }
  #cashier-shift-page .simple-balance-row { padding:10px 0; }

  /* SweetAlert and modals never overflow viewport. */
  .swal2-popup { width:calc(100vw - 28px) !important; max-width:420px !important; border-radius:20px !important; }
  .modal-dialog { margin:12px !important; }
}


/* HEPIRELOAD LITE V1.9 — INSTALLABLE PWA */
@media (max-width: 767.98px) {
  #pwa-install-btn {
    min-height:52px;
    border-radius:16px !important;
    border-color:#d9dcff !important;
    box-shadow:0 8px 22px rgba(85,70,246,.08);
  }
  #pwa-install-btn.btn-primary {
    border:0 !important;
    color:#fff !important;
    background:linear-gradient(135deg,#5546f6,#6d5dfc) !important;
  }
  @media (display-mode: standalone) {
    body.hepi-modern-ui { overscroll-behavior-y:none; }
    .hepi-topbar { padding-top:env(safe-area-inset-top,0px); height:calc(66px + env(safe-area-inset-top,0px)) !important; }
  }
}
