:root {
  --primary: #B71C1C;
  --primary-light: #D32F2F;
  --accent: #F4B400;
  --accent-light: #FFD966;
  --bg-soft: #FFFBF5;
  --text-dark: #201A16;
  --radius: 14px;
}

[data-theme="dark"] {
  --bg-soft: #1A1210;
  --text-dark: #F5EDE6;
  --card-bg: #2A1B18;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-soft);
  color: var(--text-dark);
}

h1, h2, h3, h4, .brand-font {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 700;
}

/* ---------- Navbar ---------- */
.navbar-siresti {
  background: var(--primary);
  color: #fff;
}
.navbar-siresti a { color: #fff !important; }
.btn-accent {
  background: var(--accent) !important;
  color: var(--primary) !important;
  border: none !important;
  font-weight: 600;
}
.btn-accent:hover { background: var(--accent-light) !important; color: var(--primary) !important; }

/* ---------- Hero (glassmorphism ringan) ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #7A1420 60%, #C1272D 100%);
  color: #fff;
  padding: 100px 0 140px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(244,180,0,0.25), transparent 70%);
  top: -150px; right: -100px;
  border-radius: 50%;
}
.hero .tagline {
  font-size: 1.25rem;
  color: var(--accent-light);
  font-weight: 500;
}
.glass-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
}

/* ---------- Stat cards ---------- */
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(183,28,28,0.06);
  border-top: 4px solid var(--accent);
  margin-top: -80px;
  position: relative;
  z-index: 5;
}
[data-theme="dark"] .stat-card { background: var(--card-bg); }
.stat-card .num { font-size: 2rem; font-weight: 700; color: var(--primary); }
[data-theme="dark"] .stat-card .num { color: var(--accent-light); }

/* ---------- General cards ---------- */
.card-soft {
  background: #fff;
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(183,28,28,0.05);
}
[data-theme="dark"] .card-soft { background: var(--card-bg); color: var(--text-dark); }

/* ---------- Sidebar (dashboard) ---------- */
.sidebar {
  background: var(--primary);
  min-height: 100vh;
  color: #fff;
}
.sidebar a {
  color: rgba(255,255,255,0.85);
  padding: .65rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  border-radius: 10px;
  margin: 2px 10px;
  text-decoration: none;
  font-size: .93rem;
}
.sidebar a:hover, .sidebar a.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.sidebar .brand {
  padding: 1.2rem 1.1rem;
  font-size: 1.15rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: .5rem;
}
.sidebar .brand .accent { color: var(--accent-light); }

/* ---------- Badges ---------- */
.badge-status { border-radius: 20px; padding: .4em .8em; font-weight: 600; font-size: .75rem; }

/* ---------- Buttons ---------- */
.btn-primary-siresti {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary-siresti:hover { background: var(--primary-light); color: #fff; }

/* ---------- Progress bar restitusi ---------- */
.progress-siresti { height: 10px; border-radius: 10px; background: #E4E9E6; }
.progress-siresti .bar { background: linear-gradient(90deg, var(--primary), var(--accent)); height: 100%; border-radius: 10px; }

/* ---------- Step wizard ---------- */
.step-indicator { display: flex; gap: 6px; margin-bottom: 1.5rem; }
.step-indicator .step {
  flex: 1; text-align: center; padding: .5rem .25rem;
  border-bottom: 3px solid #DDE3E0; font-size: .78rem; color: #7c8a84;
}
.step-indicator .step.active { border-color: var(--accent); color: var(--primary); font-weight: 700; }
.step-indicator .step.done { border-color: var(--primary); color: var(--primary); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hero { padding: 70px 0 110px; text-align: center; }
  .stat-card { margin-top: 20px; }
}

/* =========================================================
   RESPONSIVE TAMBAHAN — Popup Ajukan Restitusi & Dashboard
   ========================================================= */

/* ---------- Step indicator: rapat & mudah dibaca di layar kecil ---------- */
@media (max-width: 576px) {
  .step-indicator { gap: 2px; margin-bottom: 1rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .step-indicator .step {
    font-size: 0;   /* sembunyikan teks label di HP kecil */
    padding: .5rem .15rem;
    min-width: 32px;
    position: relative;
  }
  .step-indicator .step::before {
    content: attr(data-step);
    font-size: .72rem;
    font-weight: 700;
    display: inline-block;
  }
}
@media (min-width: 577px) and (max-width: 767.98px) {
  .step-indicator .step { font-size: .68rem; padding: .45rem .15rem; }
}

/* ---------- Modal Ajukan Restitusi: nyaman di HP (fullscreen di bawah breakpoint sm) ---------- */
@media (max-width: 575.98px) {
  #modalAjukan .modal-header { padding: .9rem 1rem; }
  #modalAjukan .modal-header h5 { font-size: 1rem; }
  #modalAjukan .modal-body { padding: 1rem !important; }
  #modalAjukan .modal-footer {
    padding: .75rem 1rem;
    position: sticky;
    bottom: 0;
    background: #fff;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
  }
  #modalAjukan .modal-footer .btn { flex: 1; font-size: .85rem; padding: .6rem .5rem; }
  #modalAjukan h6 { font-size: .95rem; }
  #modalAjukan .form-label { font-size: .8rem; }
  #modalAjukan textarea.form-control,
  #modalAjukan input.form-control,
  #modalAjukan select.form-select { font-size: .9rem; }
}

/* Tombol CTA di hero: full-width & mudah di-tap di HP */
@media (max-width: 575.98px) {
  .hero .d-flex.flex-wrap.gap-2 { flex-direction: column; }
  .hero .d-flex.flex-wrap.gap-2 .btn { width: 100%; }
  .navbar-siresti .btn-accent { width: 100%; margin-top: .5rem; }
}

/* ---------- Dashboard internal: sidebar jadi drawer overlay di tablet/HP ---------- */
@media (max-width: 991.98px) {
  .sidebar {
    position: fixed !important;
    left: 0; top: 0;
    width: 82%;
    max-width: 300px;
    z-index: 1045;
    box-shadow: 6px 0 30px rgba(0,0,0,0.35);
    transition: transform .25s ease;
    overflow-y: auto;
  }
  .sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1040;
  }
  .sidebar-backdrop.show { display: block; }
  main.flex-grow-1 { width: 100%; min-width: 0; }
}

/* ---------- Tabel: pastikan scroll horizontal mulus di HP ---------- */
@media (max-width: 576px) {
  .table-responsive { font-size: .82rem; }
  .card-soft, .glass-card { padding: 1rem !important; }
}

/* ---------- Kartu statistik & alur: tetap rapi 1 kolom di HP kecil ---------- */
@media (max-width: 400px) {
  .stat-card .num { font-size: 1.5rem; }
}
