/* ============================================================
   TailAdmin Official Aesthetic & Ultra-Responsive Overrides
   Matching https://demo.tailadmin.com/
   Sentra "Wirajaya" di Makassar - Kementerian Sosial RI
   ============================================================ */

/* 1. Global CSS Variable System */
:root {
  --font-outfit: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --color-brand: #465FFF;
  --color-brand-light: #F0F5FF;
  --color-brand-dark: #374ACC;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;

  /* LIGHT MODE (TailAdmin Demo Canvas) */
  --bg: #F1F5F9;
  --surface: #FFFFFF;
  --surface-alt: #F8FAFC;
  --surface-card: #FFFFFF;
  --surface-card-hover: #F8FAFC;
  --ink: #1C2434;
  --sub: #64748B;
  --faint: #94A3B8;
  --line: #E2E8F0;
  --line-light: #F1F5F9;
  --chip: #F1F5F9;
  --chip-hover: #E2E8F0;
  --border: #E2E8F0;
  --border-focus: #465FFF;
  --brand: #465FFF;
  --shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
}

/* DARK MODE (TailAdmin Dark Canvas) */
html.dark, [data-theme="dark"] {
  --bg: #0B132B;
  --surface: #111C2D;
  --surface-alt: #16243A;
  --surface-card: #111C2D;
  --surface-card-hover: #16243A;
  --ink: #FFFFFF;
  --sub: #94A3B8;
  --faint: #64748B;
  --line: #1E293B;
  --line-light: rgba(255, 255, 255, 0.06);
  --chip: #16243A;
  --chip-hover: #1E293B;
  --border: #1E293B;
  --border-focus: #465FFF;
  --brand: #465FFF;
  --shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 4px 12px -2px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
}

