/* =========================================================
   TEMA: Dark Purple / Modern Fintech (restyle visual)
   ========================================================= */

:root {
  --brand-dark: #15112b;
  --brand-purple: #4c3a9c;
  --brand-purple-light: #6c4ab6;
  --brand-gradient: linear-gradient(135deg, #2c1f5e 0%, #4c3a9c 55%, #6c4ab6 100%);
  --bg-page: #f2f1f7;
  --text-soft: #8b87a3;
  --radius-lg: 18px;
  --radius-md: 14px;
  --shadow-soft: 0 4px 18px rgba(30, 20, 70, 0.07);
}

body {
  background-color: var(--bg-page);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #1f1b33;
}

/* ---------- Angka uang: gaya monospace tegas ---------- */
.rp-mono, .fs-4.fw-bold, .fw-bold.text-success, .fw-bold.text-danger, .fw-bold.text-primary {
  font-family: 'Courier New', 'Consolas', monospace;
  letter-spacing: 0.3px;
}

/* ---------- Navbar: pill nav gaya kartu putih ---------- */
.navbar.bg-primary {
  background: #ffffff !important;
  box-shadow: var(--shadow-soft);
  padding: 10px 22px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.navbar-brand {
  color: var(--brand-dark) !important;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.navbar-brand i {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar .nav-link {
  color: #5b5675 !important;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 8px 16px !important;
  border-radius: 30px;
  margin: 0 2px;
  transition: all .15s ease;
}
.navbar .nav-link:hover {
  background: #f1eefb;
  color: var(--brand-purple) !important;
}
.navbar .nav-link.active {
  background: var(--brand-dark) !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(21, 17, 43, 0.25);
}
.navbar .badge.bg-light {
  background: var(--brand-gradient) !important;
  color: #fff !important;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ---------- Dropdown menu navbar (Transaksi: Pemasukan/Pengeluaran) ---------- */
.navbar .dropdown-menu {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 8px;
  margin-top: 6px;
}
.navbar .dropdown-item {
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.88rem;
  color: #5b5675;
}
.navbar .dropdown-item i { width: 18px; }
.navbar .dropdown-item:hover, .navbar .dropdown-item:focus {
  background: #f1eefb;
  color: var(--brand-purple);
}
.navbar .dropdown-item.active {
  background: var(--brand-dark);
  color: #fff;
}

/* ---------- Kartu umum ---------- */
.card {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
.card-header {
  border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
  border-bottom: 1px solid #f0eef7;
  font-weight: 700;
}

.card-stat .card-body {
  padding: 1.5rem;
}
.card-stat i {
  font-size: 2rem;
  opacity: 0.85;
}

/* ---------- Hero saldo (dashboard) ---------- */
.hero-saldo {
  background: var(--brand-gradient);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(44, 31, 94, 0.35);
}
.hero-saldo .label {
  font-size: 0.78rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #cfc8f0;
  font-weight: 700;
}
.hero-saldo .angka-besar {
  font-family: 'Courier New', Consolas, monospace;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: 1px;
}
.hero-badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 600;
}
.hero-pill {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 12px 14px;
}
.hero-pill .pill-label {
  font-size: 0.72rem;
  color: #d8d2f2;
  font-weight: 600;
}
.hero-pill .pill-value {
  font-family: 'Courier New', Consolas, monospace;
  font-weight: 700;
  font-size: 1.05rem;
}

.hero-bar {
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 700;
}
.hero-bar.masuk {
  background: linear-gradient(135deg, #0f5c52, #12786b);
  color: #dffaf4;
}
.hero-bar.keluar {
  background: linear-gradient(135deg, #6e1f3a, #8c2a49);
  color: #ffe3ec;
}
.hero-bar .val {
  font-family: 'Courier New', Consolas, monospace;
  font-size: 1.1rem;
}

/* ---------- Tombol ---------- */
.btn-primary {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  border-radius: 12px;
  font-weight: 600;
  padding: 10px 18px;
}
.btn-primary:hover, .btn-primary:focus {
  background: #29224d;
  border-color: #29224d;
}
.btn-outline-primary {
  color: var(--brand-purple);
  border-color: var(--brand-purple);
  border-radius: 12px;
}
.btn-outline-primary:hover {
  background: var(--brand-purple);
  border-color: var(--brand-purple);
}
.btn-success { border-radius: 12px; }
.btn-outline-success, .btn-outline-secondary, .btn-outline-danger, .btn-outline-warning, .btn-outline-info {
  border-radius: 12px;
}

/* ---------- Tabel ---------- */
.table thead {
  background-color: #f4f2fb;
}
.table thead th {
  color: #4b4667;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 700;
  border-bottom: none;
}

/* ---------- Badge jenis transaksi ---------- */
.badge-masuk {
  background-color: #12786b;
}
.badge-keluar {
  background-color: #8c2a49;
}

/* ---------- Login page ---------- */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-gradient);
}
.login-card {
  max-width: 420px;
  width: 100%;
  border-radius: var(--radius-lg);
}

/* ---------- Wizard step (setoran_form) ---------- */
.step-item {
  background: #f1eefb;
  color: var(--text-soft);
}
.step-item.active {
  background: var(--brand-dark);
  color: #fff;
}
.insidentil-box {
  background: #fff8e9;
  border: 1px dashed #e0b23b;
  border-radius: var(--radius-md);
}

/* ---------- Alert / kotak info ---------- */
.alert {
  border: none;
  border-radius: var(--radius-md);
}
.alert-primary {
  background: var(--brand-gradient);
  color: #fff;
}
.alert-primary strong { color: #fff; }
.alert-info {
  background: #eef0fb;
  color: var(--brand-dark);
}
.alert-light {
  background: #f7f6fc;
  border: 1px solid #ece9f7 !important;
}
.alert-success { background: #e3f7f1; color: #0f5c52; }
.alert-danger  { background: #fbe6ec; color: #8c2a49; }
.alert-warning { background: #fff8e6; color: #8a6412; }

/* ---------- Badge & tabel status lain ---------- */
.badge.bg-primary {
  background: var(--brand-dark) !important;
}
.badge.bg-success { background: #12786b !important; }
.badge.bg-danger  { background: #8c2a49 !important; }
.badge.bg-secondary { background: #8b87a3 !important; }

.table-primary, .table-primary > td, .table-primary > th {
  background-color: #efecfa !important;
  color: var(--brand-dark);
}
.table-light, .table-light > td, .table-light > th {
  background-color: #f7f6fc !important;
}
.table-active, .table-active > td {
  background-color: #f1eefb !important;
}

/* ---------- Form control ---------- */
.form-control, .form-select {
  border-radius: 10px;
  border-color: #e3e0f0;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand-purple-light);
  box-shadow: 0 0 0 0.2rem rgba(108, 74, 182, 0.15);
}
.form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #4b4667;
}

/* ---------- Modal ---------- */
.modal-content {
  border-radius: var(--radius-md);
  border: none;
}
.modal-header {
  border-bottom: 1px solid #f0eef7;
}
.modal-footer {
  border-top: 1px solid #f0eef7;
}
