/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #060b18;
  --bg2: #0a1020;
  --bg3: #0f1829;
  --card: #0d1626;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(99,179,237,0.2);
  --accent: #3b82f6;
  --accent2: #06b6d4;
  --accent3: #8b5cf6;
  --green: #10b981;
  --green2: #34d399;
  --red: #f43f5e;
  --orange: #f97316;
  --yellow: #f59e0b;
  --text: #f0f6ff;
  --text2: #8ba3c0;
  --text3: #3a5070;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --glow-blue: 0 0 40px rgba(59,130,246,0.18);
  --glow-green: 0 0 30px rgba(16,185,129,0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== ANIMATED BACKGROUND ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% 5%, rgba(59,130,246,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 90%, rgba(139,92,246,0.08) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(6,182,212,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.06), transparent 70%);
  top: -200px; left: -200px;
  pointer-events: none;
  z-index: 0;
  animation: floatBg 20s ease-in-out infinite alternate;
}

@keyframes floatBg {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(80px, 60px) scale(1.1); }
}

/* ===== PARTICLES ===== */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.2; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ===== HEADER ===== */
header {
  background: rgba(6, 11, 24, 0.75);
  border-bottom: 1px solid var(--border);
  padding: 13px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition: var(--transition);
}

header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 5%; right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.5), rgba(139,92,246,0.4), transparent);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 20px rgba(59,130,246,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: default;
}

.brand-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  border-radius: inherit;
}

.brand-icon:hover {
  transform: rotate(-5deg) scale(1.08);
  box-shadow: 0 6px 28px rgba(59,130,246,0.5);
}

.brand-title {
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(90deg, #e0f2fe, #a5f3fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.brand-sub {
  font-size: 10px;
  color: var(--text3);
  font-weight: 500;
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.brand-sub::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); transform: scale(1); }
  50% { box-shadow: 0 0 0 4px rgba(16,185,129,0); transform: scale(1.1); }
}

.ig-link {
  font-size: 10px;
  color: var(--accent2);
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
}
.ig-link:hover { color: #fff; text-shadow: 0 0 8px var(--accent2); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.admin-badge {
  font-size: 11px;
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(6,182,212,0.1));
  color: var(--accent2);
  border: 1px solid rgba(6,182,212,0.25);
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 20px 120px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 1;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.2s;
}

.btn:hover::after { background: rgba(255,255,255,0.06); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 12px rgba(59,130,246,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-outline {
  background: rgba(255,255,255,0.04);
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: rgba(255,255,255,0.15);
  color: var(--text);
  background: rgba(255,255,255,0.07);
  transform: translateY(-1px);
}

.btn-save {
  width: 100%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: white;
  padding: 14px;
  font-size: 14.5px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  transition: var(--transition);
  display: flex;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 20px rgba(59,130,246,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
}

.btn-save::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s;
}

.btn-save:hover::before { left: 100%; }
.btn-save:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(59,130,246,0.5);
}
.btn-save:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-close {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 15px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  transition: var(--transition);
  line-height: 1;
}
.btn-close:hover {
  background: rgba(244,63,94,0.12);
  border-color: rgba(244,63,94,0.25);
  color: #fb7185;
  transform: scale(1.05);
}

.btn-action {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transition: var(--transition);
  flex: 1;
  min-width: 140px;
  position: relative;
  overflow: hidden;
}

.btn-action::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59,130,246,0.06), rgba(6,182,212,0.04));
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-action:hover::before { opacity: 1; }
.btn-action:hover {
  border-color: rgba(59,130,246,0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(59,130,246,0.12);
}

.btn-icon { font-size: 26px; line-height: 1; }

.btn-icon-sm {
  width: 34px; height: 34px;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.btn-detail {
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.18);
  color: var(--accent);
}
.btn-detail:hover { background: rgba(59,130,246,0.22); transform: scale(1.08); }
.btn-hapus {
  background: rgba(244,63,94,0.1);
  border: 1px solid rgba(244,63,94,0.18);
  color: var(--red);
}
.btn-hapus:hover { background: rgba(244,63,94,0.22); transform: scale(1.08); }

.btn-bukti {
  background: rgba(6,182,212,0.1);
  color: var(--accent2);
  border: 1px solid rgba(6,182,212,0.18);
  border-radius: var(--radius-xs);
  padding: 4px 10px;
  font-size: 11.5px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-weight: 600;
}
.btn-bukti:hover { background: rgba(6,182,212,0.22); transform: scale(1.04); }

.btn-hapus-bayar {
  background: rgba(244,63,94,0.08);
  color: var(--red);
  border: 1px solid rgba(244,63,94,0.18);
  border-radius: var(--radius-xs);
  padding: 4px 9px;
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 700;
}
.btn-hapus-bayar:hover { background: rgba(244,63,94,0.22); }

/* ===== CARD ===== */
.card {
  background: rgba(13, 22, 38, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  transition: var(--transition);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.03), transparent);
  pointer-events: none;
}

