/* ========================================
   BILLING RW 10 — Design System v3.1
   Premium Light Mode · Green Sidebar
   SukaWarga10 Design System
   ======================================== */

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

/* === CSS Variables === */
:root {
  --hijau: #0F7A4D;
  /* Deeper, more premium emerald green */
  --hijau-muda: #10B981;
  --hijau-pale: #ECFDF5;
  --emas: #F59E0B;
  /* Richer gold */
  --emas-muda: #FEF3C7;
  --merah: #EF4444;
  /* Vivid red for alerts */
  --merah-pale: #FEF2F2;
  --biru: #3B82F6;
  /* Modern crisp blue */
  --biru-pale: #EFF6FF;
  --ungu: #8B5CF6;
  --ungu-pale: #F5F3FF;
  --abu: #F8FAFC;
  /* Softer sleek background */
  --abu2: #E2E8F0;
  --abu3: #CBD5E1;
  --text: #0F172A;
  /* Slate-like premium dark text */
  --text2: #334155;
  --text3: #64748B;
  --white: #FFFFFF;
  --sidebar-w: 260px;
  /* Slightly wider sidebar */
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 14px 28px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.08);
  /* Premium hover shadow */
  --border: 1px solid rgba(226, 232, 240, 0.8);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: 1px solid rgba(255, 255, 255, 0.4);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  background: var(--abu);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.5;
}

/* === Font Harmonization === */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  line-height: 1.3;
}

h1 {
  font-size: 20px;
  font-weight: 800;
}

h2 {
  font-size: 17px;
  font-weight: 700;
}

h3 {
  font-size: 14px;
  font-weight: 700;
}

/* Monetary / numeric values only */
.td-mono,
.stat-value,
.laporan-banner .banner-amount,
.iuran-summary-value {
  font-family: 'Space Mono', monospace;
}

/* Ensure all buttons, labels, badges use standard font */
.btn,
.badge,
.nav-item,
.filter-chip,
.form-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.text-success {
  color: var(--hijau);
}

.text-danger {
  color: var(--merah);
}

.text-warning {
  color: var(--emas);
}

.text-green {
  color: var(--hijau);
}

a {
  color: var(--hijau);
  text-decoration: none;
  cursor: pointer;
}

input,
select,
textarea,
button {
  font-family: inherit;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--abu3);
  border-radius: 4px;
}

/* === Layout === */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === Sidebar === */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  background: linear-gradient(160deg, var(--hijau) 0%, #065F38 100%);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  /* Smoother pop-in */
  overflow: hidden;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
}

.sidebar::before {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

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

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--emas);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.sidebar-logo-title {
  color: white;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.3px;
  display: block;
}

.sidebar-logo-subtitle {
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  display: block;
}

.sidebar-rw-badge {
  margin: 10px 12px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 12px;
  text-align: center;
}

.sidebar-rw-badge .rw-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.sidebar-rw-badge .rw-name {
  color: white;
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.nav-section-label {
  color: rgba(255, 255, 255, 0.4);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 14px 12px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 3px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: rgba(255, 255, 255, 0.75);
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
  min-height: 44px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateX(4px);
}

.nav-item.active {
  background: white;
  color: var(--hijau);
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.nav-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--emas);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
}

.nav-item.active .nav-badge {
  background: var(--hijau);
}

.nav-notif {
  width: 7px;
  height: 7px;
  background: var(--emas);
  border-radius: 50%;
  position: absolute;
  top: 9px;
  right: 10px;
  border: 2px solid var(--hijau);
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  background: var(--emas);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.sidebar-user-name {
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-user-role {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
}

/* === Top Header === */
.top-header {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: var(--border);
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.mobile-menu-btn:hover {
  background: var(--abu);
}

.page-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.page-subtitle {
  font-size: 11px;
  color: var(--text3);
  margin-top: 1px;
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search {
  position: relative;
}

.header-search input {
  background: var(--white);
  border: 1px solid rgba(203, 213, 225, 0.6);
  border-radius: 24px;
  /* Pill shape */
  padding: 9px 16px 9px 38px;
  color: var(--text);
  width: 220px;
  font-size: 13px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.header-search input:focus {
  border-color: var(--hijau-muda);
  background: white;
  width: 300px;
  box-shadow: 0 0 0 4px var(--hijau-pale);
}

.header-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  pointer-events: none;
  color: var(--text3);
}

.header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--hijau);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: white;
  cursor: pointer;
}

/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 280px;
  overflow-y: auto;
  z-index: 200;
  display: none;
}

.search-dropdown.show {
  display: block;
}

.search-dropdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: var(--border);
  min-height: 42px;
}

.search-dropdown-item:hover {
  background: var(--abu);
}

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

/* === Page Content === */
.page-content {
  padding: 20px 24px;
  flex: 1;
  padding-bottom: 24px;
}

/* === Bottom Nav (Mobile) === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 58px;
  z-index: 100;
  background: var(--white);
  border-top: var(--border);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
}

.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--text3);
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: none;
  padding: 5px 0;
  min-height: 44px;
}

.bnav-item.active {
  color: var(--hijau);
}

.bnav-icon {
  font-size: 1.15rem;
  margin-bottom: 2px;
}

.bnav-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* === ALERT === */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 20px;
  line-height: 1.5;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

