:root {
  --blue-900: #021b57;
  --blue-800: #0a2f7f;
  --blue-700: #113f9c;
  --gold-500: #d6a645;
  --gold-400: #e4be6a;
  --choice-selected-bg: #fff3c4;
  --choice-selected-border: #021b57;
  --choice-selected-ring: rgba(2, 27, 87, 0.28);
  --choice-selected-shadow: rgba(2, 27, 87, 0.18);
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #4b5563;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
}

.app-bg {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 10%, rgba(228, 190, 106, 0.2), transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(17, 63, 156, 0.22), transparent 45%),
    linear-gradient(145deg, var(--blue-900), var(--blue-700));
  display: grid;
  place-items: center;
  padding: 96px 24px 24px;
}

.page {
  width: 100%;
  max-width: 500px;
}

.card {
  background: var(--surface);
  border-radius: 20px;
  padding: 30px 24px;
  box-shadow: 0 20px 45px rgba(2, 27, 87, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.brand {
  margin: 0;
  letter-spacing: 0.18em;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold-500);
}

h1 {
  margin: 8px 0;
  font-size: 2rem;
  color: var(--blue-900);
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.menu-links {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.classic-topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  z-index: 80;
}

.classic-topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 28px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.topbar-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
}

.topbar-home-text {
  color: var(--blue-900);
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form {
  margin-top: 18px;
}

.field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.field label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blue-900);
}

.input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
}

.input:focus {
  outline: 2px solid rgba(17, 63, 156, 0.25);
  border-color: var(--blue-700);
}

.btn {
  display: inline-block;
  width: 100%;
  text-decoration: none;
  text-transform: capitalize;
  text-align: center;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 12px;
  border: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn-inline {
  width: auto;
  min-width: 140px;
}

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

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

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

.right {
  margin-left: auto;
}

.blue-btn {
  background: var(--blue-900);
  color: #fff;
  box-shadow: 0 10px 22px rgba(2, 27, 87, 0.28);
}

.gold-btn {
  background: var(--gold-500);
  color: #1f2937;
  box-shadow: 0 10px 22px rgba(214, 166, 69, 0.3);
}

.result {
  margin-top: 16px;
  background: #0b1c4f;
  color: #eef2ff;
  border-radius: 12px;
  padding: 12px;
  font-size: 0.85rem;
  overflow-x: auto;
}

.stats-grid {
  display: grid;
  gap: 10px;
}

.stat-card {
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.stat-card-blue {
  background: #05246d;
  color: #fff;
}

.stat-card-gold {
  background: #f7f1df;
  color: #1f2937;
}

.stat-card-mint {
  background: #edf7ef;
  color: #1f2937;
}

.stat-card-lilac {
  background: #f1ecfb;
  color: #1f2937;
}

.stat-title {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.stat-value {
  margin: 6px 0;
  font-size: 1.9rem;
  font-weight: 800;
}

.stat-note {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.88;
}

.layout {
  width: 100%;
  max-width: 980px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 250px;
  background: rgba(2, 27, 87, 0.96);
  color: #fff;
  padding: 12px 0 20px;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  z-index: 30;
  display: flex;
  flex-direction: column;
}

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

.sidebar-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 4px 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
}

.sidebar-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.sidebar-logo-wrap {
  display: flex;
  justify-content: center;
  margin: 4px 0 14px;
}

.sidebar-logo {
  width: 110px;
  max-width: 70%;
  height: auto;
  display: block;
}

.profile-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px;
  margin: 0 12px 14px;
}

.profile-name {
  margin: 0;
  font-weight: 700;
  color: #fff;
}

.profile-level {
  margin: 4px 0 0;
  color: #e2e8f0;
  font-size: 0.9rem;
}

.sidebar-nav {
  display: grid;
  gap: 2px;
  padding-bottom: 40px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #dbeafe;
  text-decoration: none;
  padding: 11px 14px;
  border-left: 3px solid transparent;
  font-weight: 600;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.is-active {
  background: rgba(214, 166, 69, 0.22);
  border-left-color: var(--gold-500);
  color: #fde68a;
}

.nav-icon {
  width: 16px;
  text-align: center;
  color: #cbd5e1;
}

.sidebar-link.is-active .nav-icon {
  color: var(--gold-400);
}

.nav-arrow {
  margin-left: auto;
  color: #cbd5e1;
}

.content {
  width: 100%;
}

.sidebar-scroll {
  position: relative;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 8px;
}

.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.32);
  border-radius: 999px;
}

.scroll-hint {
  position: sticky;
  bottom: 0;
  width: 100%;
  text-align: center;
  font-size: 0.78rem;
  color: #e2e8f0;
  padding: 16px 10px 8px;
  background: linear-gradient(to bottom, rgba(2, 27, 87, 0), rgba(2, 27, 87, 0.98) 65%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.scroll-hint.is-visible {
  opacity: 1;
}

.menu-toggle {
  width: auto;
  min-width: 120px;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 10, 35, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.sidebar-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 10, 35, 0.55);
  z-index: 60;
}

.modal-overlay.is-open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 45px rgba(2, 27, 87, 0.35);
}

