/* ==========================================================================
   keu-msk - Dashboard Keuangan Komplek & Integrasi WhatsApp GOWA
   Modern Vanilla CSS Design System
   ========================================================================== */

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-border: #c7d2fe;

  --wa-green: #10b981;
  --wa-green-hover: #059669;
  --wa-green-light: #ecfdf5;
  --wa-green-border: #a7f3d0;

  --success: #10b981;
  --success-hover: #059669;
  --success-light: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;

  --warning: #f59e0b;
  --warning-hover: #d97706;
  --warning-light: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #92400e;

  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #991b1b;

  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: #f8fafc;
  color: var(--slate-800);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  color: var(--primary-hover);
}

/* Global Interactive Pointer & Click Affordance */
button,
.btn,
select,
input[type="submit"],
input[type="button"],
input[type="reset"],
input[type="checkbox"],
input[type="radio"],
label[for],
[role="button"],
.clickable {
  cursor: pointer !important;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==========================================================================
   Icon Utilities (Standard SVG Icons)
   ========================================================================== */
.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

/* ==========================================================================
   Navigation Bar (Refined & Clean)
   ========================================================================== */
.navbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px 0 rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--slate-900);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.22);
  flex-shrink: 0;
}

.brand-icon svg {
  width: 19px;
  height: 19px;
  stroke: #ffffff;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--slate-500);
  line-height: 1.2;
  margin-top: 1px;
  max-width: 210px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  color: var(--slate-600);
  font-size: 0.84rem;
  font-weight: 600;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-item a .icon {
  width: 16px;
  height: 16px;
  color: var(--slate-400);
  transition: color 0.15s ease;
}

.nav-item a:hover {
  color: var(--primary);
  background-color: var(--slate-100);
}

.nav-item a:hover .icon {
  color: var(--primary);
}

.nav-item.active a {
  color: var(--primary);
  background-color: var(--primary-light);
  font-weight: 700;
}

.nav-item.active a .icon {
  color: var(--primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* GOWA Status Live Badge */
.gowa-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.gowa-status-badge.online {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.gowa-status-badge.offline {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  position: relative;
}

.pulse-dot.online::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  border: 2px solid currentColor;
  animation: pulseAnim 2s infinite;
}

@keyframes pulseAnim {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* User Pill */
.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-800);
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.mobile-toggle {
  display: none;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  color: var(--slate-700);
  cursor: pointer;
}

/* ==========================================================================
   Layout & Cards
   ========================================================================== */
.main-content {
  flex: 1;
  padding: 32px 0 64px 0;
}

.page-header {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.02em;
}

.page-subtitle {
  color: var(--slate-500);
  font-size: 0.92rem;
  margin-top: 3px;
}

.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

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

.card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--slate-900);
}

/* ==========================================================================
   Financial Stat Grid
   ========================================================================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-icon.saldo {
  background: #eef2ff;
  color: #4f46e5;
}

.stat-icon.pemasukan {
  background: #ecfdf5;
  color: #10b981;
}

.stat-icon.pengeluaran {
  background: #fef2f2;
  color: #ef4444;
}

.stat-icon.warga {
  background: #fffbeb;
  color: #f59e0b;
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--slate-900);
  margin-top: 4px;
  line-height: 1.2;
}

.stat-desc {
  font-size: 0.8rem;
  color: var(--slate-400);
  margin-top: 8px;
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  line-height: 1.4;
  user-select: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.btn:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
  transform: translateY(-2px);
}

.btn-success, .btn-wa {
  background: var(--wa-green);
  color: var(--white);
  border-color: var(--wa-green);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-success:hover, .btn-wa:hover {
  background: var(--wa-green-hover);
  border-color: var(--wa-green-hover);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: var(--slate-100);
  color: var(--slate-900);
  border-color: var(--slate-400);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

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

.btn-danger:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
  transform: translateY(-2px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  line-height: 1.2;
  vertical-align: middle;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  display: inline-block;
}

.badge-primary {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.badge-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.badge-neutral {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* ==========================================================================
   Table & Matrix Component
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th, .table td {
  padding: 13px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--slate-200);
}

.table th {
  background: var(--slate-50);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--slate-500);
  white-space: nowrap;
}

.table tbody tr:hover {
  background-color: #f8fafc;
}

/* 12-Month Matrix Cells */
.matrix-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
  max-width: 440px;
}

.matrix-cell {
  width: 32px;
  height: 28px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  transition: var(--transition);
}

