/* ============================================================
   ZAKAT APP — Mobile-First Modern UI
   DKM AL-IMAN ANTAPANI
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Serif:wght@400;700&display=swap');

/* ---- CSS Variables ---- */
:root {
  --green-900: #064e3b;
  --green-800: #065f46;
  --green-700: #047857;
  --green-600: #059669;
  --green-500: #10b981;
  --green-400: #34d399;
  --green-100: #d1fae5;
  --green-50: #ecfdf5;
  --gold: #d97706;
  --gold-light:#fef3c7;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --red-500: #ef4444;
  --red-100: #fee2e2;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --amber-500: #f59e0b;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 10px 32px rgba(0,0,0,.14);
  --transition: 0.2s cubic-bezier(.4,0,.2,1);
  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-serif: 'Noto Serif', Georgia, serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  background-color: var(--slate-100);
  color: var(--slate-800);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}

/* ---- Loading Overlay ---- */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--green-400);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

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

.toast-notification {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 600;
  color: #FFF;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.25s ease forwards;
  max-width: 320px;
}

.toast-success {
  background: var(--green-700);
}

.toast-error {
  background: var(--red-500);
}

.toast-warning {
  background: var(--amber-500);
  color: var(--slate-900);
}

.toast-icon {
  font-size: 16px;
  flex-shrink: 0;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- LOGIN SCREEN ---- */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--green-900) 0%, var(--green-700) 50%, var(--green-500) 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 80%, rgba(255, 255, 255, 0.06) 0%, transparent 60%), radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.04) 0%, transparent 55%);
  pointer-events: none;
}

.login-card {
  background: #FFF;
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo .mosque-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.35);
}

.login-logo .mosque-icon i {
  font-size: 32px;
  color: #FFF;
}

.login-logo h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--green-800);
  margin: 0 0 4px;
  font-family: var(--font-serif);
}

.login-logo p {
  font-size: 12.5px;
  color: var(--slate-500, #64748b);
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ---- Form Controls ---- */
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--slate-600);
  margin-bottom: 5px;
}

.form-control, .form-select, .form-control-modern {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--slate-900);
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.form-control:focus, .form-select:focus, .form-control-modern:focus {
  border-color: var(--green-500);
  background: #FFF;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.form-control::placeholder {
  color: var(--slate-400);
}

.input-group {
  display: flex;
  position: relative;
}