.modal-title {
  margin: 0;
  color: var(--blue-900);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-close {
  margin: 0;
  color: var(--blue-900);
  border-color: rgba(2, 27, 87, 0.25);
}

.is-hidden {
  display: none !important;
}

.feedback-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

.feedback-success {
  background: #e8f7ee;
  color: #166534;
  border: 1px solid #bbf7d0;
}

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

.quick-card {
  background: #0b2a77;
  color: #fff;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.quick-card-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
}

.quick-card-subtitle {
  margin: 0;
  color: #dbeafe;
  font-size: 0.92rem;
}

.quick-card-action {
  justify-self: start;
}

.notifications-card {
  background: #ffffff;
  color: var(--text);
  border: 1px solid #dbe4f0;
}

.notifications-card .quick-card-title {
  color: var(--blue-900);
}

.notifications-list {
  display: grid;
  gap: 8px;
}

.notification-item {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-left: 5px solid #94a3b8;
  border-radius: 10px;
  background: #f8fafc;
}

.notification-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notification-category {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 8px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: capitalize;
}

.notification-time {
  color: #64748b;
  font-size: 0.78rem;
  white-space: nowrap;
}

.notification-text {
  margin: 0;
  color: #0f172a;
  font-size: 0.92rem;
  line-height: 1.35;
}

.notification-empty {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
}

.notification-category-saldo,
.notification-category-pago {
  border-left-color: #16a34a;
}

.notification-category-saldo .notification-category,
.notification-category-pago .notification-category {
  background: #dcfce7;
  color: #166534;
}

.notification-category-envio,
.notification-category-retiro,
.notification-category-fallo {
  border-left-color: #dc2626;
}

.notification-category-envio .notification-category,
.notification-category-retiro .notification-category,
.notification-category-fallo .notification-category {
  background: #fee2e2;
  color: #991b1b;
}

.notification-category-recepcion,
.notification-category-abono {
  border-left-color: #0ea5e9;
}

.notification-category-recepcion .notification-category,
.notification-category-abono .notification-category {
  background: #e0f2fe;
  color: #075985;
}

.notification-category-creacion,
.notification-category-integrantes,
.notification-category-oferta {
  border-left-color: var(--gold-500);
}

.notification-category-creacion .notification-category,
.notification-category-integrantes .notification-category,
.notification-category-oferta .notification-category {
  background: #fef3c7;
  color: #92400e;
}

.notification-category-solicitud,
.notification-category-revision,
.notification-category-completada {
  border-left-color: #7c3aed;
}

.notification-category-solicitud .notification-category,
.notification-category-revision .notification-category,
.notification-category-completada .notification-category {
  background: #ede9fe;
  color: #5b21b6;
}

.notification-category-aprobacion,
.notification-category-aceptacion {
  border-left-color: #0284c7;
}

.notification-category-aprobacion .notification-category,
.notification-category-aceptacion .notification-category {
  background: #dbeafe;
  color: #1e40af;
}

.notification-category-rechazo {
  border-left-color: #f97316;
}

.notification-category-rechazo .notification-category {
  background: #ffedd5;
  color: #9a3412;
}

.choice-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.choice-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--blue-900);
  background: #f8fafc;
  box-shadow: inset 0 0 0 0 transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.choice-pill.is-selected,
.choice-pill:has(input:checked) {
  border-color: var(--choice-selected-border);
  background: var(--choice-selected-bg);
  color: var(--blue-900);
  box-shadow: inset 0 0 0 2px var(--choice-selected-border), 0 8px 18px var(--choice-selected-shadow);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.choice-grid .btn {
  min-width: 0;
  width: 100%;
}

.interest-btn.is-selected,
.installment-btn.is-selected {
  outline: 3px solid var(--choice-selected-border);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--choice-selected-ring), 0 12px 24px var(--choice-selected-shadow);
  transform: translateY(-1px);
}

.installment-btn.is-selected {
  background: var(--gold-500);
  color: var(--blue-900);
}

.interest-btn.is-selected {
  background: var(--blue-900);
  color: #fff;
}

.input-selected {
  border-color: var(--gold-500);
  outline: 3px solid var(--choice-selected-ring);
  box-shadow: inset 0 0 0 1px var(--choice-selected-border);
  background: #fffdf8;
}

.sim-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.sim-table th,
.sim-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.sim-table th {
  color: #dbeafe;
  font-weight: 700;
}

.sim-note {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: #dbeafe;
  opacity: 0.9;
}

.choice-helper {
  margin: 8px 2px 0;
  font-size: 0.82rem;
  color: #6b7280;
}

img,
video,
iframe {
  max-width: 100%;
}

img,
video {
  display: block;
  height: auto;
}

iframe {
  display: block;
  border: 0;
}

.video-wrap {
  width: 100%;
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  background: #09183f;
  aspect-ratio: 16 / 9;
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
}

.edu-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  margin-top: 12px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(2, 27, 87, 0.12);
}

