/* =============================================================================
   APDESI PORTAL — STYLESHEET UTAMA
   Asosiasi Pemerintah Desa Seluruh Indonesia
   -----------------------------------------------------------------------------
   Daftar Isi:
   1.  Variabel Desain (Design Tokens)
   2.  Reset & Dasar
   3.  Tipografi
   4.  Layout Umum (Container, Grid)
   5.  Komponen: Tombol (Button)
   6.  Komponen: Form (Input, Select, Checkbox)
   7.  Komponen: Kartu (Card)
   8.  Komponen: Badge / Label Status
   9.  Komponen: Halaman Login
   10. Komponen: Sidebar & Topbar (Portal)
   11. Komponen: Statistik / Ringkasan
   12. Komponen: Tabel
   13. Komponen: Stepper (Form Bertahap)
   14. Komponen: Progress Ring
   15. Komponen: Grafik (Chart) & Legenda
   16. Komponen: Form Wizard (Pendaftaran Bertahap)
   17. Utilitas
   18. Responsif (Media Queries)
   ============================================================================= */


/* -----------------------------------------------------------------------------
   1. VARIABEL DESAIN (DESIGN TOKENS)
   Ubah nilai di sini untuk mengubah tampilan di SELURUH halaman sekaligus.
----------------------------------------------------------------------------- */
:root {
  /* --- Warna Utama: Merah Putih (identitas APDESI) --- */
  --color-red-900: #6E0F1A;
  /* merah gelap — header, sidebar aktif   */
  --color-red-800: #8A1220;
  /* merah tua   — gradient gelap          */
  --color-red-700: #A6172A;
  /* merah sedang                          */
  --color-red-600: #C41E30;
  /* merah utama — tombol, aksen primer    */
  --color-red-500: #E0293C;
  /* merah terang — hover, highlight       */
  --color-red-100: #FCE4E6;
  /* merah sangat muda — background lembut */
  --color-red-50: #FBF3F1;
  /* merah nyaris putih — background halus */

  --color-gold-600: #B8912E;
  /* emas — aksen kehormatan / lambang     */
  --color-gold-100: #F6ECD2;
  /* emas muda — badge / highlight lembut  */

  --color-white: #FFFFFF;
  --color-ink-900: #241C1B;
  /* teks utama, nyaris hitam kehangatan   */
  --color-ink-700: #4A3E3B;
  /* teks sekunder                         */
  --color-ink-500: #8A7A76;
  /* teks placeholder / caption            */
  --color-ink-300: #D8CFC9;
  /* border netral hangat                  */
  --color-ink-100: #F3EEEB;
  /* background netral halus               */
  --color-bg: #FAF7F5;
  /* background halaman                    */

  --color-green-600: #1E8A4C;
  /* status: aktif / terverifikasi         */
  --color-green-100: #E3F5EA;
  --color-amber-600: #B9791A;
  /* status: menunggu                      */
  --color-amber-100: #FBEDD9;
  --color-blue-600: #2A5DAD;
  /* status: informasi                     */
  --color-blue-100: #E7EEF9;

  /* --- Tipografi --- */
  --font-display: "Plus Jakarta Sans", sans-serif;
  --font-body: "Plus Jakarta Sans", sans-serif;
  /* --- Radius & Bayangan --- */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(36, 28, 27, 0.06);
  --shadow-md: 0 6px 20px rgba(110, 15, 26, 0.08);
  --shadow-lg: 0 16px 40px rgba(110, 15, 26, 0.14);

  /* --- Motif garis Merah-Putih (signature APDESI) --- */
  --flag-stripe: linear-gradient(90deg, var(--color-red-600) 0%, var(--color-red-600) 50%, var(--color-white) 50%, var(--color-white) 100%);

  /* --- Spasi --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* --- Transisi --- */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 150ms var(--ease);
  --transition-base: 220ms var(--ease);
}


