/* ==========================================================================
   RINNET+ ENTERPRISE INFRASTRUCTURE CUSTOM CSS
   ========================================================================== */

:root {
  --primary-accent: #4f46e5;
  --violet-accent: #7c3aed;
  --indigo-dark: #0f172a;
  --sidebar-bg: #1e293b;
  --card-bg: #ffffff;
  --body-bg: #f8fafc;
  --text-primary: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--body-bg);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* CUSTOM SCROLLBAR FOR BETTER UI */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.5);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-accent);
}

/* BRAND TYPOGRAPHY */
.brand-logo-container {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.brand-logo-text {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}
.login-right .brand-logo-text {
  background: linear-gradient(135deg, #1e293b 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.plus-tag {
  color: #f59e0b;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 900;
  margin-left: 2px;
  -webkit-text-fill-color: #f59e0b;
}
.brand-subtitle {
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: block;
}

/* LOGIN WRAPPER */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: flex-start; /* Ubah dari center agar tidak terpotong di atas saat scroll */
  justify-content: center;
  padding: 2rem 1rem;
  background: radial-gradient(circle at top right, #312e81, #0f172a 80%);
  overflow-y: auto; /* Memastikan halaman bisa discroll */
}
.login-card-container {
  width: 100%;
  max-width: 1050px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  margin: auto; /* Mengunci posisi di tengah, namun tetap aman saat discroll */
}
.login-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}
@media (max-width: 991px) {
  .login-grid { grid-template-columns: 1fr; }
  
  /* Memunculkan panel kiri di HP dan menyesuaikan paddingnya */
  .login-left { 
    display: flex !important; 
    padding: 2.5rem 1.5rem; 
  }
  
  /* Menyesuaikan teks footer pada panel kiri agar rapi di HP */
  .login-left .border-top {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
.login-left {
  padding: 3.5rem;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.9), rgba(15, 23, 42, 0.95)),
              url('https://images.unsplash.com/photo-1558494949-ef010cbdcc31?auto=format&fit=crop&w=1200&q=80') center/cover;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-right {
  padding: 3.5rem 3rem;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.feature-pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 14px;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.badge-e2e {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.75rem;
}
.input-group-text-custom {
  background: #f8fafc;
  border-right: none;
  color: #64748b;
}

/* MAIN LAYOUT & SIDEBAR */
.mobile-header {
  background: var(--sidebar-bg);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar {
  width: 280px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--sidebar-bg);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  z-index: 1050;
  transition: all 0.3s ease;
  overflow-y: auto;
}
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
}
.sidebar-category-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
  padding: 1.2rem 1.5rem 0.4rem;
  letter-spacing: 1px;
}
.sidebar .nav-link {
  color: #94a3b8;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border-left-color: var(--primary-accent);
}
.sidebar .nav-link i {
  width: 20px;
  text-align: center;
}
.app-credit {
  margin-top: auto;
  padding: 1rem 1.5rem;
  font-size: 0.75rem;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.content-area {
  margin-left: 280px;
  padding: 2.5rem;
  min-height: 100vh;
}
@media (max-width: 991px) {
  .content-area { margin-left: 0; padding: 1.5rem; }
}

/* CARDS & COMPONENTS */
.card-custom {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}
.welcome-card-lux {
  background: linear-gradient(135deg, #312e81, #4f46e5);
  border-radius: 20px;
  padding: 2rem;
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.3);
}
.quotes-box-lux {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
}
/* ==========================================
   LUXURY ENTERPRISE DASHBOARD CARDS
   ========================================== */
.stat-card {
  border-radius: 20px;
  padding: 1.5rem;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Animasi Elevasi saat Hover */
.stat-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.3);
}

/* Animasi Cahaya Kilap (Shine Effect) melintas di Card */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  animation: luxShine 7s infinite;
  z-index: 1;
}

@keyframes luxShine {
  0% { left: -100%; }
  15% { left: 200%; }
  100% { left: 200%; }
}
/* Mempertegas Ikon Latar Belakang */
.stat-icon {
  position: absolute;
  right: -15px;
  bottom: -15px;
  font-size: 5rem;
  opacity: 0.15;
  transition: transform 0.4s ease;
  z-index: 0;
}
.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(-10deg);
  opacity: 0.25;
}

