/* =======================================================
   SYSTEM MANAGEMENT RESOURCES - MAIN STYLESHEET
   Group 2 - Refactored Structure & Final Polish
   ======================================================= */

/* -------------------------------------------------------
   1. GLOBAL RESET & TYPOGRAPHY
   ------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", "Segoe UI", sans-serif;
}

body {
  background-color: #eff6ff;
  background-image:
    radial-gradient(circle at top center, rgba(191, 219, 254, 0.7) 0%, rgba(191, 219, 254, 0.25) 18%, transparent 42%),
    radial-gradient(circle at 20% 0%, rgba(186, 230, 253, 0.55) 0%, rgba(186, 230, 253, 0.18) 14%, transparent 34%),
    linear-gradient(180deg, #eff6ff 0%, #f8fbff 38%, #ffffff 100%);
  color: #1a202c;
  line-height: 1.6;
  padding-top: 64px;
}

html {
  background-color: #eff6ff;
  scroll-behavior: smooth;
}

html.night-mode {
  background-color: #0b0f19 !important;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
  /* KUNCI UTAMA: Mencegah scroll samping */
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

h1,
h2,
h3,
h4 {
  color: #1e3a8a;
  /* Biru Navy */
  font-weight: 800;
}

a {
  text-decoration: none;
  transition: 0.3s ease;
}

img {
  max-width: 100%;
  display: block;
}

/* -------------------------------------------------------
   2. NAVBAR STYLING
   ------------------------------------------------------- */
