:root {
  --bg-dark: #0f172a;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-blue: #3b82f6;
  --accent-gold: #f59e0b;
  --glow-color: rgba(59, 130, 246, 0.15);
  --bg-dark: #0f1218; /* Warna latar belakang sangat gelap */
  --card-bg: rgba(20, 25, 38, 0.95); /* Glass effect base */
  --accent-glow: rgba(59, 130, 246, 0.5); /* Glow biru seperti di gambar */
  --danger-gradient: linear-gradient(
    135deg,
    #ef4444 0%,
    #b91c1c 100%
  ); /* Merah untuk Logout */
  --danger-glow: rgba(239, 68, 68, 0.4);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --border-subtle: rgba(255, 255, 255, 0.08);
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  min-width: 1200px;
  overflow-x: auto;
  margin: 0;
  padding: 0;
}

/* --- Background Glow Effects --- */
.bg-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  background: var(--accent-blue);
  filter: blur(150px);
  border-radius: 50%;
  opacity: 0.2;
  z-index: -1;
}
.top-left {
  top: -100px;
  left: -100px;
  background: var(--accent-green);
}
.bottom-right {
  bottom: -100px;
  right: -100px;
  background: var(--accent-purple);
}

.main-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* --- Header --- */
.glass-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
}
.logo-icon {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.brand h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}
.brand p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.btn-icon {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: 0.3s;
  cursor: pointer;
  font-size: 1.1rem;
}
.btn-icon:hover {
  background: var(--accent-blue);
  border-color: transparent;
}

/* Animasi Putar saat diklik */
.spin-anim {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* --- Controls --- */
.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.date-picker-wrapper,
.search-wrapper {
  background: rgba(30, 41, 59, 0.9);
  padding: 12px 15px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  flex: 1;
  min-width: 130px;
  transition: all 0.3s ease;
}

.date-picker-wrapper:hover {
  border-color: var(--accent-green);
  transform: translateY(-2px);
}

.date-picker-wrapper i {
  font-size: 1.4rem;
  color: var(--accent-green);
}

.date-picker-wrapper input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: "Poppins", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  outline: none;
  width: 100%;
  cursor: pointer;
  text-transform: uppercase;
  color-scheme: dark;
}

/* Style Input Search */
.search-wrapper input {
  background: transparent;
  border: none;
  color: white;
  font-family: inherit;
  outline: none;
  width: 100%;
}

.btn-download {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  padding: 14px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
  white-space: nowrap;
}
.btn-download:hover {
  background: var(--accent-green);
  color: white;
}

/* --- Dashboard Grid & Base Card --- */
.dashboard-grid {
  margin-bottom: 0px;
}

.card {
  background: rgba(30, 41, 59, 0.7); /* Base dark glass */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px; /* Lebih bulat modern */
  padding: 24px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05); /* Inner border halus */
}

.card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

/* --- MAIN BALANCE CARD (Hero Section) --- */
.card-main-balance {
  /* Gradient bergerak */
  background: linear-gradient(
    125deg,
    rgba(59, 130, 246, 0.15) 0%,
    rgba(30, 41, 59, 0.8) 50%,
    rgba(16, 185, 129, 0.15) 100%
  );
  background-size: 200% 200%;
  animation: gradientMove 8s ease infinite;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Efek Orb Cahaya Dekoratif */
.card-main-balance::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.25) 0%,
    transparent 70%
  );
  filter: blur(40px);
  opacity: 0.6;
}

.card-main-balance::after {
  content: "";
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 150px;
  height: 150px;
  background: radial-gradient(
    circle,
    rgba(16, 185, 129, 0.2) 0%,
    transparent 70%
  );
  filter: blur(30px);
  opacity: 0.5;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  z-index: 2;
}

.card-main-balance h2 {
  font-size: 2.8rem; /* Lebih besar */
  margin: 10px 0;
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(
    to right,
    #ffffff,
    #e2e8f0
  ); /* Text Gradient Silver */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 2;
}

.card-footer {
  font-size: 0.85rem;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
}

