/* ============================================================
   TEMA: Dark Purple — Sistem Kerja Promotor
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0f0a1a;
  --bg-soft: #150e24;
  --surface: #1b1330;
  --surface-2: #221a3b;
  --border: rgba(168, 85, 247, 0.16);
  --border-soft: rgba(255, 255, 255, 0.06);

  --primary: #a855f7;
  --primary-2: #7c3aed;
  --primary-3: #c084fc;
  --primary-grad: linear-gradient(135deg, #a855f7 0%, #6d28d9 100%);

  --text: #f4f1fb;
  --text-muted: #a89dc4;
  --text-faint: #6f6488;

  --success: #22c55e;
  --warning: #f5b83d;
  --danger: #f56565;
  --info: #38bdf8;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-glow: 0 8px 30px rgba(124, 58, 237, 0.25);
}

* { box-sizing: border-box; }

body {
  background: radial-gradient(circle at top right, #1e1440 0%, var(--bg) 45%) fixed;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', 'Segoe UI', Arial, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-3); text-decoration: none; }
a:hover { color: var(--primary); }

h1,h2,h3,h4,h5,h6 { color: var(--text); font-weight: 700; letter-spacing: -0.02em; }
small, .text-muted { color: var(--text-muted) !important; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  animation: fadeInUp .45s ease both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.stat-card { position: relative; overflow: hidden; }
.stat-card h2 { font-weight: 800; margin: 6px 0; }
.stat-card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at top right, rgba(168,85,247,0.12), transparent 60%);
  pointer-events: none;
}
.icon-badge {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-grad);
  color: #fff; font-size: 1.3rem;
  box-shadow: var(--shadow-glow);
  margin-bottom: 10px;
}
.icon-badge.soft { background: rgba(168,85,247,0.14); color: var(--primary-3); box-shadow: none; }

/* ---------- Forms ---------- */
.form-control, .form-select {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
}
.form-control:focus, .form-select:focus {
  background: var(--bg-soft);
  border-color: var(--primary);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.2);
}
.form-control::placeholder { color: var(--text-faint); }
.form-label { color: var(--text-muted); font-weight: 600; font-size: .85rem; }
textarea.form-control { min-height: 120px; }

/* ---------- Buttons ---------- */
.btn-primary {
  background: var(--primary-grad);
  border: none;
  font-weight: 600;
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 16px rgba(124,58,237,0.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(124,58,237,0.45); }
.btn-success { background: linear-gradient(135deg,#22c55e,#15803d); border:none; border-radius: var(--radius-sm); font-weight:600; }
.btn-danger { background: linear-gradient(135deg,#f56565,#b91c1c); border:none; border-radius: var(--radius-sm); font-weight:600; }
.btn-outline-primary, .btn-outline-warning, .btn-outline-danger, .btn-outline-success, .btn-outline-secondary {
  border-radius: var(--radius-sm); font-weight: 600;
}
.btn-outline-light { border-radius: var(--radius-sm); }

/* ---------- Tables ---------- */
.table { color: var(--text); }
.table thead { background: transparent; }
.table thead th {
  color: var(--text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--border); font-weight: 700;
}
.table td { border-color: var(--border-soft); vertical-align: middle; }
.table-hover tbody tr:hover { background: rgba(168,85,247,0.06); }

/* ---------- Badges ---------- */
.badge { border-radius: 8px; font-weight: 600; padding: .45em .7em; }
.badge-status-Nomor-Invalid { background: linear-gradient(135deg,#f56565,#b91c1c); }
.badge-status-Tidak-Membalas { background: #453b63; color:#d9cdf3; }
.badge-status-Telah-Membalas { background: #453b63; color:#d9cdf3; }
.badge-status-Telah-Daftar { background: linear-gradient(135deg,#38bdf8,#0369a1); }
.badge-status-Telah-Deposit { background: linear-gradient(135deg,#22c55e,#15803d); }

/* ---------- Alerts ---------- */
.alert { border-radius: var(--radius-sm); border: 1px solid var(--border); }
.alert-success { background: rgba(34,197,94,0.14); color:#7be6a3; }
.alert-danger { background: rgba(245,101,101,0.14); color:#ffb3b3; }
.alert-warning { background: rgba(245,184,61,0.14); color:#ffd98a; }

/* ============================================================
   LAYOUT: USER (mobile app style, bottom nav)
   ============================================================ */
.user-app-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(15,10,26,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.user-app-header .brand {
  display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem;
}
.user-app-header .brand .logo-dot {
  width: 34px; height: 34px; border-radius: 10px; background: var(--primary-grad);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem;
}
.user-chip {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 12px; font-size: .78rem; color: var(--text-muted); display:flex; align-items:center; gap:6px;
}

.user-content {
  max-width: 480px; margin: 0 auto; padding: 18px 16px 100px;
}

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(20,14,36,0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-around; align-items: center;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-faint); font-size: .68rem; font-weight: 600;
  padding: 6px 10px; border-radius: 12px; min-width: 58px;
  transition: color .15s ease, background .15s ease;
}
.bottom-nav a i { font-size: 1.25rem; }
.bottom-nav a.active { color: var(--primary-3); background: rgba(168,85,247,0.12); }
.bottom-nav a:hover { color: var(--primary-3); }

/* ============================================================
   LAYOUT: ADMIN (sidebar panel)
   ============================================================ */
.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 260px; flex-shrink: 0;
  background: linear-gradient(180deg, #170f2a 0%, #120b21 100%);
  border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 22px 16px;
  z-index: 60;
  transition: transform .25s ease;
}
.admin-sidebar .brand {
  display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; margin-bottom: 28px; padding: 0 6px;
}
.admin-sidebar .brand .logo-dot {
  width: 38px; height: 38px; border-radius: 12px; background: var(--primary-grad);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem;
}
.admin-nav-link {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-muted); font-weight: 600; font-size: .92rem;
  padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 4px;
  transition: background .15s ease, color .15s ease;
}
.admin-nav-link i { font-size: 1.1rem; width: 20px; text-align: center; }
.admin-nav-link:hover { background: rgba(168,85,247,0.1); color: var(--text); }
.admin-nav-link.active { background: var(--primary-grad); color: #fff; box-shadow: var(--shadow-glow); }

.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(15,10,26,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 16px 26px;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-topbar .page-title { font-weight: 800; font-size: 1.2rem; }
.sidebar-toggle-btn {
  display: none; background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; width: 38px; height: 38px; align-items: center; justify-content: center;
}
.admin-content { padding: 24px 26px 40px; }

.sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 55;
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-100%);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .sidebar-toggle-btn { display: inline-flex; }
  .sidebar-backdrop.show { display: block; }
  .admin-content { padding: 18px 16px 32px; }
  .admin-topbar { padding: 14px 16px; }
}

/* Utility */
.text-primary-glow { color: var(--primary-3); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 10px; }