.navbar {
  /* 1. At top of page: attached to top of body, full width edge-to-edge */
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 100%;
  z-index: 9999;
  background-color: rgba(239, 246, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid transparent;
  border-bottom: 1px solid rgba(191, 219, 254, 0.7);
  border-radius: 0;
  box-shadow: 0 2px 10px rgba(30, 58, 138, 0.04);
  padding: 8px 0;
  will-change: top, width, max-width, border-radius, box-shadow;
  transition:
    top 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled {
  /* 2. On scroll: morph smoothly to floating capsule style */
  top: 15px;
  width: 90%;
  max-width: 1200px;
  border-radius: 12px;
  border-color: rgba(191, 219, 254, 0.85);
  box-shadow: 0 10px 30px rgba(30, 58, 138, 0.08);
  padding: 6px 0;
  background-color: rgba(255, 255, 255, 0.92);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- LOGO UTAMA --- */
.logo {
  display: flex;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  padding: 2px 0;
  text-decoration: none;
}

.logo-img {
  height: 48px;
  /* Slimmer height to fit capsule cleanly */
  width: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}

.brand-logo:hover .logo-img {
  transform: scale(1.05);
}

/* --- NAVIGATION LINKS (DESKTOP) --- */
.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  color: #4a5568;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: #2563eb;
}

/* --- TOMBOL APPS & DROPDOWN (MODERN SLEEK RECTANGULAR DESIGN) --- */
.nav-apps-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.btn-nav-apps {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff !important;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  letter-spacing: 0.2px;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}

.btn-nav-apps:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-nav-apps > i.ri-apps-2-line {
  font-size: 1.05rem;
  font-weight: normal;
  transition: transform 0.25s ease;
}

.btn-nav-apps:hover > i.ri-apps-2-line {
  transform: scale(1.15);
}

.apps-dropdown-arrow {
  font-size: 0.95rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 1px;
  opacity: 0.85;
}

.nav-apps-dropdown:hover .apps-dropdown-arrow,
.nav-apps-dropdown.active .apps-dropdown-arrow {
  transform: rotate(180deg);
}

/* Dropdown Menu Panel */
.apps-dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 350px;
  max-width: calc(100vw - 32px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(219, 234, 254, 0.9);
  box-shadow: 0 20px 45px -10px rgba(30, 58, 138, 0.18), 0 0 0 1px rgba(37, 99, 235, 0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.98);
  transform-origin: top right;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10050;
  overflow: hidden;
  pointer-events: none;
}

/* Invisible bridge hover area so mouse doesn't drop hover */
.apps-dropdown-panel::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
  display: block;
}

/* Desktop Hover & Active State */
@media (min-width: 992px) {
  .nav-apps-dropdown:hover .apps-dropdown-panel {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
  }
}

.nav-apps-dropdown.active .apps-dropdown-panel {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  transform: translateY(0) scale(1) !important;
  pointer-events: auto !important;
}

/* Header inside dropdown */
.apps-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.apps-dropdown-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.apps-dropdown-badge-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.apps-dropdown-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

.apps-dropdown-subtitle {
  font-size: 0.7rem;
  color: #64748b;
  margin: 2px 0 0 0;
  line-height: 1.2;
}

.apps-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #16a34a;
  background: #dcfce7;
  padding: 3px 9px;
  border-radius: 9999px;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.apps-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

/* List Items Container */
.apps-dropdown-items {
  padding: 8px;
  max-height: 380px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.apps-dropdown-items::-webkit-scrollbar {
  width: 5px;
}
.apps-dropdown-items::-webkit-scrollbar-thumb {
  background: rgba(203, 213, 225, 0.8);
  border-radius: 10px;
}

/* Item Link */
.apps-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: inherit;
  margin-bottom: 3px;
}

.apps-dropdown-item:last-child {
  margin-bottom: 0;
}

.apps-dropdown-item:hover {
  background: #f8fafc;
  transform: translateX(3px);
}

.apps-dropdown-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.apps-dropdown-item:hover .apps-dropdown-item-icon {
  transform: scale(1.08) rotate(3deg);
}

.apps-dropdown-item-info {
  flex: 1;
  min-width: 0;
}

.apps-dropdown-item-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.apps-dropdown-item:hover .apps-dropdown-item-name {
  color: #2563eb;
}

.apps-dropdown-item-desc {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.apps-dropdown-item-action {
  color: #94a3b8;
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
  opacity: 0.5;
}

.apps-dropdown-item:hover .apps-dropdown-item-action {
  color: #2563eb;
  transform: translate(2px, -2px);
  opacity: 1;
}

/* Footer inside dropdown */
.apps-dropdown-footer {
  padding: 10px 14px;
  background: #f8fafc;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  text-align: center;
}

.apps-dropdown-footer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb !important;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.apps-dropdown-footer-btn:hover {
  background: #2563eb;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Color palettes for App Icons */
.color-blue { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); color: #2563eb; }
.color-green { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); color: #16a34a; }
.color-purple { background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%); color: #9333ea; }
.color-orange { background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%); color: #ea580c; }
.color-red { background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); color: #dc2626; }
.color-cyan { background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%); color: #0891b2; }
.color-yellow { background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%); color: #ca8a04; }
.color-indigo { background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%); color: #4f46e5; }
.color-pink { background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%); color: #db2777; }

/* -------------------------------------------------------
   3. DROPDOWN MENU (SMOOTH ANIMATION FIX)
   ------------------------------------------------------- */
.dropdown {
  position: relative;
}

.dropdown-content {
  /* Layout Dasar (Desktop) */
  position: absolute;
  background: #fff;
  min-width: 220px;
  box-shadow: 0 10px 30px rgba(30, 58, 138, 0.15);
  border-radius: 12px;
  top: 100%;
  left: 0;
  padding: 10px 0;
  border: 1px solid #eff6ff;
  z-index: 1100;

  /* --- KUNCI ANIMASI SMOOTH (Desktop) --- */
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

/* Styling Item di Dalam Dropdown */
.dropdown-content a {
  color: #4a5568 !important;
  padding: 12px 24px;
  display: block;
  font-weight: 500;
  transition: all 0.2s ease;
  text-align: left;
  /* Desktop tetap rata kiri agar rapi */
}

/* Style saat item dropdown di-hover */
.dropdown-content a:hover {
  background: #eff6ff;
  color: #2563eb !important;
  padding-left: 28px;
  /* Sedikit geser ke kanan saat hover */
}

/* Class .show ini dipanggil oleh JavaScript (Klik) */
.dropdown-content.show {
  opacity: 1;
  visibility: visible;
  max-height: 500px;
  transform: translateY(0);
}

/* Panah kecil di atas dropdown (Desktop) — disembunyikan */
.dropdown-content::before {
  display: none;
}

/* =======================================================
   [FIX: DESKTOP ONLY HOVER]
   Memaksa menu terbuka saat hover hanya di layar Laptop/PC.
   ======================================================= */
@media (min-width: 992px) {
  .dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    /* Memastikan menu bisa diklik */
  }
}

.nav-actions-right {
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 10001;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #1e3a8a;
  border-radius: 2px;
  transition: 0.4s;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- RESPONSIVE TABLET SCALING (992px - 1200px) --- */
@media screen and (max-width: 1200px) and (min-width: 992px) {
  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 0.88rem;
  }

  .btn-nav-apps {
    padding: 8px 16px;
    font-size: 0.88rem;
  }

  .navbar {
    padding: 8px 20px;
  }
}

@media screen and (max-width: 991px) {
  body {
    padding-top: 44px !important;
  }

  .navbar {
    position: fixed !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    padding: 6px 0 !important;
    border: 1px solid transparent !important;
    border-bottom: 1px solid rgba(191, 219, 254, 0.7) !important;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.05) !important;
    z-index: 9999 !important;
  }

  .navbar.scrolled {
    top: 8px !important;
    width: 92% !important;
    max-width: 1200px !important;
    border-radius: 12px !important;
    padding: 4px 0 !important;
    border-color: rgba(191, 219, 254, 0.85) !important;
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.1) !important;
  }

  .navbar .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 16px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .logo {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  .logo-img {
    height: 32px !important;
    width: auto !important;
  }

  .nav-actions-right {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  /* --- COMPACT ICON THEME TOGGLE BUTTON --- */
  .theme-toggle-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 8px !important;
    background: rgba(241, 245, 249, 0.95);
    border: 1px solid rgba(203, 213, 225, 0.9);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    color: #d97706;
    transition: all 0.25s ease;
    cursor: pointer;
    flex-shrink: 0;
  }

  .theme-toggle-btn:active {
    transform: scale(0.94);
  }

  .toggle-slider {
    position: static !important;
    background: transparent !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
    left: auto !important;
  }

  .toggle-slider i {
    font-size: 1.05rem;
    position: static;
  }

  /* Light mode (Day): show sun icon only */
  .icon-sun {
    display: inline-block;
    opacity: 1 !important;
    color: #d97706;
  }

  .icon-moon {
    display: none !important;
  }

  /* Dark mode (Night): show moon icon only and dark styling */
  body.night-mode .theme-toggle-btn {
    background: rgba(30, 41, 59, 0.9) !important;
    border-color: rgba(71, 85, 105, 0.8) !important;
  }

  body.night-mode .icon-sun {
    display: none !important;
  }

  body.night-mode .icon-moon {
    display: inline-block !important;
    opacity: 1 !important;
    color: #c084fc !important;
  }

  /* --- EYE-CATCHING APPS BUTTON --- */
  .btn-nav-apps {
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 0.76rem !important;
    font-weight: 700;
    border-radius: 8px !important;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
    transition: all 0.25s ease;
    flex-shrink: 0;
  }

  .btn-nav-apps:active {
    transform: scale(0.94);
  }

  /* --- EYE-CATCHING BURGER MENU TOGGLE --- */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 8px !important;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 0;
    gap: 3px;
    z-index: 10001;
    transition: all 0.25s ease;
    cursor: pointer;
    flex-shrink: 0;
  }

  .menu-toggle:active {
    transform: scale(0.94);
  }

  .menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background-color: #2563eb;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Active state when menu is opened */
  .menu-toggle.active {
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  }

  .menu-toggle.active span {
    background-color: #ffffff;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* Night Mode Overrides for Burger Menu */
  body.night-mode .menu-toggle {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(71, 85, 105, 0.8);
  }

  body.night-mode .menu-toggle span {
    background-color: #93c5fd;
  }

  body.night-mode .menu-toggle.active {
    background: #2563eb;
    border-color: #2563eb;
  }

  body.night-mode .menu-toggle.active span {
    background-color: #ffffff;
  }

  .nav-links {
    display: flex;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: 100% !important;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 0 24px;
    border: 1px solid rgba(191, 219, 254, 0.85);
    border-radius: 16px !important;
    box-shadow: 0 15px 35px rgba(30, 58, 138, 0.12);
    text-align: center;

    /* --- LOGIKA ANIMASI BERGULIR (SLIDE) --- */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;

    transition:
      max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.4s ease,
      padding 0.5s ease,
      visibility 0.5s;
  }

  .nav-links.active {
    max-height: 100vh;
    opacity: 1;
    visibility: visible;
    padding: 24px 20px;
  }

  /* --- FIX DROPDOWN MOBILE (ACCORDION STYLE) --- */
  .dropdown-content {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    padding-left: 0;
    text-align: center;
    transition: none;
    display: none;
    opacity: 0;
  }

  .dropdown-content.show {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation: fadeInMobile 0.3s ease forwards;
  }

  .dropdown-content::before {
    display: none;
  }

  .dropdown-content a {
    padding: 10px 0;
    text-align: center;
    color: #64748b !important;
  }

  .dropdown-content a:hover {
    padding-left: 0;
    background: transparent;
    color: #2563eb !important;
  }

  .logo-img {
    height: 48px;
  }

  .btn-nav-apps {
    width: auto;
    padding: 8px 12px;
    font-size: 0.82rem;
    border-radius: 10px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
}

@media screen and (max-width: 480px) {
  .theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    padding: 0;
  }

  .btn-apps-text {
    display: none;
    /* Hide text on extra small phones so header row stays 100% clean */
  }

  .btn-nav-apps {
    padding: 8px 10px;
    border-radius: 10px;
  }

  .apps-dropdown-arrow {
    display: none;
  }

  .apps-dropdown-panel {
    right: -10px;
    width: 290px;
    max-width: calc(100vw - 20px);
  }
}

@keyframes fadeInMobile {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------------------------------------------
   5. FOOTER STYLING (DARK THEME - 4 COLUMNS)
   ------------------------------------------------------- */
.main-footer {
  background-color: #0f172a;
  color: #e2e8f0;
  padding-top: 70px;
  font-size: 0.95rem;
  position: relative;
  z-index: 10;
  margin-top: auto;
  border-top: 4px solid #3b82f6;
  /* Paint optimization: skip rendering until near viewport */
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  /* 4 Kolom Proporsional */
  gap: 40px;
  margin-bottom: 50px;
  align-items: start;
}

/* --- Kolom 1: Logo & Kontak --- */
.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.footer-logo img {
  height: 40px;
  object-fit: contain;
}

.footer-logo span {
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
}

.footer-desc {
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 25px;
  padding-right: 20px;
}

.contact-list p {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: #cbd5e1;
}

.contact-list i {
  color: #3b82f6;
  font-size: 1.2rem;
}

/* --- Kolom 2 & 3: Menu Link --- */
.footer-section h3 {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 25px;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.footer-section h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background-color: #3b82f6;
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

/* [FIX ANIMASI] Link Footer menggunakan Transform */
.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  /* Transisi Halus */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  padding-left: 0;
  /* Reset padding agar tidak lompat */
}

.footer-links a::before {
  content: "›";
  margin-right: 8px;
  font-size: 1.2rem;
  color: #475569;
  transition: color 0.2s;
  line-height: 1;
}

/* [FIX ANIMASI] Hover Effect */
.footer-links a:hover {
  color: #60a5fa;
  transform: translateX(6px);
  /* Geser menggunakan Transform (Lebih Smooth) */
}

.footer-links a:hover::before {
  color: #60a5fa;
}

/* Style Link Eksternal */
.footer-links a[target="_blank"] {
  color: #ffffff;
}

.footer-links a[target="_blank"]:hover {
  color: #ffffff;
}

.footer-links a[target="_blank"]::before {
  content: "\ea90";
  /* Icon External Link */
  font-family: "remixicon";
  font-size: 1rem;
  color: #ffffff;
}

.separator-link {
  border-top: 1px solid #1e293b;
  margin: 15px 0 !important;
}

/* --- Kolom 4: Peta --- */
.map-wrapper {
  width: 100%;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 2px solid #1e293b;
}

/* --- Copyright --- */
.copyright {
  border-top: 1px solid #1e293b;
  padding: 25px 0;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
  margin-top: 20px;
}

/* Responsif Footer */
/* Responsif Compact Mobile Footer */
@media (max-width: 991px) {
  .main-footer {
    padding-top: 28px !important;
    border-top-width: 3px !important;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px 16px !important;
    margin-bottom: 16px !important;
  }

  .footer-section.brand-col,
  .footer-section:nth-child(1) {
    grid-column: 1 / -1 !important;
  }

  .footer-section:nth-child(4) {
    grid-column: 1 / -1 !important;
  }

  .footer-logo {
    gap: 8px !important;
    margin-bottom: 8px !important;
    justify-content: flex-start !important;
  }

  .footer-logo img {
    height: 32px !important;
  }

  .footer-logo span {
    font-size: 1.05rem !important;
  }

  .footer-desc {
    font-size: 0.78rem !important;
    line-height: 1.4 !important;
    margin-bottom: 10px !important;
    padding-right: 0 !important;
  }

  .contact-list p {
    font-size: 0.76rem !important;
    margin-bottom: 4px !important;
    gap: 6px !important;
  }

  .contact-list i {
    font-size: 0.95rem !important;
  }

  .footer-section h3 {
    font-size: 0.92rem !important;
    margin-bottom: 10px !important;
    padding-bottom: 4px !important;
  }

  .footer-section h3::after {
    width: 28px !important;
    height: 2px !important;
  }

  .footer-links li {
    margin-bottom: 5px !important;
  }

  .footer-links a {
    font-size: 0.76rem !important;
  }

  .footer-links a::before {
    font-size: 0.85rem !important;
    margin-right: 4px !important;
  }

  .separator-link {
    margin: 8px 0 !important;
  }

  .map-wrapper {
    height: 120px !important;
    border-radius: 10px !important;
  }

  .copyright {
    padding: 14px 0 !important;
    margin-top: 14px !important;
    font-size: 0.74rem !important;
  }
}

/* -------------------------------------------------------
   6. BACK TO TOP BUTTON (FIXED ANIMATION)
   ------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #2563eb;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  z-index: 9999;
  cursor: pointer;

  /* [FIX ANIMASI] State Awal Hidden */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  /* Cubic Bezier untuk efek muncul yang smooth */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* [FIX ANIMASI] State Muncul */
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: #1e40af;
  transform: translateY(-5px);
  /* Efek melayang saat hover */
  color: #fff;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.5);
}

/* -------------------------------------------------------
   7. CORE STRUCTURE FALLBACKS (PREVENT FOUC / LAYOUT SHIFT)
   ------------------------------------------------------- */
/* 
   These styles are loaded globally in style.css so that during page transitions,
   before page-specific stylesheets (like sumberdaya.css) are loaded,
   the card elements and images don't render at full-width or break the layout.
*/
.staff-grid,
.pimpinan-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  width: 100%;
}

.staff-grid .card-link,
.pimpinan-wrapper .card-link {
  width: 280px;
  max-width: 100%;
  text-decoration: none;
}

.exec-card {
  max-width: 800px;
  margin: 0 auto 40px;
  display: flex;
  width: 100%;
}

.exec-photo {
  flex: 0 0 220px;
}

.staff-photo-box {
  width: 100%;
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
}

.staff-photo-box img,
.exec-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =======================================================
   GLOBAL NIGHT / DAY THEME OVERRIDES
   ======================================================= */

body.night-mode {
  background-color: #080c14;
  background-image: radial-gradient(circle at 50% 20%, #111827 0%, #080c14 70%, #030712 100%) !important;
  position: relative;
}

/* Cosmic Nebula Atmosphere for Night Mode */
body.night-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(59, 130, 246, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(147, 51, 234, 0.10) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.08) 0%, transparent 60%);
  animation: cosmicNebulaGlow 12s ease-in-out infinite alternate;
}