.input-group .input-group-text {
  background: var(--slate-100);
  border: 1.5px solid var(--slate-200);
  border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding: 0 12px;
  color: var(--slate-500, #64748b);
  display: flex;
  align-items: center;
  font-size: 14px;
  flex-shrink: 0;
}

.input-group .form-control, .input-group .form-select, .input-group
.form-control-modern {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  flex: 1;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  color: #FFF;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--green-800), var(--green-700));
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #166534, #15803D);
  color: #FFF;
  box-shadow: 0 4px 12px rgba(22, 101, 52, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #14532D, #166534);
}

.btn-danger {
  background: linear-gradient(135deg, #b91c1c, var(--red-500));
  color: #FFF;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #991B1B, #B91C1C);
}

.btn-warning {
  background: linear-gradient(135deg, #b45309, var(--amber-500));
  color: #FFF;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #92400E, #B45309);
}

.btn-info {
  background: linear-gradient(135deg, #1e40af, var(--blue-500));
  color: #FFF;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.btn-info:hover {
  background: linear-gradient(135deg, #1E3A8A, #1D4ED8);
}

.btn-outline-secondary {
  background: transparent;
  border: 1.5px solid var(--slate-300, #cbd5e1);
  color: var(--slate-700);
}

.btn-outline-secondary:hover {
  background: var(--slate-100);
}

.btn-secondary {
  background: var(--slate-600);
  color: #FFF;
}

.btn-secondary:hover {
  background: var(--slate-700);
}

.btn-light {
  background: rgba(255, 255, 255, 0.15);
  color: #FFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.25);
}

.btn-modern {
  border-radius: var(--radius-sm);
}

.btn-modern-primary {
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: #FFF;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
}

.btn-modern-primary:hover {
  filter: brightness(1.07);
}

/* Full-width button for login */
.w-100 {
  width: 100%;
}

/* ---- Action Buttons (small) ---- */
.btn-action {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  font-size: 13px;
}

.action-buttons {
  display: flex;
  gap: 5px;
  align-items: center;
}

/* ---- NAVBAR ---- */
.navbar-modern {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-800) 100%) !important;
  padding: 0;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-modern .container {
  display: flex;
  align-items: stretch;
  min-height: 58px;
  padding: 0 12px;
}

.navbar-modern .navbar-brand {
  color: #FFF !important;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  text-decoration: none;
  letter-spacing: 0.2px;
}

.navbar-modern .navbar-brand i {
  font-size: 20px;
  color: var(--green-400);
}

/* Hamburger */
.navbar-toggler {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  margin-left: auto;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  display: inline-block;
  width: 22px;
  height: 22px;
  background-size: contain;
  background-repeat: no-repeat;
}

.navbar-collapse {
  flex-basis: 100%;
}

.navbar-collapse:not(.show) {
  display: none;
}

@media (min-width: 992px) {
  .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }
  
  .navbar-toggler {
    display: none;
  }
}

.navbar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
}

@media (min-width: 992px) {
  .navbar-nav {
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 2px;
  }
}

.navbar-modern .nav-link {
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.navbar-modern .nav-link:hover, .navbar-modern .nav-link.active {
  color: #FFF !important;
  background: rgba(255, 255, 255, 0.12);
}

.navbar-modern .nav-link.active {
  background: rgba(255, 255, 255, 0.18);
  color: var(--green-300, #6ee7b7) !important;
}

.navbar-text {
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 6px;
}

.text-danger.nav-link {
  color: #FCA5A5 !important;
}

.text-danger.nav-link:hover {
  color: #FFF !important;
  background: rgba(239, 68, 68, 0.2) !important;
}

/* ---- Main Content Area ---- */
.container, .container-fluid {
  width: 100%;
  padding-left: 0px;
  padding-right: 0px;
  margin-left: auto;
  margin-right: auto;
  max-width: 1200px;
}

@media (min-width: 768px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Content padding from navbar */
.main-content {
  padding: 16px 0px 80px;
}

@media (min-width: 768px) {
  .main-content {
    padding: 24px 20px 40px;
  }
}

/* ---- Page Header ---- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.page-header h3, .page-header h4 {
  font-size: 17px;
  font-weight: 800;
  color: var(--slate-900);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-header h3 i, .page-header h4 i {
  color: var(--green-600);
  font-size: 18px;
}

.page-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---- Cards ---- */
.card, .modern-card {
  background: #FFF;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  margin-bottom: 16px;
}

.card-header {
  padding: 13px 16px;
  border-bottom: 1px solid var(--slate-100);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--slate-50);
  color: var(--slate-800);
}

.card-header.bg-primary {
  background: linear-gradient(135deg, var(--green-800), var(--green-700)) !important;
  color: #FFF;
  border-bottom: none;
}

.card-header.bg-primary h4, .card-header.bg-primary h5 {
  color: #FFF;
  margin: 0;
}

.card-body {
  padding: 16px;
}

/* Stat Cards */
.stat-card {
  background: #FFF;
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 14px;
  align-items: center;
  transition: transform var(--transition), box-shadow var(--transition);
  margin-bottom: 12px;
}

.stat-card:active {
  transform: scale(0.98);
}

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

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

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

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

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

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

.stat-info .label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--slate-500, #64748b);
  margin-bottom: 2px;
}

.stat-info .value {
  font-size: 18px;
  font-weight: 800;
  color: var(--slate-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-info .sub {
  font-size: 11px;
  color: var(--slate-400);
  margin-top: 1px;
}

/* Dashboard summary cards */
.dashboard-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 12px;
  border: none;
  transition: transform var(--transition);
}

.dashboard-card:hover {
  transform: translateY(-2px);
}

.border-left-primary {
  border-left: 4px solid var(--green-600);
}

.border-left-success {
  border-left: 4px solid #16A34A;
}

.border-left-info {
  border-left: 4px solid var(--blue-500);
}

.border-left-warning {
  border-left: 4px solid var(--amber-500);
}

/* ---- Table ---- */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
  background: #FFF;
}

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

.table th, .table-modern th {
  background: var(--green-800);
  color: #FFF;
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 11px 12px;
  white-space: nowrap;
  text-align: left;
}

.table td, .table-modern td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--slate-100);
  vertical-align: middle;
  color: var(--slate-700);
}

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

.table tbody tr:hover td {
  background: var(--green-50);
}

.table tbody tr.table-info td {
  background: var(--blue-100);
  font-weight: 700;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.bg-primary {
  background: var(--green-700) !important;
  color: #FFF;
}

.bg-success {
  background: #16A34A !important;
  color: #FFF;
}

.bg-info {
  background: var(--blue-500) !important;
  color: #FFF;
}

.bg-warning {
  background: var(--amber-500) !important;
  color: #FFF;
}

.bg-danger {
  background: var(--red-500) !important;
  color: #FFF;
}

.bg-secondary {
  background: var(--slate-500, #64748b) !important;
  color: #FFF;
}

.bg-light {
  background: var(--slate-100) !important;
  color: var(--slate-700) !important;
}

/* ---- Search Bar ---- */
.search-bar {
  position: relative;
  margin-bottom: 14px;
}

.search-bar .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-400);
  font-size: 14px;
  pointer-events: none;
}

.search-bar input {
  padding-left: 36px;
  background: #FFF;
  border-radius: var(--radius);
  font-size: 14px;
}

/* ---- Modal / Overlay ---- */
.modal-wrapper {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1050;
  padding: 0;
}

@media (min-width: 640px) {
  .modal-wrapper {
    align-items: center;
    padding: 20px;
  }
}

.print-modal {
  background: #FFF;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 640px) {
  .print-modal {
    border-radius: var(--radius-xl);
    max-width: 560px;
    max-height: 88vh;
    animation: scaleIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

.print-modal.wide {
  max-width: 760px;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  
  to {
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.print-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  background: #FFF;
  z-index: 1;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.print-header h4, .print-header h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--slate-900);
}

.print-header.colored {
  background: linear-gradient(135deg, var(--green-800), var(--green-600));
  color: #FFF;
  border-bottom: none;
}

.print-header.colored h4, .print-header.colored h5 {
  color: #FFF;
}

.print-body {
  padding: 16px 20px;
}

.print-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--slate-100);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--slate-50);
  position: sticky;
  bottom: 0;
}

/* btn-close */
.btn-close {
  background: var(--slate-100);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--slate-600);
  transition: background var(--transition);
}

.btn-close:hover {
  background: var(--slate-200);
}

/* ---- Form Sections ---- */
.form-section {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 16px 16px 26px 16px;
  margin-bottom: 14px;
}

.form-section-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--green-700);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-section-title i {
  font-size: 14px;
}