/* Memastikan teks tetap di atas efek kilap */
.stat-card span, .stat-card h2, .stat-card div {
  position: relative;
  z-index: 2;
}

/* Modern Welcome Banner */
.welcome-card-lux {
  background: linear-gradient(135deg, #1e1b4b, #4338ca);
  border-radius: 24px;
  padding: 2.5rem;
  color: #ffffff;
  box-shadow: 0 15px 35px -5px rgba(67, 56, 202, 0.4);
  position: relative;
  overflow: hidden;
}
.welcome-card-lux::after {
  content: '';
  position: absolute;
  right: 0; bottom: 0;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  transform: translate(30%, 30%);
}
.quick-access-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.quick-access-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-accent);
}
.quick-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.metric-card-modern {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.2rem;
}
.metric-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}
.metric-val {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.terminal-console {
  background: #0f172a;
  color: #38bdf8;
  font-family: monospace;
  font-size: 0.78rem;
  padding: 1rem;
  border-radius: 12px;
  height: 250px;
  overflow-y: auto;
}
.live-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 1.5s infinite;
}
@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(0.95); opacity: 1; }
}
.col-xl-2-4 {
  flex: 0 0 auto;
  width: 20%;
}
@media (max-width: 1199px) { .col-xl-2-4 { width: 50%; } }
@media (max-width: 575px) { .col-xl-2-4 { width: 100%; } }

/* TABLE RESPONSIVE SCROLL FIX */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.table-scroll table {
  min-width: 800px; /* Force table width for scroll on small devices */
}
/* Styling Tambahan untuk Modul Tentang RINNET+ */
.about-icon-wrapper {
  width: 70px;
  height: 70px;
  background: #eef2ff;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tracking-tight {
  letter-spacing: -1px;
}

/* RESPONSIVE FIX UNTUK LAYAR MOBILE & TABLET (LOGIN PAGE) */
@media (max-width: 575px) {
  .login-wrapper {
    padding: 1rem; /* Mengurangi jarak luar (margin) pada layar kecil */
  }
  
  .login-right {
    padding: 2.5rem 1.5rem; /* Mengurangi padding di dalam kartu login */
  }
  
  .brand-subtitle {
    font-size: 0.65rem; /* Mengecilkan teks subtitle agar tidak terpotong di kanan */
    letter-spacing: 1px;
  }
  
  .login-card-container {
    border-radius: 16px; /* Menyesuaikan lengkungan border untuk layar kecil */
  }
}

/* ==========================================
   PERBAIKAN ENTERPRISE TABLE SCROLL
   ========================================== */
.table-scroll {
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: auto;
}

/* Kunci Header (Judul Kolom) di atas */
.table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #f8f9fa;
  box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.1);
}

/* Kunci Kolom Kiri (Nama Server & Tulisan TOTAL) agar selalu terlihat saat scroll horizontal */
.table-scroll .sticky-left {
  position: sticky !important;
  left: 0;
  z-index: 1; /* Berada di atas sel data biasa */
}

/* Pertemuan Header Atas dan Kolom Kiri (Pojok Kiri Atas harus paling tinggi z-index nya) */
.table-scroll thead th.sticky-left {
  z-index: 4 !important; 
}

/* Kunci Kolom AKSI (Paling Kanan) agar selalu terlihat */
.table-scroll th:last-child,
.table-scroll td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  background-color: #ffffff;
  box-shadow: -3px 0 5px -2px rgba(0,0,0,0.1);
}

/* Pastikan sudut Header Aksi paling atas tidak tertumpuk */
.table-scroll th:last-child {
  z-index: 3;
  background-color: #f8f9fa;
}

/* Penyesuaian saat baris di-hover agar warna Aksi & Kolom Kiri ikut berubah */
.table-hover tbody tr:hover td:last-child,
.table-hover tbody tr:hover td.sticky-left {
  background-color: #f2f2f2 !important;
}