/* -----------------------------------------------------------------------------
   2. RESET & DASAR
----------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-ink-900);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-family: "Plus Jakarta Sans", sans-serif !important;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

::selection {
  background: var(--color-red-100);
  color: var(--color-red-900);
}

:focus-visible {
  outline: 2px solid var(--color-red-600);
  outline-offset: 2px;
}


/* -----------------------------------------------------------------------------
   3. TIPOGRAFI
----------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-ink-900);
  margin: 0;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 28px;
  line-height: 1.25;
}

h2 {
  font-size: 22px;
  line-height: 1.3;
}

h3 {
  font-size: 17px;
  line-height: 1.35;
}

p {
  margin: 0;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-red-600);
}

.text-muted {
  color: var(--color-ink-500);
}

.text-sm {
  font-size: 13px;
}

.text-xs {
  font-size: 12px;
}


/* -----------------------------------------------------------------------------
   4. LAYOUT UMUM
----------------------------------------------------------------------------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.page-content {
  padding: var(--space-6);
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* Wrapper halaman penuh tanpa sidebar (mis. halaman Pendaftaran) */
.page-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: var(--space-6);
}

@media (max-width: 600px) {
  .page-wrap {
    padding: var(--space-4);
  }
}

.grid {
  display: grid;
  gap: var(--space-5);
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

/* Layout 2 kolom: sidebar tetap (kiri) + konten fleksibel (kanan) — dipakai di halaman Pendaftaran */
/* SESUDAH */
.layout-2col {
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: start;
}
.pendaftaran-sidebar {
  align-self: start !important;
  margin-top: 0 !important;
}

#wizardCard {
  margin-top: 0 !important;
}
/* Layout grafik: kolom lebar (kiri) + kolom sempit (kanan) — dipakai di Dashboard Admin */
.layout-chart {
  grid-template-columns: 1.4fr 1fr;
}

.flex {
  display: flex;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-3 {
  gap: var(--space-3);
}

.gap-4 {
  gap: var(--space-4);
}


/* -----------------------------------------------------------------------------
   5. TOMBOL (BUTTON)
----------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(180deg, var(--color-red-600), var(--color-red-700));
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(180deg, var(--color-red-500), var(--color-red-600));
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: var(--color-white);
  border-color: var(--color-ink-300);
  color: var(--color-ink-900);
}

.btn-outline:hover {
  border-color: var(--color-red-600);
  color: var(--color-red-600);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn-icon-right svg {
  transition: transform var(--transition-fast);
}

.btn-primary:hover .btn-icon-right svg {
  transform: translateX(3px);
}


/* -----------------------------------------------------------------------------
   6. FORM (INPUT, SELECT, CHECKBOX)
----------------------------------------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink-900);
}

.field label .req {
  color: var(--color-red-600);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap .icon {
  position: absolute;
  left: 14px;
  color: var(--color-ink-500);
  display: flex;
}

.input,
select.input,
textarea.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-ink-300);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-ink-900);
  font-family: inherit;
  font-size: 14px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-wrap .icon+.input {
  padding-left: 42px;
}

.input::placeholder {
  color: var(--color-ink-500);
}

.input:focus,
select.input:focus,
textarea.input:focus {
  outline: none;
  border-color: var(--color-red-600);
  box-shadow: 0 0 0 3px var(--color-red-100);
}

.input-toggle-visibility {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--color-ink-500);
  display: flex;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-ink-700);
}

.checkbox-row input {
  accent-color: var(--color-red-600);
  width: 16px;
  height: 16px;
}

.upload-box {
  border: 1.5px dashed var(--color-ink-300);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  text-align: center;
  background: var(--color-red-50);
  color: var(--color-ink-500);
  font-size: 13px;
  transition: border-color var(--transition-fast);
}

.upload-box:hover {
  border-color: var(--color-red-600);
}

.upload-box strong {
  display: block;
  color: var(--color-ink-900);
  font-size: 14px;
  margin-bottom: 2px;
}


/* -----------------------------------------------------------------------------
   7. KARTU (CARD)
----------------------------------------------------------------------------- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-ink-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-pad {
  padding: var(--space-5);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}


/* -----------------------------------------------------------------------------
   8. BADGE / LABEL STATUS
----------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.badge-green {
  background: var(--color-green-100);
  color: var(--color-green-600);
}

.badge-amber {
  background: var(--color-amber-100);
  color: var(--color-amber-600);
}

.badge-blue {
  background: var(--color-blue-100);
  color: var(--color-blue-600);
}

.badge-red {
  background: var(--color-red-100);
  color: var(--color-red-700);
}

.badge-gold {
  background: var(--color-gold-100);
  color: var(--color-gold-600);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}


/* -----------------------------------------------------------------------------
   9. HALAMAN LOGIN
----------------------------------------------------------------------------- */
.login-screen {
  min-height: 100vh;
  display: flex;
}

.login-hero {
  flex: 1.1;
  position: relative;
  background:
    linear-gradient(160deg, var(--color-red-900) 0%, var(--color-red-700) 55%, var(--color-red-600) 100%);
  color: var(--color-white);
  padding: var(--space-8) var(--space-7);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Motif batik parang bergaya — signature visual APDESI */
.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.10;
  background-image: repeating-linear-gradient(45deg,
      var(--color-white) 0px,
      var(--color-white) 2px,
      transparent 2px,
      transparent 34px);
  pointer-events: none;
}

.login-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.10), transparent 70%);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.login-brand .emblem {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.login-brand .emblem svg {
  width: 32px;
  height: 32px;
}

.login-brand .brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.login-brand .brand-sub {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.login-hero-mid {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.login-hero-mid h1 {
  font-family: var(--font-display);
  color: var(--color-white);
  font-size: 34px;
  line-height: 1.25;
  margin-bottom: var(--space-3);
}

.login-hero-mid p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
}

.flag-divider {
  width: 64px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--flag-stripe);
  margin-bottom: var(--space-4);
}

.login-hero-footer {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

.login-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: var(--color-white);
}

.login-form-box {
  width: 100%;
  max-width: 380px;
}

.login-form-box h2 {
  font-size: 26px;
  margin-bottom: 4px;
}

.login-form-box .subtitle {
  margin-bottom: var(--space-6);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-ink-500);
  font-size: 12px;
  margin: var(--space-5) 0;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-ink-300);
}

