* { margin:0; padding:0; box-sizing:border-box; font-family:'Segoe UI',sans-serif; }

body { display:flex; background:#f4f7f6; min-height:100vh; }

/* ================= MOBILE HEADER (Sembunyi di Desktop) ================= */
.mobile-header {
  display: none; /* Sembunyikan di laptop */
}

/* Desain Teks MyBank Gradasi */
.mobile-header {
  display: none; /* Sembunyikan di laptop */
}

.mobile-brand-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-brand-group i {
  font-size: 20px;
  color: #2563eb; /* Warna biru ikon dompet */
}

.mobile-brand {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  
  /* Trik Gradasi Teks yang Lebih Aman */
  background: linear-gradient(90deg, #1e3a8a, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ================= SIDEBAR ================= */
.sidebar {
  width:250px; background:#1e293b; color:#fff;
  padding:20px 0; display:flex; flex-direction:column;
  position:relative;
}
.logo { padding:0 20px 25px; border-bottom:1px solid #334155; margin-bottom:20px; }
.logo h2 { font-size:20px; display:flex; align-items:center; gap:10px; }
.menu { list-style:none; flex:1; }
.menu-item { padding:15px 20px; cursor:pointer; display:flex; align-items:center; gap:15px; transition:.2s; }
.menu-item:hover { background:#334155; }
.menu-item.active { background:#3b82f6; border-left:4px solid #60a5fa; }
.menu-divider { height:1px; background:#334155; margin:15px 20px; }

/* ================= MAIN ================= */
.main { flex:1; padding:30px; display:flex; flex-direction:column; gap:20px; overflow-x:auto; }

/* HEADER SALDO */
.header {
  background:linear-gradient(135deg,#3b82f6,#2563eb); color:#fff;
  padding:30px; border-radius:15px; display:flex; justify-content:space-between;
  align-items:center; box-shadow:0 4px 10px rgba(37,99,235,.3);
}
.header h1 { font-size:22px; margin-bottom:5px; }
.header p { font-size:13px; opacity:.8; }
.header h2 { font-size:36px; margin-top:8px; }
.btn { background:#fff; color:#2563eb; border:none; padding:12px 20px;
  border-radius:8px; font-weight:600; cursor:pointer; display:flex; gap:8px; align-items:center; }
.btn:hover { background:#e2e8f0; }

/* TABEL */
.card { background:#fff; padding:20px; border-radius:15px; box-shadow:0 4px 10px rgba(0,0,0,.05); }
.card h3 { margin-bottom:15px; color:#1e293b; }
table { width:100%; border-collapse:collapse; }
th,td { padding:12px 15px; text-align:left; border-bottom:1px solid #e2e8f0; font-size:14px; }
th { background:#f8fafc; color:#64748b; font-weight:600; }
tr:hover { background:#f8fafc; }
.green { color:#10b981; font-weight:700; }
.red { color:#ef4444; font-weight:700; }
.btn-del { background:#ef4444; color:#fff; border:none; padding:6px 10px;
  border-radius:6px; cursor:pointer; font-size:12px; }
.loading { text-align:center; padding:20px; color:#94a3b8; }

/* ================= DASHBOARD ================= */
.dash-title { font-size:24px; color:#1e293b; }
.dash-sub { color:#64748b; font-size:14px; margin-bottom:10px; }
.dash-grid {
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap:18px;
}
.bank-card {
  background:#fff; border-radius:15px; padding:22px;
  box-shadow:0 4px 12px rgba(0,0,0,.06);
  cursor:pointer; transition:.25s;
  border-left:6px solid #3b82f6;
  position:relative; overflow:hidden;
}
.bank-card:hover { transform:translateY(-4px); box-shadow:0 10px 20px rgba(0,0,0,.1); }
.bank-card.mandiri { border-left-color:#003d79; }
.bank-card.jago  { border-left-color:#ff5a1f; }
.bank-card.dana  { border-left-color:#118eea; }
.bank-card.ovo   { border-left-color:#4c3494; }
.bank-card.qris  { border-left-color:#e11d48; }
.bank-card .bank-name {
  font-size:13px; font-weight:700; color:#64748b;
  text-transform:uppercase; letter-spacing:1px;
  display:flex; justify-content:space-between; align-items:center;
}
.bank-card .bank-name i { font-size:16px; color:#94a3b8; }
.bank-card .bank-balance {
  font-size:24px; font-weight:800; color:#1e293b;
  margin-top:12px; word-break:break-all;
}
.bank-card .bank-sub { font-size:12px; color:#94a3b8; margin-top:6px; }
.bank-card .arrow {
  position:absolute; bottom:15px; right:18px;
  color:#cbd5e1; font-size:14px;
}

/* GRAND TOTAL */
.grand-total {
  background:linear-gradient(135deg,#10b981,#059669); color:#fff;
  padding:25px 30px; border-radius:15px;
  box-shadow:0 4px 10px rgba(16,185,129,.3);
}
.grand-total p { font-size:13px; opacity:.85; }
.grand-total h2 { font-size:32px; margin-top:6px; }

/* ================= MODAL ================= */
.modal-bg { position:fixed; inset:0; background:rgba(0,0,0,.5); display:none; align-items:center; justify-content:center; z-index:100; }
.modal-bg.show { display:flex; }
.modal { background:#fff; padding:25px; border-radius:15px; width:90%; max-width:420px; }
.modal h3 { margin-bottom:15px; }
.modal label { display:block; font-size:13px; margin-bottom:5px; color:#475569; font-weight:600; }
.modal input, .modal select {
  width:100%; padding:10px; border:1px solid #cbd5e1; border-radius:8px;
  margin-bottom:12px; font-size:14px; outline:none;
}
.modal input:focus, .modal select:focus { border-color:#3b82f6; }
.modal-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:10px; }
.btn-cancel { background:#e2e8f0; color:#334155; border:none; padding:10px 18px; border-radius:8px; cursor:pointer; }
.btn-save { background:#3b82f6; color:#fff; border:none; padding:10px 18px; border-radius:8px; cursor:pointer; }

/* ================= USER PANEL ================= */
.user-panel {
  margin-top:auto;
  padding:15px 15px 15px 20px;
  border-top:1px solid #334155;
  display:flex;
  align-items:center;
  gap:10px;
  background:#172033;
}
.user-info { display:flex; align-items:center; gap:10px; flex:1; min-width:0; }
.avatar {
  width:36px; height:36px;
  border-radius:50%;
  background:#3b82f6;
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:15px;
  flex-shrink:0;
}
.user-text { min-width:0; }
.user-label { font-size:10px; color:#94a3b8; text-transform:uppercase; letter-spacing:.5px; }
.user-email {
  font-size:12px; color:#e2e8f0; font-weight:600;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  max-width:130px;
}
.btn-logout {
  background:transparent;
  border:1px solid #475569;
  color:#cbd5e1;
  width:34px; height:34px;
  border-radius:8px;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:.2s;
  flex-shrink:0;
}
.btn-logout:hover { background:#ef4444; border-color:#ef4444; color:#fff; }

.hidden { display:none !important; }

/* ============================================================
   TOMBOL HAMBURGER & OVERLAY (Sembunyi di Desktop)
   ============================================================ */
.mobile-menu-btn {
  display: none; /* Sembunyikan di laptop */
  background: #2563eb;
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(37,99,235,0.3);
}

.sidebar-overlay {
  display: none; /* Sembunyikan di laptop */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.3s;
}

/* ============================================================
   RESPONSIVE DESIGN (Untuk HP / Tablet)
   ============================================================ */
/* ============================================================
   RESPONSIVE DESIGN (Untuk HP / Tablet)
   ============================================================ */
@media (max-width: 768px) {
  /* Tombol Hamburger */
  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    /* margin-bottom dihapus karena sudah diatur oleh mobile-header */
  }

  /* Sidebar Laci */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 5px 0 15px rgba(0,0,0,0.2);
    padding-top: 20px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.3s;
  }
  .sidebar-overlay.show {
    display: block;
    opacity: 1;
  }

  /* Menu Vertikal */
  .menu {
    display: block;
    overflow-x: visible;
  }
  .menu-item {
    padding: 15px 20px;
  }
  .menu-item.active {
    border-left: 4px solid #60a5fa;
  }

  /* Layout Utama */
  .main {
    padding: 15px;
    width: 100%;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 15px;
  }

  .header .btn {
    width: 100%;
    justify-content: center;
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }

  /* =========================================
     👇 BAGIAN INI YANG DIPERBAIKI 👇
     (Tabel Mutasi di HP)
     ========================================= */
  .card {
    padding: 10px; /* Kurangi padding luar */
    overflow-x: hidden; /* Hilangkan scroll horizontal */
  }

  .card h3 {
    font-size: 16px; /* Kecilkan judul tabel */
    margin-bottom: 10px;
  }

  table {
    min-width: 100%; /* Paksa tabel muat di layar */
    width: 100%;
  }

  th, td {
    padding: 8px 5px; /* Kecilkan jarak dalam sel */
    font-size: 11px; /* Kecilkan ukuran font */
  }

  /* Sembunyikan kolom "Tipe" (kolom ke-4) karena sudah diwakili warna merah/hijau pada nominal */
  th:nth-child(4), 
  td:nth-child(4) {
    display: none;
  }

  /* Sesuaikan lebar kolom agar proporsional */
  th:nth-child(1) { width: 25%; } /* Tanggal */
  th:nth-child(2) { width: 40%; } /* Nama */
  th:nth-child(3) { width: 25%; } /* Nominal */
  th:nth-child(5) { width: 10%; text-align: center; } /* Tombol Hapus */

  td:nth-child(5) {
    text-align: center;
  }

  .btn-del {
    padding: 5px 8px; /* Kecilkan tombol hapus */
    font-size: 10px;
  }
}

/* ================= FILTER BULAN & TAHUN ================= */
.filter-container {
  display: flex;
  gap: 10px;
}
.filter-select {
  padding: 8px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #1e293b;
  background-color: #f8fafc;
  outline: none;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}
.filter-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}