.sidebar-category-title[aria-expanded="false"] .transition-icon {
  transform: rotate(-90deg);
  transition: transform 0.3s ease;
}
.sidebar-category-title[aria-expanded="true"] .transition-icon,
.sidebar-category-title .transition-icon {
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

/* ==========================================
   MODERN UI & INTERACTION ANIMATIONS
   ========================================== */
/* Animasi masuk dari bawah (digunakan saat pindah menu) */
.fade-in-up {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Kartu Panduan */
.card-guide {
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  padding: 1.5rem;
  height: 100%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.card-guide:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-accent);
}
.guide-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
/* Tombol Modern Interaktif */
.btn-modern {
  transition: all 0.3s ease;
}
.btn-modern:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2) !important;
}

/* ==========================================
   PERBAIKAN UI/UX & SIDEBAR TOGGLE DESKTOP
   ========================================== */

/* 1. Aturan Dasar Sidebar Flexbox */
.sidebar {
  display: flex;
  flex-direction: column;
  overflow-y: hidden !important; /* Mencegah seluruh sidebar terscroll */
  overflow-x: hidden !important;
}

/* Bagian Header (Logo & Profil) */
.sidebar-header {
  flex-shrink: 0;
  transition: all 0.3s ease;
}
#navUserAvatar {
  width: 65px;
  height: 65px;
  transition: all 0.3s ease;
}

/* Bagian Tengah (Menu Navigasi - Area Scroll) */
.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 1rem;
}
/* Custom Scrollbar Khusus Menu Sidebar */
.sidebar-menu::-webkit-scrollbar { width: 4px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 10px; }
.sidebar-menu::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.4); }

/* Bagian Bawah (Tombol Keluar - Sticky Footer) */
.sidebar-footer {
  flex-shrink: 0;
  padding: 1rem 0;
  background: var(--sidebar-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.sidebar-footer .logout-btn {
  margin: 0 15px;
  border-radius: 8px;
}
.sidebar-footer .logout-btn:hover {
  background: rgba(220, 53, 69, 0.15);
}

/* 2. Tombol Toggle Minimalis */
.desktop-toggle-btn {
  position: fixed;
  top: 25px; 
  left: 295px;
  width: 35px;
  height: 35px;
  background: transparent !important;
  color: #64748b;
  border: none !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1040;
  transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.2s ease, transform 0.2s ease;
  font-size: 1.25rem;
}
.desktop-toggle-btn:hover {
  color: var(--primary-accent);
  transform: scale(1.15);
}

/* 3. Logika Layar Lebar / Fullscreen (>= 992px) */
@media (min-width: 992px) {
  .sidebar { 
    transform: translateX(0) !important;
    width: 280px !important; 
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  }
  .content-area { 
    margin-left: 280px !important; 
    transition: margin-left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  }
  
  /* Saat Mini Sidebar Aktif (Di-toggle) */
  .sidebar.desktop-collapsed {
    width: 80px !important;
  }
  .content-area.expanded {
    margin-left: 80px !important;
  }
  
  /* Geser posisi tombol toggle dengan mulus saat sidebar mengecil */
  .sidebar.desktop-collapsed ~ .desktop-toggle-btn {
    left: 95px !important;
  }
  
  /* Sembunyikan elemen teks secara instan saat mini sidebar */
  .sidebar.desktop-collapsed .sidebar-category-title,
  .sidebar.desktop-collapsed .nav-link span,
  .sidebar.desktop-collapsed .app-credit,
  .sidebar.desktop-collapsed .brand-logo-text,
  .sidebar.desktop-collapsed #navUserName,
  .sidebar.desktop-collapsed #userRoleBadge {
    display: none !important;
  }

  /* Sesuaikan Ukuran Header saat Collapse */
  .sidebar.desktop-collapsed .sidebar-header {
    padding: 1rem 0.5rem !important;
  }
  .sidebar.desktop-collapsed .sidebar-logo-icon {
    display: inline-block !important; /* Tampilkan icon mini */
    border-radius: 8px;
  }
  
  /* Poto Profil Mengecil (Menyesuaikan Sidebar) */
  .sidebar.desktop-collapsed #navUserAvatar {
    width: 40px !important;
    height: 40px !important;
    border-width: 1px !important;
    margin-top: 5px !important;
  }
  
  /* Rapikan Logo-logo Modul Halaman (Icons) menjadi proporsional di tengah */
  .sidebar.desktop-collapsed .nav-link {
    justify-content: center !important;
    padding: 0 !important;
    margin: 8px auto !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 12px !important; /* Bentuk kotak melengkung seperti icon app */
    display: flex;
    align-items: center;
  }
  .sidebar.desktop-collapsed .nav-link i {
    margin: 0 !important;
    font-size: 1.25rem !important;
  }
  
  /* Rapikan Tombol Keluar / Toggle Button di Bottom Footer */
  .sidebar.desktop-collapsed .sidebar-footer {
    padding: 15px 0 !important;
  }
  .sidebar.desktop-collapsed .sidebar-footer .logout-btn {
    margin: 0 auto !important;
  }
}