.login-footer-link {
  text-align: center;
  margin-top: var(--space-6);
  font-size: 13px;
  color: var(--color-ink-700);
}

.login-footer-link a {
  color: var(--color-red-600);
  font-weight: 700;
}


/* -----------------------------------------------------------------------------
   10. SIDEBAR & TOPBAR (PORTAL)
----------------------------------------------------------------------------- */
.sidebar {
  width: 264px;
  flex-shrink: 0;
  background: linear-gradient(190deg, var(--color-red-900), var(--color-red-800) 70%);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--space-5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-brand .emblem {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-brand .emblem svg {
  width: 24px;
  height: 24px;
}

.sidebar-brand .brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}

.sidebar-brand .brand-sub {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-3);
}

.nav-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  padding: var(--space-4) var(--space-3) var(--space-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: background var(--transition-fast);
  position: relative;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
}

.nav-item.active {
  background: var(--color-white);
  color: var(--color-red-700);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.nav-item .count {
  margin-left: auto;
  background: var(--color-gold-600);
  color: var(--color-white);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: var(--radius-full);
}

.nav-item.active .count {
  background: var(--color-red-600);
  color: var(--color-white);
}

.sidebar-footer {
  padding: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-item.logout {
  color: rgba(255, 255, 255, 0.75);
}

.nav-item.logout:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
}

/* Tombol buka/tutup sidebar — hanya tampil di layar tablet ke bawah (lihat bagian 17. RESPONSIF) */
.mobile-menu-btn {
  display: none;
  flex-shrink: 0;
}

/* Lapisan gelap di belakang sidebar saat dibuka pada layar kecil */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(36, 28, 27, 0.5);
  z-index: 40;
}

.sidebar-overlay.open {
  display: block;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-4) var(--space-6);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-ink-100);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.topbar-search .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-ink-500);
}

.topbar-search input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-ink-100);
  background: var(--color-ink-100);
  font-size: 13px;
}

.topbar-search .kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--color-ink-500);
  background: var(--color-white);
  border: 1px solid var(--color-ink-300);
  padding: 2px 6px;
  border-radius: 5px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Judul + subjudul di topbar (mis. "Selamat datang, Admin") — dipotong rapi bila ruang sempit */
.topbar-title {
  min-width: 0;
}

.topbar-title h3,
.topbar-title .text-xs {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-ink-100);
  color: var(--color-ink-700);
}

.icon-btn .dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-red-600);
  border: 2px solid var(--color-white);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-red-100);
}

.user-chip .name {
  font-size: 13px;
  font-weight: 700;
}

