/*
 * GeoAbsen V3 - "Emerald Glass Ocean" (Dark & Light Theme)
 * Layout floating: sidebar & topbar melayang dengan sudut membulat,
 * panel kaca (glassmorphism), palet emerald-teal.
 * Diaktifkan lewat atribut data-theme="light" pada <html>.
 * Font: Manrope (body) + Sora (display/angka).
 */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Sora:wght@400;600;700;800&display=swap');

/* ============ THEME VARIABLES: DARK (default) ============ */
:root {
  --bg-body: #0a1322;
  --panel-strong: rgba(19, 35, 58, 0.94);
  --icon-btn-bg: rgba(255, 255, 255, 0.06);
  --input-bg: rgba(255, 255, 255, 0.07);
  --list-bg: rgba(255, 255, 255, 0.04);
  --sidebar-foot-bg: rgba(6, 13, 24, 0.45);
  --border: rgba(148, 197, 189, 0.18);
  --border-glow: rgba(52, 211, 153, 0.5);

  --emerald: #34d399;
  --teal: #2dd4bf;
  --cyan-soft: #67e8f9;
  --violet-soft: #a5b4fc;
  --blue-soft: #7dd3fc;
  --amber-soft: #fde047;
  --rose: #fb7185;
  --rose-soft: #fda4af;
  --green-soft: #6ee7b7;

  --accent: linear-gradient(135deg, #34d399 0%, #14b8a6 100%);

  /* PERBAIKAN DARK MODE: Font Kontras Tinggi (High Contrast & Legibility) */
  --text-main: #ffffff;
  --text-muted: #e2e8f0;
  --text-dim: #cbd5e1;

  --glass-grad: linear-gradient(168deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  --stat-grad: linear-gradient(168deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  --hero-bg:
    radial-gradient(600px 260px at 85% 0%, rgba(52, 211, 153, 0.16), transparent 65%),
    radial-gradient(500px 240px at 15% 110%, rgba(45, 212, 191, 0.14), transparent 60%),
    linear-gradient(168deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  --hero-clock-grad: linear-gradient(135deg, #6ee7b7 0%, #5eead4 100%);

  --thead-bg: rgba(52, 211, 153, 0.12);
  --tbody-hover: rgba(52, 211, 153, 0.08);
  --map-bg: #0a1322;
  --scroll-thumb: #2b4257;
  --orb-opacity: 0.5;

  --shadow-floating: 0 24px 60px -12px rgba(0, 0, 0, 0.55);
  --glow-emerald: 0 0 26px rgba(52, 211, 153, 0.35);

  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --btn-close-filter: invert(1) grayscale(100%) brightness(200%);
}

/* ============ THEME VARIABLES: LIGHT ============ */
html[data-theme="light"] {
  --bg-body: #eef4f1;
  --panel-strong: rgba(255, 255, 255, 0.92);
  --icon-btn-bg: rgba(255, 255, 255, 0.7);
  --input-bg: #ffffff;
  --list-bg: rgba(255, 255, 255, 0.6);
  --sidebar-foot-bg: rgba(226, 240, 233, 0.7);
  --border: rgba(13, 94, 78, 0.14);
  --border-glow: rgba(5, 150, 105, 0.4);

  --emerald: #059669;
  --teal: #0d9488;
  --cyan-soft: #0891b2;
  --violet-soft: #6d28d9;
  --blue-soft: #0369a1;
  --amber-soft: #b45309;
  --rose: #e11d48;
  --rose-soft: #be123c;
  --green-soft: #047857;

  --accent: linear-gradient(135deg, #10b981 0%, #0d9488 100%);

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --glass-grad: linear-gradient(168deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.4));
  --stat-grad: linear-gradient(168deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.42));
  --hero-bg:
    radial-gradient(600px 260px at 85% 0%, rgba(16, 185, 129, 0.12), transparent 65%),
    radial-gradient(500px 240px at 15% 110%, rgba(13, 148, 136, 0.1), transparent 60%),
    linear-gradient(168deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.55));
  --hero-clock-grad: linear-gradient(135deg, #047857 0%, #0d9488 100%);

  --thead-bg: rgba(5, 150, 105, 0.08);
  --tbody-hover: rgba(5, 150, 105, 0.06);
  --map-bg: #e2e8f0;
  --scroll-thumb: #cbd5e1;
  --orb-opacity: 0.22;

  --shadow-floating: 0 20px 45px -12px rgba(15, 23, 42, 0.18);
  --glow-emerald: 0 0 18px rgba(16, 185, 129, 0.25);
  --btn-close-filter: none;
}

/* ============ THEME VARIABLES: SUNSET (SORE KUNING SENJA / GOLDEN HOUR) ============ */
html[data-theme="sunset"] {
  --bg-body: #fdf5ea;
  --panel-strong: rgba(255, 252, 245, 0.94);
  --icon-btn-bg: rgba(255, 255, 255, 0.85);
  --input-bg: #ffffff;
  --list-bg: rgba(255, 251, 240, 0.75);
  --sidebar-foot-bg: rgba(254, 243, 225, 0.85);
  --border: rgba(217, 119, 6, 0.18);
  --border-glow: rgba(245, 158, 11, 0.45);

  --emerald: #d97706; /* Golden Amber primary accent */
  --teal: #f59e0b;    /* Warm Amber */
  --cyan-soft: #ea580c; /* Coral Sunset */
  --violet-soft: #c084fc;
  --blue-soft: #f97316;
  --amber-soft: #d97706;
  --rose: #e11d48;
  --rose-soft: #fb7185;
  --green-soft: #b45309;

  --accent: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);

  --text-main: #291e14;
  --text-muted: #786555;
  --text-dim: #a89485;

  --glass-grad: linear-gradient(168deg, rgba(255, 255, 255, 0.85), rgba(254, 243, 199, 0.5));
  --stat-grad: linear-gradient(168deg, rgba(255, 255, 255, 0.82), rgba(254, 243, 199, 0.52));
  --hero-bg:
    radial-gradient(600px 260px at 85% 0%, rgba(245, 158, 11, 0.18), transparent 65%),
    radial-gradient(500px 240px at 15% 110%, rgba(234, 88, 12, 0.15), transparent 60%),
    linear-gradient(168deg, rgba(255, 255, 255, 0.92), rgba(254, 243, 199, 0.65));
  --hero-clock-grad: linear-gradient(135deg, #d97706 0%, #ea580c 100%);

  --thead-bg: rgba(245, 158, 11, 0.12);
  --tbody-hover: rgba(245, 158, 11, 0.08);
  --map-bg: #fef3c7;
  --scroll-thumb: #fed7aa;
  --orb-opacity: 0.38;

  --shadow-floating: 0 20px 45px -12px rgba(120, 53, 15, 0.16);
  --glow-emerald: 0 0 20px rgba(245, 158, 11, 0.35);
  --btn-close-filter: none;
}

html[data-theme="sunset"] body {
  background: radial-gradient(circle at 90% 10%, rgba(251, 191, 36, 0.25), transparent 45%),
              radial-gradient(circle at 10% 90%, rgba(249, 115, 22, 0.18), transparent 45%),
              var(--bg-body);
}

html[data-theme="sunset"] .orb-1 { background: radial-gradient(circle, rgba(245, 158, 11, 0.55), transparent 70%); }
html[data-theme="sunset"] .orb-2 { background: radial-gradient(circle, rgba(234, 88, 12, 0.45), transparent 70%); }
html[data-theme="sunset"] .orb-3 { background: radial-gradient(circle, rgba(251, 146, 60, 0.35), transparent 70%); }

/* ============ BASE ============ */
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }

body, .sidebar-wrapper, .topbar, .login-card, .card, .panel-strong, .modal-content {
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

/* ============ UNIVERSAL MODAL THEME FIX ============ */
.modal-content {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35) !important;
  opacity: 1 !important;
}

[data-theme="dark"] .modal-content {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="sunset"] .modal-content {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(217, 119, 6, 0.2) !important;
}

.modal-header {
  border-bottom: 1px solid var(--border) !important;
  background-color: inherit !important;
  color: inherit !important;
}

.modal-footer {
  border-top: 1px solid var(--border) !important;
  background-color: inherit !important;
  color: inherit !important;
}

.modal .form-control,
.modal .form-select {
  background-color: var(--input-bg) !important;
  color: var(--text-main) !important;
  border-color: var(--border) !important;
}

.modal .form-control:focus,
.modal .form-select:focus {
  border-color: var(--emerald) !important;
  color: var(--text-main) !important;
}

.modal .table {
  color: var(--text-main) !important;
}

html[data-theme="light"] .modal .btn-close,
html[data-theme="sunset"] .modal .btn-close {
  filter: none !important;
}

html[data-theme="dark"] .modal .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%) !important;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--emerald); }