/* ===== ADMIN PANEL ===== */
.admin-panel {
  background: linear-gradient(135deg, rgba(59,130,246,0.06) 0%, rgba(6,182,212,0.04) 100%);
  border: 1px solid rgba(59,130,246,0.18);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  animation: fadeInUp 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

.admin-panel::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(59,130,246,0.12), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatBg 8s ease-in-out infinite alternate;
}

.admin-panel::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(139,92,246,0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.admin-panel-title {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-panel-title::before {
  content: '';
  width: 20px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  -webkit-background-clip: unset;
  background-clip: unset;
}

.admin-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== FORM ===== */
.form-card {
  animation: slideDown 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.form-header h3 {
  font-size: 16px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--text), var(--text2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-group { margin-bottom: 15px; }

.form-group label {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 7px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
select {
  width: 100%;
  padding: 12px 15px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

input:focus, select:focus {
  outline: none;
  border-color: rgba(59,130,246,0.5);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1), 0 0 20px rgba(59,130,246,0.05);
  background: rgba(59,130,246,0.04);
}

input:hover:not(:focus), select:hover:not(:focus) {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
}

input::placeholder { color: var(--text3); }
select option { background: var(--bg2); color: var(--text); }

/* ===== FILE UPLOAD ===== */
.file-upload-area {
  position: relative;
  border: 2px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  min-height: 115px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  background: rgba(255,255,255,0.02);
}

.file-upload-area:hover {
  border-color: rgba(59,130,246,0.4);
  background: rgba(59,130,246,0.03);
}

.file-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text2);
  font-size: 13px;
  pointer-events: none;
  text-align: center;
  padding: 14px;
}

.file-icon { font-size: 28px; }
.file-hint { font-size: 11px; color: var(--text3); }

#previewImg {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 7px;
}

/* ===== PREVIEW CICILAN ===== */
.form-preview {
  background: linear-gradient(135deg, rgba(16,185,129,0.07), rgba(6,182,212,0.05));
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius-sm);
  padding: 15px;
  margin: 12px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.form-preview::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(16,185,129,0.15), transparent 70%);
  border-radius: 50%;
}

.preview-label {
  font-size: 10px;
  color: var(--text2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.preview-amount {
  font-size: 24px;
  font-weight: 800;
  color: var(--green);
  font-family: 'JetBrains Mono', monospace;
}

/* ===== SUMMARY ROW ===== */
.summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.summary-card {
  background: rgba(13, 22, 38, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: default;
  backdrop-filter: blur(12px);
  animation: fadeInUp 0.5s ease both;
}

.summary-card:nth-child(1) { animation-delay: 0.05s; }
.summary-card:nth-child(2) { animation-delay: 0.10s; }
.summary-card:nth-child(3) { animation-delay: 0.15s; }
.summary-card:nth-child(4) { animation-delay: 0.20s; }

.summary-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03), transparent);
  pointer-events: none;
}

.summary-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: height 0.3s;
}

