/* ===========================================================
   MAIN.CSS - Palet BAPPISUS (Biru • Emas)
   - Lengkap: reset, variables, header, sidebar, main, cards,
     forms, table, datatable overrides, responsive, dark-mode
   - Author: Generated for you
   =========================================================== */

/* =========================
   1. RESET & BASE
   ========================= */
*,
*::before,
*::after { box-sizing: border-box; }

html, body, #app {
  height: 100%;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans",
               "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-feature-settings: "liga" 1;
}

/* Links, images */
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; height: auto; }

/* =========================
   2. COLOR SYSTEM (ROOT)
   ========================= */
:root {
  /* BAPPISUS palette */
  --bappisus-blue: #0b2b5d;
  --bappisus-gold: #d4af37;
  --bappisus-brown: #9a7b2f;
  --bappisus-white: #ffffff;

  /* global surface/text */
  --bg: #f7f9fc;
  --surface: rgba(255,255,255,.72);
  --muted: #5f6b86;
  --text: #1c2438;
  --outline: rgba(11,43,93,.12);
  --shadow-sm: 0 6px 18px rgba(9,20,46,.06);
  --shadow-lg: 0 12px 30px rgba(9,20,46,.12);
  --glass-blur: blur(10px);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 20px;

  /* gradients and accents */
  --primary-gradient: linear-gradient(135deg, var(--bappisus-blue) 0%, #1a3a6f 100%);
  --accent-gradient: linear-gradient(135deg, rgba(212,175,55,.95), rgba(154,123,47,.9));

  /* UI sizes */
  --nav-height: 72px;
  --sidebar-width: 270px;

  /* form / table */
  --border-color: rgba(11,43,93,.08);
  --surface-contrast: rgba(255,255,255, .9);

  /* datatable compat */
  --dt-primary-color: var(--bappisus-blue);
}

/* dark theme (attribute) */
:root[data-theme="dark"], html.dark {
  --bg: #0c1526;
  --surface: rgba(18,24,40,.55);
  --muted: #a7b3cc;
  --text: #e6ecf8;
  --outline: rgba(212,175,55,.12);
  --shadow-sm: 0 10px 30px rgba(0,0,0,.45);
  --shadow-lg: 0 16px 34px rgba(0,0,0,.6);
}

/* =========================
   3. LAYOUT SHELL
   ========================= */
.header {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: var(--primary-gradient);
  color: var(--bappisus-white);
  box-shadow: var(--shadow-sm);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
}

.header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand .logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bappisus-gold);
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(212,175,55,.08);
}

.header .nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Theme toggle */
.theme-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,.16);
  color: var(--bappisus-white);
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* MAIN wrapper (sidebar + content) */
.app-shell {
  display: flex;
  margin-top: var(--nav-height);
  min-height: calc(100vh - var(--nav-height));
}

/* =========================
   4. SIDEBAR
   ========================= */
.sidebar {
  width: var(--sidebar-width);
  padding: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-right: 1px solid var(--border-color);
  transition: all 0.25s ease;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}

/* collapsed variant */
.sidebar.collapsed { width: 72px; }

/* sidebar link */
.sidebar .nav-item {
  display: block;
  margin-bottom: 8px;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  transition: all 0.18s ease;
}

.sidebar .nav-link i {
  width: 28px;
  text-align: center;
  color: var(--bappisus-blue);
}

.sidebar .nav-link:hover {
  transform: translateX(6px);
  color: var(--bappisus-blue);
  background: rgba(11,43,93,.04);
}

/* active */
.sidebar .nav-link.active {
  background: linear-gradient(90deg, rgba(11,43,93,0.08), rgba(11,43,93,0.03));
  color: var(--bappisus-blue);
  border-left: 3px solid var(--bappisus-gold);
  padding-left: calc(12px - 3px);
}

/* =========================
   5. MAIN CONTENT
   ========================= */
.main-content {
  flex: 1;
  padding: 28px;
  min-height: calc(100vh - var(--nav-height));
  transition: all 0.2s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* page header inside content */
.page-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--bappisus-blue);
}

/* small muted text */
.muted { color: var(--muted); font-weight: 500; }

/* =========================
   6. CARDS & PANELS
   ========================= */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--outline);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card h3 { margin: 0 0 8px 0; color: var(--bappisus-blue); }

/* grid helpers */
.grid {
  display: grid;
  gap: 18px;
}

.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