body {
  font-family: 'Manrope', -apple-system, "Segoe UI", sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease;
}

/* Background Orbs */
.orb {
  position: fixed;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  opacity: var(--orb-opacity);
}

.orb-1 { width: 480px; height: 480px; top: -140px; right: -120px; background: radial-gradient(circle, rgba(52, 211, 153, 0.55), transparent 70%); }
.orb-2 { width: 420px; height: 420px; bottom: -160px; left: -140px; background: radial-gradient(circle, rgba(45, 212, 191, 0.5), transparent 70%); }
.orb-3 { width: 300px; height: 300px; top: 45%; left: 55%; background: radial-gradient(circle, rgba(129, 140, 248, 0.35), transparent 70%); }

h1, h2, h3, h4, h5, h6, .display-font { font-family: 'Sora', 'Manrope', sans-serif; letter-spacing: -0.02em; }
a { text-decoration: none; }

/* Animasi masuk halaman */
.fade-up { animation: fadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.12s; }
.fade-up-3 { animation-delay: 0.19s; }
.fade-up-4 { animation-delay: 0.26s; }
.fade-up-5 { animation-delay: 0.33s; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ============ SIDEBAR FLOATING ============ */
.sidebar-wrapper {
  position: fixed;
  top: 14px;
  left: 14px;
  bottom: 14px;
  width: 256px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  background: var(--panel-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-floating);
  overflow: hidden;
  transition: width 0.65s ease-in-out, transform 0.65s ease-in-out, background 0.3s ease;
}

.sidebar-brand { display: flex; align-items: center; gap: 13px; padding: 22px 20px 18px; overflow: hidden; }
.sidebar-logo { width: 44px; height: 44px; min-width: 44px; border-radius: 14px; background: var(--accent); display: flex; align-items: center; justify-content: center; color: #04201a; font-size: 1.3rem; box-shadow: var(--glow-emerald); position: relative; }
.sidebar-logo::after { content: ''; position: absolute; inset: 0; border-radius: 14px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45); pointer-events: none; }
.sidebar-brand-text { font-family: 'Sora', sans-serif; font-weight: 800; color: var(--text-main); font-size: 1.05rem; margin: 0; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; word-break: break-word; }
.sidebar-brand-sub { font-size: 9px; letter-spacing: 0.22em; color: var(--text-dim); text-transform: uppercase; }
.sidebar-group { font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--emerald); padding: 16px 22px 7px; display: block; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 2px 12px 12px; }
.nav-link-custom { display: flex; align-items: center; gap: 12px; padding: 10.5px 13px; margin-bottom: 4px; border-radius: var(--radius-md); color: var(--text-muted); font-size: 0.85rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; transition: all 0.18s ease; }
.nav-link-custom i { width: 20px; min-width: 20px; text-align: center; font-size: 1rem; color: var(--text-dim); transition: color 0.18s; }
.nav-link-custom:hover { color: var(--text-main); background: rgba(52, 211, 153, 0.08); border-color: rgba(52, 211, 153, 0.18); }
.nav-link-custom:hover i { color: var(--emerald); }
.nav-link-custom.active { background: var(--accent); color: #04201a; font-weight: 800; box-shadow: var(--glow-emerald); }
.nav-link-custom.active i { color: #04201a; }
.menu-badge-count { background: var(--accent); color: #04201a; font-weight: 800; font-size: 11px; padding: 2px 7.5px; border-radius: 12px; line-height: 1.35; display: inline-flex; align-items: center; justify-content: center; min-width: 20px; text-align: center; }
.nav-link-custom.active .menu-badge-count { background: rgba(4, 32, 26, 0.22); color: #04201a; border: 1px solid rgba(4, 32, 26, 0.18); }
.sidebar-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; font-size: 0.72rem; color: var(--text-dim); background: var(--sidebar-foot-bg); }
.sidebar-foot .badge { background: var(--accent); color: #04201a; font-weight: 800; border-radius: 8px; padding: 0.4em 0.7em; }

/* ============ MAIN CONTENT ============ */
.main-content {
  position: relative;
  margin-left: 284px;
  padding: 14px 22px 30px 10px;
  min-height: 100vh;
  max-width: calc(100vw - 284px);
  transition: margin-left 0.65s ease-in-out, max-width 0.65s ease-in-out;
}

/* ============ TOPBAR FLOATING ============ */
.topbar {
  position: sticky;
  top: 14px;
  z-index: 1020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-floating);
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.topbar-title h4 { font-weight: 800; color: var(--text-main); margin: 0; font-size: 1.1rem; }
.topbar-title small { color: var(--text-muted); font-size: 0.72rem; }

.icon-btn { width: 38px; height: 38px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--icon-btn-bg); color: var(--text-muted); display: flex; align-items: center; justify-content: center; position: relative; transition: all 0.2s; cursor: pointer; }
.icon-btn:hover { color: var(--emerald); border-color: var(--border-glow); box-shadow: 0 0 16px rgba(52, 211, 153, 0.25); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 8px rgba(251, 113, 133, 0.8); }

.avatar-chip { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 14px; border: 1px solid var(--border); background: var(--icon-btn-bg); transition: border-color 0.2s; }
.avatar-chip:hover { border-color: var(--border-glow); }

/* ============ DROPDOWN MENU MODERN ============ */
.dropdown-menu {
  background: var(--panel-strong) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25) !important;
  backdrop-filter: blur(16px);
  padding: 8px !important;
  z-index: 1070 !important;
}
.dropdown-menu .dropdown-item {
  color: var(--text-main);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.18s ease;
}
.dropdown-menu .dropdown-item:hover {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald);
}
.dropdown-menu .dropdown-divider {
  border-color: var(--border);
  margin: 6px 0;
  opacity: 0.6;
}

/* ============ RESPONSIVE (MOBILE OPTIMIZATION) ============ */
@media (max-width: 991.98px) {
  .sidebar-wrapper {
    transform: translateX(-110%);
    top: 0; left: 0; bottom: 0; margin: 0;
    border-radius: 0 24px 24px 0;
    width: 280px;
  }

  body.sidebar-open .sidebar-wrapper { transform: translateX(0); z-index: 1055; }

  /* Overlay backdrop saat sidebar terbuka di mobile */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1050;
    cursor: pointer;
  }
  body.sidebar-open .sidebar-backdrop {
    display: block !important;
  }

  .main-content {
    margin-left: 0;
    max-width: 100vw;
    padding: 10px 10px 80px; /* Jarak bawah buat jempol */
  }

  .topbar {
    top: 0;
    margin-bottom: 18px;
    border-radius: 0 0 20px 20px;
    padding: 15px 16px;
    min-height: 72px;
    gap: 12px;
    overflow: visible;
  }

  .topbar-title {
    min-width: 0;
    overflow: hidden;
  }

  .topbar-title h4 {
    font-size: 1.05rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
  }

  .topbar-title small {
    font-size: 0.75rem;
    margin-top: 2px;
  }

  .icon-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    font-size: 0.95rem;
    border-radius: 12px;
  }

  .avatar-chip {
    padding: 0;
    border: none;
    background: transparent;
  }

  .avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    max-width: 38px;
    max-height: 38px;
    aspect-ratio: 1 / 1;
    font-size: 0.88rem;
    border-radius: 50% !important;
  }

  /* Hero Card Mobile */
  .hero-card { padding: 1.2rem; }
  .hero-clock { font-size: 2.1rem; }

  /* Grid Stat Cards Mobile */
  .stat-card { padding: 1rem; min-height: 90px; }
  .stat-num { font-size: 1.5rem; }
  .stat-ico { width: 40px; height: 40px; min-width: 40px; font-size: 1rem; }

  /* Table Mobile Scroll */
  .table-responsive {
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--input-bg);
  }

  .et-table thead th { padding: 0.7rem; font-size: 0.62rem; }
  .et-table tbody td { padding: 0.7rem; font-size: 0.78rem; }

  /* Tombol dan Input nyaman jempol di HP / WebView */
  .btn, .form-control, .form-select, .select2-container .select2-selection--single {
    min-height: 42px;
  }

  .modal-dialog {
    margin: 12px auto;
    max-width: 95vw !important;
  }
}