/* 2. Global Document Reset, Scrolling Engine & Layout Architecture */
html, body {
  background-color: var(--bg) !important;
  color: var(--ink) !important;
  font-family: var(--font-outfit) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100% !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

body {
  display: flex !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

/* Master Scrollable Content Area (Guarantees smooth scrolling on all pages) */
.content-area-scroll,
div.content-area-scroll,
body > div.relative.flex.flex-col.flex-1 {
  height: 100vh !important;
  max-height: 100vh !important;
  min-height: 0 !important;
  flex: 1 1 0% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

input, button, select, textarea, table, th, td {
  font-family: var(--font-outfit) !important;
}

/* Typography Overflow & Line Clamp Utilities */
.truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.line-clamp-1 {
  display: -webkit-box !important;
  -webkit-line-clamp: 1 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: break-word !important;
}

.line-clamp-2 {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: break-word !important;
}

.line-clamp-3 {
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: break-word !important;
}

/* 3. Main Content Wrapper - matches TailAdmin content padding */
.wrap {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

aside {
  background-color: #FFFFFF !important;
  border-right: 1px solid #E2E8F0 !important;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
html.dark aside, [data-theme="dark"] aside {
  background-color: #111C2D !important;
  border-right-color: #1E293B !important;
}

/* Sidebar Expanded State (Desktop default 288px) */
aside.sidebar-expanded {
  width: 18rem !important;
  min-width: 18rem !important;
  max-width: 18rem !important;
  margin-left: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateX(0) !important;
}

/* Sidebar Collapsed State (Desktop collapses cleanly by sliding out) */
aside.sidebar-collapsed {
  width: 18rem !important;
  min-width: 18rem !important;
  max-width: 18rem !important;
  margin-left: -18rem !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  border-right-width: 0 !important;
  border-right-color: transparent !important;
  overflow: hidden !important;
  transform: translateX(0) !important;
}

@media (max-width: 1279.98px) {
  aside.sidebar-collapsed {
    transform: translateX(-100%) !important;
    margin-left: 0 !important;
    width: 18rem !important;
    display: none !important;
  }
  aside.sidebar-expanded {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 50 !important;
    width: 18rem !important;
    min-width: 18rem !important;
    margin-left: 0 !important;
    transform: translateX(0) !important;
    display: flex !important;
  }
}

/* 5. Top Navbar Header */
header {
  background-color: rgba(255, 255, 255, 0.97) !important;
  border-bottom: 1px solid #E2E8F0 !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}
html.dark header, [data-theme="dark"] header {
  background-color: rgba(17, 28, 45, 0.97) !important;
  border-bottom-color: #1E293B !important;
}

/* 5. Top Navbar Header Layout & Button System */
header {
  background-color: rgba(255, 255, 255, 0.97) !important;
  border-bottom: 1px solid #E2E8F0 !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  width: 100% !important;
}
html.dark header, [data-theme="dark"] header {
  background-color: rgba(17, 28, 45, 0.97) !important;
  border-bottom-color: #1E293B !important;
}

/* Header layout guarantee: pushes left and right groups to the ends */
header .header-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  flex-grow: 1 !important;
}

/* TailAdmin circular icon buttons (Moon/Sun, Bell, Hamburger) */
.header-icon-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  color: #64748B !important;
  transition: all 0.2s ease !important;
}
.header-icon-btn:hover {
  background-color: #F8FAFC !important;
  color: #1E293B !important;
}
html.dark .header-icon-btn, [data-theme="dark"] .header-icon-btn {
  background-color: #111C2D !important;
  border-color: #1E293B !important;
  color: #94A3B8 !important;
}
html.dark .header-icon-btn:hover, [data-theme="dark"] .header-icon-btn:hover {
  background-color: #16243A !important;
  color: #FFFFFF !important;
}

/* TailAdmin user profile trigger (borderless with avatar and text like demo) */
.header-user-btn {
  display: flex !important;
  align-items: center !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  cursor: pointer !important;
}

/* Theme Toggle Icon Visibility */
html:not(.dark) .hidden.dark\:block, [data-theme="light"] .hidden.dark\:block { display: none !important; }
html:not(.dark) .block.dark\:hidden, [data-theme="light"] .block.dark\:hidden { display: block !important; }
html.dark .block.dark\:hidden, [data-theme="dark"] .block.dark\:hidden { display: none !important; }
html.dark .hidden.dark\:block, [data-theme="dark"] .hidden.dark\:block { display: block !important; }

/* 6. Cards - Unified TailAdmin Card System */
.card {
  background-color: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  box-shadow: var(--shadow) !important;
  padding: 20px 24px !important;
  margin-bottom: 0 !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease !important;
}
html.dark .card, [data-theme="dark"] .card {
  background-color: #111C2D !important;
  border-color: #1E293B !important;
}

/* 6.1 Global Border Fallback - ensures all .border utilities render a crisp solid line */
*, ::before, ::after {
  --tw-border-style: solid;
}
.border {
  border-style: solid !important;
  border-width: 1px !important;
}

/* 6.2 TailAdmin Official Metric Cards (100% Demo Fidelity) */
.tailadmin-metric-card,
#highlightMini > div,
#ikpaMini > div,
#sp2dMini > div {
  background-color: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 16px !important;
  padding: 22px 24px !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-height: 154px !important;
  position: relative !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.tailadmin-metric-card:hover,
#highlightMini > div:hover,
#ikpaMini > div:hover,
#sp2dMini > div:hover {
  transform: translateY(-2px) !important;
  border-color: #CBD5E1 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03) !important;
}

html.dark .tailadmin-metric-card,
html.dark #highlightMini > div,
html.dark #ikpaMini > div,
html.dark #sp2dMini > div,
[data-theme="dark"] .tailadmin-metric-card,
[data-theme="dark"] #highlightMini > div,
[data-theme="dark"] #ikpaMini > div,
[data-theme="dark"] #sp2dMini > div {
  background-color: #111C2D !important;
  border-color: #1E293B !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2) !important;
}

html.dark .tailadmin-metric-card:hover,
html.dark #highlightMini > div:hover,
html.dark #ikpaMini > div:hover,
html.dark #sp2dMini > div:hover,
[data-theme="dark"] .tailadmin-metric-card:hover,
[data-theme="dark"] #highlightMini > div:hover,
[data-theme="dark"] #ikpaMini > div:hover,
[data-theme="dark"] #sp2dMini > div:hover {
  border-color: #334155 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4) !important;
}

/* 6.3 TailAdmin Metric Icon Containers */
.metric-icon-box,
#highlightMini .rounded-2xl.bg-blue-50,
#highlightMini .rounded-2xl.bg-emerald-50,
#highlightMini .rounded-2xl.bg-amber-50,
#highlightMini .rounded-2xl.bg-indigo-50,
#sp2dView .rounded-2xl.bg-blue-50,
#sp2dView .rounded-2xl.bg-emerald-50,
#sp2dView .rounded-2xl.bg-amber-50,
#sp2dView .rounded-2xl.bg-indigo-50,
#ikpaMini .rounded-2xl.bg-blue-50,
#ikpaMini .rounded-2xl.bg-indigo-50,
#ikpaMini .rounded-2xl.bg-emerald-50,
#ikpaMini .rounded-2xl.bg-teal-50 {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

/* Light Mode Icon Backgrounds & Text */
.bg-blue-50 { background-color: #EFF6FF !important; }
.text-\[\#465FFF\] { color: #465FFF !important; }
.bg-emerald-50 { background-color: #ECFDF5 !important; }
.text-emerald-600 { color: #059669 !important; }
.bg-amber-50 { background-color: #FFFBEB !important; }
.text-amber-600 { color: #D97706 !important; }
.bg-indigo-50 { background-color: #EEF2FF !important; }
.text-indigo-600 { color: #4F46E5 !important; }
.bg-teal-50 { background-color: #F0FDFA !important; }
.text-teal-600 { color: #0D9488 !important; }

/* Dark Mode Icon Backgrounds */
html.dark .bg-blue-50, [data-theme="dark"] .bg-blue-50 { background-color: rgba(70, 95, 255, 0.15) !important; }
html.dark .bg-emerald-50, [data-theme="dark"] .bg-emerald-50 { background-color: rgba(16, 185, 129, 0.15) !important; }
html.dark .bg-amber-50, [data-theme="dark"] .bg-amber-50 { background-color: rgba(245, 158, 11, 0.15) !important; }
html.dark .bg-indigo-50, [data-theme="dark"] .bg-indigo-50 { background-color: rgba(99, 102, 241, 0.15) !important; }
html.dark .bg-teal-50, [data-theme="dark"] .bg-teal-50 { background-color: rgba(20, 184, 166, 0.15) !important; }

/* 6.4 TailAdmin Metric Pill Badges */
.metric-badge,
#highlightMini .rounded-full.border,
#sp2dView .rounded-full.border,
#ikpaMini .rounded-full.border {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 4px 10px !important;
  border-radius: 9999px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  white-space: nowrap !important;
}

/* Light Mode Badges */
.border-blue-200\/60, .border-blue-200 { border: 1px solid #BFDBFE !important; }
.border-emerald-200\/60, .border-emerald-200 { border: 1px solid #A7F3D0 !important; }
.border-amber-200\/60, .border-amber-200 { border: 1px solid #FDE68A !important; }
.border-indigo-200\/60, .border-indigo-200 { border: 1px solid #C7D2FE !important; }
.border-teal-200\/60, .border-teal-200 { border: 1px solid #99F6E4 !important; }

/* Dark Mode Badges */
html.dark .border-blue-800\/60, [data-theme="dark"] .border-blue-800\/60 { border: 1px solid rgba(70, 95, 255, 0.3) !important; }
html.dark .border-emerald-800\/60, [data-theme="dark"] .border-emerald-800\/60 { border: 1px solid rgba(16, 185, 129, 0.3) !important; }
html.dark .border-amber-800\/60, [data-theme="dark"] .border-amber-800\/60 { border: 1px solid rgba(245, 158, 11, 0.3) !important; }
html.dark .border-indigo-800\/60, [data-theme="dark"] .border-indigo-800\/60 { border: 1px solid rgba(99, 102, 241, 0.3) !important; }
html.dark .border-teal-800\/60, [data-theme="dark"] .border-teal-800\/60 { border: 1px solid rgba(20, 184, 166, 0.3) !important; }

/* Mini stat cards from legacy style.css */
.mini {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  padding: 16px 18px !important;
  box-shadow: var(--shadow) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
}
.mini:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-hover) !important;
}

/* 7. Segmented Pill Navigation Tabs */
.nav-segmented {
  display: inline-flex !important;
  background: var(--chip) !important;
  padding: 4px !important;
  border-radius: 14px !important;
  gap: 3px !important;
  border: 1px solid var(--border) !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  margin-bottom: 0 !important;
  width: auto !important;
}
.nav-segmented::-webkit-scrollbar { display: none !important; }

html.dark .nav-segmented, [data-theme="dark"] .nav-segmented {
  background: #111C2D !important;
  border-color: #1E293B !important;
}

.nav-tab-btn {
  padding: 8px 16px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #64748B !important;
  background: transparent !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex: none !important;
  border-left: none !important;
}
.nav-tab-btn:hover {
  color: #0F172A !important;
}
html.dark .nav-tab-btn, [data-theme="dark"] .nav-tab-btn {
  color: #94A3B8 !important;
}
html.dark .nav-tab-btn:hover, [data-theme="dark"] .nav-tab-btn:hover {
  color: #FFFFFF !important;
}

.nav-tab-btn.active {
  background: #FFFFFF !important;
  color: #465FFF !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04) !important;
  font-weight: 700 !important;
  border-left: none !important;
}
html.dark .nav-tab-btn.active, [data-theme="dark"] .nav-tab-btn.active {
  background: #1E293B !important;
  color: #FFFFFF !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3) !important;
}

/* Remove legacy active border-left overrides */
.nav-tab-btn[data-view="realisasi"].active,
.nav-tab-btn[data-view="ikpa"].active {
  border-left: none !important;
}

/* 8. Data Tables (TailAdmin Crisp Style) */
.table-scroll, .sp2d-table-wrapper {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border-radius: 12px !important;
}

table {
  width: 100% !important;
  border-collapse: collapse !important;
  text-align: left !important;
  background: transparent !important;
}

th {
  background: #F8FAFC !important;
  color: #475569 !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 12px 16px !important;
  border-bottom: 1px solid #E2E8F0 !important;
  white-space: nowrap !important;
}
html.dark th, [data-theme="dark"] th {
  background: #16243A !important;
  color: #94A3B8 !important;
  border-bottom-color: #1E293B !important;
}

td {
  padding: 12px 16px !important;
  font-size: 13px !important;
  border-bottom: 1px solid #F1F5F9 !important;
  color: #1E293B !important;
}
html.dark td, [data-theme="dark"] td {
  border-bottom-color: #1E293B !important;
  color: #E2E8F0 !important;
}

tr:hover td {
  background: #F8FAFC !important;
}
html.dark tr:hover td, [data-theme="dark"] tr:hover td {
  background: #16243A !important;
}

/* TailAdmin Highlighted Active Table Row */
tr.highlighted-row td {
  background-color: #EEF2FF !important;
  color: #1E293B !important;
  font-weight: 600 !important;
}
html.dark tr.highlighted-row td, [data-theme="dark"] tr.highlighted-row td {
  background-color: rgba(70, 95, 255, 0.16) !important;
  color: #FFFFFF !important;
  font-weight: 600 !important;
}

/* TailAdmin Teal Badges */
.badge.teal {
  background: #ECFDF5 !important;
  color: #059669 !important;
  border: 1px solid #A7F3D0 !important;
}
html.dark .badge.teal, [data-theme="dark"] .badge.teal {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34D399 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

/* 9. Buttons */
.btn {
  font-family: var(--font-outfit) !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
  transition: all 0.15s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
}
.btn-primary {
  background: #465FFF !important;
  color: #FFFFFF !important;
  border: 1px solid #465FFF !important;
}
.btn-primary:hover {
  background: #374ACC !important;
  border-color: #374ACC !important;
  box-shadow: 0 4px 12px rgba(70, 95, 255, 0.25) !important;
}
.btn-secondary {
  background: #FFFFFF !important;
  color: #334155 !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
}
.btn-secondary:hover {
  background: #F8FAFC !important;
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
}
html.dark .btn-secondary, [data-theme="dark"] .btn-secondary {
  background: #16243A !important;
  color: #E2E8F0 !important;
  border-color: #1E293B !important;
}
html.dark .btn-secondary:hover, [data-theme="dark"] .btn-secondary:hover {
  background: #1E293B !important;
}

/* 10. Form Controls */
select, input[type="text"], input[type="search"] {
  background-color: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  color: #1E293B !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}
select:focus, input[type="text"]:focus, input[type="search"]:focus {
  border-color: #465FFF !important;
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.12) !important;
  outline: none !important;
}
html.dark select, html.dark input[type="text"], html.dark input[type="search"],
[data-theme="dark"] select, [data-theme="dark"] input[type="text"], [data-theme="dark"] input[type="search"] {
  background-color: #16243A !important;
  border-color: #1E293B !important;
  color: #FFFFFF !important;
}

/* 11. Category Tab Pills */
.tab-pill {
  padding: 6px 14px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  background: #F1F5F9 !important;
  color: #64748B !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.15s ease !important;
}
.tab-pill:hover {
  background: #E2E8F0 !important;
  color: #0F172A !important;
}
html.dark .tab-pill, [data-theme="dark"] .tab-pill {
  background: #16243A !important;
  color: #94A3B8 !important;
}
html.dark .tab-pill:hover, [data-theme="dark"] .tab-pill:hover {
  background: #1E293B !important;
  color: #FFFFFF !important;
}
.tab-pill.active {
  background: #465FFF !important;
  color: #FFFFFF !important;
  border-color: #465FFF !important;
  box-shadow: 0 2px 6px rgba(70, 95, 255, 0.25) !important;
}

/* 12. Modal & Dialog */
.modal-overlay {
  z-index: 99999 !important;
}
.modal-card {
  border-radius: 20px !important;
  background: #FFFFFF !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  border: 1px solid #E2E8F0 !important;
}
html.dark .modal-card, [data-theme="dark"] .modal-card {
  background: #111C2D !important;
  border-color: #1E293B !important;
}

/* 13. View Switch Group (Card/Table Toggle) */
.view-switch-group {
  display: inline-flex !important;
  background: var(--chip) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 3px !important;
  gap: 2px !important;
}
.view-switch-btn {
  border-radius: 8px !important;
}
.view-switch-btn.active {
  background: var(--surface) !important;
  color: var(--ink) !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
}

/* 14. Card Top Bar - consistent card header */
.card-top-bar {
  padding-bottom: 16px !important;
  margin-bottom: 16px !important;
  border-bottom: 1px solid var(--line) !important;
}
.card-heading {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--ink) !important;
  font-family: var(--font-outfit) !important;
}

/* 15. Search Input - refined styling */
.search-input-wrap {
  background: var(--surface-alt) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 7px 12px !important;
}
.search-input-wrap:focus-within {
  border-color: #465FFF !important;
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.1) !important;
}

/* 15.1 Satker Selector Dropdown (TailAdmin Crisp Control) */
#satkerSelect {
  padding-left: 38px !important;
  padding-right: 32px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  background-color: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 12px !important;
  color: #1E293B !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  font-family: var(--font-outfit) !important;
  height: 40px !important;
  line-height: 22px !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  cursor: pointer !important;
  text-indent: 0 !important;
}
html.dark #satkerSelect, [data-theme="dark"] #satkerSelect {
  background-color: #111C2D !important;
  border-color: #1E293B !important;
  color: #F8FAFC !important;
}
#satkerSelect:focus {
  border-color: #465FFF !important;
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.15) !important;
  outline: none !important;
}

/* 16. Satker Card Items - cleaner cards */
.satker-card-item {
  border-radius: 14px !important;
  padding: 14px 18px !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}
.satker-card-item:hover {
  transform: translateY(-1px) !important;
  box-shadow: var(--shadow-hover) !important;
}

/* 17. Dropdown Menus */
.dropdown-menu {
  border-radius: 14px !important;
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
}
html.dark .dropdown-menu, [data-theme="dark"] .dropdown-menu {
  background: #111C2D !important;
  border-color: #1E293B !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4) !important;
}
.dropdown-item {
  border-radius: 8px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}
.dropdown-item:hover {
  background: var(--chip) !important;
}

/* 18. Toast Notifications */
.toast-wrap {
  z-index: 99999 !important;
}

/* 19. Content Area Spacing Refinements */
/* The main content body inside the flex layout */
main.flex-1 {
  min-width: 0 !important;
  overflow-x: hidden !important;
}

/* Ensure space-y-6 utility works correctly with cards */
.space-y-6 > .card {
  margin-bottom: 0 !important;
}

/* 20. Notification Banner - clean styling */
#highlightNote,
.highlight-note {
  font-size: 12px !important;
  line-height: 1.5 !important;
}

/* 21. Mobile & Tablet Responsive Adjustments */
@media (max-width: 640px) {
  .card {
    padding: 16px !important;
    border-radius: 14px !important;
  }

  .mini {
    padding: 12px 14px !important;
    border-radius: 14px !important;
  }

  .nav-tab-btn {
    padding: 7px 12px !important;
    font-size: 12px !important;
  }

  .card-top-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .card-actions-row {
    width: 100% !important;
    flex-wrap: wrap !important;
  }

  .search-input-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .view-switch-group {
    width: 100% !important;
    justify-content: center !important;
  }
  .view-switch-btn {
    flex: 1 !important;
    justify-content: center !important;
  }

  .tailadmin-metric-card,
  #highlightMini > div,
  #ikpaMini > div,
  #sp2dMini > div {
    padding: 16px 18px !important;
    min-height: 136px !important;
  }

  .satker-card-item {
    padding: 12px 14px !important;
  }

  th, td {
    padding: 10px 12px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 14px 12px !important;
    border-radius: 12px !important;
  }

  .nav-tab-btn {
    padding: 6px 10px !important;
    font-size: 11.5px !important;
    gap: 5px !important;
  }
  .nav-tab-btn svg {
    width: 13px !important;
    height: 13px !important;
  }
}

/* 22. TailAdmin Satker Info Summary Banner */
#highlightCard,
#ikpaCard,
.tailadmin-banner {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 16px !important;
  padding: 16px 20px !important;
  margin-bottom: 24px !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

html.dark #highlightCard,
html.dark #ikpaCard,
[data-theme="dark"] #highlightCard,
[data-theme="dark"] #ikpaCard,
html.dark .tailadmin-banner,
[data-theme="dark"] .tailadmin-banner {
  background: #111C2D !important;
  border-color: #1E293B !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2) !important;
}

#highlightCard .banner-icon,
#ikpaCard .banner-icon {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  background-color: #EFF6FF !important;
  color: #465FFF !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

html.dark #highlightCard .banner-icon,
html.dark #ikpaCard .banner-icon,
[data-theme="dark"] #highlightCard .banner-icon,
[data-theme="dark"] #ikpaCard .banner-icon {
  background-color: rgba(70, 95, 255, 0.15) !important;
  color: #7592FF !important;
}

#highlightName,
#ikpaName {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--ink) !important;
  font-family: var(--font-outfit) !important;
  display: block !important;
}

#highlightNote,
#ikpaNote {
  font-size: 12px !important;
  color: var(--sub) !important;
  margin-top: 2px !important;
  display: block !important;
  font-weight: 500 !important;
}

@media (max-width: 640px) {
  #highlightCard,
  #ikpaCard,
  .tailadmin-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 14px 16px !important;
    gap: 12px !important;
  }
}

/* 23. Progress bars */
.sci-progress-track {
  height: 6px !important;
  border-radius: 99px !important;
  background: var(--chip) !important;
}
.sci-progress-fill {
  border-radius: 99px !important;
}

/* 24. Ensure no horizontal overflow in content */
aside {
  flex-shrink: 0 !important;
}

#app,
.main-panel,
.view-fade,
#realisasiView,
#sp2dView,
#ikpaView,
#historyView {
  max-width: 100% !important;
  overflow-x: hidden !important;
  min-width: 0 !important;
}

/* 25. Chart containers */
.chart-canvas-wrap,
.chart-section {
  min-width: 0 !important;
  overflow: hidden !important;
}

/* 26. Scrollbar styling for tables */
.table-scroll::-webkit-scrollbar,
.sp2d-table-wrapper::-webkit-scrollbar {
  height: 6px;
}
.table-scroll::-webkit-scrollbar-track,
.sp2d-table-wrapper::-webkit-scrollbar-track {
  background: var(--chip);
  border-radius: 99px;
}
.table-scroll::-webkit-scrollbar-thumb,
.sp2d-table-wrapper::-webkit-scrollbar-thumb {
  background: var(--faint);
  border-radius: 99px;
}
.table-scroll::-webkit-scrollbar-thumb:hover,
.sp2d-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--sub);
}

/* 27. Fix spinner animation */
@keyframes spinSync {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.syncing svg,
svg.syncing {
  animation: spinSync 0.8s linear infinite !important;
}
.spinner {
  animation: spinSync 1.2s linear infinite !important;
}

/* 28. Auto Load Status styling */
#autoLoadStatus {
  text-align: center !important;
  padding: 48px 24px !important;
}

/* 29. Notification Badge Dropdown Panels */
div[x-show] {
  z-index: 50 !important;
}

/* 30. Print / Export Styles */
@media print {
  aside, header, .nav-segmented, .card-actions-row, .modal-overlay, .toast-wrap {
    display: none !important;
  }
  body {
    background: white !important;
  }
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    page-break-inside: avoid !important;
  }
}