.member-card {
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 6px 16px rgba(2, 27, 87, 0.08);
}

.member-card + .member-card {
  margin-top: 10px;
}

.member-name {
  margin: 0;
  color: var(--blue-900);
  font-weight: 700;
}

.member-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.member-badge {
  background: #edf7ef;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.users-summary-table-wrap {
  overflow-x: auto;
}

.users-summary-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.users-summary-table th,
.users-summary-table td {
  padding: 12px 10px;
  border-top: 1px solid #dbe4f0;
  text-align: left;
  vertical-align: middle;
}

.users-summary-table th {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.users-summary-user {
  display: grid;
  gap: 4px;
}

.users-summary-name {
  margin: 0;
  color: var(--blue-900);
  font-weight: 800;
}

.users-summary-level {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.users-summary-empty {
  color: #64748b;
  text-align: center;
}

.users-summary-action-cell {
  text-align: right;
}

.users-summary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue-900);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 800;
}

.loans-distribution-layout {
  display: grid;
  gap: 14px;
}

.loans-distribution-chart-wrap {
  position: relative;
  min-height: 280px;
}

.loans-distribution-table {
  min-width: 100%;
}

.loan-health-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.loan-health-badge-current {
  background: #edf8ef;
  color: #267447;
}

.loan-health-badge-due-soon {
  background: #fff6df;
  color: #9a6700;
}

.loan-health-badge-overdue {
  background: #fff2f0;
  color: #b9382f;
}

.user-detail-grid {
  display: grid;
  gap: 10px;
}

.user-detail-meta {
  display: grid;
  gap: 10px;
}

.user-detail-meta-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f8fafc;
}

.user-detail-meta-label {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.user-detail-loans {
  display: grid;
  gap: 12px;
}

.user-loan-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #f8fafc;
}

.user-loan-grid {
  display: grid;
  gap: 10px;
}

@media (min-width: 768px) {
  .user-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .user-detail-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-loan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .loans-distribution-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
  }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-900);
  font-weight: 700;
  text-decoration: none;
}

.education-list {
  display: grid;
  gap: 12px;
}

.education-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #dbe4f0;
  box-shadow: 0 10px 24px rgba(2, 27, 87, 0.08);
  text-decoration: none;
  color: inherit;
}

.education-card-eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-500);
}

.education-card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--blue-900);
}

.education-card-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.education-card-meta {
  color: var(--blue-700);
  font-weight: 700;
  font-size: 0.9rem;
}

.education-hero {
  background: linear-gradient(135deg, #0b2a77, #1546aa);
}

.education-shell {
  display: grid;
  gap: 14px;
}

.lesson-sidebar-panel,
.lesson-view-card {
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(2, 27, 87, 0.08);
}

.lesson-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.lesson-switch {
  width: 100%;
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #dbe4f0;
  background: #f8fafc;
  color: var(--text);
  font-weight: 700;
}

.lesson-switch.is-active {
  border-color: var(--gold-500);
  background: #fff7e3;
}

.lesson-switch.is-completed {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.lesson-counter {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue-700);
}

.lesson-view-title {
  margin: 10px 0 8px;
  color: var(--blue-900);
}

.lesson-section-title {
  margin: 0 0 8px;
  color: var(--blue-900);
}

.lesson-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.lesson-parts {
  display: grid;
  gap: 14px;
}

.assessment-form {
  display: grid;
  gap: 12px;
}

.lesson-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.progress-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eaf2ff;
  color: var(--blue-900);
  font-size: 0.82rem;
  font-weight: 800;
}

.lesson-countdown {
  color: #92400e;
  font-size: 0.9rem;
  font-weight: 700;
}

@media (max-width: 520px) {
  .card {
    padding: 24px 18px;
  }

  h1 {
    font-size: 1.7rem;
  }
}

@media (min-width: 768px) {
  .sidebar {
    position: static;
    transform: none;
    height: auto;
    border-radius: 16px;
    width: 230px;
  }

  .sidebar-close {
    display: none;
  }

  .sidebar-overlay {
    display: none;
  }

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

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

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

  .education-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .education-shell {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    align-items: start;
  }

  .lesson-sidebar-panel {
    position: sticky;
    top: 24px;
  }
}

/* Loans detail panels: keep content contained and readable on medium widths */
.loan-detail-card {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.loan-detail-card .top-row {
  flex-wrap: wrap;
  align-items: flex-start;
}

.loan-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1rem 1.25rem !important;
  width: 100%;
}

.loan-detail-grid > div,
.loan-payment-stats > div,
.loan-stat-box {
  min-width: 0;
}

.loan-detail-value,
.loan-meta-note,
.quick-card-subtitle {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.loan-payment-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 0.85rem !important;
  width: 100%;
}

.loan-stat-box {
  width: 100%;
}

.loan-payments-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.loan-payments-table {
  width: 100%;
  min-width: 680px;
}

@media (max-width: 900px) {
  .loan-payment-stats {
    grid-template-columns: 1fr !important;
  }
}
