/* ======================================= */
/* === 1. DEFINISI WARNA (Custom Props) === */
/* ======================================= */
:root {
  --primary-color-accent: #2563EB; /* Biru Indigo/Deep Blue */
  --bg-active-light: #b5bfc7;     /* Biru Sangat Muda (Latar Belakang Aktif) */
  --bg-light: #f8f9fa;           /* Latar Belakang Area Konten */
  --bg-white: #ffffff;           /* Latar Belakang Sidebar */
  --text-default: #343a40;       
  --text-muted: #6c757d;         
  --shadow-light: rgba(0, 0, 0, 0.08);
}

/* ======================================= */
/* === 2. BODY & LAYOUT === */
/* ======================================= */
body {
  background-color: var(--bg-light);
  margin: 0;
  height: 100vh;
  overflow: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.container-fluid,
.layout-wrapper,
.row {
  height: 100%;
}

/* ======================================= */
/* === 3. SIDEBAR === */
/* ======================================= */
.sidebar {
  height: 100vh;
  overflow-y: auto;
  border-right: none;
  background-color: var(--bg-white);
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease; 
  z-index: 1050;
}

/* Bayangan Sidebar (Desktop) */
@media (min-width: 768px) {
  .sidebar {
    box-shadow: 1px 0 10px var(--shadow-light); 
    z-index: 1030 !important; 
  }
}

.sidebar.active {
  opacity: 1;
}

.p-3.border-bottom {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
    border-color: #e9ecef !important; 
}


/* ======================================= */
/* === 4. NAV LINK (Gaya Konsisten) === */
/* ======================================= */
.nav-link {
  border-radius: 8px;           
  padding: 10px 15px;           
  transition: all 0.2s ease-in-out; 
  color: var(--text-default) !important; 
  margin-bottom: 4px;           
  border-left: 2px solid transparent; 
}

.nav-link:hover {
  background-color: rgba(0, 0, 0, 0.05); 
  color: var(--primary-color-accent) !important; 
}

.nav-link i {
    color: var(--text-muted); 
    transition: color 0.2s ease-in-out;
}

/* === GAYA AKTIF: Menggunakan aksen biru yang lebih kuat === */
.nav-link.active {
  /* Latar belakang Biru Sangat Muda dan Menenangkan */
  background-color: var(--bg-active-light); 
  /* Teks dan ikon menggunakan warna aksen gelap */
  color: var(--primary-color-accent) !important; 
  /* Garis Kiri Biru Aksen yang Kuat */
  border-left: 2px solid var(--primary-color-accent); 
  box-shadow: none; 
}

.nav-link.active i {
  color: var(--primary-color-accent) !important; 
}

/* Ikon Panah Collapse */
.nav-link i.fa-chevron-down {
    transition: transform 0.2s ease-in-out;
}

.nav-link[aria-expanded="true"] i.fa-chevron-down {
    transform: rotate(180deg);
}


/* === PENYESUAIAN SUB-MENU (COLLAPSE) === */
.nav .collapse {
    padding-left: 0 !important;
}

.nav .collapse .nav-item {
    padding-left: 10px; 
}

.nav .collapse .nav-link {
    border-radius: 0 8px 8px 0; 
}


/* ======================================= */
/* === 5. AREA KONTEN === */
/* ======================================= */
.content-area {
  height: 100vh;
  overflow-y: auto;
  background-color: var(--bg-light);
  padding: 20px;
}

/* ======================================= */
/* === 6. SCROLLBAR === */
/* ======================================= */
.sidebar::-webkit-scrollbar,
.content-area::-webkit-scrollbar {
  width: 10px; 
}

.sidebar::-webkit-scrollbar-thumb,
.content-area::-webkit-scrollbar-thumb {
  background: #c3c7cc; 
  border-radius: 4px; 
  transition: background 0.2s;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.content-area::-webkit-scrollbar-thumb:hover {
  background: #a9adb4; 
}

/* ======================================= */
/* === 7. RESPONSIVE MODE === */
/* ======================================= */
@media (max-width: 767.98px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    transform: translateX(-100%);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2); 
    opacity: 0;
    z-index: 1050 !important; 
  }

  .sidebar.active {
    transform: translateX(0);
    opacity: 1;
  }

  body.sidebar-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4); 
    z-index: 1040;
    opacity: 1;
    transition: opacity 0.3s ease;
  }

  #toggleSidebar {
    position: fixed;
    top: 10px;
    right: 15px;
    z-index: 1060;
    border: none;
    background-color: var(--bg-white);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); 
    border-radius: 50%; 
    width: 44px; 
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #toggleSidebar i {
    font-size: 20px; 
    color: #495057; 
    transition: transform 0.3s ease, color 0.3s;
  }

  body.sidebar-open #toggleSidebar i {
    transform: rotate(90deg);
    color: var(--primary-color-accent); 
  }
}

/* === Highlight efek (Biru Gelap Konsisten) === */
.highlight {
  background-color: var(--bg-active-light) !important;
  border-left: 4px solid var(--primary-color-accent) !important; 
  animation: pulse-highlight 2s ease-in-out;
}

@keyframes pulse-highlight {
  0% { background-color: var(--bg-active-light); }
  50% { background-color: #C1E1FD; } /* Pulsa sedikit lebih kuat */
  100% { background-color: var(--bg-active-light); }
}

/* === Scroll lembut dan responsif untuk body modal === */
.modal-body.scrollable {
  max-height: 70vh;
  overflow-y: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-right: 12px;
}