/* ============ MOBILE BOTTOM NAVIGATION (KHUSUS HP / WEBVIEW) ============ */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--panel-strong, #111e33);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1040;
  padding: 4px 8px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-dim, #94a3b8);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  gap: 3px;
  padding: 6px 12px;
  border-radius: 12px;
  transition: all 0.2s ease;
  min-width: 60px;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item i {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item:active {
  color: var(--emerald, #10b981);
}

.mobile-nav-item.active {
  color: var(--emerald, #10b981);
  background: rgba(16, 185, 129, 0.12);
}

.mobile-nav-item.active i {
  transform: translateY(-1px);
}

/* ============ CARDS GLASS ============ */
.glass-card { background: var(--glass-grad); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-floating); transition: all 0.25s ease; overflow: hidden; }
.glass-card.hoverable:hover { border-color: var(--border-glow); transform: translateY(-4px); box-shadow: var(--shadow-floating), 0 0 30px rgba(52, 211, 153, 0.12); }
.card-head { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 12px; 
    margin-bottom: 1rem; 
    flex-wrap: wrap;
}

@media (max-width: 767.98px) {
    .card-head {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .card-head > div:first-child,
    .card-head > .d-flex:first-child {
        width: 100% !important;
        max-width: 100% !important;
    }
    .card-head > .d-flex:last-child:not(.card-head-filters),
    .card-head > .btn-group,
    .card-head > .chip,
    .card-head > div:last-child:not(:first-child):not(.card-head-filters) {
        width: 100% !important;
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .card-head .btn-group {
        width: 100% !important;
        display: flex !important;
    }
    .card-head .btn-group .btn {
        flex: 1 1 auto !important;
        text-align: center !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
        font-size: 0.8rem !important;
    }
}

/* ============ SEGMENTED STATUS FILTERS (MODERN PILL TABS) ============ */
.card-head-filters {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: var(--input-bg, rgba(255, 255, 255, 0.04)) !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    padding: 4px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}
.card-head-filters::-webkit-scrollbar {
    display: none;
}
.card-head-filters .btn {
    white-space: nowrap !important;
    flex: 1 1 auto;
    min-width: max-content !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    padding: 6px 14px !important;
    border-radius: 10px !important;
    border: none !important;
    background: transparent !important;
    color: var(--text-muted) !important;
    box-shadow: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
}
.card-head-filters .btn .badge {
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 2px 6px !important;
    border-radius: 999px !important;
    line-height: 1.1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.card-head-filters .btn:hover {
    color: var(--text-main) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}
.card-head-filters .btn.active,
.card-head-filters .btn.btn-emerald {
    background: #10b981 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4) !important;
}
.card-head-filters .btn.active .badge {
    background: #ffffff !important;
    color: #065f46 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}
.card-head-filters .btn:not(.active) .badge {
    background: rgba(234, 179, 8, 0.2) !important;
    color: #d97706 !important;
    border: 1px solid rgba(234, 179, 8, 0.3) !important;
}

@media (max-width: 767.98px) {
    .card-head-filters {
        width: 100% !important;
        display: flex !important;
        justify-content: flex-start !important;
        gap: 4px !important;
        padding: 4px !important;
        overflow-x: auto !important;
    }
    .card-head-filters .btn {
        flex: 1 1 auto !important;
        padding: 7px 11px !important;
        font-size: 0.78rem !important;
        text-align: center !important;
        min-width: max-content !important;
        gap: 5px !important;
    }
}

/* Custom Search Box V3 */
.search-box-v3 {
    position: relative;
    width: 280px;
    max-width: 100%;
}
@media (max-width: 767.98px) {
    .search-box-v3 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }
}
.search-box-v3 i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 13px;
    pointer-events: none;
}
.search-box-v3 .form-control {
    padding: 10px 15px 10px 38px;
    border-radius: 14px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.search-box-v3 .form-control:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
    width: 100%;
}
[data-theme="light"] .search-box-v3 .form-control { background: #f8fafc; }
.card-head h6 { font-weight: 700; color: var(--text-main); margin: 0; font-size: 0.95rem; }

/* Perfect Table Action Buttons (Fixes elongated oval bug) */
.table td .btn.rounded-circle,
.table td .btn-glass.rounded-circle,
.table td .btn-sm.rounded-circle,
.btn-action-round {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    line-height: 1 !important;
    border: 1px solid var(--border) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.table td .btn.rounded-circle:hover,
.table td .btn-glass.rounded-circle:hover,
.table td .btn-sm.rounded-circle:hover,
.btn-action-round:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--emerald) !important;
}
html[data-theme="light"] .table td .btn.rounded-circle,
html[data-theme="light"] .table td .btn-glass.rounded-circle,
html[data-theme="light"] .table td .btn-sm.rounded-circle,
html[data-theme="light"] .btn-action-round {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}
html[data-theme="light"] .table td .btn.rounded-circle:hover,
html[data-theme="light"] .table td .btn-glass.rounded-circle:hover,
html[data-theme="light"] .table td .btn-sm.rounded-circle:hover,
html[data-theme="light"] .btn-action-round:hover {
    background: #ffffff !important;
    color: #059669 !important;
    border-color: #10b981 !important;
}

/* ============ HERO & OWNER EXECUTIVE HUB ============ */
.hero-card { position: relative; overflow: hidden; padding: 1.6rem 1.8rem; margin-bottom: 22px; border-radius: var(--radius-xl); border: 1px solid var(--border); background: var(--hero-bg); box-shadow: var(--shadow-floating); }
.hero-clock { font-family: 'Sora', sans-serif; font-size: 2.6rem; font-weight: 800; line-height: 1; background: var(--hero-clock-grad); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.quick-btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 14px; font-weight: 800; font-size: 0.86rem; border: none; transition: all 0.2s ease; }
.quick-btn.checkin { background: var(--accent); color: #04201a; box-shadow: var(--glow-emerald); }
.quick-btn.checkin:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(52, 211, 153, 0.5); }
.quick-btn.checkout { background: var(--icon-btn-bg); color: var(--text-main); border: 1px solid var(--border); }
.quick-btn.checkout:hover { border-color: var(--border-glow); color: var(--emerald); transform: translateY(-2px); }

/* Owner Executive Hub & Shortcuts */
/* Native App Header & Grid Menu (Ala Mobile App Referensi - Bersih & Profesional) */
.app-header-card {
  padding: 1.15rem 1.35rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl, 20px);
  margin-bottom: 20px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.03);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .app-header-card {
  background: var(--panel-strong, #1e293b);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.app-logo-box {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

[data-theme="dark"] .app-logo-box {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.app-header-card:hover .app-logo-box {
  transform: scale(1.03);
}

.app-grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 8px;
  margin-top: 16px;
  padding: 6px 2px;
}

@media (min-width: 992px) {
  .app-grid-container {
    grid-template-columns: repeat(6, 1fr);
    gap: 22px 14px;
  }
}

.app-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none !important;
  color: var(--text-main);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.app-grid-item:hover, .app-grid-item:active {
  transform: translateY(-2px);
}

.app-grid-icon-wrap {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.03);
}

.app-grid-item:hover .app-grid-icon-wrap {
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.app-grid-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  color: #334155;
  max-width: 82px;
  word-wrap: break-word;
}

[data-theme="dark"] .app-grid-label {
  color: #cbd5e1;
}

.app-grid-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

[data-theme="dark"] .app-grid-badge {
  border-color: #1e293b;
}

/* PALET PROFESIONAL SOFT TINTS (TIDAK NEON / BUKAN BLOK TERANG) */
/* Light Mode: Soft pastel background + Deep corporate icon color */
.ico-emerald {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #d1fae5 !important;
}
.ico-blue {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #dbeafe !important;
}
.ico-indigo {
  background: #eef2ff !important;
  color: #4338ca !important;
  border: 1px solid #e0e7ff !important;
}
.ico-amber {
  background: #fffbeb !important;
  color: #b45309 !important;
  border: 1px solid #fef3c7 !important;
}
.ico-rose {
  background: #fff1f2 !important;
  color: #be123c !important;
  border: 1px solid #ffe4e6 !important;
}
.ico-pink {
  background: #fdf2f8 !important;
  color: #be185d !important;
  border: 1px solid #fce7f3 !important;
}
.ico-cyan {
  background: #ecfeff !important;
  color: #0e7490 !important;
  border: 1px solid #cffafe !important;
}
.ico-purple {
  background: #f5f3ff !important;
  color: #6d28d9 !important;
  border: 1px solid #ede9fe !important;
}
.ico-teal {
  background: #f0fdfa !important;
  color: #0f766e !important;
  border: 1px solid #ccfbf1 !important;
}
.ico-orange {
  background: #fff7ed !important;
  color: #c2410c !important;
  border: 1px solid #ffedd5 !important;
}
.ico-slate {
  background: #f8fafc !important;
  color: #475569 !important;
  border: 1px solid #e2e8f0 !important;
}

/* Dark Mode: Muted subtle dark tint background + Readable calm colors */
[data-theme="dark"] .ico-emerald { background: rgba(16, 185, 129, 0.12) !important; color: #34d399 !important; border-color: rgba(52, 211, 153, 0.22) !important; }
[data-theme="dark"] .ico-blue    { background: rgba(59, 130, 246, 0.12) !important; color: #60a5fa !important; border-color: rgba(96, 165, 250, 0.22) !important; }
[data-theme="dark"] .ico-indigo  { background: rgba(99, 102, 241, 0.12) !important; color: #818cf8 !important; border-color: rgba(129, 140, 248, 0.22) !important; }
[data-theme="dark"] .ico-amber   { background: rgba(245, 158, 11, 0.12) !important; color: #fbbf24 !important; border-color: rgba(251, 191, 36, 0.22) !important; }
[data-theme="dark"] .ico-rose    { background: rgba(239, 68, 68, 0.12) !important; color: #f87171 !important; border-color: rgba(248, 113, 113, 0.22) !important; }
[data-theme="dark"] .ico-pink    { background: rgba(236, 72, 153, 0.12) !important; color: #f472b6 !important; border-color: rgba(244, 114, 182, 0.22) !important; }
[data-theme="dark"] .ico-cyan    { background: rgba(6, 182, 212, 0.12) !important; color: #22d3ee !important; border-color: rgba(34, 211, 238, 0.22) !important; }
[data-theme="dark"] .ico-purple  { background: rgba(139, 92, 246, 0.12) !important; color: #a78bfa !important; border-color: rgba(167, 139, 250, 0.22) !important; }
[data-theme="dark"] .ico-teal    { background: rgba(20, 184, 166, 0.12) !important; color: #2dd4bf !important; border-color: rgba(45, 212, 191, 0.22) !important; }
[data-theme="dark"] .ico-orange  { background: rgba(249, 115, 22, 0.12) !important; color: #fb923c !important; border-color: rgba(251, 146, 60, 0.22) !important; }
[data-theme="dark"] .ico-slate   { background: rgba(148, 163, 184, 0.12) !important; color: #cbd5e1 !important; border-color: rgba(203, 213, 225, 0.22) !important; }

/* ============ FLOATING ONBOARDING MODAL OVERLAY (JENDELA MENGAMBANG) ============ */
.floating-onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1070;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInBackdrop 0.22s ease;
}

.floating-onboarding-window {
  max-width: 460px;
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
  animation: floatInUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

[data-theme="dark"] .floating-onboarding-window {
  background: var(--bg-card, #1e293b);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes floatInUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============ STAT CARDS ============ */
.stat-card { position: relative; overflow: hidden; padding: 1.15rem 1.25rem; border-radius: var(--radius-lg); background: var(--stat-grad); border: 1px solid var(--border); height: 100%; min-height: 104px; transition: all 0.22s ease; }
.stat-card::after { content: ''; position: absolute; top: -45%; right: -25%; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(52, 211, 153, 0.14), transparent 70%); pointer-events: none; }
.stat-card:hover { border-color: var(--border-glow); transform: translateY(-4px); box-shadow: var(--shadow-floating), 0 0 26px rgba(52, 211, 153, 0.13); }
.stat-label { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-num { font-family: 'Sora', sans-serif; font-size: 1.85rem; font-weight: 800; line-height: 1.2; margin-top: 0.2rem; color: var(--text-main); }
.stat-ico { width: 46px; height: 46px; min-width: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; color: #04201a !important; }
.stat-ico.emerald { background: var(--accent); box-shadow: var(--glow-emerald); }
.stat-ico.green { background: linear-gradient(135deg, #059669, #34d399); box-shadow: 0 0 18px rgba(52, 211, 153, 0.35); }
.stat-ico.amber { background: linear-gradient(135deg, #d97706, #fbbf24); box-shadow: 0 0 18px rgba(251, 191, 36, 0.35); }
.stat-ico.rose { background: linear-gradient(135deg, #e11d48, #fb7185); box-shadow: 0 0 18px rgba(251, 113, 133, 0.35); }

/* Status Styles */
.c-green { color: var(--green-soft) !important; }
.c-amber { color: var(--amber-soft) !important; }
.c-rose { color: var(--rose-soft) !important; }

/* ============ CHIPS / BADGES ============ */
.chip {
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.38em 0.75em;
  font-size: 0.73rem;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Dark Mode Chips (High Contrast) */
.chip-success   { background: rgba(52, 211, 153, 0.16) !important; color: #6ee7b7 !important; border: 1px solid rgba(52, 211, 153, 0.4) !important; }
.chip-warning   { background: rgba(251, 191, 36, 0.16) !important; color: #fde047 !important; border: 1px solid rgba(251, 191, 36, 0.4) !important; }
.chip-danger    { background: rgba(251, 113, 133, 0.16) !important; color: #fca5a5 !important; border: 1px solid rgba(251, 113, 133, 0.4) !important; }
.chip-teal      { background: rgba(45, 212, 191, 0.16) !important; color: #5eead4 !important; border: 1px solid rgba(45, 212, 191, 0.4) !important; }
.chip-info      { background: rgba(56, 189, 248, 0.16) !important; color: #7dd3fc !important; border: 1px solid rgba(56, 189, 248, 0.4) !important; }
.chip-violet    { background: rgba(167, 139, 250, 0.16) !important; color: #c4b5fd !important; border: 1px solid rgba(167, 139, 250, 0.4) !important; }
.chip-secondary { background: rgba(148, 163, 184, 0.16) !important; color: #e2e8f0 !important; border: 1px solid rgba(148, 163, 184, 0.4) !important; }

/* Light Mode Chips */
html[data-theme="light"] .chip-success   { color: #065f46 !important; background: rgba(5, 150, 105, 0.12) !important; border: 1px solid rgba(5, 150, 105, 0.3) !important; }
html[data-theme="light"] .chip-warning   { color: #92400e !important; background: rgba(217, 119, 6, 0.12) !important; border: 1px solid rgba(217, 119, 6, 0.3) !important; }
html[data-theme="light"] .chip-danger    { color: #9f1239 !important; background: rgba(225, 29, 72, 0.12) !important; border: 1px solid rgba(225, 29, 72, 0.3) !important; }
html[data-theme="light"] .chip-teal      { color: #115e59 !important; background: rgba(13, 148, 136, 0.12) !important; border: 1px solid rgba(13, 148, 136, 0.3) !important; }
html[data-theme="light"] .chip-info      { color: #075985 !important; background: rgba(2, 132, 199, 0.12) !important; border: 1px solid rgba(2, 132, 199, 0.3) !important; }
html[data-theme="light"] .chip-violet    { color: #5b21b6 !important; background: rgba(124, 58, 237, 0.12) !important; border: 1px solid rgba(124, 58, 237, 0.3) !important; }
html[data-theme="light"] .chip-secondary { color: #334155 !important; background: rgba(100, 116, 139, 0.12) !important; border: 1px solid rgba(100, 116, 139, 0.3) !important; }

/* Status Badges (Dark Mode High Contrast) */
.badge.status-success   { background: rgba(52, 211, 153, 0.18) !important; color: #6ee7b7 !important; border: 1px solid rgba(52, 211, 153, 0.4) !important; border-radius: 10px; padding: 0.45em 0.75em; font-size: 0.72rem; font-weight: 700; }
.badge.status-danger    { background: rgba(251, 113, 133, 0.18) !important; color: #fca5a5 !important; border: 1px solid rgba(251, 113, 133, 0.4) !important; border-radius: 10px; padding: 0.45em 0.75em; font-size: 0.72rem; font-weight: 700; }
.badge.status-warning   { background: rgba(251, 191, 36, 0.18) !important; color: #fde047 !important; border: 1px solid rgba(251, 191, 36, 0.4) !important; border-radius: 10px; padding: 0.45em 0.75em; font-size: 0.72rem; font-weight: 700; }
.badge.status-secondary { background: rgba(148, 163, 184, 0.18) !important; color: #e2e8f0 !important; border: 1px solid rgba(148, 163, 184, 0.4) !important; border-radius: 10px; padding: 0.45em 0.75em; font-size: 0.72rem; font-weight: 700; }
.badge.status-info      { background: rgba(56, 189, 248, 0.18) !important; color: #7dd3fc !important; border: 1px solid rgba(56, 189, 248, 0.4) !important; border-radius: 10px; padding: 0.45em 0.75em; font-size: 0.72rem; font-weight: 700; }

/* Status Badges (Light Mode) */
html[data-theme="light"] .badge.status-success   { color: #065f46 !important; background: rgba(5, 150, 105, 0.14) !important; border-color: rgba(5, 150, 105, 0.3) !important; }
html[data-theme="light"] .badge.status-danger    { color: #9f1239 !important; background: rgba(225, 29, 72, 0.14) !important; border-color: rgba(225, 29, 72, 0.3) !important; }
html[data-theme="light"] .badge.status-warning   { color: #92400e !important; background: rgba(217, 119, 6, 0.14) !important; border-color: rgba(217, 119, 6, 0.3) !important; }
html[data-theme="light"] .badge.status-secondary { color: #334155 !important; background: rgba(100, 116, 139, 0.14) !important; border-color: rgba(100, 116, 139, 0.3) !important; }
html[data-theme="light"] .badge.status-info      { color: #075985 !important; background: rgba(2, 132, 199, 0.14) !important; border-color: rgba(2, 132, 199, 0.3) !important; }

/* ============ BUTTONS ============ */
.btn-emerald { background: var(--accent) !important; border: none !important; color: #04201a !important; font-weight: 800; border-radius: var(--radius-md); box-shadow: 0 4px 16px rgba(52, 211, 153, 0.3); transition: all 0.2s; }
.btn-emerald:hover { transform: translateY(-1px); box-shadow: 0 7px 22px rgba(52, 211, 153, 0.45); color: #04201a !important; }
.btn-glass { background: var(--icon-btn-bg) !important; border: 1px solid rgba(52, 211, 153, 0.3) !important; color: var(--text-muted) !important; font-weight: 700; border-radius: var(--radius-md); transition: all 0.2s; }
html[data-theme="light"] .btn-glass { border-color: rgba(5, 150, 105, 0.3) !important; }
.btn-glass:hover { color: var(--emerald) !important; border-color: var(--border-glow) !important; }
.btn-glass.active { background: linear-gradient(135deg, var(--emerald), var(--teal)) !important; border-color: transparent !important; color: #04201a !important; box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35); }

/* ============ TABLES & GEOFENCE LISTS ============ */
.table,
.table.et-table,
.et-table {
  --bs-table-bg: transparent !important;
  --bs-table-accent-bg: transparent !important;
  --bs-table-striped-bg: transparent !important;
  --bs-table-active-bg: rgba(52, 211, 153, 0.08) !important;
  --bs-table-hover-bg: var(--tbody-hover) !important;
  --bs-table-color: var(--text-main) !important;
  --bs-table-border-color: var(--border) !important;
  color: var(--text-main) !important;
  background-color: transparent !important;
  border-color: var(--border) !important;
}

.table.et-table > :not(caption) > * > *,
.et-table > :not(caption) > * > * {
  background-color: transparent !important;
  box-shadow: none !important;
  color: var(--text-main) !important;
  border-bottom: 1px solid rgba(148, 197, 189, 0.12) !important;
}

.table.et-table thead th,
.et-table thead th {
  background: var(--thead-bg) !important;
  color: var(--emerald) !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 0.95rem 0.85rem !important;
  white-space: nowrap !important;
}

html[data-theme="light"] .table.et-table thead th,
html[data-theme="light"] .et-table thead th {
  color: #065f46 !important;
  background: rgba(5, 150, 105, 0.08) !important;
}

.table.et-table tbody tr,
.et-table tbody tr {
  background-color: transparent !important;
  transition: background 0.15s ease !important;
}

.table.et-table tbody td,
.et-table tbody td {
  padding: 0.95rem 0.85rem !important;
  border-bottom: 1px solid rgba(148, 197, 189, 0.1) !important;
  font-size: 0.86rem !important;
  color: var(--text-main) !important;
  vertical-align: middle !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

.table.et-table tbody tr:hover > *,
.et-table tbody tr:hover > * {
  background-color: var(--tbody-hover) !important;
  box-shadow: none !important;
}

/* Matriks Rekapitulasi Khusus */
.rek-table {
  color: #0f172a !important;
}
.rek-table th,
.rek-table td {
  color: #0f172a !important;
}
.rek-table th b,
.rek-table td b {
  color: #04201a !important;
}

/* ============ DATATABLES & PAGINATION ============ */
.dataTables_wrapper {
  margin-top: 6px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 12px;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted) !important;
  margin: 0;
  width: 100%;
}

.dataTables_wrapper .dataTables_filter label {
  justify-content: flex-end;
}

.dataTables_wrapper .dataTables_length select {
  background-color: var(--input-bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-main) !important;
  border-radius: 8px !important;
  padding: 4px 10px !important;
  font-size: 0.82rem !important;
  font-weight: 600;
  cursor: pointer;
  outline: none !important;
  transition: all 0.2s ease;
  min-width: 60px;
}

.dataTables_wrapper .dataTables_length select:focus {
  border-color: var(--emerald) !important;
  box-shadow: 0 0 0 0.15rem rgba(52, 211, 153, 0.2) !important;
}

.dataTables_wrapper .dataTables_filter input {
  background-color: var(--input-bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-main) !important;
  border-radius: 8px !important;
  padding: 5px 12px !important;
  font-size: 0.82rem !important;
  outline: none !important;
  margin-left: 0 !important;
  width: auto;
  max-width: 220px;
  transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--emerald) !important;
  box-shadow: 0 0 0 0.15rem rgba(52, 211, 153, 0.2) !important;
}

@media (max-width: 767.98px) {
  .dataTables_wrapper .row:first-child > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
  }
  .dataTables_wrapper .dataTables_length label,
  .dataTables_wrapper .dataTables_filter label {
    justify-content: flex-start;
  }
  .dataTables_wrapper .dataTables_filter input {
    width: 100% !important;
    max-width: 100% !important;
  }
}

.dataTables_wrapper .dataTables_info {
  color: var(--text-muted) !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  padding-top: 0.85em !important;
}

.dataTables_wrapper .dataTables_paginate .pagination {
  gap: 4px !important;
}

.dataTables_wrapper .dataTables_paginate .page-link {
  background: var(--icon-btn-bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-main) !important;
  border-radius: 10px !important;
  padding: 6px 12px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  transition: all 0.2s ease !important;
}

.dataTables_wrapper .dataTables_paginate .page-link:hover {
  background: rgba(52, 211, 153, 0.12) !important;
  border-color: var(--border-glow) !important;
  color: var(--emerald) !important;
}

.dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
  background: var(--accent) !important;
  border-color: transparent !important;
  color: #04201a !important;
  font-weight: 800 !important;
  box-shadow: var(--glow-emerald) !important;
}

.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link {
  opacity: 0.35 !important;
  background: transparent !important;
  border-color: var(--border) !important;
  color: var(--text-dim) !important;
}

/* ============ LIST ITEM ============ */
.list-item { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--list-bg); margin-bottom: 8px; transition: all 0.18s ease; }
.list-item:hover { border-color: var(--border-glow); background: var(--tbody-hover); }

/* ============ FORMS ============ */
.form-label, label { color: var(--text-muted) !important; font-weight: 600; font-size: 0.84rem; }
.form-control, .form-select { background-color: var(--input-bg) !important; border: 1px solid var(--border) !important; color: var(--text-main) !important; border-radius: var(--radius-md) !important; }
.form-control:focus, .form-select:focus { border-color: var(--emerald) !important; box-shadow: 0 0 0 0.2rem rgba(52, 211, 153, 0.15) !important; }
.form-control::placeholder { color: var(--text-dim) !important; opacity: 0.75; }

.form-select option {
  background-color: #101c2e !important;
  color: #ffffff !important;
}

html[data-theme="light"] .form-select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* ============ AVATAR ============ */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; min-width: 34px; min-height: 34px; max-width: 34px; max-height: 34px; aspect-ratio: 1 / 1; border-radius: 50% !important; font-size: .78rem; font-weight: 800; color: #04201a; background: linear-gradient(135deg, #34d399, #14b8a6); flex-shrink: 0; user-select: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-sm { width: 28px; height: 28px; min-width: 28px; min-height: 28px; max-width: 28px; max-height: 28px; font-size: .68rem; }

/* ============ UTILS ============ */
.text-muted { color: var(--text-muted) !important; font-weight: 500; }
.map-frame { 
  border-radius: var(--radius-lg); 
  border: 1px solid var(--border); 
  overflow: hidden; 
  background: var(--map-bg); 
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}

/* ============ OPTIMASI PERFORMA LEAFLET MAP DI HP / MOBILE ============ */
.leaflet-container {
  touch-action: pan-x pan-y !important;
  -webkit-tap-highlight-color: transparent;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}

.leaflet-tile-container,
.leaflet-tile-pane {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}

.leaflet-marker-pane,
.leaflet-overlay-pane {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

@media (max-width: 768px) {
  .user-presensi-marker-masuk div,
  .user-presensi-marker-pulang div {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35) !important;
  }
  .office-marker div {
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4) !important;
  }
}

/* ============ DESKTOP SIDEBAR COLLAPSE ============ */
#sidebarToggleDesktop {
  transition: all 0.65s ease-in-out;
}

@media (min-width: 992px) {
  body.sidebar-collapsed .sidebar-wrapper {
    width: 88px;
  }
  body.sidebar-collapsed .sidebar-brand-text-wrapper,
  body.sidebar-collapsed .sidebar-group,
  body.sidebar-collapsed .nav-link-custom span,
  body.sidebar-collapsed .sidebar-foot,
  body.sidebar-collapsed .sidebar-nav > div.px-3 {
    opacity: 0;
    display: none !important;
  }
  
  body.sidebar-collapsed .sidebar-brand-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 12px;
  }
  
  body.sidebar-collapsed .sidebar-brand {
    padding: 22px 0 10px 0;
    justify-content: center;
  }
  
  body.sidebar-collapsed #sidebarToggleDesktop {
    position: static !important;
    transform: rotate(180deg);
    margin-top: 0px;
    background: var(--icon-btn-bg) !important;
    border-radius: 50%;
    border: 1px solid var(--border) !important;
  }

  body.sidebar-collapsed .nav-link-custom {
    justify-content: center;
    padding: 12px 0;
    margin: 6px auto;
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }
  
  body.sidebar-collapsed .nav-link-custom i {
    margin: 0 !important;
    font-size: 1.15rem;
  }
  
  body.sidebar-collapsed .main-content {
    margin-left: 116px;
    max-width: calc(100vw - 116px);
  }
  
  body.sidebar-collapsed .sidebar-logo {
    cursor: pointer;
  }
}

/* ============ LIGHTBOX PREVIEW ============ */
.et-table td img,
.table td img,
.img-lightbox {
  cursor: zoom-in !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease !important;
}

.et-table td img:hover,
.table td img:hover,
.img-lightbox:hover {
  transform: scale(1.15) !important;
  box-shadow: 0 4px 14px rgba(52, 211, 153, 0.45) !important;
  position: relative;
  z-index: 2;
}

.geo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.geo-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.geo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 18, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

.geo-lightbox-container {
  position: relative;
  z-index: 100001;
  max-width: min(92vw, 560px);
  width: 100%;
  transform: scale(0.92);
  transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.geo-lightbox.active .geo-lightbox-container {
  transform: scale(1);
}

.geo-lightbox-card {
  background: var(--panel-strong, #13233a);
  border: 1px solid var(--border-glow, rgba(52, 211, 153, 0.45));
  border-radius: var(--radius-lg, 18px);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.75), 0 0 30px rgba(52, 211, 153, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.geo-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border, rgba(148, 197, 189, 0.16));
  background: rgba(255, 255, 255, 0.03);
}

.geo-lightbox-title {
  font-family: 'Sora', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main, #ffffff);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-lightbox-close-btn {
  background: var(--icon-btn-bg, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--border, rgba(148, 197, 189, 0.18));
  color: var(--text-muted, #e2e8f0);
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.geo-lightbox-close-btn:hover {
  background: rgba(251, 113, 133, 0.25);
  border-color: #fb7185;
  color: #fb7185;
  transform: rotate(90deg);
}

.geo-lightbox-body {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  min-height: 280px;
}

.geo-lightbox-body img {
  width: 100%;
  max-width: 480px;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid var(--border, rgba(148, 197, 189, 0.16));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: block;
  margin: 0 auto;
}

/* ============ PASSWORD TOGGLE EYE ============ */
.btn-toggle-password {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: var(--text-muted, #94a3b8) !important;
  cursor: pointer !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, opacity 0.2s ease;
  z-index: 10;
  opacity: 0.8;
  padding: 6px 10px;
  user-select: none;
}

.btn-toggle-password:hover {
  color: var(--emerald, #10b981) !important;
  opacity: 1;
}

.btn-toggle-password:focus,
.btn-toggle-password:active {
  outline: none !important;
  box-shadow: none !important;
}

/* ============ SELECT2 LIVE SEARCH (EMERALD GLASS) ============ */
.select2-container--bootstrap-5 .select2-selection {
  background-color: var(--input-bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-main) !important;
  border-radius: var(--radius-md, 12px) !important;
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: var(--emerald) !important;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25) !important;
  background-color: var(--input-bg) !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  color: var(--text-main) !important;
  padding-left: 14px !important;
  font-size: 0.95rem;
  font-weight: 500;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
  color: var(--text-dim) !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
  top: 50% !important;
  transform: translateY(-50%) !important;
  right: 12px !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow b {
  border-color: var(--text-dim) transparent transparent transparent !important;
}

.select2-container--bootstrap-5.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: transparent transparent var(--emerald) transparent !important;
}

/* Dropdown Panel */
.select2-container--bootstrap-5 .select2-dropdown {
  background-color: var(--panel-strong, #13233a) !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  box-shadow: var(--shadow-floating, 0 20px 50px rgba(0, 0, 0, 0.6)) !important;
  overflow: hidden !important;
  z-index: 1060 !important;
  margin-top: 4px;
}

html[data-theme="light"] .select2-container--bootstrap-5 .select2-dropdown {
  background-color: #ffffff !important;
  border: 1px solid rgba(13, 94, 78, 0.2) !important;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.15) !important;
}

/* Search Field */
.select2-container--bootstrap-5 .select2-search {
  padding: 10px !important;
  background: transparent !important;
}

.select2-container--bootstrap-5 .select2-search .select2-search__field {
  background-color: var(--input-bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-main) !important;
  border-radius: 10px !important;
  padding: 8px 14px !important;
  font-size: 0.9rem !important;
  outline: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

html[data-theme="light"] .select2-container--bootstrap-5 .select2-search .select2-search__field {
  background-color: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

.select2-container--bootstrap-5 .select2-search .select2-search__field:focus {
  border-color: var(--emerald) !important;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25) !important;
}

/* Options List */
.select2-container--bootstrap-5 .select2-results__options {
  padding: 6px !important;
  max-height: 240px !important;
}

/* 1. Base item styling */
.select2-container--bootstrap-5 .select2-results__option,
.select2-container--bootstrap-5 .select2-results__option.select2-results__option--selectable {
  color: var(--text-main) !important;
  background-color: transparent !important;
  padding: 9px 14px !important;
  border-radius: 8px !important;
  font-size: 0.9rem !important;
  margin-bottom: 3px !important;
  cursor: pointer !important;
  transition: background-color 0.15s ease, color 0.15s ease !important;
}

/* 2. Highlighted / Hovered Option (Belum dipilih / sedang di-hover) */
.select2-container--bootstrap-5 .select2-results__option--highlighted,
.select2-container--bootstrap-5 .select2-results__option--highlighted.select2-results__option--selectable {
  background: rgba(16, 185, 129, 0.15) !important;
  color: var(--emerald) !important;
  font-weight: 600 !important;
}

html[data-theme="light"] .select2-container--bootstrap-5 .select2-results__option--highlighted,
html[data-theme="light"] .select2-container--bootstrap-5 .select2-results__option--highlighted.select2-results__option--selectable {
  background: rgba(5, 150, 105, 0.12) !important;
  color: #047857 !important;
  font-weight: 600 !important;
}

/* 3. Selected Option (Status dipilih) - Soft subtle background & clear contrast */
.select2-container--bootstrap-5 .select2-results__option--selected,
.select2-container--bootstrap-5 .select2-results__option[aria-selected="true"],
.select2-container--bootstrap-5 .select2-results__option.select2-results__option--selected,
.select2-container--bootstrap-5 .select2-results__option.select2-results__option--selectable.select2-results__option--selected {
  background: rgba(16, 185, 129, 0.22) !important;
  color: #34d399 !important;
  font-weight: 700 !important;
}

html[data-theme="light"] .select2-container--bootstrap-5 .select2-results__option--selected,
html[data-theme="light"] .select2-container--bootstrap-5 .select2-results__option[aria-selected="true"],
html[data-theme="light"] .select2-container--bootstrap-5 .select2-results__option.select2-results__option--selected,
html[data-theme="light"] .select2-container--bootstrap-5 .select2-results__option.select2-results__option--selectable.select2-results__option--selected {
  background: rgba(5, 150, 105, 0.15) !important;
  color: #065f46 !important;
  font-weight: 700 !important;
}

/* 4. Highlighted + Selected (Sedang aktif terpilih dan di-hover/focus) */
.select2-container--bootstrap-5 .select2-results__option--highlighted.select2-results__option--selected,
.select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected="true"] {
  background: var(--accent) !important;
  color: #04201a !important;
  font-weight: 700 !important;
}

html[data-theme="light"] .select2-container--bootstrap-5 .select2-results__option--highlighted.select2-results__option--selected,
html[data-theme="light"] .select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected="true"] {
  background: #059669 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

.select2-container--bootstrap-5 .select2-results__option--disabled {
  color: var(--text-dim) !important;
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

/* Native select element & options */
.form-select {
  background-color: var(--input-bg) !important;
  border-color: var(--border) !important;
  color: var(--text-main) !important;
}

.form-select option {
  background-color: var(--panel-strong, #13233a);
  color: var(--text-main, #ffffff);
}

html[data-theme="light"] .form-select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* Select2 Multiple Tags / Choices */
.select2-container--bootstrap-5 .select2-selection--multiple {
  background-color: var(--input-bg, #182234) !important;
  border: 1px solid var(--border, rgba(255,255,255,0.15)) !important;
  color: var(--text-main, #f1f5f9) !important;
  border-radius: var(--radius-md, 12px) !important;
  min-height: 44px !important;
  padding: 5px 8px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  align-items: center !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  align-items: center !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
  background: rgba(16, 185, 129, 0.18) !important;
  border: 1px solid rgba(16, 185, 129, 0.45) !important;
  color: #34d399 !important;
  border-radius: 8px !important;
  padding: 4px 10px !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
  color: #f87171 !important;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  font-weight: bold !important;
  cursor: pointer !important;
  font-size: 14px !important;
  line-height: 1 !important;
  order: 2;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
  color: #ef4444 !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-search--inline {
  display: inline-flex !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-grow: 1 !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-search--inline .select2-search__field {
  background: transparent !important;
  border: none !important;
  color: var(--text-main, #f1f5f9) !important;
  padding: 4px 6px !important;
  margin: 0 !important;
  font-size: 0.85rem !important;
  outline: none !important;
  box-shadow: none !important;
  min-width: 120px !important;
}

/* ============ BOOTSTRAP MODAL FIX (Mencegah Layar Freeze & Backdrop Menimpa Modal) ============ */
.modal-backdrop {
  z-index: 1050 !important;
}
.modal {
  z-index: 1060 !important;
}
.modal-dialog {
  z-index: 1065 !important;
}
body.modal-open .geobot-wrapper {
  display: none !important;
}
body.modal-open .mobile-bottom-nav {
  z-index: 1030 !important;
}

/* ============ TOPBAR MENU QUICK SEARCH ============ */
.topbar-search-box {
  position: relative;
  max-width: 360px;
  width: 100%;
}

.topbar-search-input-wrap {
  background: var(--input-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.15));
  border-radius: var(--radius-md, 12px);
  padding: 2px 6px;
  display: flex;
  align-items: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar-search-input-wrap:focus-within {
  border-color: var(--emerald, #10b981) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
  background: var(--panel-bg, rgba(19, 35, 58, 0.9)) !important;
}

.topbar-search-input-wrap input {
  color: var(--text-main, #f1f5f9) !important;
  font-size: 0.86rem;
  box-shadow: none !important;
}

.topbar-search-input-wrap input::placeholder {
  color: var(--text-dim, #94a3b8) !important;
  font-size: 0.82rem;
}

.shortcut-kbd {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-dim, #94a3b8);
  font-size: 10px;
  font-family: inherit;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  user-select: none;
}

.topbar-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 320px;
  background: var(--panel-strong, #111d2e);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.18));
  border-radius: 14px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-floating, 0 20px 45px rgba(0, 0, 0, 0.6));
  z-index: 1065;
  overflow: hidden;
  animation: fadeInDown 0.15s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.topbar-search-list {
  padding: 6px;
  max-height: 360px;
  overflow-y: auto;
}

.topbar-search-list::-webkit-scrollbar {
  width: 5px;
}
.topbar-search-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.topbar-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-main, #f1f5f9);
  font-size: 0.88rem;
  transition: all 0.15s ease;
  cursor: pointer;
  margin-bottom: 2px;
  border-left: 3px solid transparent;
}

.topbar-search-item .search-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald, #10b981);
  font-size: 13px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.topbar-search-item .search-group {
  font-size: 10px;
  color: var(--text-dim, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1px;
}

.topbar-search-item .search-title {
  font-weight: 500;
  line-height: 1.2;
}

.topbar-search-item .search-enter-hint {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-dim, #94a3b8);
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.15s ease;
}

.topbar-search-item:hover,
.topbar-search-item.active {
  background: rgba(16, 185, 129, 0.14) !important;
  color: var(--emerald, #10b981) !important;
  border-left-color: var(--emerald, #10b981) !important;
}

.topbar-search-item:hover .search-icon,
.topbar-search-item.active .search-icon {
  background: var(--emerald, #10b981) !important;
  color: #04201a !important;
}

.topbar-search-item:hover .search-enter-hint,
.topbar-search-item.active .search-enter-hint {
  opacity: 1;
  transform: translateX(0);
}

.topbar-search-item .search-highlight {
  color: var(--emerald, #10b981);
  font-weight: 700;
}

/* ==========================================================
   SWEETALERT2 THEME INTEGRATION (DARK & LIGHT MODE)
   ========================================================== */
html[data-theme="dark"] .swal2-popup,
[data-bs-theme="dark"] .swal2-popup {
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 18px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8) !important;
}

html[data-theme="dark"] .swal2-title,
[data-bs-theme="dark"] .swal2-title {
  color: #f8fafc !important;
}

html[data-theme="dark"] .swal2-html-container,
[data-bs-theme="dark"] .swal2-html-container {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .swal2-close,
[data-bs-theme="dark"] .swal2-close {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .swal2-input,
html[data-theme="dark"] .swal2-textarea,
html[data-theme="dark"] .swal2-select,
[data-bs-theme="dark"] .swal2-input,
[data-bs-theme="dark"] .swal2-textarea,
[data-bs-theme="dark"] .swal2-select {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #f8fafc !important;
  border-radius: 10px !important;
}

html[data-theme="dark"] .swal2-validation-message,
[data-bs-theme="dark"] .swal2-validation-message {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

html[data-theme="light"] .swal2-popup,
[data-bs-theme="light"] .swal2-popup {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12) !important;
}

html[data-theme="light"] .swal2-title,
[data-bs-theme="light"] .swal2-title {
  color: #0f172a !important;
}

html[data-theme="light"] .swal2-html-container,
[data-bs-theme="light"] .swal2-html-container {
  color: #475569 !important;
}

/* ==========================================================================
   UNIVERSAL THEME TEXT VISIBILITY & CONTRAST ENGINE (GLOBAL ACROSS ALL PAGES)
   Menjamin keterbacaan sempurna di SEMUA halaman:
   - Light Mode  : Teks, label, tabel, input kontras gelap tajam (#0f172a / #475569)
   - Sunset Mode : Teks kontras warm coffee tajam (#291e14 / #6b5847)
   - Dark Mode   : Teks kontras putih terang (#ffffff / #cbd5e1)
   ========================================================================== */

/* 1. Global Reset & Typography Enforcer */
body {
  color: var(--text-main) !important;
  background-color: var(--bg-body) !important;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--text-main) !important;
}

.card,
.card-body,
.glass-card,
.filter-card-custom,
.box,
.panel {
  color: var(--text-main);
}

/* 2. Global Table & DataTables Contrast Rules */
table,
.table {
  color: var(--text-main) !important;
  border-color: var(--border) !important;
  background-color: transparent !important;
}

table thead th,
.table thead th,
table th,
.table th {
  color: var(--text-main) !important;
  border-color: var(--border) !important;
}

table tbody td,
.table tbody td,
table td,
.table td {
  color: var(--text-main) !important;
  border-color: var(--border) !important;
}

.table > :not(caption) > * > * {
  color: var(--text-main) !important;
  border-color: var(--border) !important;
  background-color: transparent !important;
}

/* DataTables Global Contrast */
.dataTables_wrapper,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_processing {
  color: var(--text-main) !important;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  background-color: var(--input-bg) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 4px 10px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  color: var(--text-main) !important;
}

/* 3. Global Form Inputs & Selects */
.form-control,
.form-select,
.custom-dark-input,
.custom-dark-select,
.search-box-wrapper,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="search"],
select,
textarea {
  background-color: var(--input-bg) !important;
  color: var(--text-main) !important;
  border-color: var(--border) !important;
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--text-dim) !important;
}

select option {
  background-color: var(--panel-strong) !important;
  color: var(--text-main) !important;
}

/* 4. LIGHT MODE GUARDS (Anti-Teks Putih / Transparan di Background Terang) */
html[data-theme="light"] {
  --text-main: #0f172a !important;
  --text-muted: #475569 !important;
  --text-dim: #64748b !important;
}

html[data-theme="light"] table,
html[data-theme="light"] .table,
html[data-theme="light"] th,
html[data-theme="light"] td,
html[data-theme="light"] label,
html[data-theme="light"] .section-title,
html[data-theme="light"] .card-title,
html[data-theme="light"] .page-title {
  color: #0f172a !important;
}

/* Otomatis ubah teks hardcoded putih menjadi gelap di light mode (kecuali tombol & badge) */
html[data-theme="light"] [style*="color: #f8fafc"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="light"] [style*="color:#f8fafc"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="light"] [style*="color: #ffffff"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="light"] [style*="color:#ffffff"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="light"] [style*="color: #fff"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="light"] [style*="color:#fff"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="light"] [style*="color: white"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="light"] [style*="color:white"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="light"] .text-white:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *) {
  color: #0f172a !important;
}

html[data-theme="light"] .text-muted,
html[data-theme="light"] .small.text-muted {
  color: #475569 !important;
}

/* 5. SUNSET MODE GUARDS (Golden Warm Hour) */
html[data-theme="sunset"] {
  --text-main: #291e14 !important;
  --text-muted: #6b5847 !important;
  --text-dim: #8a7664 !important;
}

html[data-theme="sunset"] table,
html[data-theme="sunset"] .table,
html[data-theme="sunset"] th,
html[data-theme="sunset"] td,
html[data-theme="sunset"] label,
html[data-theme="sunset"] .section-title,
html[data-theme="sunset"] .card-title,
html[data-theme="sunset"] .page-title {
  color: #291e14 !important;
}

html[data-theme="sunset"] [style*="color: #f8fafc"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="sunset"] [style*="color:#f8fafc"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="sunset"] [style*="color: #ffffff"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="sunset"] [style*="color:#ffffff"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="sunset"] [style*="color: #fff"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="sunset"] [style*="color:#fff"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="sunset"] [style*="color: white"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="sunset"] [style*="color:white"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="sunset"] .text-white:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *) {
  color: #291e14 !important;
}

html[data-theme="sunset"] .text-muted,
html[data-theme="sunset"] .small.text-muted {
  color: #6b5847 !important;
}

/* 6. DARK MODE GUARDS (High Contrast White / Light Gray) */
html[data-theme="dark"],
:root:not([data-theme="light"]):not([data-theme="sunset"]) {
  --text-main: #ffffff !important;
  --text-muted: #cbd5e1 !important;
  --text-dim: #94a3b8 !important;
}

html[data-theme="dark"] table,
html[data-theme="dark"] .table,
html[data-theme="dark"] th,
html[data-theme="dark"] td,
html[data-theme="dark"] label,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .page-title,
:root:not([data-theme="light"]):not([data-theme="sunset"]) table,
:root:not([data-theme="light"]):not([data-theme="sunset"]) .table,
:root:not([data-theme="light"]):not([data-theme="sunset"]) th,
:root:not([data-theme="light"]):not([data-theme="sunset"]) td,
:root:not([data-theme="light"]):not([data-theme="sunset"]) label,
:root:not([data-theme="light"]):not([data-theme="sunset"]) .section-title,
:root:not([data-theme="light"]):not([data-theme="sunset"]) .card-title,
:root:not([data-theme="light"]):not([data-theme="sunset"]) .page-title {
  color: #ffffff !important;
}

html[data-theme="dark"] [style*="color: #000"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="dark"] [style*="color:#000"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="dark"] [style*="color: #0f172a"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="dark"] [style*="color:#0f172a"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="dark"] [style*="color: black"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="dark"] [style*="color:black"]:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
html[data-theme="dark"] .text-dark:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *),
:root:not([data-theme="light"]):not([data-theme="sunset"]) .text-dark:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.chip):not(.chip *):not(.stat-ico):not(.stat-ico *) {
  color: #ffffff !important;
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .small.text-muted,
:root:not([data-theme="light"]):not([data-theme="sunset"]) .text-muted,
:root:not([data-theme="light"]):not([data-theme="sunset"]) .small.text-muted {
  color: #cbd5e1 !important;
}

/* ============ NATIVE WEBVIEW & BOTTOM SHEET MODAL OPTIMIZATIONS ============ */
html, body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body.modal-open .geobot-wrapper,
body.modal-open .floating-wa-btn {
  display: none !important;
}

.mobile-bottom-nav {
  z-index: 1030 !important;
}

.modal-backdrop {
  z-index: 1050 !important;
}

.modal {
  z-index: 1055 !important;
}

@media (max-width: 767.98px) {
  .modal-dialog {
    margin: 10px;
    max-width: calc(100% - 20px);
  }
}

.modal-content {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 22px !important;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.22) !important;
  overflow: hidden;
}

[data-theme="dark"] .modal-content {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Segmented Control Filter Tabs */
.segmented-control {
  display: flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  border: 1px solid #e2e8f0;
  width: 100%;
}

[data-theme="dark"] .segmented-control {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

.segmented-tab {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  border-radius: 9px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

[data-theme="dark"] .segmented-tab {
  color: #94a3b8;
}

.segmented-tab.active {
  background: #ffffff !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1) !important;
}

[data-theme="dark"] .segmented-tab.active {
  background: #334155 !important;
  color: #f8fafc !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

/* Modal Search Input with embedded icon */
.modal-search-wrap {
  position: relative;
  width: 100%;
}
.modal-search-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.85rem;
  pointer-events: none;
}
.modal-search-input {
  width: 100%;
  height: 42px;
  padding-left: 38px;
  padding-right: 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.86rem;
  color: #0f172a;
  transition: all 0.2s ease;
}
.modal-search-input:focus {
  background: #ffffff;
  border-color: #10b981;
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
[data-theme="dark"] .modal-search-input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}
[data-theme="dark"] .modal-search-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: #34d399;
}

/* Executive Modal Buttons */
.btn-modal-primary {
  background: linear-gradient(135deg, #059669, #0d9488) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none !important;
}
.btn-modal-primary:hover, .btn-modal-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.4) !important;
  color: #ffffff !important;
}
.btn-modal-dismiss {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  font-size: 0.86rem !important;
  height: 44px;
  padding: 0 18px;
  transition: all 0.2s ease;
}
.btn-modal-dismiss:hover, .btn-modal-dismiss:active {
  background: #e2e8f0 !important;
  color: #1e293b !important;
}
[data-theme="dark"] .btn-modal-dismiss {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
[data-theme="dark"] .btn-modal-dismiss:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

/* Employee Row Card in Modal */
.employee-row-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.18s ease;
}
.employee-row-card:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
[data-theme="dark"] .employee-row-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .employee-row-card:hover {
  background: rgba(255, 255, 255, 0.07);
}

/* ============ MOBILE HARDWARE ACCELERATION & SNAPPY PERFORMANCE ============ */
@media (max-width: 768px) {
  /* Matikan efek orb latar belakang untuk hemat GPU & baterai HP */
  .orb, .orb-1, .orb-2, .orb-3 {
    display: none !important;
  }

  /* Percepat animasi masuk halaman di HP (dari 0.55s menjadi 0.12s agar terasa instan) */
  .fade-up {
    animation: fadeUp 0.12s ease-out both !important;
  }
  .fade-up-1, .fade-up-2, .fade-up-3, .fade-up-4, .fade-up-5 {
    animation-delay: 0s !important;
  }

  /* Hilangkan transisi warna global yang memicu repaint lag saat scroll di HP */
  body, .sidebar-wrapper, .topbar, .login-card, .panel-strong, .modal-content {
    transition: none !important;
  }

  /* Optimasi sentuhan tombol & scrolling di HP */
  * {
    -webkit-tap-highlight-color: transparent;
  }

  .main-content {
    padding-bottom: 75px !important; /* Ruang untuk bottom nav agar tidak tertutup */
  }
}


