:root {
  --primary: #1e3a8a; /* Navy deep untuk elemen utama */
  --primary-dark: #172554; /* Navy lebih gelap untuk gradien */
  --secondary: #64748b; /* Abu-abu perak untuk elemen pendukung */
  --accent: #d4af37; /* Emas lembut untuk highlight */
  --success: #059669; /* Hijau tua untuk notifikasi sukses */
  --warning: #d97706; /* Oranye tua untuk peringatan */
  --danger: #b91c1c; /* Merah tua untuk error */
  --dark: #0f172a; /* Latar gelap */
  --card: rgba(30,41,59,0.9); /* Kartu dengan transparansi */
  --card-light: #334155; /* Abu-abu gelap untuk variasi */
  --text: #f8fafc; /* Putih krem untuk teks utama */
  --text-muted: #cbd5e1; /* Abu-abu terang untuk teks sekunder */
  --border: rgba(148,163,184,0.2); /* Border halus */
  --glow: rgba(30,64,175,0.3); /* Glow biru tua (untuk elemen lain) */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: var(--text);
  min-height: 100vh;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
}

/* Latar Belakang Halus */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(30,64,175,0.1) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.wrap {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeInDown 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-icon {
  font-size: 3.5rem;
  display: inline-block;
  color: var(--accent); /* Emas lembut untuk ikon */
  transition: transform 0.3s ease;
  animation: scaleIn 0.5s ease;
}

.header-icon:hover {
  transform: scale(1.15) rotate(5deg);
}

.header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text);
  margin: 16px 0 8px;
  letter-spacing: -0.5px;
}

.header p {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  animation: fadeIn 1s ease 0.2s both;
}

/* Navigasi */
.nav {
  display: flex;
  gap: 12px;
  margin-bottom: 48px;
  background: rgba(15,23,42,0.9);
  backdrop-filter: blur(12px);
  padding: 10px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease;
}

.nav button {
  flex: 1;
  min-width: 160px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.nav button:hover {
  color: var(--text);
  background: rgba(30,64,175,0.2);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px var(--glow);
}

.nav button.active {
  color: var(--text);
  background: var(--primary);
  box-shadow: 0 4px 12px var(--glow);
  transform: scale(1.02);
}

.nav button:active {
  transform: scale(0.98);
}

.nav button span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav button span i {
  color: var(--accent); /* Emas untuk ikon navigasi */
  transition: transform 0.3s ease;
}

.nav button:hover span i {
  transform: scale(1.1);
}

/* Page Transitions */
.page {
  display: none;
}

.page.active {
  display: block;
  animation: slideInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card */
.card {
  background: var(--card);
  backdrop-filter: blur(12px);
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  margin-bottom: 32px;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
  border-color: var(--primary);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.7s ease 0.1s both;
}

.card-header h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--card-light); /* Abu-abu gelap untuk latar ikon */
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent); /* Emas untuk ikon */
  transition: transform 0.3s ease;
  animation: scaleIn 0.5s ease;
  /* Hapus box-shadow glow */
}

.card-icon:hover {
  transform: scale(1.1) rotate(5deg);
}

/* Form Styling */
.form-group {
  margin-bottom: 20px;
  animation: fadeInUp 0.5s ease;
  animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }

label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

label i {
  color: var(--accent); /* Emas untuk ikon label */
  transition: transform 0.3s ease;
  animation: scaleIn 0.5s ease;
}

label:hover i {
  transform: scale(1.15);
}

input, select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(51,65,85,0.7);
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(51,65,85,0.9);
  box-shadow: 0 0 0 3px var(--glow);
  transform: scale(1.01);
}

input::placeholder {
  color: var(--text-muted);
}

/* Buttons */
.button-group {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.3s both;
}

button {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 0.95rem;
  position: relative;
}

button i {
  color: var(--text); /* Ikon tombol putih krem */
  transition: transform 0.3s ease;
}

button:hover i {
  transform: scale(1.1);
}

button.primary {
  background: var(--primary);
  color: var(--text);
  box-shadow: 0 4px 12px var(--glow);
}

button.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px var(--glow);
}