/* modern card variants */
.modern-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid var(--outline);
}

/* module / app card */
.app-card {
  position: relative;
  background: var(--surface);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--outline);
}

.app-card .app-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: rgba(11,43,93,.06);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink: 0;
}

.app-card .app-name {
  font-weight: 700;
  color: var(--bappisus-blue);
}

/* info ribbon */
.ribbon {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  background: linear-gradient(90deg, rgba(11,43,93,.06), rgba(11,43,93,.03));
  color: var(--bappisus-blue);
  font-weight: 700;
  border: 1px solid var(--outline);
}

/* =========================
   7. BUTTONS
   ========================= */
.btn {
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  font-weight: 700;
  /* Transisi diterapkan pada semua tombol */
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease; 
  text-decoration: none;
}

/* --- PRIMARY BUTTON (Emas Solid) --- */
.btn--primary {
  background: var(--bappisus-gold);
  color: #1b2233;
  box-shadow: 0 10px 24px rgba(212,175,55,.22);
  border: 1px solid rgba(212,175,55,.15);
}
.btn--primary:hover {
  /* Efek utama: Terangkat */
  transform: translateY(-2px); 
  /* Meningkatkan bayangan agar terlihat lebih terangkat */
  box-shadow: 0 12px 28px rgba(212,175,55,.3); 
  
  /* Mempertahankan warna agar tidak hilang (seperti masalah sebelumnya) */
  background: var(--bappisus-gold); 
  border-color: rgba(212,175,55,.35); /* Garis tepi sedikit lebih tebal/jelas */
  color: #1b2233;
}

/* --- OUTLINE BUTTON (Garis Tepi) --- */
.btn--outline {
  background: transparent;
  color: var(--bappisus-white);
  border: 1px solid rgba(255,255,255,.14);
}
.btn--outline:hover {
  transform: translateY(-2px);
  /* Meningkatkan opasitas garis tepi dan menambahkan sedikit bayangan */
  border-color: rgba(255,255,255,.3); 
  box-shadow: 0 4px 10px rgba(255,255,255,.1); 
}

/* --- SECONDARY BUTTON (Biru Solid) --- */
.btn--secondary {
  background: var(--bappisus-blue);
  color: var(--bappisus-white);
  border: 1px solid rgba(255,255,255,.06);
}
.btn--secondary:hover {
  transform: translateY(-2px);
  /* Sedikit menggelapkan latar belakang (jika var(--bappisus-blue) adalah warna solid) */
  /* Di sini diasumsikan ada var(--bappisus-darker-blue) atau menggunakan filter */
  /* Menggunakan Opacity untuk mensimulasikan kegelapan */
  opacity: 0.95; 
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2); /* Menambah bayangan gelap */
}

/* --- GHOST BUTTON (Garis Tepi Putus-putus) --- */
.btn--ghost {
  background: transparent;
  color: var(--bappisus-blue);
  border: 1px dashed rgba(11,43,93,.08);
}
.btn--ghost:hover {
  transform: translateY(-2px);
  /* Mengubah garis putus-putus menjadi solid dan memperjelas warna teks */
  color: var(--bappisus-darker-blue, #081d43); /* Jika ada warna biru yang lebih gelap */
  border-style: solid; /* Mengubah dari dashed ke solid */
  border-color: rgba(11,43,93,.2); /* Memperjelas garis tepi */
}

/* --- ICON BUTTON --- */
.icon-btn {
  width: 40px;
  height: 40px;
  display:inline-grid;
  place-items:center;
  border-radius: 10px;
  background: rgba(11,43,93,.04);
  border: 1px solid var(--outline);
}
.icon-btn:hover {
  transform: translateY(-1px); /* Efek terangkat yang lebih kecil */
  background: rgba(11,43,93,.08); /* Latar belakang sedikit lebih gelap */
  border-color: var(--bappisus-gold); /* Mengubah garis tepi menjadi emas (aksen) */
  box-shadow: 0 2px 5px rgba(11,43,93,.1);
}

/* =========================
   8. FORMS & INPUTS
   ========================= */
.form-group { margin-bottom: 14px; }

.label {
  display:block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.input, .select, textarea {
  width:100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--surface-contrast);
  color: var(--text);
  transition: box-shadow .12s ease, border-color .12s ease;
  font-size: 14px;
}

.input:focus, .select:focus, textarea:focus {
  outline: none;
  border-color: var(--bappisus-blue);
  box-shadow: 0 6px 18px rgba(11,43,93,.06);
}

/* helper text */
.form-helper { font-size: 13px; color: var(--muted); }

/* =========================
   9. TABLES & DATATABLE OVERRIDES
   ========================= */
.table {
  width:100%;
  border-collapse: collapse;
  background: transparent;
}

.table thead th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  background: var(--bappisus-blue);
  color: white;
  border: none;
  border-radius: 6px;
}