.sc-blue::after { background: linear-gradient(90deg, var(--accent), #60a5fa); }
.sc-green::after { background: linear-gradient(90deg, var(--green), var(--green2)); }
.sc-cyan::after { background: linear-gradient(90deg, var(--accent2), #22d3ee); }
.sc-orange::after { background: linear-gradient(90deg, var(--orange), #fb923c); }

.summary-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}
.summary-card:hover::after { height: 3px; }

.sum-icon { font-size: 26px; margin-bottom: 10px; line-height: 1; }
.sum-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  word-break: break-all;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.sum-label {
  font-size: 9.5px;
  color: var(--text3);
  margin-top: 5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== TABLE HEADER ===== */
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.table-header h3 {
  font-size: 16px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--text), var(--text2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.filter-row input {
  width: auto;
  padding: 9px 15px;
  font-size: 13px;
  min-width: 210px;
  border-radius: 99px;
}

.filter-row input:focus { border-radius: 99px; }

/* ===== CICILAN LIST ===== */
.cicilan-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cicilan-item {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.4s ease both;
}

.cicilan-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  border-radius: 3px 0 0 3px;
  opacity: 0;
  transition: opacity 0.3s;
}

.cicilan-item:hover::before { opacity: 1; }

.cicilan-item:hover {
  border-color: rgba(59,130,246,0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2), 0 0 0 1px rgba(59,130,246,0.05);
  transform: translateY(-2px);
  background: rgba(59,130,246,0.03);
}

.cicilan-item.item-lunas::before {
  background: linear-gradient(180deg, var(--green), var(--green2));
}

.cicilan-item.item-lunas {
  border-color: rgba(16,185,129,0.2);
}
.cicilan-item.item-lunas:hover {
  border-color: rgba(16,185,129,0.35);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2), 0 0 0 1px rgba(16,185,129,0.05);
  background: rgba(16,185,129,0.02);
}

.cicilan-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}

.cicilan-nama {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.cicilan-tgl {
  font-size: 11px;
  color: var(--text3);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cicilan-tgl::before {
  content: '📅';
  font-size: 10px;
}

.cicilan-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Stats */
.cicilan-stats {
  display: flex;
  gap: 9px;
  margin-bottom: 13px;
  flex-wrap: wrap;
}

.stat-block {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 9px 12px;
  flex: 1;
  min-width: 90px;
  transition: var(--transition);
}

.stat-block:hover {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
}

.stat-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  margin-bottom: 4px;
}

.stat-val {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.3px;
}

/* Progress */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 11px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: shimmer 2.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -60%; }
  100% { left: 160%; }
}

.progress-fill.lunas-fill {
  background: linear-gradient(90deg, var(--green), var(--green2));
}

.progress-pct {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  min-width: 38px;
  text-align: right;
}

/* Meta row */
.cicilan-meta-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.meta-item {
  font-size: 11px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 11px;
  color: var(--text2);
  font-weight: 600;
  transition: var(--transition);
}

.meta-item.lunas {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.25);
  color: var(--green);
  font-weight: 800;
}

.lunas { color: var(--green) !important; }

/* Pembayaran list */
.pembayaran-list {
  margin-top: 13px;
  border-top: 1px solid var(--border);
  padding-top: 13px;
}

.pay-header {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text3);
  margin-bottom: 9px;
}

.pembayaran-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pembayaran-row {
  display: grid;
  grid-template-columns: 28px 1fr 1fr auto auto;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 8px 11px;
  font-size: 13px;
  transition: var(--transition);
}

.pembayaran-row:hover {
  border-color: rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}

.pay-num {
  width: 26px; height: 26px;
  background: rgba(59,130,246,0.12);
  color: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.pay-tgl { color: var(--text2); font-size: 12px; }
.pay-nominal {
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--green);
}
.no-bukti { font-size: 11.5px; color: var(--text3); }

.no-bayar {
  font-size: 13px;
  color: var(--text3);
  font-style: italic;
  text-align: center;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  animation: fadeInUp 0.6s ease;
}

.empty-icon { font-size: 54px; margin-bottom: 16px; opacity: 0.6; animation: float 3s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.empty-text { font-size: 17px; font-weight: 800; color: var(--text2); }
.empty-sub { font-size: 13px; color: var(--text3); margin-top: 7px; }

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  padding: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal.show {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 30px 26px 26px;
  width: 100%;
  max-width: 440px;
  animation: popIn 0.35s cubic-bezier(0.34,1.56,0.64,1);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
  position: relative;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.4), transparent);
}

.modal-large { max-width: 600px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 16px; font-weight: 800; }

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

.modal-icon { font-size: 44px; text-align: center; margin-bottom: 12px; animation: float 3s ease-in-out infinite; }
.modal-content h3 { text-align: center; margin-bottom: 4px; font-size: 19px; font-weight: 800; }
.modal-sub { text-align: center; color: var(--text2); font-size: 13px; margin-bottom: 20px; }

/* IMG MODAL */
.img-modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 92vw;
}

.img-modal-content img {
  max-width: 92vw;
  max-height: 82vh;
  border-radius: 16px;
  box-shadow: 0 12px 60px rgba(0,0,0,0.8);
}