.alert::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.alert-warn {
  background: var(--emas-muda);
  color: #7A5200;
}

.alert-warn::before {
  background: var(--emas);
}

.alert-danger {
  background: var(--merah-pale);
  color: #8B1A1A;
}

.alert-danger::before {
  background: var(--merah);
}

.alert-info {
  background: var(--biru-pale);
  color: #1B3F8B;
}

.alert-info::before {
  background: var(--biru);
}

.alert-success {
  background: var(--hijau-pale);
  color: #145A33;
}

.alert-success::before {
  background: var(--hijau);
}

/* === Stat Cards === */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: var(--border);
  z-index: 1;
  /* For hover pseudo-element stacking */
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

.stat-accent {
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  border-radius: 0 var(--radius) 0 50%;
  opacity: 0.1;
}

.stat-card.green .stat-accent {
  background: var(--hijau);
}

.stat-card.gold .stat-accent {
  background: var(--emas);
}

.stat-card.red .stat-accent {
  background: var(--merah);
}

.stat-card.blue .stat-accent {
  background: var(--biru);
}

.stat-card.purple .stat-accent {
  background: var(--ungu);
}

.stat-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}

.stat-card.green .stat-icon-box {
  background: var(--hijau-pale);
}

.stat-card.gold .stat-icon-box {
  background: var(--emas-muda);
}

.stat-card.red .stat-icon-box {
  background: var(--merah-pale);
}

.stat-card.blue .stat-icon-box {
  background: var(--biru-pale);
}

.stat-card.purple .stat-icon-box {
  background: var(--ungu-pale);
}

.stat-label {
  font-size: 11px;
  color: var(--text3);
  font-weight: 600;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  font-family: 'Space Mono', monospace;
  line-height: 1.2;
}

.stat-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 3px;
}

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

.stat-trend.up {
  color: var(--hijau-muda);
}

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

.stat-trend.neutral {
  color: var(--text3);
}

/* === Page Card === */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: var(--border);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

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

.card-sub {
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 14px;
}

/* === Laporan Header Banner === */
.laporan-banner {
  background: linear-gradient(135deg, var(--hijau), #0F5C31);
  border-radius: var(--radius);
  padding: 22px;
  color: white;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.laporan-banner::after {
  content: '📊';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 56px;
  opacity: 0.12;
  pointer-events: none;
}

.laporan-banner h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 2px;
}

.laporan-banner p {
  font-size: 12px;
  opacity: 0.65;
}

.laporan-banner .banner-amount {
  font-size: 30px;
  font-weight: 800;
  font-family: 'Space Mono', monospace;
  margin-top: 10px;
}

.laporan-banner .banner-sub {
  font-size: 11px;
  opacity: 0.58;
}

/* === Grid Layouts === */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.grid-3-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* === Progress Bar (RT) === */
.rt-item {
  margin-bottom: 14px;
}

.rt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.rt-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.rt-count {
  font-size: 12px;
  color: var(--text3);
}

.progress-bar {
  height: 7px;
  background: var(--abu2);
  border-radius: 20px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 20px;
  transition: width 1s ease;
}

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

.progress-fill.gold {
  background: linear-gradient(90deg, #D68A0A, var(--emas));
}

.progress-fill.red {
  background: linear-gradient(90deg, #C93030, var(--merah));
}

.progress-fill.blue {
  background: linear-gradient(90deg, #1B56D4, var(--biru));
}

.rt-detail {
  font-size: 11px;
  color: var(--text3);
  margin-top: 3px;
}

/* === Mini Bar Chart === */
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 60px;
  margin: 10px 0;
}

.mini-bar {
  flex: 1;
  background: var(--hijau-pale);
  border-radius: 4px 4px 0 0;
  transition: background 0.2s;
  cursor: pointer;
}

.mini-bar:hover,
.mini-bar.current {
  background: var(--hijau);
}

.mini-chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text3);
}

/* === Laporan Summary Bar === */
.summary-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.summary-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border: var(--border);
  text-align: center;
}

.summary-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.summary-value {
  font-size: 18px;
  font-weight: 800;
  font-family: 'Space Mono', monospace;
}

.summary-value.green {
  color: var(--hijau);
}

.summary-value.red {
  color: var(--merah);
}

.summary-value.blue {
  color: var(--biru);
}

.summary-value.gold {
  color: var(--emas);
}

/* === Laporan Chart Bar === */
.chart-bar-container {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 12px 0 0;
  min-height: 140px;
}

.chart-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.chart-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: opacity 0.2s;
  cursor: pointer;
  min-height: 2px;
}

.chart-bar:hover {
  opacity: 0.8;
}

.chart-bar.emerald {
  background: linear-gradient(180deg, var(--hijau), var(--hijau-muda));
}

.chart-bar.rose {
  background: linear-gradient(180deg, var(--merah), #FF7B7B);
}

.chart-bar-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text3);
  margin-top: 4px;
  text-align: center;
}

/* === Report Section Cards === */
.report-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.report-kpi {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: var(--border);
  text-align: center;
  transition: transform 0.2s;
}

.report-kpi:hover {
  transform: translateY(-2px);
}

