:root {
  --bg-base: #e6e9f0;
  --shadow-light: #ffffff;
  --shadow-dark: #c3c9d6;
  --navy: #1a2a4a;
  --navy-mid: #273e6b;
  --maroon: #753443;
  --maroon-soft: #8d4858;
  --grad-primary: linear-gradient(135deg, #1a2a4a 0%, #3e2f54 52%, #753443 100%);
  --grad-soft: linear-gradient(135deg, rgba(26, 42, 74, 0.12) 0%, rgba(117, 52, 67, 0.14) 100%);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
body {
  user-select: none;
  -webkit-user-select: none;
}

input,
textarea {
  user-select: text;
  -webkit-user-select: text;
}

body {
  background-color: var(--bg-base);
  color: #1e293b;
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Neumorphism Core Utilities */
.neu-flat {
  background: var(--bg-base);
  box-shadow:
    8px 8px 18px var(--shadow-dark),
    -8px -8px 18px var(--shadow-light);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.neu-sm {
  background: var(--bg-base);
  box-shadow:
    5px 5px 11px var(--shadow-dark),
    -5px -5px 11px var(--shadow-light);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.neu-inset {
  background: #e2e6ee;
  box-shadow:
    inset 4px 4px 9px #c1c7d4,
    inset -4px -4px 9px #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: all 0.2s ease;
}

.neu-inset:focus-within {
  box-shadow:
    inset 5px 5px 11px #b8bfce,
    inset -5px -5px 11px #ffffff,
    0 0 0 2px rgba(117, 52, 67, 0.25);
}

.neu-btn {
  background: var(--bg-base);
  box-shadow:
    5px 5px 12px var(--shadow-dark),
    -5px -5px 12px var(--shadow-light);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  transition: all 0.18s ease;
  cursor: pointer;
}

.neu-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    7px 7px 14px var(--shadow-dark),
    -7px -7px 14px var(--shadow-light);
}

.neu-btn:active {
  transform: translateY(0);
  box-shadow:
    inset 3px 3px 7px var(--shadow-dark),
    inset -3px -3px 7px var(--shadow-light);
}

/* Gradasi Biru Dongker - Merah Marun Sedikit Pudar */
.grad-navy-maroon {
  background: var(--grad-primary);
  color: #ffffff;
  box-shadow:
    6px 6px 16px rgba(26, 42, 74, 0.28),
    -4px -4px 12px rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.2s ease;
}

.grad-navy-maroon:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    8px 8px 20px rgba(117, 52, 67, 0.3),
    -4px -4px 12px rgba(255, 255, 255, 0.85);
}

.grad-navy-maroon:active {
  transform: translateY(0);
}

.text-grad-navy-maroon {
  background: linear-gradient(135deg, #1a2a4a 10%, #753443 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.grad-subtle-banner {
  background: linear-gradient(135deg, rgba(26, 42, 74, 0.08) 0%, rgba(117, 52, 67, 0.11) 100%);
  border: 1px solid rgba(117, 52, 67, 0.22);
}

/* Input & Select Reset inside Neumorphic Inset */
.neu-input {
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  color: #1e293b;
  font-size: 0.9rem;
}

.neu-input::placeholder {
  color: #8490a4;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #e6e9f0;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1a2a4a, #753443);
  border-radius: 999px;
}

/* =====================================================================
       RESPONSIVE NAVBAR: Desktop Top Bar -> Mobile Centered Bottom Nav Bar
       ===================================================================== */
.desktop-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(230, 233, 240, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
}

/* Mobile Bottom Navigation — Presisi di tengah untuk SEMUA ukuran smartphone */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .desktop-nav-links {
    display: none !important;
  }

  body {
    padding-bottom: 96px; /* Ruang aman agar konten tidak tertutup bottom nav */
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 14px;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: calc(100vw - 24px);
    max-width: 440px;
    z-index: 50;
    padding: 6px;
    background: rgba(230, 233, 240, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 999px;
    box-shadow:
      0 10px 26px rgba(26, 42, 74, 0.22),
      6px 6px 14px #bec4d2,
      -6px -6px 14px #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    align-items: center;
    justify-content: space-between;
    gap: 2px;
  }

  .mobile-nav-item {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 7px 2px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
  }

  .mobile-nav-item.active {
    background: var(--grad-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(117, 52, 67, 0.35);
  }

  .mobile-nav-item i {
    font-size: 0.9rem;
    margin-bottom: 2px;
  }
}

/* Layar smartphone sangat kecil (<= 360px) */
@media (max-width: 360px) {
  .mobile-bottom-nav {
    width: calc(100vw - 16px);
    padding: 5px;
    gap: 1px;
  }

  .mobile-nav-item {
    padding: 6px 1px;
    font-size: 0.58rem;
  }

  .mobile-nav-item i {
    font-size: 0.82rem;
  }
}

/* Pulse Badge untuk Jatuh Tempo */
@keyframes softPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.88;
  }
}
.due-pulse {
  animation: softPulse 2.2s infinite ease-in-out;
}

/* Modal Backdrop */
.modal-backdrop {
  background: rgba(26, 42, 74, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
/* DROPDOWN */
.neu-select-wrapper {
  position: relative;
  width: 100%;
}

.neu-select-trigger {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #1e293b;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.neu-select-trigger .chevron-icon {
  color: #753443;
  font-size: 0.75rem;
  transition: transform 0.22s ease;
}

.neu-select-wrapper.open .neu-select-trigger .chevron-icon {
  transform: rotate(180deg);
}

.neu-select-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: -14px;
  right: -14px;
  z-index: 45;
  background: #e6e9f0;
  border-radius: 18px;
  padding: 6px;
  box-shadow:
    10px 10px 22px #bcc3d1,
    -8px -8px 18px #ffffff,
    0 12px 28px rgba(26, 42, 74, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.75);
  max-height: 230px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.neu-select-wrapper.open .neu-select-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.neu-select-option {
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a2a4a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.neu-select-option:hover {
  background: rgba(255, 255, 255, 0.65);
  color: #753443;
}

.neu-select-option.selected {
  background: linear-gradient(135deg, #1a2a4a 0%, #3e2f54 52%, #753443 100%);
  color: #ffffff;
  box-shadow: 3px 3px 8px rgba(26, 42, 74, 0.25);
}