.img-hint { font-size: 12px; color: rgba(255,255,255,0.35); }

/* ===== DETAIL MODAL ===== */
.detail-info {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  gap: 10px;
  transition: background 0.2s;
}

.detail-row:hover { background: rgba(255,255,255,0.02); }
.detail-row:last-child { border-bottom: none; }
.detail-row span { color: var(--text2); flex-shrink: 0; }
.detail-row b { font-weight: 700; text-align: right; font-family: 'JetBrains Mono', monospace; font-size: 12px; }

.detail-pay-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text3);
  margin: 16px 0 10px;
}

.detail-pay-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-bottom: 8px;
  transition: var(--transition);
}
.detail-pay-row:hover {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  transform: translateX(3px);
}

.detail-pay-num {
  width: 30px; height: 30px;
  background: rgba(59,130,246,0.12);
  color: var(--accent);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.detail-pay-info { flex: 1; min-width: 0; }
.detail-pay-tgl { font-size: 11px; color: var(--text2); }
.detail-pay-nom {
  font-size: 14px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--green);
}

.detail-pay-img {
  width: 54px; height: 54px;
  object-fit: cover;
  border-radius: var(--radius-xs);
  cursor: pointer;
  border: 1px solid var(--border);
  transition: var(--transition);
  flex-shrink: 0;
}
.detail-pay-img:hover {
  transform: scale(1.08);
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(59,130,246,0.3);
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(13, 22, 38, 0.95);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
  padding: 13px 24px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 700;
  z-index: 999;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(59,130,246,0.1);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s;
  opacity: 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(20px);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.error {
  border-color: rgba(244,63,94,0.3);
  background: rgba(244,63,94,0.08);
  box-shadow: 0 8px 40px rgba(244,63,94,0.2);
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 20px 16px 50px;
  font-size: 12px;
  color: var(--text3);
  position: relative;
  z-index: 1;
}

.footer p { display: flex; align-items: center; justify-content: center; gap: 6px; }
.footer a {
  color: var(--accent2);
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.footer a:hover { color: #fff; text-shadow: 0 0 12px var(--accent2); }

/* ===== UTILITY ===== */
.hidden { display: none !important; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ===== NUMBER COUNTER ANIMATION ===== */
.count-up { display: inline-block; }

/* ===== SKELETON LOADING ===== */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skeletonWave 1.5s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes skeletonWave {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== RESPONSIVE TABLET ===== */
@media (min-width: 700px) {
  .container { padding: 32px 24px 120px; }
  .cicilan-stats { flex-wrap: nowrap; }
  .admin-btns { gap: 14px; }
  .summary-row { grid-template-columns: repeat(4, 1fr); }
  .modal-large { align-self: center; }
  .pembayaran-row { grid-template-columns: 28px 140px 1fr auto auto; }
  .filter-row input { min-width: 260px; }
}

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 600px) {
  header { padding: 12px 14px; gap: 8px; }
  .brand-title { font-size: 13px; }
  .brand-sub { font-size: 9.5px; }
  .brand-icon { width: 40px; height: 40px; font-size: 18px; border-radius: 11px; }

  .container { padding: 14px 14px 100px; gap: 14px; }
  .admin-btns { gap: 10px; }
  .btn-action { flex-direction: row; min-width: unset; padding: 13px 15px; }
  .cicilan-stats { gap: 7px; }
  .stat-block { min-width: 80px; padding: 8px 10px; }
  .stat-val { font-size: 12px; }
  .pembayaran-row { grid-template-columns: 26px 1fr auto auto; font-size: 12px; }
  .pay-tgl { display: none; }
  .summary-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sum-val { font-size: 15px; }
  .modal-content { padding: 22px 18px 20px; border-radius: 18px; }
  .modal-large { max-width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; align-self: flex-end; margin: 0; padding-bottom: 32px; }
  .table-header { flex-direction: column; align-items: stretch; }
  .filter-row input { width: 100%; min-width: unset; }
  .toast { max-width: 90%; text-align: center; white-space: normal; font-size: 13px; }
  .detail-row { font-size: 12.5px; padding: 10px 14px; }
  .header-actions .admin-badge { display: none; }
}

@media (max-width: 380px) {
  .brand-sub, .brand-sub + small { display: none; }
  .btn { padding: 8px 12px; font-size: 12px; }
}

/* ===== LIGHT MODE ===== */
body.light {
  --bg: #f0f4fb;
  --bg2: #ffffff;
  --bg3: #f5f8ff;
  --card: rgba(255,255,255,0.85);
  --border: rgba(0,0,0,0.07);
  --border2: rgba(59,130,246,0.2);
  --text: #0c1630;
  --text2: #4a6080;
  --text3: #9db0c8;
}

body.light::before {
  background:
    radial-gradient(ellipse 70% 50% at 15% 5%, rgba(59,130,246,0.07), transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 90%, rgba(139,92,246,0.05), transparent 50%);
}

body.light .card,
body.light .cicilan-item,
body.light .modal-content,
body.light .summary-card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

body.light header {
  background: rgba(240, 244, 251, 0.85);
  border-bottom-color: rgba(0,0,0,0.08);
}

body.light .admin-panel {
  background: linear-gradient(135deg, rgba(59,130,246,0.05), rgba(6,182,212,0.04));
  border-color: rgba(59,130,246,0.15);
}

body.light .cicilan-item {
  background: rgba(255,255,255,0.8);
  border-color: rgba(0,0,0,0.06);
}

body.light .cicilan-item:hover {
  background: rgba(255,255,255,0.95);
  border-color: rgba(59,130,246,0.2);
  box-shadow: 0 8px 28px rgba(59,130,246,0.08);
}

body.light input,
body.light select {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.1);
}

body.light input:focus,
body.light select:focus {
  background: #fff;
  border-color: var(--accent);
}

body.light .stat-block,
body.light .pembayaran-row,
body.light .detail-info,
body.light .detail-pay-row {
  background: rgba(248,250,255,0.9);
  border-color: rgba(0,0,0,0.07);
}

body.light .modal {
  background: rgba(0,0,0,0.4);
}

body.light .toast {
  background: rgba(255,255,255,0.95);
  border-color: rgba(0,0,0,0.08);
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

body.light .progress-bar {
  background: rgba(0,0,0,0.08);
}

body.light .meta-item {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.08);
}

body.light .btn-outline {
  background: rgba(255,255,255,0.8);
  border-color: rgba(0,0,0,0.1);
  color: var(--text2);
}

body.light .btn-action {
  background: rgba(255,255,255,0.7);
  border-color: rgba(0,0,0,0.08);
}

body.light .file-upload-area {
  background: rgba(248,250,255,0.9);
  border-color: rgba(0,0,0,0.12);
}

body.light .brand-title {
  background: linear-gradient(90deg, #1e40af, #0891b2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== HERO BANNER ===== */
.hero-banner {
  background: linear-gradient(135deg, rgba(15,24,42,0.9) 0%, rgba(10,16,32,0.8) 100%);
  border: 1px solid rgba(59,130,246,0.18);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease;
  backdrop-filter: blur(16px);
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(59,130,246,0.12), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatBg 10s ease-in-out infinite alternate;
}

.hero-banner::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(139,92,246,0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content { flex: 1; position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  color: var(--accent2);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 13px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  animation: fadeInUp 0.5s ease 0.1s both;
}

.hero-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.8px;
  margin-bottom: 10px;
  animation: fadeInUp 0.5s ease 0.15s both;
}

.hero-accent {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.6;
  max-width: 380px;
  animation: fadeInUp 0.5s ease 0.2s both;
}

.hero-visual {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.5s ease 0.25s both;
}

.hero-card-float {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 16px 20px;
  min-width: 170px;
  backdrop-filter: blur(8px);
  animation: float 4s ease-in-out infinite;
}

.hcf-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  margin-bottom: 6px;
}

.hcf-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.hcf-bar {
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
}

.hcf-fill {
  height: 100%;
  width: 65%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  transition: width 1s ease;
}

/* Light mode hero */
body.light .hero-banner {
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(240,246,255,0.9));
  border-color: rgba(59,130,246,0.15);
}

body.light .hero-card-float {
  background: rgba(255,255,255,0.9);
  border-color: rgba(59,130,246,0.15);
  box-shadow: 0 8px 24px rgba(59,130,246,0.08);
}

@media (max-width: 600px) {
  .hero-banner { padding: 22px 18px; flex-direction: column; align-items: flex-start; }
  .hero-title { font-size: 20px; }
  .hero-sub { font-size: 12.5px; }
  .hero-visual { width: 100%; }
  .hero-card-float { width: 100%; }
}