/* public/css/style.css */
/* EasyLoan Design System */

:root {
  --color-primary: #1a56db;
  --color-primary-dark: #1e429f;
  --color-secondary: #16a34a;
  --color-dark: #111827;
  --color-gray-900: #1f2937;
  --color-gray-700: #374151;
  --color-gray-500: #6b7280;
  --color-gray-300: #d1d5db;
  --color-gray-100: #f3f4f6;
  --color-gray-50: #f9fafb;
  --color-white: #ffffff;
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-danger: #dc2626;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;

  --font-base: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  color: var(--color-gray-900);
  background: var(--color-white);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-gray-50);
}

.btn-block {
  width: 100%;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-100);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--color-primary);
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-weight: 500;
  color: var(--color-gray-700);
  transition: color 0.15s ease;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--color-gray-900);
  border-radius: 2px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--color-gray-100);
  gap: 16px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-weight: 500;
  color: var(--color-gray-700);
  padding: 8px 0;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #eef2ff 0%, #f0fdf4 100%);
  padding: 80px 24px;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: var(--color-white);
  color: var(--color-primary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-dark);
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--color-primary);
}

.hero p {
  font-size: 17px;
  color: var(--color-gray-700);
  margin-bottom: 28px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-visual {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px;
}

.hero-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hero-stat {
  background: var(--color-gray-50);
  border-radius: var(--radius-md);
  padding: 18px;
}

.hero-stat .num {
  font-size: 26px;
  font-weight: 800;
  color: var(--color-primary);
}

.hero-stat .label {
  font-size: 13px;
  color: var(--color-gray-500);
  margin-top: 4px;
}

/* ---------- Section shared ---------- */
.section {
  padding: 80px 24px;
}

.section-alt {
  background: var(--color-gray-50);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-tag {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--color-gray-500);
  font-size: 16px;
}

/* ---------- About ---------- */
.about-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
}

.about-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.about-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--color-gray-700);
}

.check-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  margin-top: 2px;
}

/* ---------- How it works ---------- */
.steps-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-100);
  position: relative;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
  color: var(--color-dark);
}

.step-card p {
  font-size: 14px;
  color: var(--color-gray-500);
}

/* ---------- Partners ---------- */
.partners-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.partner-logo {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-500);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 16px;
}

.partner-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

/* ---------- Logo image ---------- */
.logo-img {
  height: 50px;
  width: auto;
  display: block;
}

.footer-logo-img {
  height: 44px;
  width: auto;
  display: block;
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
}

.logo-admin-tag {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Contact ---------- */
.contact-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.contact-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-100);
  text-align: center;
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-gray-100);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.contact-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.contact-card p {
  color: var(--color-gray-500);
  font-size: 14px;
}

.social-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

.social-row a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-700);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark);
  color: var(--color-gray-300);
  padding: 56px 24px 24px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
}

.footer-col h4 {
  color: white;
  font-size: 14px;
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 14px;
  color: var(--color-gray-300);
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  font-size: 13px;
  text-align: center;
  color: var(--color-gray-500);
}

/* ---------- Responsive (public site) ---------- */
@media (max-width: 968px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

@media (max-width: 768px) {
  .nav-links,
  .nav-actions {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero {
    padding: 48px 20px;
  }

  .section {
    padding: 56px 20px;
  }
}

@media (max-width: 560px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }

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

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

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

/* ---------- Auth Pages ---------- */
.auth-page {
  min-height: calc(100vh - 73px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef2ff 0%, #f0fdf4 100%);
  padding: 48px 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
}

.auth-card-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-card-header .logo {
  justify-content: center;
  margin-bottom: 16px;
}

.auth-card-header h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 6px;
}

.auth-card-header p {
  color: var(--color-gray-500);
  font-size: 14px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray-700);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: var(--font-base);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

.form-control.input-error {
  border-color: var(--color-danger);
}

.field-error {
  color: var(--color-danger);
  font-size: 13px;
  margin-top: 6px;
  display: none;
}

.field-error.visible {
  display: block;
}

.form-row-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 14px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-gray-700);
}

.link-text {
  color: var(--color-primary);
  font-weight: 600;
}

.auth-footer-text {
  text-align: center;
  margin-top: 22px;
  font-size: 14px;
  color: var(--color-gray-500);
}