.matrix-cell.paid {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.matrix-cell.unpaid {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

/* Checklist Bulan Box in Verification Form */
.month-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.month-check-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.month-check-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.month-check-card.checked {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
}

.month-check-card.already-paid {
  border-color: #86efac;
  background: #f0fdf4;
  color: #16a34a;
  cursor: not-allowed;
  opacity: 0.7;
}

/* ==========================================================================
   WhatsApp Inbox & Gallery Cards
   ========================================================================== */
.proof-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.proof-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

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

.proof-img-wrap {
  width: 100%;
  height: 190px;
  background: #0f172a;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.proof-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.proof-content {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 10px;
}

.chat-incoming {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-outgoing {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #14532d;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--slate-800);
  background: var(--white);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-hint {
  font-size: 0.78rem;
  color: var(--slate-500);
  margin-top: 4px;
}

/* Filter Bar */
.filter-bar {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 24px;
}

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.92rem;
  font-weight: 500;
}

.alert-success {
  background-color: var(--success-light);
  border: 1px solid var(--success-border);
  color: var(--success-text);
}

.alert-danger {
  background-color: var(--danger-light);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
}

/* ==========================================================================
   Modal Dialogs
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-box {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: scaleUp 0.2s ease-out;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--slate-900);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--slate-400);
  cursor: pointer;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--slate-100);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--slate-50);
}

/* ==========================================================================
   Public Digital Receipt (Kuitansi Digital)
   ========================================================================== */
.kuitansi-card {
  background: #ffffff;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-xl);
  padding: 44px;
  max-width: 760px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.kuitansi-stamp {
  border: 3px double #10b981;
  color: #10b981;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 3px;
  padding: 4px 16px;
  transform: rotate(-3deg);
  border-radius: 6px;
  user-select: none;
  display: inline-block;
  line-height: 1.1;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.15);
}

.kuitansi-header {
  border-bottom: 2px solid var(--slate-800);
  padding-bottom: 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media print {
  body { background: #ffffff !important; }
  .navbar, .footer, .btn, .no-print { display: none !important; }
  .main-content { padding: 0 !important; }
  .card, .kuitansi-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
}

/* Animations */
@keyframes scaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 1100px) {
  .brand-subtitle { display: none; }
  .nav-item a { padding: 6px 8px; font-size: 0.8rem; }
}

@media (max-width: 992px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 66px;
    left: 16px;
    right: 16px;
    background: #ffffff;
    flex-direction: column;
    padding: 12px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    gap: 4px;
  }
  .nav-menu.open { display: flex; }
  .nav-menu .nav-item { width: 100%; }
  .nav-menu .nav-item a { width: 100%; padding: 10px 14px; font-size: 0.92rem; }
  .mobile-toggle { display: flex; align-items: center; justify-content: center; }
  .month-selector-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 576px) {
  .month-selector-grid { grid-template-columns: repeat(2, 1fr); }
  .matrix-grid { grid-template-columns: repeat(6, 1fr); gap: 4px; }
  .matrix-cell { width: auto; height: 26px; }
  .gowa-status-badge span { display: none; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ==========================================================================
   GOWA Premium Interactive Sending Overlay & Success Feedback Modal
   ========================================================================== */
.gowa-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 16px;
  animation: gowaFadeIn 0.2s ease-out;
}

.gowa-loader-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 34px 28px 28px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  position: relative;
  animation: gowaPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.gowa-loader-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #10b981, #06b6d4, #2563eb, #10b981);
  background-size: 300% 100%;
  animation: gowaShimmer 2s linear infinite;
}

.gowa-avatar-halo {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gowa-avatar-halo .pulse-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(16, 185, 129, 0.4);
  animation: gowaRingPulse 1.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

.gowa-avatar-halo .pulse-ring-2 {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1.5px solid rgba(16, 185, 129, 0.2);
  animation: gowaRingPulse 1.8s cubic-bezier(0.24, 0, 0.38, 1) 0.5s infinite;
}

.gowa-avatar-core {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 10px 24px -4px rgba(37, 211, 102, 0.45);
  position: relative;
  z-index: 2;
  animation: gowaFloat 2.4s ease-in-out infinite;
}

.gowa-progress-track {
  width: 100%;
  height: 7px;
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0 12px;
  position: relative;
}

.gowa-progress-bar {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #10b981 0%, #34d399 50%, #059669 100%);
  background-size: 200% 100%;
  animation: gowaShimmer 1.5s linear infinite;
  transition: width 0.3s ease;
}

.gowa-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 8px;
}

@keyframes gowaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes gowaPopIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes gowaRingPulse {
  0% {
    transform: scale(0.85);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

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

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

/* ==========================================================================
   WhatsApp Bulk Reminder & Confirmation Modal Theme
   ========================================================================== */
.wa-modal-box {
  max-width: 680px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.35);
  animation: scaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.wa-metric-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wa-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -4px rgba(0, 0, 0, 0.08);
}

.wa-chip-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.15s ease;
}

.wa-chip-item:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.wa-chat-preview-wrap {
  margin-top: 12px;
  background: #efeae2;
  border: 1px solid #d1d7db;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

.wa-chat-preview-header {
  background: linear-gradient(135deg, #075e54 0%, #128c7e 100%);
  color: #ffffff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}

.wa-chat-preview-body {
  padding: 14px;
  max-height: 190px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wa-chat-bubble {
  align-self: flex-end;
  background: #d9fdd3;
  color: #111b21;
  border-radius: 8px 0px 8px 8px;
  padding: 9px 12px 6px;
  max-width: 92%;
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 1px 2px rgba(11,20,26,0.13);
  position: relative;
  white-space: pre-wrap;
  word-break: break-word;
}

.wa-chat-bubble::after {
  content: "";
  position: absolute;
  top: 0;
  right: -8px;
  width: 0;
  height: 0;
  border: 8px solid transparent;
  border-top-color: #d9fdd3;
  border-right: 0;
}

.wa-chat-bubble-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 10.5px;
  color: #667781;
  margin-top: 4px;
}

.wa-chat-bubble-footer svg {
  color: #53bdeb;
}

.wa-confirm-card {
  max-width: 440px;
  border-radius: 22px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 30px 70px -15px rgba(15, 23, 42, 0.45);
  animation: scaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}