/* 31. SweetAlert2 TailAdmin Modern SaaS Styling */
.tailadmin-swal-popup {
  border-radius: 24px !important;
  font-family: var(--font-outfit) !important;
  padding: 24px !important;
  background-color: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
}
html.dark .tailadmin-swal-popup, [data-theme="dark"] .tailadmin-swal-popup {
  background-color: #111C2D !important;
  border: 1px solid #1E293B !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !important;
}
.tailadmin-swal-title {
  font-family: var(--font-outfit) !important;
  font-weight: 700 !important;
  font-size: 1.25rem !important;
  color: #1C2434 !important;
  margin-bottom: 8px !important;
}
html.dark .tailadmin-swal-title, [data-theme="dark"] .tailadmin-swal-title {
  color: #FFFFFF !important;
}
.tailadmin-swal-html {
  font-family: var(--font-outfit) !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  color: #64748B !important;
}
html.dark .tailadmin-swal-html, [data-theme="dark"] .tailadmin-swal-html {
  color: #94A3B8 !important;
}
.tailadmin-swal-actions {
  gap: 12px !important;
  margin-top: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.tailadmin-swal-confirm-danger {
  background-color: #E11D48 !important;
  color: #FFFFFF !important;
  border-radius: 12px !important;
  padding: 10px 22px !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}
.tailadmin-swal-confirm-danger:hover {
  background-color: #BE123C !important;
  box-shadow: 0 6px 16px rgba(225, 29, 72, 0.35) !important;
}
.tailadmin-swal-confirm {
  background-color: #3C50E0 !important;
  color: #FFFFFF !important;
  border-radius: 12px !important;
  padding: 10px 22px !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(60, 80, 224, 0.25) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}
.tailadmin-swal-confirm:hover {
  background-color: #2D3ECA !important;
  box-shadow: 0 6px 16px rgba(60, 80, 224, 0.35) !important;
}
.tailadmin-swal-cancel {
  background-color: #F1F5F9 !important;
  color: #475569 !important;
  border-radius: 12px !important;
  padding: 10px 22px !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  border: 1px solid #E2E8F0 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}
.tailadmin-swal-cancel:hover {
  background-color: #E2E8F0 !important;
  color: #1E293B !important;
}
html.dark .tailadmin-swal-cancel, [data-theme="dark"] .tailadmin-swal-cancel {
  background-color: #1E293B !important;
  color: #CBD5E1 !important;
  border-color: #334155 !important;
}
html.dark .tailadmin-swal-cancel:hover, [data-theme="dark"] .tailadmin-swal-cancel:hover {
  background-color: #334155 !important;
  color: #FFFFFF !important;
}

/* ============================================================
   TAILADMIN BRAND COLOR CLASSES & BUTTON CONTRAST ENGINE
   ============================================================ */

/* Primary brand button background & contrast */
.bg-\[\#465FFF\],
[class*="bg-[#465FFF]"],
.bg-brand-500,
.btn-brand-primary {
  background-color: #465FFF !important;
  color: #FFFFFF !important;
}

.bg-\[\#465FFF\]:hover,
[class*="hover:bg-[#374ACC]"]:hover,
.hover\:bg-\[\#374ACC\]:hover,
.bg-brand-600:hover,
.btn-brand-primary:hover {
  background-color: #374ACC !important;
  color: #FFFFFF !important;
}

/* Brand text color */
.text-\[\#465FFF\],
[class*="text-[#465FFF]"],
.text-brand-500 {
  color: #465FFF !important;
}

/* Dark mode text brand */
.dark\:text-\[\#7592FF\],
[class*="dark:text-[#7592FF]"],
html.dark [class*="text-[#465FFF]"],
[data-theme="dark"] [class*="text-[#465FFF]"] {
  color: #7592FF !important;
}

/* Active sidebar item / light badge background */
.bg-\[\#F0F5FF\],
[class*="bg-[#F0F5FF]"] {
  background-color: #F0F5FF !important;
}

html.dark [class*="dark:bg-[#465FFF]/15"],
[data-theme="dark"] [class*="dark:bg-[#465FFF]/15"] {
  background-color: rgba(70, 95, 255, 0.18) !important;
}

/* Borders */
.border-\[\#465FFF\],
[class*="border-[#465FFF]"] {
  border-color: #465FFF !important;
}

.hover\:border-\[\#465FFF\]:hover,
[class*="hover:border-[#465FFF]"]:hover {
  border-color: #465FFF !important;
}

/* Focus rings */
.focus\:ring-\[\#465FFF\]:focus,
[class*="focus:ring-[#465FFF]"]:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.3) !important;
  border-color: #465FFF !important;
}

/* Kelola Data & Primary Action Buttons */
.btn-kelola-data {
  background-color: #465FFF !important;
  color: #FFFFFF !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.375rem !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 1px 3px rgba(70, 95, 255, 0.35) !important;
  transition: all 0.2s ease-in-out !important;
  cursor: pointer !important;
}

.btn-kelola-data:hover {
  background-color: #374ACC !important;
  box-shadow: 0 4px 12px rgba(70, 95, 255, 0.4) !important;
  transform: translateY(-1px);
}

.btn-kelola-data svg {
  color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}

.btn-kelola-data span {
  color: #FFFFFF !important;
  font-weight: 700 !important;
}

/* Filter pills active styling */
button[class*="bg-[#465FFF]"],
.filter-pill-active {
  background-color: #465FFF !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 6px rgba(70, 95, 255, 0.3) !important;
}

button[class*="bg-[#465FFF]"]:hover,
.filter-pill-active:hover {
  background-color: #374ACC !important;
  color: #FFFFFF !important;
}

/* ============================================================
   EMERALD & SUCCESS BUTTON SYSTEM (FOR TAMBAH PENGGUNA, LOGIN, DLL)
   ============================================================ */

.bg-emerald-600,
[class*="bg-emerald-600"],
.bg-emerald-500,
[class*="bg-emerald-500"],
.btn-emerald {
  background-color: #059669 !important;
  color: #FFFFFF !important;
}

.bg-emerald-600:hover,
.hover\:bg-emerald-700:hover,
[class*="hover:bg-emerald-700"]:hover,
.hover\:bg-emerald-600:hover,
[class*="hover:bg-emerald-600"]:hover,
.btn-emerald:hover {
  background-color: #047857 !important;
  color: #FFFFFF !important;
}

.active\:bg-emerald-800:active,
[class*="active:bg-emerald-800"]:active,
.btn-emerald:active {
  background-color: #065F46 !important;
  color: #FFFFFF !important;
}

.bg-emerald-50,
[class*="bg-emerald-50"] {
  background-color: #ECFDF5 !important;
}

.text-emerald-700,
[class*="text-emerald-700"] {
  color: #047857 !important;
}

.text-emerald-600,
[class*="text-emerald-600"] {
  color: #059669 !important;
}

.border-emerald-200,
[class*="border-emerald-200"] {
  border-color: #A7F3D0 !important;
}

/* Ensure text inside action buttons is always crisp and visible */
button.bg-emerald-600,
button[class*="bg-emerald-600"],
button.bg-brand-500,
button[class*="bg-[#465FFF]"],
.btn-emerald {
  color: #FFFFFF !important;
}

button.bg-emerald-600 *,
button[class*="bg-emerald-600"] *,
button.bg-brand-500 *,
button[class*="bg-[#465FFF]"] *,
.btn-emerald * {
  color: #FFFFFF !important;
}

/* Blue & Amber Action Buttons (SP2D, Realisasi Upload & Actions) */
.bg-blue-600, [class*="bg-blue-600"] {
  background-color: #2563EB !important;
  color: #FFFFFF !important;
}
.bg-blue-600:hover, [class*="bg-blue-600"]:hover,
.hover\:bg-blue-700:hover, [class*="hover:bg-blue-700"]:hover {
  background-color: #1D4ED8 !important;
  color: #FFFFFF !important;
}
button.bg-blue-600 *, button[class*="bg-blue-600"] * {
  color: #FFFFFF !important;
}

.bg-amber-600, [class*="bg-amber-600"] {
  background-color: #D97706 !important;
  color: #FFFFFF !important;
}
.bg-amber-600:hover, [class*="bg-amber-600"]:hover,
.hover\:bg-amber-700:hover, [class*="hover:bg-amber-700"]:hover {
  background-color: #B45309 !important;
  color: #FFFFFF !important;
}
button.bg-amber-600 *, button[class*="bg-amber-600"] * {
  color: #FFFFFF !important;
}

/* Purple Action Buttons & Icons (BNBA PPKS Upload & Actions) */
.bg-purple-600, [class*="bg-purple-600"] {
  background-color: #9333EA !important;
  color: #FFFFFF !important;
}
.bg-purple-600:hover, [class*="bg-purple-600"]:hover,
.hover\:bg-purple-700:hover, [class*="hover:bg-purple-700"]:hover {
  background-color: #7E22CE !important;
  color: #FFFFFF !important;
}
button.bg-purple-600 *, button[class*="bg-purple-600"] * {
  color: #FFFFFF !important;
}

.bg-purple-50, [class*="bg-purple-50"] {
  background-color: #FAF5FF !important;
}
.text-purple-600, [class*="text-purple-600"] {
  color: #9333EA !important;
}
.text-purple-700, [class*="text-purple-700"] {
  color: #7E22CE !important;
}
.dark .bg-purple-950\/60, [data-theme="dark"] .bg-purple-950\/60 {
  background-color: rgba(59, 7, 100, 0.6) !important;
}
.dark .text-purple-400, [data-theme="dark"] .text-purple-400 {
  color: #C084FC !important;
}

/* ============================================================
   8. COMPREHENSIVE TAILADMIN DARK / NIGHT MODE SUITE
   Guarantees 100% of cards, containers, charts, tables,
   sub-cards, and input elements transform seamlessly in Night Mode.
   ============================================================ */

/* 8.1 All Primary Card Containers (Charts, Tables, Wrapper Cards) */
html.dark .bg-white:not(.keep-white):not(.logo-badge),
html.dark [class*="bg-white"]:not(.keep-white):not(.logo-badge),
html.dark [class*="dark:bg-[#111C2D]"],
html.dark [class*="dark:bg-gray-900"],
[data-theme="dark"] .bg-white:not(.keep-white):not(.logo-badge),
[data-theme="dark"] [class*="bg-white"]:not(.keep-white):not(.logo-badge),
[data-theme="dark"] [class*="dark:bg-[#111C2D]"],
[data-theme="dark"] [class*="dark:bg-gray-900"] {
  background-color: #111C2D !important;
  color: #FFFFFF !important;
}

/* 8.2 Borders & Dividers Across the Application */
html.dark .border-gray-200,
html.dark .border-gray-100,
html.dark [class*="border-gray-200"],
html.dark [class*="border-gray-100"],
html.dark [class*="dark:border-gray-800"],
html.dark [class*="dark:border-gray-700"],
[data-theme="dark"] .border-gray-200,
[data-theme="dark"] .border-gray-100,
[data-theme="dark"] [class*="border-gray-200"],
[data-theme="dark"] [class*="border-gray-100"],
[data-theme="dark"] [class*="dark:border-gray-800"],
[data-theme="dark"] [class*="dark:border-gray-700"] {
  border-color: #1E293B !important;
}

html.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]),
html.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]),
html.dark [class*="divide-gray-100"] > :not([hidden]) ~ :not([hidden]),
html.dark [class*="divide-gray-200"] > :not([hidden]) ~ :not([hidden]),
html.dark [class*="dark:divide-gray-800"] > :not([hidden]) ~ :not([hidden]),
[data-theme="dark"] .divide-gray-100 > :not([hidden]) ~ :not([hidden]),
[data-theme="dark"] .divide-gray-200 > :not([hidden]) ~ :not([hidden]),
[data-theme="dark"] [class*="divide-gray-100"] > :not([hidden]) ~ :not([hidden]),
[data-theme="dark"] [class*="divide-gray-200"] > :not([hidden]) ~ :not([hidden]),
[data-theme="dark"] [class*="dark:divide-gray-800"] > :not([hidden]) ~ :not([hidden]) {
  border-color: #1E293B !important;
}

/* 8.3 Satker List Cards (Cards View in Realisasi & IKPA) */
html.dark div[class*="border-gray-200/80"],
html.dark div.p-4.rounded-2xl.border,
[data-theme="dark"] div[class*="border-gray-200/80"],
[data-theme="dark"] div.p-4.rounded-2xl.border {
  background-color: #16243A !important;
  border-color: #1E293B !important;
}

html.dark div.p-4.rounded-2xl.border:hover,
[data-theme="dark"] div.p-4.rounded-2xl.border:hover {
  background-color: #1A2C46 !important;
  border-color: #334155 !important;
}

/* Selected Satker Card Highlight */
html.dark div[class*="bg-blue-50/30"],
html.dark div[class*="dark:bg-blue-950/20"],
[data-theme="dark"] div[class*="bg-blue-50/30"],
[data-theme="dark"] div[class*="dark:bg-blue-950/20"] {
  background-color: rgba(70, 95, 255, 0.16) !important;
  border-color: rgba(70, 95, 255, 0.75) !important;
}

/* 8.4 Tables, Headers, Rows & Cells */
html.dark table thead tr,
[data-theme="dark"] table thead tr {
  background-color: #16243A !important;
  border-bottom: 1px solid #1E293B !important;
}
html.dark table thead th,
[data-theme="dark"] table thead th {
  color: #94A3B8 !important;
  background-color: transparent !important;
  border-color: #1E293B !important;
}
html.dark table tbody tr,
[data-theme="dark"] table tbody tr {
  color: #E2E8F0 !important;
  border-bottom: 1px solid #1E293B !important;
}
html.dark table tbody tr:hover,
[data-theme="dark"] table tbody tr:hover {
  background-color: rgba(22, 36, 58, 0.75) !important;
}
html.dark table tbody td,
[data-theme="dark"] table tbody td {
  border-color: #1E293B !important;
}
html.dark table tbody tr[class*="bg-blue-50"],
html.dark table tbody tr[class*="bg-teal-50"],
[data-theme="dark"] table tbody tr[class*="bg-blue-50"],
[data-theme="dark"] table tbody tr[class*="bg-teal-50"] {
  background-color: rgba(70, 95, 255, 0.18) !important;
}

/* 8.5 Inputs, Selects, and Textareas */
html.dark input[type="text"],
html.dark input[type="search"],
html.dark input[type="password"],
html.dark input[type="email"],
html.dark input[type="number"],
html.dark select,
html.dark textarea,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background-color: #16243A !important;
  border-color: #1E293B !important;
  color: #FFFFFF !important;
}
html.dark input::placeholder,
[data-theme="dark"] input::placeholder {
  color: #64748B !important;
}
html.dark select option,
[data-theme="dark"] select option {
  background-color: #111C2D !important;
  color: #FFFFFF !important;
}

/* Chrome/Edge Autofill Protection in Dark Mode */
html.dark input:-webkit-autofill,
html.dark input:-webkit-autofill:hover, 
html.dark input:-webkit-autofill:focus,
[data-theme="dark"] input:-webkit-autofill,
[data-theme="dark"] input:-webkit-autofill:hover, 
[data-theme="dark"] input:-webkit-autofill:focus {
  -webkit-text-fill-color: #FFFFFF !important;
  -webkit-box-shadow: 0 0 0px 1000px #16243A inset !important;
  box-shadow: 0 0 0px 1000px #16243A inset !important;
  transition: background-color 5000s ease-in-out 0s !important;
}

/* File Input Element & Buttons */
input[type="file"] {
  background-color: transparent !important;
  border-color: transparent !important;
}
input[type="file"]::file-selector-button {
  border: 1px solid #E2E8F0 !important;
  border-radius: 10px !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  font-family: var(--font-outfit) !important;
  background-color: #F1F5F9 !important;
  color: #1E293B !important;
  cursor: pointer !important;
  margin-right: 10px !important;
  transition: all 0.15s ease !important;
}
input[type="file"]::file-selector-button:hover {
  background-color: #E2E8F0 !important;
}
html.dark input[type="file"],
[data-theme="dark"] input[type="file"] {
  background-color: transparent !important;
  color: #94A3B8 !important;
}
html.dark input[type="file"]::file-selector-button,
[data-theme="dark"] input[type="file"]::file-selector-button {
  background-color: #16243A !important;
  border-color: #1E293B !important;
  color: #FFFFFF !important;
}
html.dark input[type="file"]::file-selector-button:hover,
[data-theme="dark"] input[type="file"]::file-selector-button:hover {
  background-color: #1E293B !important;
}

/* Dark Surface & Sub-card Utilities */
html.dark [class*="dark:bg-gray-800"],
[data-theme="dark"] [class*="dark:bg-gray-800"] {
  background-color: #16243A !important;
}
html.dark [class*="dark:bg-gray-800/60"],
[data-theme="dark"] [class*="dark:bg-gray-800/60"] {
  background-color: rgba(22, 36, 58, 0.7) !important;
}
html.dark [class*="dark:bg-gray-950"],
[data-theme="dark"] [class*="dark:bg-gray-950"] {
  background-color: #0B132B !important;
}

/* 8.6 Top Toolbar Items (Peringkat Pill, Satker Selector, Sync Button) */
html.dark .h-10.flex.items-center.gap-2.px-3.py-2.rounded-xl.bg-white,
html.dark button.h-10.px-3\.5.py-2.rounded-xl.bg-white,
[data-theme="dark"] .h-10.flex.items-center.gap-2.px-3.py-2.rounded-xl.bg-white,
[data-theme="dark"] button.h-10.px-3\.5.py-2.rounded-xl.bg-white {
  background-color: #111C2D !important;
  border-color: #1E293B !important;
  color: #FFFFFF !important;
}

/* 8.7 Inactive Filter Pills & View Mode Buttons */
html.dark .bg-gray-100,
html.dark [class*="bg-gray-100"],
[data-theme="dark"] .bg-gray-100,
[data-theme="dark"] [class*="bg-gray-100"] {
  background-color: #16243A !important;
  color: #CBD5E1 !important;
}

html.dark .bg-gray-50,
html.dark [class*="bg-gray-50"],
[data-theme="dark"] .bg-gray-50,
[data-theme="dark"] [class*="bg-gray-50"] {
  background-color: rgba(22, 36, 58, 0.6) !important;
}

/* Active Segmented Button (e.g., Kartu vs Tabel in Dark Mode) */
html.dark button[class*="bg-white"][class*="text-gray-900"],
[data-theme="dark"] button[class*="bg-white"][class*="text-gray-900"] {
  background-color: #1E293B !important;
  color: #FFFFFF !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
}

/* 8.8 Dropdown Menus, Popovers, and Modal Containers */
html.dark [class*="shadow-xl"],
html.dark [class*="shadow-2xl"],
[data-theme="dark"] [class*="shadow-xl"],
[data-theme="dark"] [class*="shadow-2xl"] {
  background-color: #111C2D !important;
  border-color: #1E293B !important;
  color: #FFFFFF !important;
}
html.dark [class*="shadow-xl"] button:hover,
html.dark [class*="shadow-2xl"] button:hover,
[data-theme="dark"] [class*="shadow-xl"] button:hover,
[data-theme="dark"] [class*="shadow-2xl"] button:hover {
  background-color: #16243A !important;
}

/* 8.9 Typography Neutral Colors in Dark Mode */
html.dark .text-gray-900,
[data-theme="dark"] .text-gray-900 {
  color: #FFFFFF !important;
}
html.dark .text-gray-800,
[data-theme="dark"] .text-gray-800 {
  color: #F1F5F9 !important;
}
html.dark .text-gray-700,
[data-theme="dark"] .text-gray-700 {
  color: #E2E8F0 !important;
}
html.dark .text-gray-600,
[data-theme="dark"] .text-gray-600 {
  color: #CBD5E1 !important;
}
html.dark .text-gray-500,
[data-theme="dark"] .text-gray-500 {
  color: #94A3B8 !important;
}
html.dark .text-gray-400,
[data-theme="dark"] .text-gray-400 {
  color: #64748B !important;
}

/* 8.10 Progress Track Bars in Dark Mode */
html.dark .bg-gray-100.rounded-full,
html.dark [class*="bg-gray-100"][class*="rounded-full"],
[data-theme="dark"] .bg-gray-100.rounded-full,
[data-theme="dark"] [class*="bg-gray-100"][class*="rounded-full"] {
  background-color: #1E293B !important;
}

/* 8.11 Dropzone in Modals and Admin Upload */
html.dark .border-dashed,
[data-theme="dark"] .border-dashed {
  border-color: #334155 !important;
  background-color: rgba(22, 36, 58, 0.4) !important;
}

/* 8.12 Logo Protection (Keep white card around Kemensos Emblem) */
.logo-badge {
  background-color: #FFFFFF !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
}
html.dark .logo-badge,
[data-theme="dark"] .logo-badge {
  background-color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Ensure brand text has transparent background in both modes */
a[title*="Sentra Wirajaya"] > div.flex-col {
  background-color: transparent !important;
  background: transparent !important;
}
html.dark a[title*="Sentra Wirajaya"] > div.flex-col,
[data-theme="dark"] a[title*="Sentra Wirajaya"] > div.flex-col {
  background-color: transparent !important;
  background: transparent !important;
}

/* 9. Typography, Truncation & Line-Clamps */
.truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.line-clamp-1 {
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 1 !important;
  word-break: break-word !important;
}

.line-clamp-2 {
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  word-break: break-word !important;
}

.line-clamp-3 {
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  word-break: break-word !important;
}

/* Specific Satker title clamp helper */
.card-satker-title {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  overflow: hidden !important;
  word-break: break-word !important;
  min-height: 2.25rem !important;
}

/* 10. Comprehensive TailAdmin Responsive Grid System */
.grid { display: grid !important; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }

.col-span-1 { grid-column: span 1 / span 1 !important; }
.col-span-2 { grid-column: span 2 / span 2 !important; }
.col-span-3 { grid-column: span 3 / span 3 !important; }
.col-span-4 { grid-column: span 4 / span 4 !important; }
.col-span-5 { grid-column: span 5 / span 5 !important; }
.col-span-6 { grid-column: span 6 / span 6 !important; }
.col-span-7 { grid-column: span 7 / span 7 !important; }
.col-span-8 { grid-column: span 8 / span 8 !important; }
.col-span-12 { grid-column: span 12 / span 12 !important; }
.col-span-full { grid-column: 1 / -1 !important; }

@media (min-width: 640px) {
  .sm\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

@media (min-width: 768px) {
  .md\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }
  .lg\:col-span-1 { grid-column: span 1 / span 1 !important; }
  .lg\:col-span-2 { grid-column: span 2 / span 2 !important; }
  .lg\:col-span-3 { grid-column: span 3 / span 3 !important; }
  .lg\:col-span-4 { grid-column: span 4 / span 4 !important; }
  .lg\:col-span-5 { grid-column: span 5 / span 5 !important; }
  .lg\:col-span-6 { grid-column: span 6 / span 6 !important; }
  .lg\:col-span-7 { grid-column: span 7 / span 7 !important; }
  .lg\:col-span-8 { grid-column: span 8 / span 8 !important; }
  .lg\:col-span-12 { grid-column: span 12 / span 12 !important; }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
  .xl\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .xl\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }
  .xl\:col-span-1 { grid-column: span 1 / span 1 !important; }
  .xl\:col-span-2 { grid-column: span 2 / span 2 !important; }
  .xl\:col-span-3 { grid-column: span 3 / span 3 !important; }
  .xl\:col-span-4 { grid-column: span 4 / span 4 !important; }
  .xl\:col-span-5 { grid-column: span 5 / span 5 !important; }
  .xl\:col-span-6 { grid-column: span 6 / span 6 !important; }
  .xl\:col-span-7 { grid-column: span 7 / span 7 !important; }
  .xl\:col-span-8 { grid-column: span 8 / span 8 !important; }
  .xl\:col-span-12 { grid-column: span 12 / span 12 !important; }
}

@media (min-width: 1536px) {
  .\32xl\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .\32xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .\32xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}

/* 11. Ultra-Premium Detail Modal & Soft Badges Design System */
.badge-soft-primary {
  background-color: rgba(70, 95, 255, 0.12) !important;
  color: #374ACC !important;
  border: 1px solid rgba(70, 95, 255, 0.25) !important;
}
html.dark .badge-soft-primary, [data-theme="dark"] .badge-soft-primary {
  background-color: rgba(70, 95, 255, 0.22) !important;
  color: #A3B5FF !important;
  border-color: rgba(70, 95, 255, 0.4) !important;
}

.badge-soft-warning {
  background-color: rgba(245, 158, 11, 0.12) !important;
  color: #B45309 !important;
  border: 1px solid rgba(245, 158, 11, 0.28) !important;
}
html.dark .badge-soft-warning, [data-theme="dark"] .badge-soft-warning {
  background-color: rgba(245, 158, 11, 0.22) !important;
  color: #FCD34D !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
}

.badge-soft-success {
  background-color: rgba(16, 185, 129, 0.12) !important;
  color: #047857 !important;
  border: 1px solid rgba(16, 185, 129, 0.28) !important;
}
html.dark .badge-soft-success, [data-theme="dark"] .badge-soft-success {
  background-color: rgba(16, 185, 129, 0.22) !important;
  color: #6EE7B7 !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}

.badge-soft-rose {
  background-color: rgba(244, 63, 94, 0.12) !important;
  color: #BE123C !important;
  border: 1px solid rgba(244, 63, 94, 0.28) !important;
}
html.dark .badge-soft-rose, [data-theme="dark"] .badge-soft-rose {
  background-color: rgba(244, 63, 94, 0.22) !important;
  color: #FDA4AF !important;
  border-color: rgba(244, 63, 94, 0.4) !important;
}

.badge-soft-purple {
  background-color: rgba(139, 92, 246, 0.12) !important;
  color: #6D28D9 !important;
  border: 1px solid rgba(139, 92, 246, 0.28) !important;
}
html.dark .badge-soft-purple, [data-theme="dark"] .badge-soft-purple {
  background-color: rgba(139, 92, 246, 0.22) !important;
  color: #C4B5FD !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
}

.badge-soft-cyan {
  background-color: rgba(6, 182, 212, 0.12) !important;
  color: #0E7490 !important;
  border: 1px solid rgba(6, 182, 212, 0.28) !important;
}
html.dark .badge-soft-cyan, [data-theme="dark"] .badge-soft-cyan {
  background-color: rgba(6, 182, 212, 0.22) !important;
  color: #67E8F9 !important;
  border-color: rgba(6, 182, 212, 0.4) !important;
}

.badge-soft-amber {
  background-color: rgba(217, 119, 6, 0.12) !important;
  color: #B45309 !important;
  border: 1px solid rgba(217, 119, 6, 0.28) !important;
}
html.dark .badge-soft-amber, [data-theme="dark"] .badge-soft-amber {
  background-color: rgba(217, 119, 6, 0.22) !important;
  color: #FCD34D !important;
  border-color: rgba(217, 119, 6, 0.4) !important;
}

.badge-soft-danger {
  background-color: rgba(239, 68, 68, 0.12) !important;
  color: #B91C1C !important;
  border: 1px solid rgba(239, 68, 68, 0.28) !important;
}
html.dark .badge-soft-danger, [data-theme="dark"] .badge-soft-danger {
  background-color: rgba(239, 68, 68, 0.22) !important;
  color: #FCA5A5 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

/* Modal Specific Interactive Styling */
.modal-field-card {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
}
.modal-field-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 2px 8px -1px rgba(0, 0, 0, 0.05);
}
html.dark .modal-field-card, [data-theme="dark"] .modal-field-card {
  background-color: rgba(17, 28, 45, 0.7);
  border-color: rgba(255, 255, 255, 0.08);
}
html.dark .modal-field-card:hover, [data-theme="dark"] .modal-field-card:hover {
  border-color: rgba(70, 95, 255, 0.4);
  box-shadow: 0 2px 8px -1px rgba(0, 0, 0, 0.25);
}

.modal-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: #F1F5F9;
  color: #334155;
  border: 1px solid #E2E8F0;
  transition: all 0.15s ease;
  cursor: pointer;
}
.modal-chip-btn:hover {
  background-color: #E2E8F0;
  color: #0F172A;
  border-color: #CBD5E1;
}
html.dark .modal-chip-btn, [data-theme="dark"] .modal-chip-btn {
  background-color: rgba(255, 255, 255, 0.06);
  color: #CBD5E1;
  border-color: rgba(255, 255, 255, 0.1);
}
html.dark .modal-chip-btn:hover, [data-theme="dark"] .modal-chip-btn:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

/* Modal Print Formatting Rules */
@media print {
  body * {
    visibility: hidden;
  }
  #printableProfileModal, #printableProfileModal * {
    visibility: visible;
  }
  #printableProfileModal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  .no-print, button, input {
    display: none !important;
  }
}

/* 12. Modal Viewport Constraint & Premium Scrollbar Engine */
.modal-viewport-frame {
  height: 88vh !important;
  max-height: 88vh !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

@media (max-width: 640px) {
  .modal-viewport-frame {
    height: 94vh !important;
    max-height: 94vh !important;
  }
}

/* Modal Content Scrollable Body */
.modal-scroll-container,
#printableProfileModal .modal-scroll-container,
.custom-scrollbar {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  scrollbar-color: #94A3B8 rgba(0, 0, 0, 0.05) !important;
}

html.dark .modal-scroll-container,
html.dark #printableProfileModal .modal-scroll-container,
html.dark .custom-scrollbar,
[data-theme="dark"] .modal-scroll-container,
[data-theme="dark"] #printableProfileModal .modal-scroll-container,
[data-theme="dark"] .custom-scrollbar {
  scrollbar-color: #475569 rgba(255, 255, 255, 0.05) !important;
}

/* Chrome / Safari / Edge / Webkit Scrollbar */
.modal-scroll-container::-webkit-scrollbar,
#printableProfileModal .modal-scroll-container::-webkit-scrollbar,
.custom-scrollbar::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
}

.modal-scroll-container::-webkit-scrollbar-track,
#printableProfileModal .modal-scroll-container::-webkit-scrollbar-track,
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04) !important;
  border-radius: 9999px !important;
}