/* --- MINI CARDS LAYOUT --- */
.mini-cards-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.mini-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  height: 80%;
}

.icon-box {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.mini-card:hover .icon-box {
  transform: scale(1.1) rotate(5deg);
}

.mini-card span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  opacity: 0.8;
}

.mini-card h4 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* --- COLORS & CONTEXTUAL GLOWS --- */

/* 1. Income (Green) */
.income .icon-box {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}
.income h4 {
  color: #34d399;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}
.income.card:hover {
  background: linear-gradient(
    165deg,
    rgba(30, 41, 59, 0.9),
    rgba(6, 78, 59, 0.3)
  );
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 10px 30px -5px rgba(16, 185, 129, 0.2);
}

/* 2. Expense (Red) */
.expense .icon-box {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.1);
}
.expense h4 {
  color: #f87171;
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}
.expense.card:hover {
  background: linear-gradient(
    165deg,
    rgba(30, 41, 59, 0.9),
    rgba(127, 29, 29, 0.3)
  );
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 10px 30px -5px rgba(239, 68, 68, 0.2);
}

/* 3. Highlight / Profit Margin (Gold) */
.highlight-card .icon-box {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.1);
}
.highlight-card h4 {
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}
.highlight-card.card:hover {
  background: linear-gradient(
    165deg,
    rgba(30, 41, 59, 0.9),
    rgba(120, 53, 15, 0.3)
  );
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 10px 30px -5px rgba(245, 158, 11, 0.2);
}

/* --- ANIMATION KEYFRAMES --- */
@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Responsive Fix */
@media (max-width: 768px) {
  .mini-cards-container {
    grid-template-columns: 1fr; /* Stack cards on mobile */
  }
  .card-main-balance h2 {
    font-size: 2.2rem;
  }
}

/* --- TRANSFORMATION: TABS MENJADI TOMBOL --- */
/* --- CSS: MODERN TAB BUTTONS --- */

/* --- WADAH TOMBOL (TABS CONTAINER) --- */
.tabs {
  display: inline-flex;
  background: rgba(
    30,
    41,
    59,
    0.6
  ); /* Sedikit lebih transparan untuk efek glass */
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08); /* Border lebih halus */
  box-shadow:
    0 4px 20px -5px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05); /* Inner stroke halus */
  margin-bottom: 10px;
  margin-top: 30px;
  gap: 8px; /* Memberi sedikit jarak antar tombol agar tidak terlalu padat */

  /* Efek Kaca (Glassmorphism) */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 10;
}

/* --- TOMBOL DASAR --- */
.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px 24px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* Efek membal (bouncy) */
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Hilangkan garis bawah lama (Sesuai request) */
.tab-btn::after {
  display: none !important;
}

/* --- EFEK HOVER & INTERAKSI --- */
.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px); /* Sedikit naik saat hover */
}

/* Animasi Ikon saat Hover */
.tab-btn:hover i {
  transform: scale(1.15) rotate(-5deg); /* Ikon membesar & miring sedikit */
  transition: transform 0.3s ease;
  color: #fff;
}

.tab-btn:active {
  transform: scale(0.96); /* Efek tekan (klik) */
}

/* --- TOMBOL AKTIF (SELECTED) --- */
.tab-btn.active {
  color: white;
  font-weight: 600;
  transform: translateY(-2px); /* Naik lebih tinggi dari hover */
  border: 1px solid rgba(255, 255, 255, 0.15); /* Border tipis agar tegas */
}

/* Efek Kilap Berjalan (Shimmer) pada tombol aktif */
.tab-btn.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transform: skewX(-20deg);
  animation: shimmer 3s infinite; /* Animasi kilap berulang */
  pointer-events: none;
}

/* --- WARNA KHUSUS & GLOW --- */

/* PENGELUARAN (Merah) */
.tab-btn.active[data-type="keluar"] {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  /* Glow Merah di sekeliling */
  box-shadow: 0 8px 25px -5px rgba(239, 68, 68, 0.5);
}