.report-kpi-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.report-kpi-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  font-family: 'Space Mono', monospace;
}

.report-kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* === Laporan Status Cards (Lunas/Cicilan/Belum) === */
.status-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.status-summary-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid;
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-summary-card.lunas {
  border-color: var(--hijau);
}

.status-summary-card.cicilan {
  border-color: var(--emas);
}

.status-summary-card.belum {
  border-color: var(--merah);
}

.status-summary-card .status-icon {
  font-size: 28px;
}

.status-summary-card .status-info .status-count {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.status-summary-card .status-info .status-label {
  font-size: 11px;
  color: var(--text3);
  font-weight: 600;
}

.status-summary-card.lunas .status-count {
  color: var(--hijau);
}

.status-summary-card.cicilan .status-count {
  color: var(--emas);
}

.status-summary-card.belum .status-count {
  color: var(--merah);
}

/* === Chart Legend === */
.chart-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text2);
}

.chart-legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 4px;
}

/* === Logout Button === */
.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: all 0.2s;
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.btn-logout:hover {
  background: rgba(255, 60, 60, 0.15);
  color: #FF6B6B;
  border-color: rgba(255, 60, 60, 0.3);
}

/* === Quick Stats Row (Dashboard) === */
.quick-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.quick-stat {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  border: var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.quick-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.quick-stat-info {
  flex: 1;
}

.quick-stat-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.quick-stat-label {
  font-size: 11px;
  color: var(--text3);
}

/* === List Items (Transaksi) === */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: var(--border);
  cursor: pointer;
  transition: all 0.15s;
}

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

.list-item:hover {
  background: var(--abu);
  margin: 0 -10px;
  padding: 10px;
  border-radius: 8px;
  border-bottom: none;
}

.list-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--abu2);
}

.list-info {
  flex: 1;
  min-width: 0;
}

.list-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-meta {
  font-size: 11px;
  color: var(--text3);
}

.list-amount {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.list-amount.pos {
  color: var(--hijau);
}

.list-amount.neg {
  color: var(--merah);
}

/* === Warga Cards Grid === */
.warga-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.warga-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s;
  border: 1.5px solid transparent;
}

.warga-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--hijau);
}

.warga-card-add {
  border: 2px dashed var(--abu2);
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  min-height: 80px;
}

.warga-card-add:hover {
  border-color: var(--hijau);
  background: var(--hijau-pale);
  box-shadow: none;
}

.warga-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.warga-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.warga-nokk {
  font-size: 10px;
  font-family: 'Space Mono', monospace;
  color: var(--text3);
  margin-top: 1px;
  letter-spacing: 0.3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warga-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.warga-kk {
  font-size: 11px;
  color: var(--text3);
}

.warga-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.warga-stat {
  background: var(--abu);
  border-radius: 8px;
  padding: 7px 9px;
}

.warga-stat-label {
  font-size: 9px;
  color: var(--text3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.warga-stat-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-top: 1px;
}

/* === Table === */
.data-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  background: var(--abu);
  padding: 9px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  border-bottom: var(--border);
}

.data-table td {
  padding: 11px 12px;
  border-bottom: var(--border);
  color: var(--text);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: var(--abu);
}

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

.td-mono {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
}

.td-click {
  cursor: pointer;
  font-weight: 600;
  color: var(--hijau);
}

.td-click:hover {
  text-decoration: underline;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  min-height: 36px;
}

.btn-primary {
  background: var(--hijau);
  color: white;
}

.btn-primary:hover {
  background: #156b3d;
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--white);
  color: var(--text);
  border: 1.5px solid var(--abu2);
}

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

.btn-danger {
  background: var(--merah);
  color: white;
}

.btn-danger:hover {
  background: #C93030;
}

.btn-success {
  background: var(--hijau);
  color: white;
}

.btn-warning {
  background: var(--emas);
  color: #7A5200;
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12px;
  border-radius: 8px;
  min-height: 30px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 14px;
  min-height: 46px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* === Toolbar === */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === Filter Chips === */
.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.filter-chip {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--abu2);
  background: var(--white);
  color: var(--text3);
  transition: all 0.18s;
}

.filter-chip:hover {
  border-color: var(--hijau);
  color: var(--hijau);
}

.filter-chip.active {
  background: var(--hijau);
  color: white;
  border-color: var(--hijau);
}

/* === Filter Select === */
.filter-select {
  background: var(--white);
  border: 1.5px solid var(--abu2);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  min-height: 36px;
  outline: none;
}

.filter-select:focus {
  border-color: var(--hijau);
}

/* === Forms === */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 5px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 13px;
  background: var(--white);
  border: 1.5px solid var(--abu2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  transition: border-color 0.2s;
  outline: none;
  min-height: 40px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--hijau);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.form-hint {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

/* === Stepper === */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 20px;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stepper-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--abu2);
  color: var(--text3);
  border: 2px solid var(--abu2);
  transition: all 0.3s;
}

.stepper-label {
  font-size: 12px;
  color: var(--text3);
}

.stepper-line {
  width: 48px;
  height: 2px;
  background: var(--abu2);
  margin: 0 8px;
}