.user-chip .role {
  font-size: 11px;
  color: var(--color-ink-500);
}


/* -----------------------------------------------------------------------------
   11. STATISTIK / RINGKASAN
----------------------------------------------------------------------------- */
.stat-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
}

.stat-icon.icon-red {
  background: var(--color-red-100);
  color: var(--color-red-600);
}

.stat-icon.icon-green {
  background: var(--color-green-100);
  color: var(--color-green-600);
}

.stat-icon.icon-amber {
  background: var(--color-amber-100);
  color: var(--color-amber-600);
}

.stat-icon.icon-blue {
  background: var(--color-blue-100);
  color: var(--color-blue-600);
}

.stat-icon.icon-gold {
  background: var(--color-gold-100);
  color: var(--color-gold-600);
}

.stat-label {
  font-size: 12px;
  color: var(--color-ink-500);
  font-weight: 600;
  margin-bottom: 3px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-ink-900);
}

.stat-trend {
  font-size: 11px;
  font-weight: 700;
  margin-top: 3px;
}

.stat-trend.up {
  color: var(--color-green-600);
}

.stat-trend.down {
  color: var(--color-red-600);
}

.hero-welcome {
  background: linear-gradient(120deg, var(--color-red-800), var(--color-red-600));
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  position: relative;
  overflow: hidden;
}

.hero-welcome::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.06) 0px, rgba(255, 255, 255, 0.06) 2px, transparent 2px, transparent 30px);
}

.hero-welcome>* {
  position: relative;
  z-index: 1;
}

.hero-welcome-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-welcome-user img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.4);
  object-fit: cover;
}

.hero-welcome-user .greeting {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.hero-welcome-user .name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}

.hero-welcome-user .meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
}

.progress-card {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  backdrop-filter: blur(6px);
}


/* -----------------------------------------------------------------------------
   12. TABEL
----------------------------------------------------------------------------- */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-500);
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-ink-100);
}

.table td {
  padding: 12px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--color-ink-100);
  color: var(--color-ink-900);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: var(--color-red-50);
}

.table-avatar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-avatar img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.row-menu-btn {
  background: none;
  border: none;
  color: var(--color-ink-500);
  padding: 4px;
  border-radius: 6px;
}

.row-menu-btn:hover {
  background: var(--color-ink-100);
}


/* -----------------------------------------------------------------------------
   13. STEPPER (FORM BERTAHAP)
----------------------------------------------------------------------------- */
.stepper {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: var(--space-3);
  border-radius: var(--radius-md);
}

.step-item.current {
  background: var(--color-red-50);
}

.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--color-ink-100);
  color: var(--color-ink-500);
}

.step-item.current .step-num {
  background: var(--color-red-600);
  color: var(--color-white);
}

.step-item.done .step-num {
  background: var(--color-green-600);
  color: var(--color-white);
}

.step-text .title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-ink-900);
}

.step-text .desc {
  font-size: 12px;
  color: var(--color-ink-500);
}

.security-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--color-green-100);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-top: var(--space-5);
}

.security-note svg {
  color: var(--color-green-600);
  flex-shrink: 0;
  margin-top: 2px;
}

.security-note .title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-green-600);
}

.security-note .desc {
  font-size: 12px;
  color: var(--color-ink-700);
}


/* -----------------------------------------------------------------------------
   14. PROGRESS RING (lingkaran persentase)
----------------------------------------------------------------------------- */
.progress-ring {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.progress-ring svg {
  transform: rotate(-90deg);
}

.progress-ring .ring-bg {
  stroke: rgba(255, 255, 255, 0.25);
  fill: none;
}

.progress-ring .ring-fill {
  stroke: var(--color-white);
  fill: none;
  stroke-linecap: round;
}

.progress-ring .ring-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-white);
}


/* -----------------------------------------------------------------------------
   15. GRAFIK (CHART) & LEGENDA
----------------------------------------------------------------------------- */
.legend-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.legend-item .label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-ink-700);
}

.legend-item .swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-item .value {
  font-weight: 700;
  color: var(--color-ink-900);
}

.donut-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-center {
  position: absolute;
  text-align: center;
}

.donut-center .total-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
}

.donut-center .total-label {
  font-size: 11px;
  color: var(--color-ink-500);
}