/* ==========================================
   LUXURY ENTERPRISE UI/UX ENHANCEMENTS
   ========================================== */

/* 1. Shimmer Loading Skeleton */
.skeleton-row td {
  position: relative;
  overflow: hidden;
  background-color: #f8fafc;
  border-color: #f1f5f9;
}
.skeleton-box {
  height: 20px;
  background-color: #e2e8f0;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}
.skeleton-box::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,0.6) 20%, rgba(255,255,255,0) 60%);
  animation: shimmer 1.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes shimmer { 
  100% { transform: translateX(100%); } 
}

/* 2. Glassmorphism pada Modal & Dropdown */
.modal-content, .dropdown-menu {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15) !important;
}

/* 3. Luxury Override untuk SweetAlert2 */
div:where(.swal2-container) div:where(.swal2-popup) {
  border-radius: 24px !important;
  padding: 2.5rem !important;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.15) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(10px);
}

/* 4. Floating Action Button (FAB) */
.fab-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1040;
}
.fab-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.fab-btn:hover {
  transform: translateY(-5px) rotate(90deg);
  box-shadow: 0 15px 25px rgba(99, 102, 241, 0.4) !important;
}

/* ==========================================
   MODERN NOTIFICATION SYSTEM
   ========================================== */
.topbar-modern {
  position: relative;
  z-index: 1020;
}

.notif-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px -3px rgba(0,0,0,0.1) !important;
  border-color: var(--primary-accent) !important;
}

.notif-btn:hover i {
  color: var(--primary-accent) !important;
}

.notif-badge.pulse {
  animation: badgePulse 1.5s infinite;
}

@keyframes badgePulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.notif-item {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.notif-item:hover {
  background-color: #f8fafc;
}

.notif-item.unread {
  background-color: #f0fdfa; /* Highlight cyan sangat pudar untuk pesan baru */
  border-left: 3px solid var(--primary-accent);
}

.notif-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Custom Scrollbar untuk Dropdown Notif */
.notif-scroll-area::-webkit-scrollbar {
  width: 5px;
}
.notif-scroll-area::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

/* =========================================================
   1. MODERN LOGIN SPLIT SCREEN
   ========================================================= */
.login-wrapper {
  min-height: 100vh;
  width: 100%;
  padding: 0 !important;
  background: radial-gradient(circle at center, #1e293b 0%, #080b12 100%);
  position: relative;
}
.login-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(99, 102, 241, 0.15) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.5;
  pointer-events: none;
}
.login-split {
  display: flex;
  width: 100%;
  min-height: 100vh;
}
.login-left {
  flex: 1.2;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  padding: 2rem;
}
.login-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: 20px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 420px;
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}
.login-card h3 { color: #ffffff !important; }
.login-card .text-muted, .login-card .text-secondary { color: #94a3b8 !important; }
.login-card .text-dark { color: #ffffff !important; }

.input-group-modern .form-control, .input-group-modern .input-group-text, .input-group-modern .btn {
  background-color: rgba(15, 23, 42, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}
.input-group-modern .form-control::placeholder {
  color: #64748b !important;
}
.input-group-text-custom {
  background: rgba(15, 23, 42, 0.5);
  color: #94a3b8;
}
#eyeIcon {
  color: #94a3b8 !important;
}

.brand-glow-logo {
  width: 130px;
  border-radius: 25px;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.4);
  transition: all 0.4s ease;
  background: transparent;
  padding: 10px;
}
.brand-glow-logo:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.7);
}
.title-glow {
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}
.btn-login-modern {
  background: var(--primary-accent) !important;
  border-radius: 12px !important;
  transition: all 0.3s ease;
}
.btn-login-modern:hover {
  background: var(--violet-accent) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* Responsif Mobile untuk Login */
@media (max-width: 991px) {
  .login-split { flex-direction: column; }
  .login-left { flex: none; padding: 4rem 1.5rem; }
  .login-right { flex: none; padding: 3rem 1rem; }
  .login-card { padding: 2rem 1.5rem; }
}


/* ==========================================
   PERBAIKAN UI/UX & SIDEBAR TOGGLE DESKTOP
   ========================================== */

/* 1. Aturan Dasar Sidebar agar selalu bisa discroll */
.sidebar {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Custom Scrollbar Khusus Sidebar (Sangat Tipis & Elegan) */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 10px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.4); }