/* PEMASUKAN (Hijau) */
.tab-btn.active[data-type="masuk"] {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  /* Glow Hijau di sekeliling */
  box-shadow: 0 8px 25px -5px rgba(16, 185, 129, 0.5);
}

/* Ikon Styling */
.tab-btn i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

/* Keyframes untuk efek kilap */
@keyframes shimmer {
  0% {
    left: -100%;
  }
  10% {
    left: 150%;
  } /* Cepat lewat */
  100% {
    left: 150%;
  } /* Diam sebentar sebelum ulang */
}

/* --- CONTAINER UTAMA --- */
.list-container {
  background: rgba(30, 41, 59, 0.6); /* Glassmorphism lebih deep */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 20px; /* Padding lebih lega */
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.3);
  overflow: hidden; /* Agar anak elemen tidak keluar radius */
}

/* --- HEADER LIST --- */
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px 15px 20px;
  font-size: 0.75rem;
  text-transform: uppercase; /* Huruf kapital agar tegas */
  letter-spacing: 1px; /* Jarak antar huruf */
  color: var(--text-secondary);
  border-bottom: 1px solid rgb(94, 94, 94);
  margin-bottom: 15px;
  font-weight: 600;
}

/* --- ITEM TRANSAKSI --- */
.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* Efek membal halus */
  margin-bottom: 8px;
  border: 1px solid transparent; /* Persiapan border saat hover */
  position: relative;
  background: transparent;
}

/* Garis pemisah antar item (kecuali item terakhir) */
.transaction-item:not(:last-child)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 70px; /* Mulai setelah ikon */
  right: 20px;
  height: 1px;
  background: rgba(255, 255, 255, 0.03);
  transition: opacity 0.2s;
}

/* Efek Hover Item */
.transaction-item:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: scale(1.01) translateX(5px); /* Sedikit membesar & geser kanan */
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.transaction-item:hover::after {
  opacity: 0; /* Hilangkan garis pemisah saat di-hover */
}

/* --- BAGIAN KIRI (IKON & TEXT) --- */
.t-left {
  display: flex;
  gap: 18px;
  align-items: center;
}

.t-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