.province-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--color-ink-100);
}

.province-row:last-child {
  border-bottom: none;
}

.province-row .value {
  font-weight: 700;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-ink-100);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-red-100);
  color: var(--color-red-600);
  flex-shrink: 0;
}

.activity-icon svg {
  width: 16px;
  height: 16px;
}

.activity-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink-900);
}

.activity-time {
  font-size: 11px;
  color: var(--color-ink-500);
  margin-top: 2px;
}


/* -----------------------------------------------------------------------------
   16. KOMPONEN: FORM WIZARD (PENDAFTARAN BERTAHAP)
   Dipakai di pendaftaran.html. Setiap "langkah" adalah elemen dengan
   class .form-step; JS menambah/menghapus class .is-active untuk
   menampilkan satu langkah pada satu waktu.
----------------------------------------------------------------------------- */

/* Setiap panel langkah disembunyikan secara default, hanya yang .is-active tampil */
.form-step {
  display: none;
}

.form-step.is-active {
  display: block;
  animation: stepIn 260ms var(--ease);
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Progress horizontal ringkas (dipakai di atas kartu form, & tampil penuh di mobile) --- */
.wizard-progress {
  display: none;
  /* ditampilkan lewat media query di bagian 18. RESPONSIF, untuk tablet/HP */
  align-items: flex-start;
  margin-bottom: var(--space-6);
}

.wizard-progress .wp-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
  text-align: center;
}

.wizard-progress .wp-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--color-ink-100);
  color: var(--color-ink-500);
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  z-index: 1;
}

.wizard-progress .wp-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-ink-500);
  max-width: 90px;
}

/* garis penghubung antar-lingkaran */
.wizard-progress .wp-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  left: calc(50% + 22px);
  right: calc(-50% + 22px);
  height: 2px;
  background: var(--color-ink-100);
  z-index: 0;
}

.wizard-progress .wp-step.done:not(:last-child)::after {
  background: var(--color-green-600);
}

.wizard-progress .wp-step.current .wp-circle {
  background: var(--color-red-600);
  color: var(--color-white);
  border-color: var(--color-red-100);
  box-shadow: 0 0 0 4px var(--color-red-100);
}

.wizard-progress .wp-step.current .wp-label {
  color: var(--color-red-600);
}

.wizard-progress .wp-step.done .wp-circle {
  background: var(--color-green-600);
  color: var(--color-white);
}

.wizard-progress .wp-step.done .wp-label {
  color: var(--color-ink-900);
}

/* --- Validasi: state error pada field --- */
.field-error-msg {
  display: none;
  font-size: 12px;
  color: var(--color-red-600);
  font-weight: 600;
  gap: 5px;
  align-items: center;
}

.field.has-error label {
  color: var(--color-red-600);
}

.field.has-error .input,
.field.has-error select.input,
.field.has-error textarea.input,
.field.has-error .upload-box {
  border-color: var(--color-red-600);
  background: var(--color-red-50);
}

.field.has-error .field-error-msg {
  display: flex;
}

/* --- Upload file: input asli disembunyikan, kotak jadi tombol klik --- */
.upload-box {
  cursor: pointer;
  position: relative;
}

.upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-box.has-file {
  border-style: solid;
  border-color: var(--color-green-600);
  background: var(--color-green-100);
  color: var(--color-ink-900);
}

.upload-box .upload-filename {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  color: var(--color-green-600);
}

/* --- Radio pilihan bergaya kartu (status domisili, dsb.) --- */
.radio-card-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.radio-card {
  border: 1.5px solid var(--color-ink-300);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink-700);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.radio-card input {
  display: none;
}

.radio-card:has(input:checked) {
  border-color: var(--color-red-600);
  background: var(--color-red-50);
  color: var(--color-red-700);
}

/* --- Ringkasan (langkah "Tinjau & Konfirmasi") --- */
.review-block {
  margin-bottom: var(--space-5);
}

.review-block:last-child {
  margin-bottom: 0;
}

.review-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-red-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-ink-100);
}

.review-block-title a {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
  color: var(--color-ink-700);
}

.review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 8px 0;
  font-size: 13px;
}

.review-row .label {
  color: var(--color-ink-500);
}

.review-row .value {
  font-weight: 700;
  color: var(--color-ink-900);
  text-align: right;
}