button.primary:active {
  transform: scale(0.98);
}

button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

button.ghost:hover {
  background: rgba(51,65,85,0.7);
  border-color: var(--primary);
  transform: translateY(-2px) scale(1.02);
}

button.ghost:active {
  transform: scale(0.98);
}

button.danger {
  background: var(--danger);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(185,28,28,0.3);
}

button.danger:hover {
  background: #991b1b;
  transform: translateY(-2px) scale(1.02);
}

button.danger:active {
  transform: scale(0.98);
}

/* Result Tiles */
.result {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.tile {
  background: var(--card);
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease;
  animation-fill-mode: both;
}

.tile:nth-child(1) { animation-delay: 0.1s; }
.tile:nth-child(2) { animation-delay: 0.2s; }
.tile:nth-child(3) { animation-delay: 0.3s; }
.tile:nth-child(4) { animation-delay: 0.4s; }

.tile:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  border-color: var(--primary);
}

.tile-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.tile-label i {
  color: var(--accent); /* Emas untuk ikon tile */
  animation: scaleIn 0.5s ease;
}

.tile-label:hover i {
  transform: scale(1.15);
}

.tile-value {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  color: var(--accent);
}

/* Alerts */
.alert {
  padding: 14px 20px;
  border-radius: 12px;
  margin-top: 16px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  border: 1px solid;
  animation: slideInRight 0.5s ease;
}

.alert i {
  color: inherit; /* Warna sesuai tipe alert */
  animation: scaleIn 0.5s ease;
}

.alert:hover i {
  transform: scale(1.15);
}

.alert.info {
  background: rgba(30,64,175,0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.alert.success {
  background: rgba(5,150,105,0.1);
  border-color: var(--success);
  color: var(--success);
}

.alert.error {
  background: rgba(185,28,28,0.1);
  border-color: var(--danger);
  color: var(--danger);
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 0.9rem;
  border-radius: 12px;
  overflow: hidden;
  animation: fadeIn 0.6s ease;
}

thead {
  background: rgba(30,64,175,0.2);
}

th {
  padding: 14px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  font-size: 0.8rem;
}

th i {
  color: var(--accent); /* Emas untuk ikon tabel */
  margin-right: 6px;
  animation: scaleIn 0.5s ease;
}

th:hover i {
  transform: scale(1.15);
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.5s ease;
}

tbody tr {
  background: var(--card);
  transition: all 0.3s ease;
}

tbody tr:hover {
  background: rgba(51,65,85,0.8);
  transform: scale(1.005);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Stats Cards */
.stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease;
  animation-fill-mode: both;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }
.stat-card:nth-child(5) { animation-delay: 0.5s; }

.stat-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  border-color: var(--primary);
}

.stat-card h4 {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-card h4 i {
  color: var(--accent); /* Emas untuk ikon stat-card */
  animation: scaleIn 0.5s ease;
}

.stat-card h4:hover i {
  transform: scale(1.15);
}

.stat-card .value {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  color: var(--accent);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  animation: fadeIn 0.6s ease;
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 16px;
  color: var(--accent); /* Emas untuk ikon empty-state */
  transition: transform 0.3s ease;
  animation: scaleIn 0.5s ease;
  /* Hapus drop-shadow glow */
}

.empty-state i:hover {
  transform: scale(1.15) rotate(5deg);
}

.empty-state h3 {
  font-size: 1.4rem;
  margin-bottom: 6px;
  color: var(--text);
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

/* Responsive */
@media(max-width: 768px) {
  body { padding: 16px; }
  .header h1 { font-size: 1.8rem; }
  .header-icon { font-size: 2.5rem; }
  .card { padding: 20px; }
  .nav { flex-direction: column; }
  .nav button { min-width: 100%; }
  .result { grid-template-columns: 1fr; }
  .tile-value, .stat-card .value { font-size: 1.5rem; }
  .row { grid-template-columns: 1fr; }
  .stats-summary { grid-template-columns: 1fr; }
  .card, .tile, .stat-card { animation: fadeIn 0.4s ease; }
  .header-icon, .card-icon, .empty-state i { animation: none; }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}