/* 2. Tombol Toggle Minimalis, Simple & Elegant (Tanpa Background Box) */
.desktop-toggle-btn {
  position: fixed;
  top: 25px; /* Sejajar dengan topbar header */
  left: 295px;
  width: 35px;
  height: 35px;
  background: transparent !important;
  color: #64748b;
  border: none !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1040;
  transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.2s ease, transform 0.2s ease;
  font-size: 1.25rem;
}

/* Efek interaktif saat disentuh kursor */
.desktop-toggle-btn:hover {
  color: var(--primary-accent);
  transform: scale(1.15);
}

/* 3. Logika Layar Lebar / Fullscreen (>= 992px) */
@media (min-width: 992px) {
  .sidebar { 
    transform: translateX(0) !important;
    width: 280px !important; 
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  }
  .content-area { 
    margin-left: 280px !important; 
    transition: margin-left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  }
  
  /* Saat Mini Sidebar Aktif (Di-toggle) */
  .sidebar.desktop-collapsed {
    width: 80px !important;
  }
  .content-area.expanded {
    margin-left: 80px !important;
  }
  
  /* Geser posisi tombol toggle dengan mulus saat sidebar mengecil */
  .sidebar.desktop-collapsed ~ .desktop-toggle-btn {
    left: 95px !important;
  }
  
  /* Sembunyikan elemen teks secara instan saat mini sidebar */
  .sidebar.desktop-collapsed .sidebar-category-title,
  .sidebar.desktop-collapsed .nav-link span,
  .sidebar.desktop-collapsed .app-credit,
  .sidebar.desktop-collapsed .brand-logo-text,
  .sidebar.desktop-collapsed #navUserName,
  .sidebar.desktop-collapsed #userRoleBadge {
    display: none !important;
  }
  
  /* Rapikan icon di tengah saat mode mini */
  .sidebar.desktop-collapsed .nav-link {
    justify-content: center !important;
    padding: 0.8rem 0 !important;
    margin: 10px auto !important;
    width: 45px !important;
  }
  .sidebar.desktop-collapsed .nav-link i {
    margin: 0 !important;
    font-size: 1.25rem !important;
  }
}

/* 4. Logika Layar Halfscreen / Mobile (< 992px) */
@media (max-width: 991px) {
  .desktop-toggle-btn { 
    display: none !important; /* Sembunyikan icon toggle desktop murni */
  }
  .sidebar {
    transform: translateX(-100%) !important;
    width: 280px !important; /* Kunci lebar kembali normal */
    transition: transform 0.3s ease !important;
  }
  .sidebar.show {
    transform: translateX(0) !important;
  }
  .content-area { 
    margin-left: 0 !important; 
    padding: 1.5rem !important; 
  }
} 

/* ==========================================
   LUXURY MONITORING SYSTEM UI (APM)
   ========================================== */