/* ---- Zakat Input Grid (mobile-optimized) ---- */
.zakat-input-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.zakat-item {
  background: #FFF;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 12px;
  transition: border-color var(--transition);
}

.zakat-item:focus-within {
  border-color: var(--green-500);
}

.zakat-item-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.zakat-item-label .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-500);
  flex-shrink: 0;
}

.zakat-item-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.zakat-item-inputs .input-field label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--slate-400);
  display: block;
  margin-bottom: 4px;
}

.zakat-item-inputs .input-field input {
  padding: 8px 10px;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
}

/* ---- Summary Card ---- */
.summary-total {
  background: linear-gradient(135deg, var(--green-800), var(--green-600));
  border-radius: var(--radius-lg);
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
  color: #FFF;
}

.summary-total .s-item {
  text-align: center;
}

.summary-total .s-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.summary-total .s-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.summary-total .s-unit {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 2px;
}

/* ---- Alert ---- */
.alert {
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 14px;
  border: none;
}

.alert-danger {
  background: var(--red-100);
  color: #991B1B;
}

.alert-info {
  background: var(--blue-100);
  color: #1E40AF;
}

.alert-success {
  background: var(--green-100);
  color: var(--green-800);
}

.alert-warning {
  background: var(--gold-light);
  color: #92400E;
}

/* ---- Receipt (print) ---- */
.receipt-header {
  text-align: center;
  margin-bottom: 18px;
}

.receipt-header h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--green-800);
  margin: 0 0 4px;
}