.agreement-box {
  background: var(--color-ink-100);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-top: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.agreement-box.has-error {
  border-color: var(--color-red-600);
  background: var(--color-red-50);
}

.agreement-box .checkbox-row {
  align-items: flex-start;
}

.agreement-box .checkbox-row input {
  margin-top: 3px;
  flex-shrink: 0;
}

/* --- Tombol navigasi bawah form --- */
.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-6);
  gap: var(--space-3);
}

/* --- Layar sukses setelah pendaftaran diajukan --- */
.success-screen {
  text-align: center;
  padding: 45px;
}

.success-icon {
  width: 85px;
  height: 85px;
  margin: auto;
  border-radius: 50%;
  background: #eaf8ef;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

.success-screen h2 {
  margin-bottom: 10px;
  font-size: 28px;
  font-weight: 700;
}

.success-desc {
  max-width: 520px;
  margin: auto;
  color: #6b7280;
  margin-bottom: 30px;
  line-height: 1.7;
}

.credential-box {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  margin: 25px auto;
  max-width: 520px;
  background: #fff;
}

.credential-item {
  padding: 18px 22px;
  border-bottom: 1px solid #eee;
}

.credential-item:last-child {
  border-bottom: none;
}

.credential-item label {
  display: block;
  text-align: left;
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 8px;
  font-weight: 600;
}

.credential-value {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.credential-value span {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  word-break: break-all;
}

.copy-btn {
  border: none;
  background: #f3f4f6;
  color: #dc2626;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  transition: .25s;
}

.copy-btn:hover {
  background: #fee2e2;
}

.credential-note {
  max-width: 520px;
  margin: 20px auto;
  background: #fff7ed;
  color: #92400e;
  border: 1px solid #fdba74;
  padding: 15px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.success-actions {
  max-width: 520px;
  margin: 30px auto 0;
  display: flex;
  gap: 15px;
}

.success-actions .btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
}

@media (max-width:576px) {

  .success-actions {
    flex-direction: column;
  }

}

/* -----------------------------------------------------------------------------
   17. UTILITAS
----------------------------------------------------------------------------- */
.mb-1 {
  margin-bottom: var(--space-1);
}

.mb-2 {
  margin-bottom: var(--space-2);
}

.mb-3 {
  margin-bottom: var(--space-3);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mb-5 {
  margin-bottom: var(--space-5);
}

.mb-6 {
  margin-bottom: var(--space-6);
}

.w-full {
  width: 100%;
}

/* Bungkus elemen <table> dengan <div class="table-scroll"> agar bisa digeser
   ke samping di layar sempit, tanpa merusak tata letak kolom tabel. */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll .table {
  min-width: 640px;
}


/* -----------------------------------------------------------------------------
   18. RESPONSIF
   Pendekatan: desktop-first, dipecah dalam 5 breakpoint umum.
   1280px → laptop kecil / netbook
   1024px → tablet lanskap (iPad, dsb.)
    768px → tablet potret
    600px → HP besar / phablet
    380px → HP kecil
----------------------------------------------------------------------------- */

/* ===== 1280px ke bawah — laptop kecil ===== */
@media (max-width: 1280px) {
  .grid-cols-5 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .layout-chart {
    grid-template-columns: 1fr;
  }
}

/* ===== 1024px ke bawah — tablet lanskap ===== */
@media (max-width: 1024px) {
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .layout-2col {
    grid-template-columns: 240px 1fr;
  }

  .page-content {
    padding: var(--space-5);
  }
}

/* ===== 768px ke bawah — tablet potret & mulai mode sidebar-tersembunyi ===== */
@media (max-width: 768px) {

  /* Sidebar berubah jadi panel geser (off-canvas), disembunyikan secara default */
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    z-index: 50;
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-lg);
    width: 264px;
    max-width: 82vw;
  }

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

  /* Tombol hamburger untuk membuka sidebar jadi terlihat */
  .mobile-menu-btn {
    display: flex;
  }

  /* Halaman login: hero merah disembunyikan, form login jadi satu-satunya konten */
  .login-hero {
    display: none;
  }

  .login-panel {
    padding: var(--space-5) var(--space-4);
  }

  /* Semua grid multi-kolom melebur jadi satu kolom */
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4,
  .grid-cols-5,
  .layout-2col,
  .layout-chart {
    grid-template-columns: 1fr;
  }

  /* Sidebar pada halaman Pendaftaran tak perlu lagi menempel (sticky) saat sudah full-width */
  .pendaftaran-sidebar {
    position: static;
  }

  /* Sidebar langkah versi lengkap (deskriptif) disembunyikan; progress ringkas di atas form yang tampil */
  .pendaftaran-sidebar .stepper {
    display: none;
  }

  .wizard-progress {
    display: flex;
  }

  /* Kolom kontak pada kartu Informasi Pribadi (dashboard.html) kehilangan garis pemisah kiri saat menumpuk */
  .grid-cols-3>div[style*="border-left"] {
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 1px solid var(--color-ink-100);
    padding-top: var(--space-4);
    margin-top: var(--space-2);
  }

  .topbar-search {
    display: none;
  }

  .topbar {
    padding: var(--space-3) var(--space-4);
  }

  /* Sambutan besar di dashboard menumpuk vertikal & rapi */
  .hero-welcome {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
  }

  .progress-card {
    width: 100%;
  }
}

/* ===== 600px ke bawah — HP besar / phablet ===== */
@media (max-width: 600px) {
  .page-content {
    padding: var(--space-4);
  }

  h1 {
    font-size: 23px;
  }

  h2 {
    font-size: 19px;
  }

  h3 {
    font-size: 16px;
  }

  /* Kartu & form tidak butuh padding sebesar versi desktop */
  .card-pad {
    padding: var(--space-4);
  }

  /* Sambutan pengguna: avatar & teks lebih ringkas */
  .hero-welcome-user img {
    width: 52px;
    height: 52px;
  }

  .hero-welcome-user .name {
    font-size: 19px;
  }

  /* Nama & peran pengguna di topbar disembunyikan, sisakan foto profil saja */
  .user-chip .name,
  .user-chip .role {
    display: none;
  }

  .user-chip img {
    width: 34px;
    height: 34px;
  }

  /* Tombol & input tetap nyaman disentuh jari (target ≥44px) */
  .btn {
    padding: 12px 16px;
    /* min-height: 44px; */
  }

  .input,
  select.input,
  textarea.input {
    padding: 12px 14px;
    min-height: 44px;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }

  /* Form pendaftaran: dua kolom field jadi satu kolom penuh */
  .step-item .desc {
    display: none;
  }

  /* Statistik ringkasan jadi satu kolom penuh agar angka tetap terbaca jelas */
  .stat-card {
    padding: var(--space-3) var(--space-4);
  }

  .stat-value {
    font-size: 20px;
  }

  /* Tabel & grafik SVG lebar penuh bisa digeser bila kepenuhan */
  .chart-area {
    height: 180px;
  }

  .login-form-box h2 {
    font-size: 22px;
  }

  .flag-divider {
    margin-bottom: var(--space-3);
  }

  /* Wizard: label tiap langkah pada progress ringkas disembunyikan, sisakan lingkaran angka */
  .wizard-progress .wp-label {
    display: none;
  }

  .wizard-progress .wp-circle {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .wizard-progress .wp-step:not(:last-child)::after {
    top: 15px;
  }

  /* Pilihan berbentuk kartu (mis. status tempat tinggal) ditumpuk 1 kolom */
  .radio-card-group {
    grid-template-columns: 1fr;
  }

  /* Tombol Kembali / Lanjutkan melebar penuh dan ditumpuk di layar sempit */
  .wizard-actions {
    flex-direction: column-reverse;
  }

  .wizard-actions .btn {
    width: 100%;
  }

  .review-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .review-row .value {
    text-align: left;
  }
}

/* ===== 380px ke bawah — HP kecil ===== */
@media (max-width: 380px) {
  .page-content {
    padding: var(--space-3);
  }

  .card-pad {
    padding: var(--space-3);
  }

  .sidebar-brand .brand-name {
    font-size: 14px;
  }

  .stat-card {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .topbar-actions {
    gap: var(--space-2);
  }

  .topbar-title .text-xs {
    display: none;
  }
}

/* ===== Aksesibilitas: hormati preferensi kurangi gerak ===== */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

.dob-select-group {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 8px;
}