.table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text);
  background: transparent;
}

/* datatables specific - keeps things consistent */
.dt-container {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--outline);
  box-shadow: var(--shadow-sm);
}

/* pagination active */
.dt-container .page-item.active .page-link {
  background: var(--bappisus-blue);
  color: white;
  border-color: var(--bappisus-gold);
  box-shadow: 0 6px 16px rgba(11,43,93,.12);
}

/* selected row */
table.dataTable > tbody > tr.selected > * {
  background: linear-gradient(90deg, rgba(11,43,93,.08), rgba(11,43,93,.02)) !important;
  color: inherit !important;
}

/* datatable search / length inputs */
.dt-container input[type="search"], .dt-container select {
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 10px;
}

/* =========================
   10. NOTIFICATIONS / ALERTS
   ========================= */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--outline);
  background: rgba(11,43,93,.03);
  color: var(--text);
  box-shadow: 0 6px 18px rgba(11,43,93,.03);
}

.alert.success { border-left: 4px solid #2ecc71; }
.alert.warn { border-left: 4px solid #f39c12; }
.alert.error { border-left: 4px solid #e74c3c; }

/* =========================
   11. FOOTER
   ========================= */
.site-footer {
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* =========================
   12. UTILITIES
   ========================= */
.flex { display:flex; }
.center { display:grid; place-items:center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.p-12 { padding: 12px; }

/* =========================
   13. RESPONSIVE
   ========================= */
@media (max-width: 990px) {
  .sidebar { display: none; }
  .app-shell { margin-left: 0; }
  .main-content { padding: 20px; }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .header { padding: 0 12px; }
  .brand .logo { width: 36px; height: 36px; }
  .page-title { font-size: 18px; }
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
}

/* =========================
   14. DARK MODE TWEAKS
   ========================= */
:root[data-theme="dark"] .header,
html.dark .header {
  background: linear-gradient(135deg, rgba(11,43,93,.9), rgba(10,30,60,.95));
}

:root[data-theme="dark"] .card,
html.dark .card {
  background: rgba(18,24,40,.6);
  border: 1px solid rgba(255,255,255,.04);
}

:root[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-right: 1px solid rgba(255,255,255,.03);
}

:root[data-theme="dark"] .btn--primary {
  box-shadow: 0 8px 28px rgba(212,175,55,.12);
}

/* dark text adjustments */
:root[data-theme="dark"] .muted { color: var(--muted); }
:root[data-theme="dark"] .table thead th { background: linear-gradient(135deg, #24324f, #162033); }

/* =========================
   15. SMALL ANIMATIONS
   ========================= */
.fade-in {
  animation: fadeIn .45s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================
   16. OPTIONAL: COMPONENTS FOR PORTALS & MODULES
   ========================= */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.module-card {
  border-radius: 14px;
  padding: 18px;
  min-height: 160px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid var(--outline);
}

.module-card .module-title { font-weight: 700; color: var(--bappisus-blue); }
.module-card .module-desc { color: var(--muted); font-size: 14px; }

/* hover border accent */
.module-card:hover {
  border-color: var(--bappisus-gold);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(11,43,93,.08);
}

/* =========================
   17. MODAL COMPONENTS
   ========================= */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  background: var(--primary-gradient);
  border: none;
  padding: var(--space-xl);
  color: var(--bappisus-white);
}

.modal-title {
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body {
  padding: var(--space-2xl);
  background: var(--bappisus-white);
  font-size: var(--font-base);
  color: var(--text);
  line-height: 1.6;
}

.btn-close {
  background: none;
  border: none;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.btn-close:hover {
  opacity: 1;
}

.btn-close-white {
  filter: brightness(0) invert(1);
}

/* =========================
   18. ENHANCED ALERT SYSTEM
   ========================= */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid var(--outline);
  box-shadow: 0 6px 18px rgba(11,43,93,.03);
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.alert::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--bappisus-blue);
}

.alert-info {
  background: linear-gradient(90deg, rgba(52, 152, 219, 0.1) 0%, rgba(255, 255, 255, 0.95) 100%);
  color: #1565c0;
  border-color: #bbdefb;
}

.alert-info::before {
  background: #2196f3;
}

.alert-success {
  background: linear-gradient(90deg, rgba(46, 204, 113, 0.1) 0%, rgba(255, 255, 255, 0.95) 100%);
  color: #2e7d32;
  border-color: #c8e6c9;
}

.alert-success::before {
  background: #4caf50;
}

.alert-warning {
  background: linear-gradient(90deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 255, 255, 0.95) 100%);
  color: #ef6c00;
  border-color: #ffe0b2;
}

.alert-warning::before {
  background: #ff9800;
}

.alert-danger {
  background: linear-gradient(90deg, rgba(244, 67, 54, 0.1) 0%, rgba(255, 255, 255, 0.95) 100%);
  color: #c62828;
  border-color: #ffcdd2;
}

.alert-danger::before {
  background: #f44336;
}

.alert-dismissible {
  padding-right: 50px;
}

.alert .btn-close {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px;
  color: inherit;
  opacity: 0.6;
}

.alert .btn-close:hover {
  opacity: 1;
}

/* =========================
   19. NAVBAR & DROPDOWN ENHANCEMENTS
   ========================= */
.navbar {
  background: var(--primary-gradient) !important;
  box-shadow: var(--shadow-sm);
  padding: 0.75rem 0;
  border: none;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--bappisus-white) !important;
  text-decoration: none;
}

.navbar-brand img {
  transition: transform 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.navbar-nav .nav-link {
  color: var(--bappisus-white) !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--bappisus-gold) !important;
}

.dropdown-menu {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  background: var(--bappisus-white);
  margin-top: 8px;
}

.dropdown-item {
  padding: 10px 20px;
  color: var(--text);
  transition: all 0.2s ease;
  border-radius: 0;
}

.dropdown-item:hover {
  background: linear-gradient(90deg, rgba(11,43,93,0.08), rgba(11,43,93,0.03));
  color: var(--bappisus-blue);
  transform: translateX(4px);
}

.dropdown-item:active {
  background: rgba(11,43,93,0.1);
}

.dropdown-divider {
  margin: 8px 20px;
  border-top: 1px solid var(--outline);
}

/* Navbar Toggle Button */
.navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 10px;
  border-radius: 6px;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* =========================
   19. ENHANCED HEADER COMPONENTS FOR tBaseHeader
   ========================= */
/* Modern Brand Component */
.modern-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.modern-brand:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.brand-logo-container {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  overflow: hidden;
}

.brand-logo-container:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.brand-logo-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-icon {
  font-size: 24px;
  color: white;
}

.brand-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--bappisus-white) !important;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin-right: 12px;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.sidebar-toggle-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.sidebar-toggle-btn i {
  color: white;
  font-size: 16px;
}

/* Modern Header Class */
.modern-header {
  background: var(--primary-gradient) !important;
  box-shadow: var(--shadow-sm);
  padding: 0.75rem 0;
  border: none;
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Modern Nav Links */
.modern-nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  font-size: 14px;
  padding: 8px 16px !important;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.modern-nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--bappisus-gold) !important;
  transform: translateY(-1px);
  text-decoration: none;
}

.modern-nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: var(--bappisus-gold) !important;
  font-weight: 600;
}

/* User Avatar */
.user-avatar {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
  transition: all 0.3s ease;
}

.user-avatar:hover {
  border-color: var(--bappisus-gold);
  transform: scale(1.05);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-avatar i {
  color: white;
  font-size: 16px;
}

.user-name {
  color: white;
  font-weight: 500;
  font-size: 14px;
  margin-left: 8px;
}

/* Enhanced Dropdown Menu */
.modern-dropdown-menu {
  background: var(--bappisus-white) !important;
  border: 1px solid var(--outline);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  margin-top: 8px;
  min-width: 240px;
  position: absolute;
  right: 0;
  left: auto !important;
  transform: none !important;
  animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modern-dropdown-header {
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--bg);
  margin-bottom: 4px;
  border-bottom: 1px solid var(--outline);
}

.modern-dropdown-header small {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modern-dropdown-item {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-bottom: 2px;
}

.modern-dropdown-item:hover {
  background: rgba(11,43,93,0.08);
  color: var(--bappisus-blue);
  transform: translateX(4px);
  text-decoration: none;
}

.modern-dropdown-item:focus {
  background: rgba(11,43,93,0.08);
  color: var(--bappisus-blue);
  outline: none;
}

.modern-dropdown-item i {
  width: 20px;
  text-align: center;
  font-size: 14px;
  margin-right: 8px;
}

.modern-dropdown-item.text-danger {
  color: #dc3545;
}

.modern-dropdown-item.text-danger:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

/* =========================
   20. SIDEBAR NAVIGATION ENHANCEMENTS
   ========================= */
.sidebar {
  width: var(--sidebar-width);
  padding: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,249,250,0.95));
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--outline);
  transition: all 0.25s ease;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  z-index: 998;
}

.sidebar-hidden {
  left: calc(-1 * var(--sidebar-width));
}

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--outline);
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Sidebar Links */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
  margin-bottom: 4px;
  position: relative;
}