.stepper-step.active .stepper-circle {
  background: var(--hijau);
  border-color: var(--hijau);
  color: white;
}

.stepper-step.active .stepper-label {
  color: var(--hijau);
  font-weight: 700;
}

.stepper-step.completed .stepper-circle {
  background: var(--hijau-muda);
  border-color: var(--hijau-muda);
  color: white;
}

.stepper-line.completed {
  background: var(--hijau-muda);
}

/* === Badge === */
.badge {
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.badge-green {
  background: var(--hijau-pale);
  color: var(--hijau);
}

.badge-gold {
  background: var(--emas-muda);
  color: #B87800;
}

.badge-red {
  background: var(--merah-pale);
  color: var(--merah);
}

.badge-blue {
  background: var(--biru-pale);
  color: var(--biru);
}

.badge-gray {
  background: var(--abu2);
  color: var(--text3);
}

.badge-purple {
  background: var(--ungu-pale);
  color: var(--ungu);
}

/* === Tag Chip === */
.tag-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--ungu-pale);
  color: var(--ungu);
  border: 1px solid rgba(124, 58, 237, 0.15);
}

.tag-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--white);
  border: 1.5px solid var(--abu2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  color: var(--text2);
  min-height: 40px;
}

.tag-checkbox input {
  accent-color: var(--hijau);
}

/* === Tabs === */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: var(--border);
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  padding: 11px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text3);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.18s;
  min-height: 42px;
  font-family: inherit;
}

.tab-btn:hover {
  color: var(--hijau);
}

.tab-btn.active {
  color: var(--hijau);
  border-bottom-color: var(--hijau);
}

/* === Search Bar (Warga) === */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--abu);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  border: 1.5px solid var(--abu2);
  transition: border-color 0.2s;
}

.search-bar:focus-within {
  border-color: var(--hijau);
  background: white;
}

.search-bar input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
  flex: 1;
}

/* === Billing Grid === */
.billing-grid-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.billing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.billing-table th {
  background: var(--abu);
  padding: 8px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text3);
  font-weight: 700;
  border-bottom: var(--border);
  text-align: center;
  white-space: nowrap;
}

.billing-table th:first-child,
.billing-table th:nth-child(2),
.billing-table th:nth-child(3) {
  text-align: left;
}

.billing-table td {
  padding: 7px 6px;
  border-bottom: var(--border);
  text-align: center;
  vertical-align: middle;
  font-size: 13px;
}

.billing-table td:first-child,
.billing-table td:nth-child(2),
.billing-table td:nth-child(3) {
  text-align: left;
  white-space: nowrap;
}

.billing-table tr:hover td {
  background: var(--abu);
}

.billing-cell {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--merah-pale);
  color: var(--merah);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.15s;
  border: 1.5px solid rgba(232, 64, 64, 0.15);
}

.billing-cell:hover {
  transform: scale(1.18);
}

.billing-cell.paid {
  background: var(--hijau-pale);
  color: var(--hijau);
  border-color: rgba(27, 138, 78, 0.2);
}

.billing-cell.dispensasi {
  background: var(--emas-muda);
  color: #7A5A00;
  border-color: rgba(245, 166, 35, 0.3);
  font-size: 13px;
}

/* === Billing Cards (Mobile) === */
.billing-cards {
  display: none;
}

.billing-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.billing-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.billing-card-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.billing-card-rt {
  font-size: 12px;
  color: var(--text3);
}

.billing-card-status {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
}

.billing-card-btn {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  min-height: 42px;
  font-family: inherit;
}

.billing-card-btn.pay {
  background: var(--hijau);
  color: white;
}

.billing-card-btn.paid-btn {
  background: var(--hijau-pale);
  color: var(--hijau);
  border: 1.5px solid rgba(27, 138, 78, 0.2);
}

/* === Iuran Dot Indicators === */
.iuran-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.iuran-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  transition: transform 0.15s;
}

.iuran-dot:hover {
  transform: scale(1.3);
}

.iuran-dot.lunas {
  background: var(--hijau-muda);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.iuran-dot.belum {
  background: var(--abu2);
  border: 1.5px solid var(--abu3);
}

.iuran-dot.dispensasi {
  background: var(--emas);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

/* === Iuran Summary Row === */
.iuran-summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.iuran-summary-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  border: var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}

.iuran-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.iuran-summary-icon {
  font-size: 22px;
}

.iuran-summary-value {
  font-size: 20px;
  font-weight: 800;
  font-family: 'Space Mono', monospace;
  color: var(--text);
  line-height: 1.2;
}

.iuran-summary-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  margin-top: 1px;
}

.iuran-summary-card.green {
  border-left: 3px solid var(--hijau);
}

.iuran-summary-card.red {
  border-left: 3px solid var(--merah);
}

.iuran-summary-card.blue {
  border-left: 3px solid var(--biru);
}

/* === Toolbar Search Input === */
.toolbar-search {
  position: relative;
}

.toolbar-search input {
  min-width: 180px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
}

@media (max-width: 768px) {
  .iuran-summary-row {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }

  .iuran-summary-card {
    flex-direction: column;
    text-align: center;
    padding: 12px 8px;
    gap: 4px;
  }

  .iuran-summary-value {
    font-size: 16px;
  }

  .toolbar-search input {
    min-width: 120px;
    width: 100%;
  }
}