/* Alert / notification banner shown inside forms */
.alert {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 18px;
}

.alert.visible {
  display: flex;
}

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

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

/* Spinner for buttons while submitting */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: none;
}

.btn.loading .spinner {
  display: inline-block;
}

.btn.loading .btn-text {
  opacity: 0.85;
}

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

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

@media (max-width: 480px) {
  .auth-card {
    padding: 32px 22px;
  }
}

/* ---------- Dashboard Layout ---------- */
.dash-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-100);
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.dash-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.dash-welcome {
  font-size: 14px;
  color: var(--color-gray-500);
}

.dash-welcome strong {
  color: var(--color-dark);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--color-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: var(--color-gray-700);
  position: relative;
}

.icon-btn:hover {
  background: var(--color-gray-300);
}

.dash-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

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

.stat-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-100);
}

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

.stat-icon.blue { background: #dbeafe; color: var(--color-primary); }
.stat-icon.green { background: #dcfce7; color: var(--color-secondary); }
.stat-icon.amber { background: #fef3c7; color: var(--color-warning); }
.stat-icon.red { background: #fee2e2; color: var(--color-danger); }

.stat-card .stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--color-dark);
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--color-gray-500);
  margin-top: 4px;
}

/* Action cards */
.actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

.action-card {
  background: linear-gradient(135deg, var(--color-primary), #1e40af);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: white;
  cursor: pointer;
  border: none;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-md);
}

.action-card.alt {
  background: linear-gradient(135deg, var(--color-secondary), #15803d);
}

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

.action-card .action-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.action-card h3 {
  font-size: 19px;
  margin-bottom: 6px;
}

.action-card p {
  font-size: 14px;
  opacity: 0.9;
}

/* Section blocks */
.dash-section {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-100);
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
  overflow: hidden;
}

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

.dash-section-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-dark);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.data-table thead th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-gray-500);
  padding: 12px 20px;
  background: var(--color-gray-50);
  border-bottom: 1px solid var(--color-gray-100);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 14px 20px;
  font-size: 14px;
  color: var(--color-gray-900);
  border-bottom: 1px solid var(--color-gray-100);
  white-space: nowrap;
}

.data-table tbody tr:nth-child(even) {
  background: var(--color-gray-50);
}

.data-table tbody tr:hover {
  background: #eef2ff;
}

.empty-row td {
  text-align: center;
  color: var(--color-gray-500);
  padding: 32px 20px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.badge-pending { background: #fef3c7; color: #92400e; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--color-gray-100) 25%, var(--color-gray-300) 37%, var(--color-gray-100) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: 6px;
  color: transparent !important;
}

@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 280px;
  max-width: 360px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.25s ease;
}

@keyframes toast-in {
  from { transform: translateX(30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-success { background: #166534; color: white; }
.toast-error { background: #991b1b; color: white; }
.toast-info { background: var(--color-gray-900); color: white; }

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

@media (max-width: 560px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .dash-welcome {
    display: none;
  }
}

/* Mobile: turn history tables into stacked cards */
@media (max-width: 640px) {
  table.data-table thead {
    display: none;
  }
  table.data-table {
    min-width: 0;
  }
  table.data-table, table.data-table tbody, table.data-table tr, table.data-table td {
    display: block;
    width: 100%;
  }
  table.data-table tr {
    border-bottom: 1px solid var(--color-gray-100);
    padding: 12px 16px;
  }
  table.data-table td {
    border: none;
    padding: 6px 0;
    white-space: normal;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4px 12px;
    text-align: right;
  }
  table.data-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--color-gray-500);
    font-size: 12px;
    text-align: left;
  }
  .table-wrap {
    overflow-x: visible;
  }
}

/* ---------- Modals ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

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

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-gray-100);
  position: sticky;
  top: 0;
  background: var(--color-white);
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-dark);
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--color-gray-100);
  cursor: pointer;
  font-size: 16px;
  color: var(--color-gray-700);
}

.modal-close:hover {
  background: var(--color-gray-300);
}

.modal-body {
  padding: 24px;
}

.modal-footer-note {
  font-size: 13px;
  color: var(--color-gray-500);
  margin-top: 4px;
}

.balance-preview {
  background: var(--color-gray-50);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--color-gray-700);
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
}

.balance-preview strong {
  color: var(--color-dark);
}

.file-drop {
  border: 2px dashed var(--color-gray-300);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.file-drop:hover {
  border-color: var(--color-primary);
  background: #f5f8ff;
}

.file-drop.has-file {
  border-color: var(--color-secondary);
  background: #f0fdf4;
}

.file-drop input[type="file"] {
  display: none;
}

.file-drop-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.file-drop-text {
  font-size: 14px;
  color: var(--color-gray-700);
  font-weight: 600;
}

.file-drop-hint {
  font-size: 12px;
  color: var(--color-gray-500);
  margin-top: 4px;
}

.file-preview-name {
  font-size: 13px;
  color: var(--color-secondary);
  margin-top: 8px;
  font-weight: 600;
}

/* Confirmation step inside modal */
.confirm-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 18px;
}

.confirm-box p {
  font-size: 14px;
  color: #92400e;
  margin-bottom: 4px;
}

.confirm-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--color-gray-300);
}