@keyframes cosmicNebulaGlow {
  0% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.8;
  }
}

/* Canvas Starfield Layer */
#nightStarCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

body.night-mode #nightStarCanvas {
  opacity: 1;
}

/* CSS Fallback Twinkling Stars Effect for Night Mode */
body.night-mode::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.7) 100%, transparent),
    radial-gradient(1.5px 1.5px at 35% 28%, rgba(191, 219, 254, 0.6) 100%, transparent),
    radial-gradient(1px 1px at 68% 15%, rgba(255, 255, 255, 0.5) 100%, transparent),
    radial-gradient(1.5px 1.5px at 85% 42%, rgba(254, 240, 138, 0.7) 100%, transparent),
    radial-gradient(1px 1px at 24% 75%, rgba(255, 255, 255, 0.6) 100%, transparent),
    radial-gradient(1.5px 1.5px at 78% 82%, rgba(191, 219, 254, 0.5) 100%, transparent);
  background-size: 100% 100%;
  animation: starTwinkleSlow 4s ease-in-out infinite alternate;
}

@keyframes starTwinkleSlow {
  0% {
    opacity: 0.3;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.4;
  }
}

/* Disable expensive night-mode pseudo-element animations when reduced motion is preferred */
@media (prefers-reduced-motion: reduce) {

  body.night-mode::before,
  body.night-mode::after {
    animation: none !important;
  }
}