.mini-grid {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.mini-cell {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  background: var(--merah-pale);
  color: var(--merah);
  border: 1px solid rgba(232, 64, 64, 0.12);
}

.mini-cell.paid {
  background: var(--hijau-pale);
  color: var(--hijau);
  border-color: rgba(27, 138, 78, 0.2);
}

/* === Summary Cards === */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.summary-card {
  background: var(--white);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
  text-align: center;
  border: var(--border);
}

.sc-icon {
  font-size: 22px;
  margin-bottom: 6px;
}

.sc-label {
  font-size: 11px;
  color: var(--text3);
  font-weight: 500;
}

.sc-value {
  font-size: 17px;
  font-weight: 800;
  font-family: 'Space Mono', monospace;
  margin-top: 4px;
}

/* === Quick Actions === */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.quick-btn {
  background: var(--white);
  border: 1.5px solid var(--abu2);
  border-radius: var(--radius);
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-btn:hover {
  border-color: var(--hijau);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.quick-btn .qicon {
  font-size: 22px;
  display: block;
  margin-bottom: 5px;
}

.quick-btn .qlabel {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
}

/* === WA Preview === */
.wa-preview {
  background: #E5DDD5;
  /* WhatsApp light web background */
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h20v20H0V0zm10 17a7 7 0 1 0 0-14 7 7 0 0 0 0 14z' fill='%23000000' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.wa-bubble {
  background: #D9FDD3;
  /* WhatsApp light mode outgoing bubble color */
  border-radius: 8px 0 8px 8px;
  /* Sharper top-right corner like WA */
  padding: 8px 12px 12px;
  max-width: 90%;
  margin-left: auto;
  font-size: 13.5px;
  color: #111B21;
  /* Dark text for high contrast */
  line-height: 1.45;
  white-space: pre-line;
  word-break: break-word;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  position: relative;
}

.wa-time {
  text-align: right;
  font-size: 10.5px;
  color: rgba(17, 27, 33, 0.6);
  margin-top: 4px;
  margin-right: -4px;
}

/* === Kwitansi === */
.kwitansi-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius);
  border: var(--border);
  box-shadow: var(--shadow);
}

.kwitansi-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.kwitansi-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.kwitansi-subtitle {
  font-size: 12px;
  color: var(--text3);
}

.kwitansi-divider {
  height: 2px;
  background: linear-gradient(90deg, var(--hijau), var(--hijau-muda));
  margin: 14px 0;
  border-radius: 2px;
}

.kwitansi-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--abu2);
  font-size: 13px;
}

.kwitansi-label {
  color: var(--text3);
  font-weight: 500;
}

.kwitansi-value {
  color: var(--text);
  font-weight: 600;
}

.kwitansi-amount-box {
  margin: 14px 0 8px;
  padding: 14px;
  background: var(--hijau-pale);
  border: 2px solid var(--hijau);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kwitansi-amount-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--hijau);
}

.kwitansi-amount-value {
  font-size: 20px;
  font-weight: 900;
  color: var(--hijau);
  font-family: 'Space Mono', monospace;
}

.kwitansi-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 28px;
}

.kwitansi-sign {
  text-align: center;
  min-width: 100px;
}

.kwitansi-sign-label {
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 42px;
}

.kwitansi-sign-line {
  border-bottom: 1px solid var(--text);
  margin-bottom: 3px;
  width: 100px;
}

.kwitansi-sign-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.kwitansi-stamp {
  font-size: 14px;
  font-weight: 900;
  color: var(--hijau);
  border: 3px solid var(--hijau);
  border-radius: 8px;
  padding: 7px 12px;
  transform: rotate(-8deg);
  letter-spacing: 0.1em;
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  backdrop-filter: blur(2px);
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
  box-shadow: var(--shadow-lg);
}

.modal-xl {
  max-width: 800px;
}

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

.modal-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.modal-close {
  background: var(--abu);
  border: none;
  color: var(--text3);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.modal-close:hover {
  background: var(--abu2);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-8px);
  }

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

/* === Toast === */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  box-shadow: var(--shadow-md);
}

.toast-success {
  background: var(--hijau);
  color: white;
}

.toast-warning {
  background: var(--emas);
  color: #7A5200;
}

.toast-error {
  background: var(--merah);
  color: white;
}

.toast-info {
  background: var(--biru);
  color: white;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

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

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(30px);
  }
}