html.dark .modal-scroll-container::-webkit-scrollbar-track,
html.dark #printableProfileModal .modal-scroll-container::-webkit-scrollbar-track,
html.dark .custom-scrollbar::-webkit-scrollbar-track,
[data-theme="dark"] .modal-scroll-container::-webkit-scrollbar-track,
[data-theme="dark"] #printableProfileModal .modal-scroll-container::-webkit-scrollbar-track,
[data-theme="dark"] .custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04) !important;
}

.modal-scroll-container::-webkit-scrollbar-thumb,
#printableProfileModal .modal-scroll-container::-webkit-scrollbar-thumb,
.custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: #94A3B8 !important;
  border-radius: 9999px !important;
  border: 2px solid transparent !important;
  background-clip: content-box !important;
  transition: background-color 0.2s ease !important;
}

.modal-scroll-container::-webkit-scrollbar-thumb:hover,
#printableProfileModal .modal-scroll-container::-webkit-scrollbar-thumb:hover,
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background-color: #64748B !important;
}

html.dark .modal-scroll-container::-webkit-scrollbar-thumb,
html.dark #printableProfileModal .modal-scroll-container::-webkit-scrollbar-thumb,
html.dark .custom-scrollbar::-webkit-scrollbar-thumb,
[data-theme="dark"] .modal-scroll-container::-webkit-scrollbar-thumb,
[data-theme="dark"] #printableProfileModal .modal-scroll-container::-webkit-scrollbar-thumb,
[data-theme="dark"] .custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: #475569 !important;
}