/* --- Theme Toggle Switch inside Navbar --- */
.theme-toggle-li {
  display: flex;
  align-items: center;
}

.theme-toggle-btn {
  background: rgba(226, 232, 240, 0.8);
  border: 1px solid rgba(203, 213, 225, 0.8);
  width: 68px;
  height: 34px;
  border-radius: 50px;
  cursor: pointer;
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 3px;
  display: flex;
  align-items: center;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.toggle-slider {
  width: 28px;
  height: 28px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: absolute;
  left: 3px;
}

.toggle-slider i {
  font-size: 1rem;
  transition: all 0.3s ease;
}

.icon-sun {
  color: #f59e0b;
  opacity: 1;
}

.icon-moon {
  color: #a855f7;
  opacity: 0;
  position: absolute;
}

/* Night Mode Slider Override */
body.night-mode .theme-toggle-btn {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(71, 85, 105, 0.8);
}

body.night-mode .toggle-slider {
  left: 35px;
  background: #1e293b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

body.night-mode .icon-sun {
  opacity: 0;
}

body.night-mode .icon-moon {
  opacity: 1;
}

/* Global Night Mode Body Override */
html.night-mode,
html.night-mode body,
body.night-mode {
  background-color: #0b0f19 !important;
  background-image: none !important;
  color: #f8fafc !important;
}

/* --- Night Mode Navbar & Menu Layout Overrides --- */
body.night-mode .navbar {
  background-color: rgba(11, 15, 25, 0.95) !important;
  /* Sleek translucent black background */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
}

body.night-mode .navbar.scrolled {
  background-color: rgba(11, 15, 25, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

body.night-mode .navbar .nav-links a {
  color: #e2e8f0 !important;
}

body.night-mode .navbar .nav-links a:hover {
  color: #60a5fa !important;
}

body.night-mode .dropdown-content {
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
}

body.night-mode .btn-nav-apps {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(96, 165, 250, 0.3);
}

body.night-mode .btn-nav-apps:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

body.night-mode .dropdown-content a {
  color: #f1f5f9 !important;
}

body.night-mode .dropdown-content a:hover {
  background-color: #0f172a !important;
  color: #60a5fa !important;
}

/* Pastikan panah dropdown tidak muncul di dark mode */
body.night-mode .dropdown-content::before {
  display: none !important;
}

/* Hamburger menu color on Mobile in Night Mode */
body.night-mode .menu-toggle span {
  background-color: #e2e8f0;
}

@media screen and (max-width: 991px) {
  body.night-mode .nav-links {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55) !important;
  }
}

/* Global Heading Overrides in Night Mode */
body.night-mode h1,
body.night-mode h2,
body.night-mode h3,
body.night-mode h4 {
  color: #ffffff !important;
}

/* --- NIGHT MODE: IC-LABS APPS DROPDOWN --- */
body.night-mode .apps-dropdown-panel {
  background: rgba(15, 23, 42, 0.98);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body.night-mode .apps-dropdown-header {
  background: #1e293b;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.night-mode .apps-dropdown-title {
  color: #f8fafc;
}

body.night-mode .apps-dropdown-subtitle {
  color: #94a3b8;
}

body.night-mode .apps-status-pill {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.3);
}

body.night-mode .apps-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

body.night-mode .apps-dropdown-item-name {
  color: #f1f5f9;
}

body.night-mode .apps-dropdown-item:hover .apps-dropdown-item-name {
  color: #60a5fa;
}

body.night-mode .apps-dropdown-item-desc {
  color: #94a3b8;
}

body.night-mode .apps-dropdown-item-action {
  color: #64748b;
}

body.night-mode .apps-dropdown-item:hover .apps-dropdown-item-action {
  color: #60a5fa;
}

body.night-mode .apps-dropdown-footer {
  background: #1e293b;
  border-top-color: rgba(255, 255, 255, 0.08);
}

body.night-mode .apps-dropdown-footer-btn {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa !important;
}

body.night-mode .apps-dropdown-footer-btn:hover {
  background: #2563eb;
  color: #ffffff !important;
}

body.night-mode .color-blue { background: linear-gradient(135deg, rgba(37, 99, 235, 0.25) 0%, rgba(30, 58, 138, 0.35) 100%); color: #60a5fa; }
body.night-mode .color-green { background: linear-gradient(135deg, rgba(22, 163, 74, 0.25) 0%, rgba(20, 83, 45, 0.35) 100%); color: #4ade80; }
body.night-mode .color-purple { background: linear-gradient(135deg, rgba(147, 51, 234, 0.25) 0%, rgba(88, 28, 135, 0.35) 100%); color: #c084fc; }
body.night-mode .color-orange { background: linear-gradient(135deg, rgba(234, 88, 12, 0.25) 0%, rgba(124, 45, 18, 0.35) 100%); color: #fb923c; }
body.night-mode .color-red { background: linear-gradient(135deg, rgba(220, 38, 38, 0.25) 0%, rgba(127, 29, 29, 0.35) 100%); color: #f87171; }
body.night-mode .color-cyan { background: linear-gradient(135deg, rgba(8, 145, 178, 0.25) 0%, rgba(22, 78, 99, 0.35) 100%); color: #22d3ee; }
body.night-mode .color-yellow { background: linear-gradient(135deg, rgba(202, 138, 4, 0.25) 0%, rgba(113, 63, 18, 0.35) 100%); color: #facc15; }
body.night-mode .color-indigo { background: linear-gradient(135deg, rgba(79, 70, 229, 0.25) 0%, rgba(49, 46, 129, 0.35) 100%); color: #818cf8; }
body.night-mode .color-pink { background: linear-gradient(135deg, rgba(219, 39, 119, 0.25) 0%, rgba(131, 24, 67, 0.35) 100%); color: #f472b6; }