.sidebar-link i {
  width: 20px;
  text-align: center;
  color: var(--bappisus-blue);
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  transform: translateX(6px);
  color: var(--bappisus-blue);
  background: rgba(11,43,93,.06);
  text-decoration: none;
}

.sidebar-link.active {
  background: linear-gradient(90deg, rgba(11,43,93,0.1), rgba(11,43,93,0.05));
  color: var(--bappisus-blue);
  font-weight: 600;
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--bappisus-gold);
  border-radius: 0 3px 3px 0;
}

/* Sidebar Dropdown */
.sidebar-dropdown {
  cursor: pointer;
}

.dropdown-arrow {
  margin-left: auto;
  transition: transform 0.3s ease;
  font-size: 12px;
}

.sidebar-dropdown[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
}

.submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(11,43,93,.02);
  border-radius: 8px;
  margin-top: 4px;
  margin-left: 12px;
}

.submenu.show {
  max-height: 500px;
  padding: 8px 0;
}

.submenu .sidebar-link {
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}

.submenu .sidebar-link:hover {
  background: rgba(11,43,93,.08);
  transform: translateX(4px);
}

.submenu .sidebar-link.active {
  background: rgba(11,43,93,.12);
  color: var(--bappisus-blue);
}

/* =========================
   21. MAIN CONTENT ADJUSTMENTS
   ========================= */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 28px;
  min-height: calc(100vh - var(--nav-height));
  transition: margin-left 0.25s ease;
  background: var(--bg);
}