/* === Backup Notif === */
.backup-notif {
  position: fixed;
  bottom: 70px;
  left: 12px;
  right: 12px;
  background: var(--emas-muda);
  border: 1.5px solid var(--emas);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #7A5200;
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-state-icon {
  font-size: 3.5rem;
  opacity: 0.6;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.empty-state-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.empty-state-sub {
  font-size: 13px;
  color: var(--text3);
  max-width: 250px;
  line-height: 1.5;
}

/* === Divider === */
.divider {
  height: 1px;
  background: var(--abu2);
  margin: 16px 0;
}

/* === Utilities === */
.text-green {
  color: var(--hijau) !important;
}

.text-red {
  color: var(--merah) !important;
}

.text-gold {
  color: var(--emas) !important;
}

.text-blue {
  color: var(--biru) !important;
}

.text-muted {
  color: var(--text3) !important;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.font-mono {
  font-family: 'Space Mono', monospace;
}

.fw-bold {
  font-weight: 700;
}

.fw-800 {
  font-weight: 800;
}

.mt-2 {
  margin-top: 8px;
}

.mt-3 {
  margin-top: 12px;
}

.mt-4 {
  margin-top: 16px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-3 {
  margin-bottom: 12px;
}

.hidden {
  display: none !important;
}

/* === Animation === */
.animate-in {
  animation: pageIn 0.3s ease forwards;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* ========== RESPONSIVE ========== */

/* Desktop (> 1024px) */
@media (min-width: 1025px) {
  .sidebar {
    transform: translateX(0);
  }

  .main-content {
    margin-left: var(--sidebar-w);
  }

  .mobile-menu-btn {
    display: none;
  }

  .bottom-nav {
    display: none;
  }

  .backup-notif {
    bottom: 14px;
    left: calc(var(--sidebar-w) + 14px);
  }
}

/* Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .bottom-nav {
    display: none;
  }

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

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

  .grid-3-1,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
  }

  .sidebar {
    display: none !important;
  }

  .sidebar-overlay {
    display: none !important;
  }

  .page-content {
    padding: 12px;
    padding-bottom: 76px;
  }

  .header-search input {
    width: 110px;
  }

  .header-search input:focus {
    width: 150px;
  }

  .page-title {
    font-size: 15px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .grid-2,
  .grid-3-1,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

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

  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
  }

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

  .billing-grid-container {
    display: none;
  }

  .billing-cards {
    display: block;
  }

  .modal {
    max-width: 100%;
    padding: 16px;
  }

  .toast-container {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 66px;
  }

  .backup-notif {
    left: 10px;
    right: 10px;
  }
}

/* === Print === */
@media print {

  .sidebar,
  .bottom-nav,
  .top-header,
  .mobile-menu-btn,
  .sidebar-overlay,
  .btn,
  .toolbar,
  .tab-nav,
  .toast-container,
  .backup-notif,
  .modal-overlay,
  .quick-actions {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 11pt;
  }

  .main-content {
    margin-left: 0 !important;
  }

  .page-content {
    padding: 0 !important;
  }

  .card,
  .stat-card,
  .kwitansi-container {
    border: 1px solid #ccc;
    box-shadow: none;
  }

  .kwitansi-stamp {
    color: green !important;
    border-color: green !important;
  }

  .td-mono {
    font-family: 'Courier New', monospace;
  }
}

/* ==============================================
   DASHBOARD — Stat Cards
   ============================================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 20px 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s;
  border: var(--border);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card .stat-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.stat-card.green .stat-accent {
  background: var(--hijau);
}

.stat-card.gold .stat-accent {
  background: var(--emas);
}

.stat-card.blue .stat-accent {
  background: var(--biru);
}

.stat-card.red .stat-accent {
  background: var(--merah);
}

.stat-icon-box {
  font-size: 22px;
  margin-bottom: 10px;
  display: inline-block;
}

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

.stat-value {
  font-size: 26px;
  font-weight: 800;
  font-family: 'Space Mono', monospace;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 2px;
}

.stat-sub {
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 8px;
}

.stat-trend {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-block;
}

.stat-trend.up {
  background: var(--hijau-pale);
  color: var(--hijau);
}

.stat-trend.down {
  background: var(--merah-pale);
  color: var(--merah);
}

.stat-trend.neutral {
  background: var(--abu2);
  color: var(--text2);
}

/* ==============================================
   LAYOUT GRID
   ============================================== */
.grid-3-1 {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 14px;
}

/* ==============================================
   RT PROGRESS BARS
   ============================================== */
.rt-item {
  margin-bottom: 14px;
}

.rt-item:last-child {
  margin-bottom: 0;
}

.rt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.rt-label {
  font-size: 13px;
  font-weight: 600;
}

.rt-count {
  font-size: 12px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-bar {
  height: 8px;
  background: var(--abu2);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
}

.progress-fill.green {
  background: var(--hijau);
}

.progress-fill.gold {
  background: var(--emas);
}

.progress-fill.red {
  background: var(--merah);
}

.rt-detail {
  font-size: 11px;
  color: var(--text3);
}

/* ==============================================
   MINI BAR CHART
   ============================================== */
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 100px;
  padding: 10px 0 4px;
  margin-top: 8px;
}

.mini-bar {
  flex: 1;
  background: var(--abu2);
  border-radius: 4px 4px 0 0;
  transition: background 0.2s;
  min-height: 8px;
}

.mini-bar.current {
  background: var(--hijau);
}

.mini-bar:hover {
  background: var(--hijau-muda);
}

.mini-chart-labels {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.mini-chart-labels span {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: var(--text3);
}

/* ==============================================
   LIST ITEMS (sidebar-style row)
   ============================================== */
.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.list-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.list-info {
  flex: 1;
  min-width: 0;
}

.list-name {
  font-size: 13px;
  font-weight: 600;
}

.list-meta {
  font-size: 11px;
  color: var(--text3);
}

.list-amount {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
}

.list-amount.pos {
  color: var(--hijau);
}

.list-amount.neg {
  color: var(--merah);
}

.divider {
  height: 1px;
  background: var(--abu2);
  margin: 12px 0;
}

/* ==============================================
   WARGA GRID & CARDS
   ============================================== */
.warga-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.warga-card {
  background: var(--white);
  border-radius: var(--radius);
  border: var(--border);
  padding: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}

.warga-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.warga-card-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px dashed var(--abu3);
  background: transparent;
  min-height: 120px;
}

.warga-card-add:hover {
  border-color: var(--hijau);
  background: var(--hijau-pale);
}

.warga-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.warga-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.warga-name {
  font-size: 14px;
  font-weight: 700;
}

.warga-kk {
  font-size: 11px;
  color: var(--text3);
}

.warga-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  border-top: var(--border);
  padding-top: 10px;
}

.warga-stat-label {
  font-size: 10px;
  color: var(--text3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.warga-stat-value {
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 2px;
}

/* ==============================================
   FORM STEPPER
   ============================================== */
.stepper {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.stepper-step.active {
  opacity: 1;
}

.stepper-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--abu2);
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.stepper-step.active .stepper-circle {
  background: var(--hijau);
  color: white;
}

.stepper-step.completed .stepper-circle {
  background: var(--hijau-pale);
  color: var(--hijau);
}

.stepper-label {
  font-size: 12px;
  font-weight: 600;
}

.stepper-line {
  flex: 1;
  height: 2px;
  background: var(--abu2);
  margin: 0 8px;
  transition: background 0.3s;
}

.stepper-line.completed {
  background: var(--hijau);
}

/* ==============================================
   FILTER ROW & CHIPS
   ============================================== */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.filter-chip {
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--abu2);
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  user-select: none;
}

.filter-chip:hover {
  background: var(--hijau-pale);
  color: var(--hijau);
}

.filter-chip.active {
  background: var(--hijau);
  color: white;
  border-color: var(--hijau);
}

/* ==============================================
   TAG CHECKBOX GROUP
   ============================================== */
.tag-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--abu2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
}

.tag-checkbox:has(input:checked) {
  background: var(--hijau-pale);
  border-color: var(--hijau);
  color: var(--hijau);
}

/* ==============================================
   SEARCH BAR
   ============================================== */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--abu);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  height: 40px;
}

.search-bar input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  font-size: 13px;
}

/* ==============================================
   ALERT VARIATIONS
   ============================================== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 13px;
}

.alert-warn {
  background: #FFF8E7;
  border: 1px solid #F5D97F;
  color: #7A5A00;
}

.alert-info {
  background: var(--biru-pale);
  border: 1px solid #C0D3FC;
  color: #1E3A8A;
}

/* ==============================================
   BADGES — EXTRA VARIANTS
   ============================================== */
.badge-green {
  background: var(--hijau-pale);
  color: var(--hijau);
}

.badge-gold {
  background: var(--emas-muda);
  color: #7A5A00;
}

.badge-red {
  background: var(--merah-pale);
  color: var(--merah);
}

.badge-blue {
  background: var(--biru-pale);
  color: var(--biru);
}

.badge-gray {
  background: var(--abu2);
  color: var(--text3);
}

/* ==============================================
   MISC UTILITIES
   ============================================== */
.clickable {
  cursor: pointer;
}

.clickable:hover {
  text-decoration: underline;
  color: var(--hijau);
}

.text-green {
  color: var(--hijau);
}

.text-red {
  color: var(--merah);
}

.td-mono {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
}

.mt-3 {
  margin-top: 12px;
}

.mb-3 {
  margin-bottom: 12px;
}

/* ============================================
   RESPONSIVE — Bottom overrides
   ============================================ */
@media (max-width: 768px) {
  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .grid-3-1 {
    grid-template-columns: 1fr;
  }

  .warga-grid {
    grid-template-columns: 1fr 1fr;
  }

  .warga-stats {
    grid-template-columns: 1fr 1fr;
  }

  .summary-bar {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .report-grid {
    grid-template-columns: 1fr 1fr;
  }

  .status-cards-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .quick-stats-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .chart-bar-container {
    min-height: 100px;
    gap: 4px;
  }

  .chart-bar-label {
    font-size: 8px;
  }

  .tab-nav {
    flex-wrap: wrap;
    gap: 4px;
  }

  .tab-btn {
    font-size: 11px;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr;
  }

  .warga-grid {
    grid-template-columns: 1fr;
  }

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

  .summary-bar {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .summary-item {
    padding: 10px;
  }

  .summary-value {
    font-size: 14px;
  }

  .summary-label {
    font-size: 9px;
  }

  .report-grid {
    grid-template-columns: 1fr;
  }

  .report-kpi {
    padding: 12px;
  }

  .report-kpi-value {
    font-size: 18px;
  }

  .chart-bar-container {
    min-height: 80px;
    gap: 2px;
    overflow-x: auto;
  }

  .data-table {
    font-size: 11px;
  }

  .data-table th,
  .data-table td {
    padding: 6px 8px;
  }
}

/* ===================================================================
   LAPORAN & ANALISIS — Complete Component Styles
   =================================================================== */

/* --- Tab Bar & Tab Content --- */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--abu2);
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar {
  display: none;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeSlideUp .35s ease;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

/* --- Glass Card --- */
.glass-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: var(--border);
  overflow: hidden;
  margin-bottom: 16px;
  transition: box-shadow .2s;
}

.glass-card:hover {
  box-shadow: var(--shadow-md);
}

.glass-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: var(--border);
  background: linear-gradient(135deg, var(--abu), transparent);
}

.glass-card .card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.glass-card .card-body {
  padding: 18px;
}

/* --- Dashboard Grid (2-column card layout) --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* --- Bar Chart (Annual Trend) --- */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 16px 0 0;
  min-height: 160px;
}

.bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.bar-pair {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 100%;
  justify-content: center;
  min-height: 120px;
}

.bar {
  width: 16px;
  border-radius: 4px 4px 0 0;
  transition: all .3s ease;
  cursor: pointer;
  min-height: 2px;
  position: relative;
}

.bar:hover {
  opacity: .8;
  transform: scaleY(1.03);
}

.bar.bar-in {
  background: linear-gradient(180deg, var(--hijau), var(--hijau-muda));
}

.bar.bar-out {
  background: linear-gradient(180deg, var(--merah), #FF9B9B);
}

.bar-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-align: center;
  letter-spacing: .3px;
}

/* --- Chart Legend --- */
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text2);
  font-weight: 600;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

/* --- Horizontal Bar / Progress Row (Kepatuhan, Distribusi) --- */
.chart-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.chart-bar-row+.chart-bar-row {
  border-top: 1px solid var(--abu2);
}

.chart-label {
  width: 60px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
  text-align: right;
}

.chart-bar-track {
  flex: 1;
  height: 10px;
  background: var(--abu);
  border-radius: 20px;
  overflow: hidden;
}

.chart-value {
  width: 90px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  flex-shrink: 0;
  font-family: 'Space Mono', monospace;
}

/* --- Mini Progress (inline small progress bar) --- */
.mini-progress {
  width: 60px;
  height: 6px;
  background: var(--abu);
  border-radius: 20px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

.mini-progress-fill {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--hijau), var(--hijau-muda));
  transition: width .6s ease;
}