.confirm-row:last-child {
  border-bottom: none;
}

.confirm-row .label {
  color: var(--color-gray-500);
}

.confirm-row .value {
  font-weight: 700;
  color: var(--color-dark);
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.modal-actions .btn {
  flex: 1;
}

@media (max-width: 480px) {
  .modal-box {
    max-width: 100%;
  }
}

/* ---------- Admin Theme ---------- */
.admin-body {
  background: #0f172a;
}

.admin-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 20px;
}

.admin-login-card {
  width: 100%;
  max-width: 420px;
  background: #1e293b;
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
  border: 1px solid #334155;
}

.admin-login-card .auth-card-header h1 {
  color: white;
}

.admin-login-card .auth-card-header p {
  color: #94a3b8;
}

.admin-login-card label {
  color: #cbd5e1;
}

.admin-login-card .form-control {
  background: #0f172a;
  border-color: #334155;
  color: white;
}

.admin-login-card .form-control:focus {
  border-color: var(--color-primary);
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(26, 86, 219, 0.15);
  color: #93c5fd;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* Admin dashboard shell */
.admin-shell {
  display: flex;
  min-height: 100vh;
  background: #f1f5f9;
}

.admin-sidebar {
  width: 240px;
  background: #0f172a;
  color: #cbd5e1;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 150;
  transition: transform 0.2s ease;
}

.admin-sidebar-header {
  padding: 22px 20px;
  border-bottom: 1px solid #1e293b;
}

.admin-sidebar-header .logo {
  color: white;
}

.admin-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.admin-nav-link:hover {
  background: #1e293b;
  color: white;
}

.admin-nav-link.active {
  background: var(--color-primary);
  color: white;
}

.admin-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid #1e293b;
}

.admin-content {
  flex: 1;
  margin-left: 240px;
  padding: 28px 32px 64px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-topbar h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-dark);
}

.sidebar-toggle {
  display: none;
}

.admin-page-section {
  display: none;
}

.admin-page-section.active {
  display: block;
}

@media (max-width: 968px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-content {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: flex;
  }
}

/* ---------- Admin Loans Table ---------- */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.search-input-wrap input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1.5px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  font-size: 14px;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-gray-500);
  font-size: 14px;
}

.filter-select {
  padding: 10px 14px;
  border: 1.5px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  font-size: 14px;
  background: white;
}

.table-action-btn {
  border: none;
  background: var(--color-gray-100);
  color: var(--color-gray-700);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 4px;
  margin-bottom: 4px;
}

.table-action-btn:hover {
  background: var(--color-gray-300);
}

.table-action-btn.view { background: #dbeafe; color: #1e40af; }
.table-action-btn.approve { background: #dcfce7; color: #166534; }
.table-action-btn.reject { background: #fee2e2; color: #991b1b; }

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

/* Detail modal image */
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-gray-100);
  font-size: 14px;
}

.detail-row .label {
  color: var(--color-gray-500);
}

.detail-row .value {
  font-weight: 600;
  color: var(--color-dark);
  text-align: right;
}

.proof-image-preview {
  width: 100%;
  border-radius: var(--radius-md);
  margin-top: 12px;
  border: 1px solid var(--color-gray-100);
  cursor: zoom-in;
}

/* ---------- Transaction Type Badges ---------- */
.badge-credit { background: #dcfce7; color: #166534; }
.badge-debit { background: #fee2e2; color: #991b1b; }
