/* --- Base Styles (Unchanged) --- */
.setting-card {
  transition: all 0.3s ease-in-out;
  background: #fdfdfd;
}

.setting-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  background-color: #ffffff;
}

.setting-card .badge {
  font-size: 0.75rem;
  padding: 0.35em 0.6em;
}

.bg-brown {
  background-color: #996633 !important;
  color: white !important;
}

.hover-scale {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.03);
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.15);
}

.btn-referral {
  background-color: #28a745;
  color: #ffffff;
  font-weight: 500;
  border: none;
  padding: 0.65rem 1.5rem;
  font-size: 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-referral:hover {
  background-color: #218838;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
  color: #fff;
}

/* --- Fade Animations --- */
.fade-expand-enter-active,
.fade-expand-leave-active {
  transition: all 0.3s ease;
  overflow: hidden;
}

.fade-expand-enter-from,
.fade-expand-leave-to {
  max-height: 0;
  opacity: 0;
}

.fade-expand-enter-to,
.fade-expand-leave-from {
  max-height: 800px;
  opacity: 1;
}

/* --- Timer / Countdown Styles --- */
.timer-card {
  max-width: 720px;
  margin: 2rem auto;
}

.countdown {
  font-family: monospace;
  font-size: 2rem;
}

.small-label {
  font-size: .95rem;
  color: #666;
}

.btn[disabled],
.btn.disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

.action-area.closed {
  filter: grayscale(.08) saturate(.9);
}

.action-area.open {
  filter: none;
}

.card-open {
  border-radius: 1rem;
  background: linear-gradient(to right, #20c997, #0dcaf0);
  color: white;
}

.card-closed {
  border-radius: 1rem;
  background: linear-gradient(to right, #6c757d, #adb5bd);
  color: #f8f9fa;
}

.text-purple {
  color: #6f42c1 !important;
}

.bg-purple {
  background-color: #6f42c1 !important;
  color: #fff;
}

/* --- Floating CTA --- */
.floating-cta {
  position: relative;
  width: 100%;
}

@media (min-width: 768px) {
  .floating-cta {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    width: auto;
    z-index: 1050;
  }

  .floating-cta button {
    min-width: 180px;
    border-radius: 1.5rem;
  }
}

.floating-cta button {
  border-radius: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease-in-out;
}

.floating-cta button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* --- KPI Cards --- */
.kpi-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.kpi {
  background: var(--card-bg);
  padding: 14px;
  border-radius: 8px;
  min-width: 150px;
  flex: 1;
  box-shadow: 0 6px 16px rgba(15, 25, 40, 0.04);
}

.kpi .title {
  font-size: 0.85rem;
  color: var(--muted);
}

.kpi .value {
  font-weight: 700;
  font-size: 1.25rem;
  margin-top: 6px;
}

.kpi .sub {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 4px;
}
/* Action Card Icons for Debtor Types */
.action-icon.view-individual {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.action-icon.view-groups {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.action-icon.view-institutions {
  background: linear-gradient(135deg, #059669, #047857);
}

/* Badge colors for consistency */
.action-badge.success {
  background: #10b981;
  color: white;
}

.action-badge.warning {
  background: #f59e0b;
  color: white;
}

.action-badge.info {
  background: #3b82f6;
  color: white;
}

/* --- Dashboard Layout --- */
.grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  align-items: start;
}

.grid .left {
  display: grid;
  grid-template-rows: auto auto;
  gap: 12px;
}

.card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 6px 16px rgba(15, 25, 40, 0.04);
}

.card h5 {
  margin: 0 0 10px 0;
  font-size: 0.95rem;
}

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

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

.pie {
  height: 240px;
}

canvas {
  width: 100% !important;
  height: 260px !important;
}

/* --- Table Styles --- */
.table-card table {
  width: 100%;
  border-collapse: collapse;
}

.table-card th,
.table-card td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f3f5;
  font-size: 0.9rem;
}

/* --- Main Area --- */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.topbar {
  background: linear-gradient(90deg, #6f42c1, #3b82f6);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 6px 18px rgba(10, 20, 40, 0.06);
}

.topbar h3 {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.6px;
}

.topbar .controls {
  display: flex;
  gap: 8px;
  align-items: center;
}


/* General page shell + theme colors */
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: var(--page-bg);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  gap: 20px;
  padding: 20px;
}

:root {
  --brand-blue: #6f42c1;
  --brand-green: #2e7d32;
  --muted: #6c757d;
  --card-bg: #ffffff;
  --page-bg: #eef2fb;
}

/* --- Enhanced Responsiveness: SmartDebt Fluid Grid --- */
/* Tablets (portrait) and medium devices */
@media (max-width: 992px) {
  .grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .charts-row,
  .small-charts {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

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

  .kpi {
    flex: 1 1 48%;
  }

  .card {
    padding: 14px;
  }

  /* --- Keep same topbar styling but make it responsive --- */
  .topbar {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    gap: 8px;
  }

  .topbar h3 {
    font-size: 1rem;
  }

  .topbar .controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }

  canvas {
    height: 220px !important;
  }
}

/* Small devices (phones ≤767px) */
@media (max-width: 767px) {
  .grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .charts-row,
  .small-charts {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

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

  .kpi {
    flex: 1 1 48%;
  }

  .card {
    padding: 14px;
  }

  /* --- Maintain current topbar look, just adjust spacing --- */
  .topbar {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
  }

  .topbar h3 {
    font-size: 0.95rem;
  }

  .topbar .controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }

  canvas {
    height: 210px !important;
  }
}

/* Extra small phones (≤480px) */
@media (max-width: 480px) {
  .app-shell {
    padding: 8px;
    gap: 8px;
  }

  .topbar {
    padding: 10px 12px;
    gap: 6px;
  }

  .topbar h3 {
    font-size: 0.85rem;
  }

  .kpi .value {
    font-size: 1.1rem;
  }

  .card {
    padding: 10px;
    border-radius: 6px;
  }

  .kpi {
    border-radius: 6px;
  }

  canvas {
    height: 180px !important;
  }
}


/* --- Subcounty & Ward Section Styling (Refined Colors) --- */

/* Softer bluish-gray background for expanded area */
.sub-row {
  background-color: #f5f8fa;
  /* light bluish-grey for visual separation */
}

.sub-row td {
  border-top: 1px solid #dbe4e6;
  border-bottom: 1px solid #dbe1e6;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Sub-county blocks */
.sub-row .d-flex {
  background-color: #0ed6d6;
  /* white with a soft tint */
  border: 1px solid #ccd7e0;
  /* subtle cool gray border */
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.sub-row .d-flex:hover {
  background-color: #eef3f7;
  /* gentle hover highlight */
}

/* Ward list */
.ward-list {
  background-color: #f7fafc;
  /* lighter neutral background */
  border-left: 3px solid #3b82f620;
  /* soft blue accent (Tailwind 500 with opacity) */
  border-radius: 4px;
  margin-top: 0.5rem;
  padding-left: 1rem;
}

.ward-list li {
  list-style: none;
  padding: 4px 0;
  color: #495057;
  font-size: 0.925rem;
}

.ward-list li i {
  color: #6c757d;
}

.ward-list li:hover {
  color: #0d6efd;
  /* soft primary blue hover */
}

/* Buttons inside expanded sections */
.sub-row .btn-outline-secondary {
  color: #495057;
  border-color: #adb5bd;
  background-color: #ffffff;
}

.sub-row .btn-outline-secondary:hover {
  background-color: #e9ecef;
  border-color: #868e96;
}

.sub-row .btn-outline-primary {
  color: #0d6efd;
  border-color: #0d6efd;
  background-color: #ffffff;
}

.sub-row .btn-outline-primary:hover {
  background-color: #e7f1ff;
  border-color: #0a58ca;
}



/* Container and Layout */
.roles-management-container {
  padding: 24px;
  font-family: 'Inter', sans-serif;
  background-color: #ffffff;
  min-height: 80%;
  border-radius: 16px;
  /* smooth rounded corners */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  /* soft floating effect */
  margin: 20px auto;
  /* center it horizontally */
  width: 95%;
  /* adjust width to leave space around edges */
  transition: all 0.3s ease;
}

/* Optional: subtle hover lift */
.roles-management-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

/* Header Section */
.roles-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.header-title h1 {
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
  font-size: 28px;
}

.header-subtitle {
  color: #64748b;
  margin: 0;
  font-size: 14px;
}

.header-icon {
  color: #3b82f6;
  font-size: 24px;
  margin-right: 12px;
}

.add-role-btn {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 14px;
}

.add-role-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Controls Section */
.controls-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}

.search-container {
  position: relative;
  flex-grow: 1;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: #64748b;
  z-index: 1;
}

.search-input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px 12px 44px;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-size-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #64748b;
}

.page-size-select {
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #e2e8f0;
  background-color: white;
  cursor: pointer;
  transition: border-color 0.3s;
}

.page-size-select:focus {
  border-color: #3b82f6;
  outline: none;
}

/* Table Card */
.table-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid #f1f5f9;
}

.table-container {
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: auto;
}

.roles-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 900px;
}

.roles-table thead {
  background-color: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid #e2e8f0;
}

.roles-table th {
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e2e8f0;
}

.roles-table td {
  padding: 16px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.table-row {
  transition: background-color 0.2s ease;
}

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

.role-name {
  font-weight: 600;
  color: #3b82f6;
  background-color: #eff6ff;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.action-btn {
  border: none;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.edit-btn {
  background-color: #eff6ff;
  color: #3b82f6;
}

.edit-btn:hover {
  background-color: #3b82f6;
  color: white;
  transform: scale(1.05);
}

.delete-btn {
  background-color: #fef2f2;
  color: #ef4444;
}

.delete-btn:hover {
  background-color: #ef4444;
  color: white;
  transform: scale(1.05);
}

/* Empty State */
.empty-row td {
  padding: 60px 20px;
  text-align: center;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #64748b;
}

.empty-icon {
  font-size: 48px;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.empty-subtext {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
}

/* Pagination Section */
.pagination-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.pagination-info {
  color: #64748b;
  font-size: 14px;
}

.highlight {
  color: #1e293b;
  font-weight: 600;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #475569;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  gap: 4px;
}

.page-btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  min-width: 36px;
}

.page-btn.active {
  background-color: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.page-btn:not(.active):hover {
  background-color: #f1f5f9;
}

.goto-page {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
}

.page-input {
  width: 60px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  text-align: center;
}

.page-input:focus {
  border-color: #3b82f6;
  outline: none;
}

.goto-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
}

.goto-btn:hover {
  background-color: #f1f5f9;
}

/* Modal Styles */
.modal-content {
  border-radius: 16px;
  overflow: hidden;
  border: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.modal-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #374151;
  font-size: 14px;
}

.required {
  color: #ef4444;
}

.form-input,
.form-textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  transition: all 0.3s ease;
  background-color: white;
}

.form-input:focus,
.form-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

.form-input.error {
  border-color: #ef4444;
}

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

.error-message {
  color: #ef4444;
  font-size: 12px;
  margin-top: 6px;
}

/* Button Styles */
.btn {
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #f1f5f9;
  color: #475569;
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .roles-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .controls-section {
    flex-direction: column;
    align-items: stretch;
  }

  .search-container {
    max-width: 100%;
  }

  .pagination-section {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .pagination-controls {
    justify-content: center;
  }

  .goto-page {
    justify-content: center;
  }
}
































/* Product List Container */
.product-list-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.product-list {
    padding: 1rem;
    display: grid;
    gap: 1rem;
}

/* Sticky Pagination */
.product-pagination-sticky {
    position: sticky;
    bottom: 0;
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 1rem;
    margin: 0 -1rem -1rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 10;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pagination-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #495057;
}

.pagination-btn:hover:not(:disabled) {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination-btn:disabled:hover {
    background: white;
    color: #495057;
    border-color: #dee2e6;
}

.pagination-pages {
    display: flex;
    gap: 0.25rem;
}

.page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
}

.page-number:hover {
    background: #f8f9fa;
    border-color: #007bff;
    transform: translateY(-1px);
}

.page-number.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: scale(1.05);
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6c757d;
    flex: 1;
    justify-content: center;
}

.pagination-info i {
    color: #007bff;
}

.pagination-info strong {
    color: #495057;
    font-weight: 600;
}

.pagination-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.page-size-selector label {
    margin: 0;
    white-space: nowrap;
}

.page-size-select {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
    background: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.page-size-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.refresh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.refresh-btn:hover {
    background: #28a745;
    color: white;
    border-color: #28a745;
    transform: rotate(90deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .pagination-main {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .pagination-info {
        justify-content: center;
        text-align: center;
    }
    
    .pagination-actions {
        width: 100%;
        justify-content: center;
    }
}













/* Modern Toast Styles */
.modern-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  min-width: 300px;
  max-width: 400px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 0;
  overflow: hidden;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.modern-toast.toast-visible {
  transform: translateX(0);
  opacity: 1;
}

.modern-toast.toast-hiding {
  transform: translateX(400px);
  opacity: 0;
}

.toast-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  position: relative;
}

.toast-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.toast-message {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  color: #1a1a1a;
  font-weight: 500;
  word-wrap: break-word;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 4px;
  border-radius: 6px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.05);
  opacity: 1;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--progress-color, #007AFF) 0%, var(--progress-color, #007AFF) 100%);
  transform-origin: left;
  animation: toastProgress linear forwards;
}

/* Toast Type Styles */
.toast-success {
  --progress-color: #34C759;
}
.toast-success .toast-icon {
  color: #34C759;
}

.toast-warning {
  --progress-color: #FF9500;
}
.toast-warning .toast-icon {
  color: #FF9500;
}

.toast-danger {
  --progress-color: #FF3B30;
}
.toast-danger .toast-icon {
  color: #FF3B30;
}

.toast-info {
  --progress-color: #007AFF;
}
.toast-info .toast-icon {
  color: #007AFF;
}

/* Progress Bar Animation */
@keyframes toastProgress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .modern-toast {
    min-width: unset;
    width: calc(100vw - 40px);
    max-width: 400px;
    right: 20px;
    left: 20px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .modern-toast {
    width: calc(100vw - 32px);
    right: 16px;
    left: 16px;
  }
  
  .toast-content {
    padding: 14px;
    gap: 10px;
  }
  
  .toast-message {
    font-size: 13px;
  }
}










/* SweetAlert Fixes */
.swal2-container {
    z-index: 99999 !important;
    backdrop-filter: none !important;
}

.swal2-popup {
    animation: none !important;
    border-radius: 12px !important;
}

.swal2-show {
    animation: swal2-show 0.3s !important;
}

.swal2-hide {
    animation: swal2-hide 0.15s ease-out !important;
}

/* Ensure proper modal stacking */
.swal2-shown {
    overflow: hidden !important;
    height: 100% !important;
}

/* Remove any custom animations that might interfere */
.swal2-backdrop-show {
    background: rgba(0, 0, 0, 0.4) !important;
}

/* Fix for modal not closing */
.swal2-close:focus {
    box-shadow: none !important;
}


/* Main Dialog Styling */
.styled-confirmation-popup {
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden !important;
    border: 1px solid #e8f4fd !important;
}

.styled-confirmation-header {
    padding: 0 !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

.dialog-title {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    text-align: center !important;
    padding: 1.5rem 2rem 0 !important;
}

.styled-confirmation-html {
    padding: 0 !important;
    margin: 0 !important;
}

/* Dialog Content */
.loan-confirmation-dialog {
    padding: 0 2rem 1rem;
}

.confirmation-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.confirmation-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.confirmation-icon i {
    font-size: 1.8rem;
    color: white;
}

.confirmation-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1.2rem;
    font-weight: 600;
}

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

.main-message {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
}

.highlight-product {
    color: #7c3aed;
    font-weight: 700;
    background: #f3e8ff;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

.highlight-amount {
    color: #059669;
    font-weight: 700;
    background: #f0fdf4;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

.highlight-borrower {
    color: #dc2626;
    font-weight: 700;
    background: #fef2f2;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

.verification-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffecb5;
    border-radius: 12px;
    color: #856404;
    font-size: 0.95rem;
    font-weight: 500;
}

.verification-note i {
    color: #f59e0b;
    font-size: 1.1rem;
}

/* Button Styling */
.styled-confirmation-actions {
    margin: 1.5rem 0 0 !important;
    padding: 0 2rem 1.5rem !important;
    gap: 1rem !important;
}

.styled-confirm-btn, .styled-cancel-btn {
    border: none !important;
    border-radius: 12px !important;
    padding: 0.875rem 1.5rem !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    min-width: 160px !important;
    height: auto !important;
}

.styled-confirm-btn {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3) !important;
}

.styled-confirm-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4) !important;
}

.styled-cancel-btn {
    background: linear-gradient(135deg, #6c757d, #adb5bd) !important;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3) !important;
}

.styled-cancel-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4) !important;
}

.confirm-btn-content, .cancel-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Responsive Design */
@media (max-width: 520px) {
    .styled-confirmation-popup {
        width: 95% !important;
        margin: 1rem !important;
    }
    
    .loan-confirmation-dialog {
        padding: 0 1rem 1rem;
    }
    
    .styled-confirmation-actions {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .styled-confirm-btn, .styled-cancel-btn {
        width: 100% !important;
        min-width: unset !important;
    }
    
    .main-message {
        font-size: 1rem;
    }
}

/* Emergency SweetAlert Fix */
.swal2-container {
    z-index: 99999 !important;
}

.swal2-popup {
    border-radius: 12px !important;
    padding: 1.5rem !important;
}

.swal2-close {
    border: none !important;
    background: none !important;
}

.swal2-close:focus {
    box-shadow: none !important;
}

/* Force close any stuck modals */
.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
    overflow: hidden !important;
    overflow-y: hidden !important;
}

/* Animation fix */
@keyframes swal2-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.swal2-spinner {
    animation: swal2-spin 1s linear infinite !important;
}