html.dark .modal-scroll-container::-webkit-scrollbar-thumb:hover,
html.dark #printableProfileModal .modal-scroll-container::-webkit-scrollbar-thumb:hover,
html.dark .custom-scrollbar::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] .modal-scroll-container::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] #printableProfileModal .modal-scroll-container::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] .custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background-color: #64748B !important;
}

/* Photo Gallery & Field Documentation UI Styles */
.photo-card-container {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.photo-card-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}
.photo-img-box {
  background: radial-gradient(circle at center, rgba(70, 95, 255, 0.04) 0%, rgba(0,0,0,0.02) 100%);
  position: relative;
  overflow: hidden;
}
html.dark .photo-img-box {
  background: radial-gradient(circle at center, rgba(70, 95, 255, 0.08) 0%, rgba(0,0,0,0.2) 100%);
}
.photo-img-box img {
  transition: transform 0.35s ease;
}
.photo-card-container:hover .photo-img-box img {
  transform: scale(1.04);
}

/* ============================================================
   Profile Dropdown Menu Architecture & UI Polishing
   ============================================================ */
.profile-dropdown-card {
  width: 250px !important;
  min-width: 240px !important;
  max-width: 280px !important;
  box-shadow: 0 20px 40px -6px rgba(15, 23, 42, 0.16), 0 8px 16px -4px rgba(15, 23, 42, 0.08) !important;
  border-radius: 18px !important;
  transform-origin: top right !important;
  animation: dropdownPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownPop {
  0% {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

html.dark .profile-dropdown-card,
[data-theme="dark"] .profile-dropdown-card {
  background-color: #111C2D !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 24px 48px -6px rgba(0, 0, 0, 0.6) !important;
}

/* ============================================================
   Premium Satker Card UI/UX (Realisasi & IKPA Modules)
   Modern, responsive, contemporary card architecture
   ============================================================ */
.satker-cards-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 0.5rem;
}

@media (min-width: 768px) {
  .satker-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .satker-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.satker-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.satker-card:hover {
  transform: translateY(-2px);
  border-color: #465FFF;
  box-shadow: 0 10px 20px -3px rgba(70, 95, 255, 0.12), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
}

html.dark .satker-card,
[data-theme="dark"] .satker-card {
  background: #111C2D;
  border-color: #1E293B;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

html.dark .satker-card:hover,
[data-theme="dark"] .satker-card:hover {
  border-color: #465FFF;
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(70, 95, 255, 0.3);
}

/* Active / Selected Satker Card (Executive Spotlight) */
.satker-card.is-active {
  border: 2px solid #465FFF !important;
  background: linear-gradient(180deg, #F0F4FF 0%, #FFFFFF 45%) !important;
  box-shadow: 0 10px 25px -4px rgba(70, 95, 255, 0.2), 0 0 0 1px rgba(70, 95, 255, 0.2) !important;
}

html.dark .satker-card.is-active,
[data-theme="dark"] .satker-card.is-active {
  border: 2px solid #465FFF !important;
  background: linear-gradient(180deg, rgba(70, 95, 255, 0.18) 0%, #111C2D 45%) !important;
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(70, 95, 255, 0.4) !important;
}

/* IKPA Variant Card */
.satker-card.ikpa-card:hover {
  border-color: #0D9488;
  box-shadow: 0 10px 20px -3px rgba(13, 148, 136, 0.12), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
}

.satker-card.ikpa-card.is-active {
  border: 2px solid #0D9488 !important;
  background: linear-gradient(180deg, #F0FDFA 0%, #FFFFFF 45%) !important;
  box-shadow: 0 10px 25px -4px rgba(13, 148, 136, 0.2), 0 0 0 1px rgba(13, 148, 136, 0.2) !important;
}

html.dark .satker-card.ikpa-card.is-active,
[data-theme="dark"] .satker-card.ikpa-card.is-active {
  border: 2px solid #0D9488 !important;
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.18) 0%, #111C2D 45%) !important;
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(13, 148, 136, 0.4) !important;
}

/* Rank Badge */
.satker-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #E2E8F0;
}

html.dark .satker-rank,
[data-theme="dark"] .satker-rank {
  background: #1E293B;
  color: #94A3B8;
  border-color: #334155;
}

/* Rank Top 1 Gold */
.satker-rank.rank-gold {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35) !important;
}

/* Rank Top 2-3 Amber */
.satker-rank.rank-amber {
  background: #FEF3C7 !important;
  color: #92400E !important;
  border-color: #FDE68A !important;
}

html.dark .satker-rank.rank-amber,
[data-theme="dark"] .satker-rank.rank-amber {
  background: rgba(146, 64, 14, 0.3) !important;
  color: #FCD34D !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
}

/* Satker Code Chip */
.satker-code {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #F8FAFC;
  color: #64748B;
  border: 1px solid #E2E8F0;
  flex-shrink: 0;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.dark .satker-code,
[data-theme="dark"] .satker-code {
  background: #16243A;
  color: #94A3B8;
  border-color: #1E293B;
}

/* Active Badge Beacon */
.satker-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #465FFF;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(70, 95, 255, 0.35);
  flex-shrink: 0;
}

.satker-active-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background-color: #FFFFFF;
  animation: pulseBeacon 1.5s infinite;
}

@keyframes pulseBeacon {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

.satker-card.ikpa-card .satker-active-badge {
  background: #0D9488;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.35);
}

/* Percentage Pill */
.satker-pct-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: -0.02em;
  border: 1px solid;
  flex-shrink: 0;
}

/* Satker Title */
.satker-name {
  font-family: 'Outfit', sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: #0F172A !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  overflow: hidden !important;
  min-height: 36px !important;
  max-height: 36px !important;
  transition: color 0.15s ease !important;
  margin: 0 !important;
}

.satker-card:hover .satker-name {
  color: #465FFF !important;
}

html.dark .satker-name,
[data-theme="dark"] .satker-name {
  color: #F8FAFC !important;
}

html.dark .satker-card:hover .satker-name,
[data-theme="dark"] .satker-card:hover .satker-name {
  color: #7592FF !important;
}

.satker-card.ikpa-card:hover .satker-name {
  color: #0D9488 !important;
}

html.dark .satker-card.ikpa-card:hover .satker-name,
[data-theme="dark"] .satker-card.ikpa-card:hover .satker-name {
  color: #2DD4BF !important;
}

/* Progress Bar */
.satker-track {
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: #F1F5F9;
  overflow: hidden;
}

html.dark .satker-track,
[data-theme="dark"] .satker-track {
  background: #1E293B;
}

.satker-bar {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.5s ease;
}

/* Metrics Recessed Panel */
.satker-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 8px 10px;
  gap: 6px;
}

html.dark .satker-metrics,
[data-theme="dark"] .satker-metrics {
  background: #16243A;
  border-color: #1E293B;
}

.satker-metric-col {
  min-width: 0;
}

.satker-metric-col + .satker-metric-col {
  border-left: 1px solid #E2E8F0;
  padding-left: 8px;
}

html.dark .satker-metric-col + .satker-metric-col,
[data-theme="dark"] .satker-metric-col + .satker-metric-col {
  border-left-color: #1E293B;
}

.satker-metric-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94A3B8;
  line-height: 1.2;
}

html.dark .satker-metric-label,
[data-theme="dark"] .satker-metric-label {
  color: #64748B;
}

.satker-metric-val {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  line-height: 1.2;
}

html.dark .satker-metric-val,
[data-theme="dark"] .satker-metric-val {
  color: #F1F5F9;
}