/* Ikon menyala saat baris di-hover */
.transaction-item:hover .t-icon {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: rotate(-10deg); /* Ikon miring sedikit */
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.t-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.t-details h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.t-details span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- BAGIAN KANAN (JUMLAH UANG) --- */
.t-amount {
  font-weight: 700;
  font-size: 1rem;
  font-variant-numeric: tabular-nums; /* Agar angka sejajar rapi */
  letter-spacing: -0.5px;
}

.t-amount.minus {
  color: #f87171;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.t-amount.plus {
  color: #34d399;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* --- SKELETON LOADING (PREMIUM SHIMMER) --- */
.skeleton-item {
  height: 70px;
  margin: 10px 0;
  border-radius: 16px;
  background: #1e293b;
  position: relative;
  overflow: hidden;
}

.skeleton-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.04),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* --- TAMBAHAN KHUSUS SKELETON --- */
/* Timpa style skeleton-item agar fleksibel */
.skeleton-box {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  /* Gunakan animasi shimmer yang sudah ada di CSS kamu */
}

.skeleton-box::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

/* Ukuran khusus */
.sk-balance {
  height: 45px;
  width: 70%;
  margin-top: 5px;
}
.sk-text {
  height: 25px;
  width: 60%;
}
.sk-list {
  height: 75px;
  width: 100%;
  margin-bottom: 10px;
  border-radius: 16px;
}

/* --- PAGINATION --- */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pagination-controls button {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: 12px; /* Kotak membulat lebih modern drpd bulat penuh */
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-controls button:hover:not(:disabled) {
  background: var(--accent-blue, #3b82f6); /* Fallback blue */
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.pagination-controls button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: transparent;
}

.pagination-controls span {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: monospace; /* Font monospace untuk angka halaman */
  background: rgba(0, 0, 0, 0.2);
  padding: 5px 10px;
  border-radius: 8px;
}

/* --- Tombol Sortir (Perbaikan) --- */
.sort-btn {
  background: rgb(48, 46, 75); /* Latar transparan gelap */
  border: 1px solid rgba(255, 255, 255, 0.1); /* Border tipis */
  color: var(--text-secondary); /* Warna ikon abu-abu soft */
  width: 52px;
  height: 32px;
  border-radius: 8px; /* Sedikit membulat (squircle) */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 8px; /* Jarak dari teks "TRANSAKSI" */
  font-size: 0.9rem;
}

/* Efek Hover (Saat kursor diarahkan) */
.sort-btn:hover {
  background: rgba(59, 130, 246, 0.15); /* Biru transparan saat hover */
  border-color: rgba(59, 130, 246, 0.4); /* Border biru */
  color: #fff; /* Ikon jadi putih terang */
  transform: translateY(-1px); /* Naik sedikit */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Efek Klik (Active) */
.sort-btn:active {
  transform: scale(0.95);
}

/* --- ANIMASI MASUK --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.transaction-item {
  animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0; /* Mulai invisible */
}

/* Stagger delay manual (opsional jika JS tidak handle) */
.transaction-item:nth-child(1) {
  animation-delay: 0.1s;
}
.transaction-item:nth-child(2) {
  animation-delay: 0.15s;
}
.transaction-item:nth-child(3) {
  animation-delay: 0.2s;
}
.transaction-item:nth-child(4) {
  animation-delay: 0.25s;
}
.transaction-item:nth-child(5) {
  animation-delay: 0.3s;
}

/* Responsive */
@media (max-width: 600px) {
  .list-header {
    display: none;
  } /* Sembunyikan header di HP */
  .t-amount {
    font-size: 0.95rem;
  }
  .transaction-item {
    padding: 12px 15px;
  }
  .t-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* ========================================= */
/* MODAL SYSTEM REIMAGINED (Glass & Glow)   */
/* ========================================= */

/* 1. Overlay (Background Gelap) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 10, 20, 0.85); /* Lebih gelap utk kontras */
  backdrop-filter: blur(12px); /* Blur lebih kuat */
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition:
    opacity 0.4s ease,
    backdrop-filter 0.4s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(0px);
}

/* 2. Modal Box (Kotak Utama) */
.modal-box {
  position: relative;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.2); /* Highlight atas */
  padding: 40px 30px;
  border-radius: 24px;
  text-align: center;
  width: 90%;
  max-width: 380px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Efek Glow di belakang modal */
.modal-decoration-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.3) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}

/* Typography */
.modal-box h2 {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 15px 0 10px;
  letter-spacing: -0.5px;
}

.modal-box p.subtitle {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 30px;
}

.modal-box.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

/* 2. Pastikan Modal Box memiliki margin auto agar selalu di tengah */
.modal-box {
  /* Tambahkan ini jika belum ada */
  margin: auto;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 18px;
  border-radius: 24px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Tombol Keluar (Primary - Danger Glow) */
.btn-danger-glow {
  background: var(--danger-gradient);
  border: none;
  color: white;
  box-shadow: 0 4px 20px var(--danger-glow);
  position: relative;
  overflow: hidden;
}

/* Efek kilap pada tombol merah */
.btn-danger-glow::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.btn-danger-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--danger-glow);
}

.btn-danger-glow:hover::before {
  left: 100%;
}

/* --- ANIMASI --- */

/* Animasi dasar slide up */
@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Class helper untuk animasi */
.animate-up {
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0; /* Mulai invisible */
}

/* Staggered delays (urutan muncul) */
.delay-1 {
  animation-delay: 0.1s;
}
.delay-2 {
  animation-delay: 0.2s;
}
.delay-3 {
  animation-delay: 0.3s;
}

/* Responsive untuk layar kecil */
@media (max-width: 480px) {
  .modal-box.glass-effect {
    width: 90%;
    padding: 30px 20px;
  }
  .modal-actions {
    flex-direction: column-reverse; /* Tombol batal di bawah di HP */
  }
}

/* 3. Icons & Animation */
.icon-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
}

.icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  position: relative;
  z-index: 2;
}