.receipt-header h4 {
  font-size: 13px;
  color: var(--slate-600);
  margin: 0;
  font-weight: 500;
}

.receipt-no {
  position: absolute;
  top: 12px;
  right: 16px;
  border: 1.5px solid var(--red-500);
  color: var(--red-500);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.receipt-info {
  background: var(--slate-50);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13px;
}

.receipt-info p {
  margin: 5px 0;
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 16px;
}

.receipt-table th, .receipt-table td {
  border: 1px solid var(--slate-200);
  padding: 8px 10px;
}

.receipt-table th {
  background: var(--green-700);
  color: #FFF;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 700;
}

.receipt-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
}

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

.signature-line {
  border-bottom: 1.5px solid var(--slate-400);
  width: 120px;
  margin: 28px auto 8px;
}

/* ---- Recap / Report ---- */
.recap-header {
  text-align: center;
  padding: 16px;
  margin-bottom: 16px;
}

.recap-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--green-800);
  margin: 0 0 4px;
  font-family: var(--font-serif);
}

.recap-header p {
  font-size: 12.5px;
  color: var(--slate-600);
  margin: 0;
}

.table-recap th {
  background: var(--slate-800);
}

.zakat-report {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.zakat-report th, .zakat-report td {
  border: 1px solid var(--slate-200);
  padding: 8px 10px;
  text-align: center;
}

.zakat-report thead {
  background: var(--slate-800);
  color: #FFF;
  font-weight: 700;
}

.zakat-report tbody tr:nth-child(even) {
  background: var(--slate-50);
}

.zakat-report tbody tr:hover {
  background: var(--green-50);
}

/* ---- Utilities ---- */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -6px;
  margin-right: -6px;
}

.col-md-4, .col-md-6, .col-md-12, .col-12 {
  padding-left: 6px;
  padding-right: 6px;
  width: 100%;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .col-md-4 {
    width: 33.3333%;
  }
  
  .col-md-6 {
    width: 50%;
  }
  
  .col-md-12 {
    width: 100%;
  }
}

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

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

.mb-4 {
  margin-bottom: 16px;
}

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

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

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

.me-1 {
  margin-right: 4px;
}

.me-2 {
  margin-right: 8px;
}

.me-3 {
  margin-right: 12px;
}

.ms-auto {
  margin-left: auto;
}

.g-2 > * {
  margin-bottom: 8px;
}

.g-3 > * {
  margin-bottom: 12px;
}

.gap-2 {
  gap: 8px;
}

.py-4 {
  padding-top: 16px;
  padding-bottom: 16px;
}

.d-flex {
  display: flex;
  margin-top: 0;
  height: 50px;
}

.d-grid {
  display: grid;
}

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

.justify-content-between {
  justify-content: space-between;
}

.justify-content-end {
  justify-content: flex-end;
}

.flex-wrap {
  flex-wrap: wrap;
}

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

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

.text-start {
  text-align: left;
}

.text-muted {
  color: var(--slate-400);
}

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

.text-success {
  color: #16A34A;
}

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

.text-white {
  color: #FFF;
}

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

.fw-semibold {
  font-weight: 600;
}

.fw-medium {
  font-weight: 500;
}

.fs-small {
  font-size: 12px;
}

.small {
  font-size: 12px;
}

small {
  font-size: 12px;
}

.h4 {
  font-size: 18px;
  font-weight: 700;
}

h3 {
  font-size: 17px;
  font-weight: 800;
}

h4 {
  font-size: 16px;
  font-weight: 700;
}

h5 {
  font-size: 15px;
  font-weight: 700;
}

h6 {
  font-size: 13px;
  font-weight: 700;
}

.collapse:not(.show) {
  display: none;
}

.me-auto {
  margin-right: auto;
}

/* ---- Bottom Nav (mobile) ---- */
.bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFF;
  border-top: 1px solid var(--slate-200);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  z-index: 999;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom);
}

@media (min-width: 992px) {
  .bottom-nav {
    display: none;
  }
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--slate-400);
  font-size: 10px;
  font-weight: 600;
  gap: 2px;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-sans);
}

.bottom-nav-item i {
  font-size: 18px;
  transition: color var(--transition), transform var(--transition);
}

.bottom-nav-item.active {
  color: var(--green-700);
}