/* --- Stat Items (Warga Rentan Grid) --- */
.stat-items {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.stat-item {
  text-align: center;
  padding: 14px 8px;
  background: var(--abu);
  border-radius: var(--radius-sm);
  transition: transform .2s;
}

.stat-item:hover {
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 4px;
}

.stat-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  font-family: 'Space Mono', monospace;
  display: block;
}

.stat-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .4px;
  display: block;
  margin-top: 2px;
}

/* --- Heatmap (RT Kepatuhan Map) --- */
.rt-heatmap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.heatmap-cell {
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  transition: transform .2s;
}

.heatmap-cell:hover {
  transform: scale(1.03);
}

.heatmap-rt {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}

.heatmap-pct {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  font-family: 'Space Mono', monospace;
}

.heatmap-sub {
  font-size: 11px;
  color: var(--text3);
  font-weight: 600;
  margin-top: 2px;
}

/* --- Tag List (Sudah/Belum Bayar Badges) --- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge-lunas {
  display: inline-block;
  background: #d1fae5;
  color: #065f46;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.badge-belum {
  display: inline-block;
  background: #fee2e2;
  color: #991b1b;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* --- WA Preview --- */
.wa-preview {
  background: #e5ddd5;
  border-radius: var(--radius);
  padding: 16px;
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
}

.wa-bubble {
  background: #dcf8c6;
  padding: 10px 14px;
  border-radius: 8px 8px 8px 0;
  font-size: 13px;
  line-height: 1.5;
  max-width: 90%;
  word-wrap: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
}

/* --- Laporan Responsive --- */
@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

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

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

  .bar {
    width: 12px;
  }

  .chart-label {
    width: 40px;
    font-size: 10px;
  }

  .chart-value {
    width: 70px;
    font-size: 10px;
  }
}

@media (max-width: 600px) {
  .stat-items {
    grid-template-columns: repeat(2, 1fr);
  }

  .rt-heatmap {
    grid-template-columns: 1fr;
  }

  .bar-chart {
    gap: 4px;
    min-height: 120px;
  }

  .bar {
    width: 8px;
  }

  .bar-pair {
    gap: 2px;
  }

  .glass-card .card-header {
    padding: 10px 14px;
  }

  .glass-card .card-body {
    padding: 14px;
  }

  .tab-bar {
    gap: 0;
  }

  .tab-btn {
    padding: 8px 10px;
    font-size: 11px;
  }
}

/* === Animations === */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

.animate-in {
  animation: fadeSlideUp 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.animate-in>* {
  opacity: 0;
  animation: fadeSlideUp 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.animate-in>*:nth-child(1) {
  animation-delay: 0.05s;
}

.animate-in>*:nth-child(2) {
  animation-delay: 0.1s;
}

.animate-in>*:nth-child(3) {
  animation-delay: 0.15s;
}

.animate-in>*:nth-child(4) {
  animation-delay: 0.2s;
}

.animate-in>*:nth-child(5) {
  animation-delay: 0.25s;
}