.main-content.expanded {
  margin-left: 0;
}

/* Page not found styling */
.modern-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--outline);
  box-shadow: var(--shadow-sm);
}

.modern-card-body {
  padding: var(--space-2xl);
}

/* =========================
   22. RESPONSIVE ENHANCEMENTS
   ========================= */
@media (max-width: 768px) {
  .sidebar {
    left: calc(-1 * var(--sidebar-width));
  }
  
  .sidebar.show {
    left: 0;
  }
  
  .main-content {
    margin-left: 0;
    padding: 20px 15px;
  }
  
  .navbar-brand {
    font-size: 18px;
  }
  
  .modal-body {
    padding: var(--space-xl);
  }
  
  .alert {
    padding: 12px 16px;
    font-size: 14px;
  }
}

/* =========================
   23. DARK MODE MODAL & ALERT
   ========================= */
:root[data-theme="dark"] .modal-content,
html.dark .modal-content {
  background: rgba(18,24,40,.95);
  border: 1px solid rgba(255,255,255,.08);
}

:root[data-theme="dark"] .modal-body,
html.dark .modal-body {
  background: rgba(18,24,40,.8);
  color: #e6ecf8;
}

:root[data-theme="dark"] .alert,
html.dark .alert {
  background: rgba(18,24,40,.6);
  border: 1px solid rgba(255,255,255,.08);
  color: #e6ecf8;
}

:root[data-theme="dark"] .dropdown-menu,
html.dark .dropdown-menu {
  background: rgba(18,24,40,.95);
  border: 1px solid rgba(255,255,255,.08);
}

:root[data-theme="dark"] .dropdown-item,
html.dark .dropdown-item {
  color: #e6ecf8;
}

:root[data-theme="dark"] .dropdown-item:hover,
html.dark .dropdown-item:hover {
  background: rgba(212,175,55,.1);
  color: var(--bappisus-gold);
}

/* =========================
   END OF MAIN.CSS
   ========================= */