.bottom-nav-item.active i {
  transform: scale(1.1);
}

.bottom-nav-item.add-btn {
  color: #FFF;
}

.bottom-nav-item.add-btn .add-circle {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
  margin-top: -8px;
}

.bottom-nav-item.add-btn .add-circle i {
  font-size: 20px;
  color: #FFF;
  transform: none !important;
}

/* ---- Table bootstrap utils ---- */
.table-bordered td, .table-bordered th {
  border: 1px solid var(--slate-200) !important;
}

.table-light th {
  background: var(--slate-100) !important;
  color: var(--slate-700) !important;
}

.table > :not(caption) > * > * {
  padding: 9px 10px;
  border-bottom-width: 1px;
}

/* ---- Print ---- */
@media print {
  .no-print, .navbar-modern, .bottom-nav, .btn, .card-header, .toast-container,
  .loading-overlay {
    display: none !important;
  }
  
  body {
    background: white;
  }
  
  .print-area, .print-area * {
    visibility: visible;
  }
  
  .print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  
  @page {
    size: A4;
    margin: 10mm;
  }
}

/* ---- Bootstrap grid compat ---- */
.col-12.col-sm-6 {
  width: 100%;
}

@media (min-width: 576px) {
  .col-12.col-sm-6 {
    width: 50%;
  }
}

.col-12.col-lg-3 {
  width: 100%;
}

@media (min-width: 992px) {
  .col-12.col-lg-3 {
    width: 25%;
  }
}

.col-12.col-lg-4 {
  width: 100%;
}

@media (min-width: 992px) {
  .col-12.col-lg-4 {
    width: 33.3333%;
  }
}

/* Override Bootstrap table color vars */
--bs-table-bg: transparent {
}

--bs-table-color: var(--slate-800) {
}

.table-success td {
  background: var(--green-50) !important;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--slate-300, #cbd5e1);
  border-radius: 4px;
}

/* ---- Input number no-arrows ---- */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  opacity: 1;
}

/* ---- Card for forms ---- */
.form-card {
  background: #FFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.form-card-header {
  background: linear-gradient(135deg, var(--green-800), var(--green-700));
  color: #FFF;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-card-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #FFF;
}

.form-card-header i {
  font-size: 18px;
  color: var(--green-300, #6ee7b7);
}

.form-card-body {
  padding: 18px 0px;
}

/* Pill tabs */
.pill-tabs {
  display: flex;
  gap: 6px;
  background: var(--slate-100);
  padding: 4px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.pill-tab {
  flex: 1;
  min-width: 80px;
  padding: 8px 12px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--slate-600);
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.pill-tab.active {
  background: #FFF;
  color: var(--green-700);
  box-shadow: var(--shadow-sm);
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  background: var(--slate-50);
  border-radius: var(--radius);
  margin-bottom: 14px;
  border: 1px solid var(--slate-200);
}

.filter-bar select {
  flex: 1;
  min-width: 120px;
}

/* Navbar mobile dropdown fix */
@media (max-width: 991.98px) {
  .navbar-collapse.show {
    display: flex !important;
    flex-direction: column;
  }
  
  .navbar-nav {
    padding: 4px 0 8px;
  }
  
  .navbar-modern .container {
    flex-wrap: wrap;
  }
}

/* th.abc overrides */
th.abc {
  width: 80px;
}

th.abc2 {
  width: 100px;
}

.fa-solid, .fas {
  margin-left: 0;
}

/* me-auto on flex */
.me-auto {
  margin-right: auto;
}

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--slate-400);
}

.empty-state i {
  font-size: 40px;
  margin-bottom: 12px;
  display: block;
  opacity: 0.5;
}

.empty-state p {
  font-size: 13.5px;
  margin: 0;
}

/* ---- Floating Action Button (mobile only) ---- */
.fab {
  position: fixed;
  bottom: 76px;
  right: 16px;
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45);
  cursor: pointer;
  border: none;
  z-index: 900;
  transition: transform var(--transition), box-shadow var(--transition);
  color: #FFF;
  font-size: 22px;
}

.fab:active {
  transform: scale(0.93);
}

@media (min-width: 992px) {
  .fab {
    display: none;
  }
}