.lock-icon {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.2),
    rgba(37, 99, 235, 0.1)
  );
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
  animation: floatIcon 3s ease-in-out infinite;
}

.logout-icon {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.2),
    rgba(220, 38, 38, 0.1)
  );
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

@keyframes floatIcon {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* 4. Buttons Styling */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Button Utama (Gradient) */
.btn-primary-gradient {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  width: 100%;
}

.btn-primary-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
  filter: brightness(1.1);
}

.btn-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  z-index: 2;
}

/* Secondary Actions Container */
.secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 5px;
}

.btn-outline-wa {
  background: transparent;
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  padding: 10px;
  border-radius: 12px;
  font-size: 0.9rem;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition: 0.2s;
}
.btn-outline-wa:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: #4ade80;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
  border: 1px solid transparent;
  padding: 10px;
  border-radius: 12px;
  font-size: 0.9rem;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition: 0.2s;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

/* 5. Waiting Animation (Radar) */
.loader-container {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.radar-spinner {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(59, 130, 246, 0.1);
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.radar-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.2);
  animation: pulseBig 2s infinite;
}

.center-icon {
  color: #60a5fa;
  font-size: 1.5rem;
  animation: pulseText 2s infinite;
}

@keyframes pulseBig {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.highlight-warning {
  color: #f59e0b;
  font-size: 0.85rem;
  background: rgba(245, 158, 11, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 8px;
  display: inline-block;
}

.btn-pill-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #22c55e;
  color: white;
  padding: 10px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: 0.3s;
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}
.btn-pill-wa:hover {
  transform: scale(1.05);
}

.btn-text-danger {
  /* Layout & Ukuran */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* Jarak ikon dan teks */
  padding: 10px 24px;
  margin-top: 20px;

  /* Warna & Border Default (Transparan) */
  background: rgba(239, 68, 68, 0.05); /* Merah sangat tipis */
  border: 1px solid rgba(239, 68, 68, 0.3); /* Garis tepi merah pudar */
  color: #ef4444; /* Teks Merah */

  /* Bentuk & Font */
  border-radius: 50px; /* Bentuk Pill (Lonjong) */
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Agar tidak nabrak elemen lain */
  position: relative;
  overflow: hidden;
}

/* Efek Hover (Saat Mouse Diarahkan) */
.btn-text-danger:hover {
  background: #ef4444; /* Berubah jadi Merah Solid */
  color: white; /* Teks jadi Putih */
  border-color: #ef4444;

  /* Efek Glow Merah */
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);

  /* Sedikit naik ke atas */
  transform: translateY(-2px);
}

/* Efek Klik (Active) */
.btn-text-danger:active {
  transform: scale(0.95);
  box-shadow: none;
}

/* Animasi Ikon saat Hover */
.btn-text-danger:hover i {
  transform: rotate(90deg); /* Ikon silang berputar */
  transition: transform 0.3s ease;
}
/* 6. Success SVG Animation (The Best Part) */
.checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: #fff;
  stroke-miterlimit: 10;
  margin: 0 auto 20px;
  box-shadow: inset 0 0 0 #10b981;
  animation:
    fill 0.4s ease-in-out 0.4s forwards,
    scale 0.3s ease-in-out 0.9s both;
}
.checkmark__circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: #10b981;
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.checkmark__check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}
@keyframes scale {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}
@keyframes fill {
  100% {
    box-shadow: inset 0 0 0 50px #10b981;
  }
}

/* 7. Staggered Entrance Animations */
.animate-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.delay-1 {
  animation-delay: 0.1s;
}
.delay-2 {
  animation-delay: 0.2s;
}
.delay-3 {
  animation-delay: 0.3s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logout Actions */
.btn-danger-glow {
  background: #ef4444;
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}
.btn-danger-glow:hover {
  background: #dc2626;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}
.modal-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
}

/* Responsive */
@media (max-width: 480px) {
  .modal-box {
    padding: 30px 20px;
    width: 85%;
  }
  .secondary-actions {
    grid-template-columns: 1fr;
  }
}