.live-status-badge {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 8px 18px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #ffffff;
}

.glow-dot-live {
  width: 10px; height: 10px; 
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981, 0 0 15px #10b981;
  animation: pulseNeon 1.5s infinite alternate;
}
@keyframes pulseNeon { 
  from { opacity: 0.5; transform: scale(0.85); } 
  to { opacity: 1; transform: scale(1.15); } 
}

.metric-card-premium {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.03);
}
.metric-card-premium:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 25px rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
}
.icon-box-glow {
  width: 48px; height: 48px; 
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; color: #fff;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
.metric-info { display: flex; flex-direction: column; }
.metric-info .title { font-size: 0.72rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; margin-bottom: 2px;}
.metric-info .val { font-size: 1.15rem; font-weight: 900; line-height: 1.2;}

.terminal-premium {
  background: #0b1121; /* Dark blue/black */
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 1.25rem;
  height: 280px;
  overflow-y: auto;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.8rem;
  color: #38bdf8; /* Cyber blue */
  box-shadow: inset 0 0 20px rgba(0,0,0,0.4);
}
.terminal-premium::-webkit-scrollbar { width: 6px; }
.terminal-premium::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
.terminal-premium div { margin-bottom: 6px; }
.terminal-premium .error { color: #f43f5e; }
.terminal-premium .success { color: #34d399; }

.table-premium {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
.table-premium thead th {
  background: #f8fafc;
  color: #475569;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.table-premium tbody td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  font-size: 0.85rem;
}
.table-premium tbody tr { transition: background-color 0.2s ease; }
.table-premium tbody tr:hover td { background: #f8fafc; }

/* ==========================================
   TAMBAHAN MIXRADIUS UPLOAD UI
   ========================================== */
.cursor-pointer {
  cursor: pointer !important;
}

#areaRekapManual, #areaRekapOtomatis {
  animation: smoothFadeIn 0.4s ease forwards;
}

/* Kustomisasi Kartu Metrik Mixradius */
#areaRekapOtomatis .card-custom h3 {
  letter-spacing: -0.5px;
}
#areaRekapOtomatis .table th {
  text-transform: capitalize !important;
  color: #334155 !important;
  font-weight: 700 !important;
}

/* ==========================================
   MATRIX TABLE UI (REKAP PENJUALAN)
   ========================================== */
.table-matrix {
  border-collapse: separate;
  border-spacing: 0;
}
.table-matrix thead th {
  background: linear-gradient(to bottom, #ffffff, #f8fafc) !important;
  color: #334155 !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  font-size: 0.72rem !important;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e2e8f0 !important;
  padding: 1rem 0.5rem !important;
}
.table-matrix tbody td {
  font-size: 0.85rem !important;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
}
.table-matrix tbody tr {
  transition: all 0.2s ease;
}
.table-matrix tbody tr:hover td {
  background-color: #eef2ff !important;
  color: var(--primary-accent);
}
.table-matrix td.sticky-left, .table-matrix th.sticky-left {
  box-shadow: 2px 0 5px rgba(0,0,0,0.04);
  border-right: 2px solid #e2e8f0 !important;
}
.table-matrix td.sticky-right, .table-matrix th.sticky-right {
  box-shadow: -2px 0 5px rgba(0,0,0,0.04);
  border-left: 2px solid #e2e8f0 !important;
}

/* ==========================================
   LUXURY MIXRADIUS UI ENHANCEMENTS
   ========================================== */
.card-mix-metric {
  border-radius: 20px;
  padding: 1.5rem;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}
.card-mix-metric:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.25);
}
.card-mix-metric .mix-icon {
  position: absolute;
  right: -15px;
  top: -15px;
  font-size: 6rem;
  opacity: 0.15;
  transform: rotate(-15deg);
  transition: transform 0.4s ease;
}
.card-mix-metric:hover .mix-icon {
  transform: rotate(0deg) scale(1.1);
}
.card-mix-metric .mix-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
}
.card-mix-metric .mix-value {
  font-weight: 900;
  font-size: 1.8rem;
  margin: 0;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}