/* ====================================================================
   JKLF Microfinance (jklf.rdfcmicrofinance.com)
   Single-Branch Microfinance System - Custom Stylesheet
   ==================================================================== */

:root {
  --primary: #0f766e;        /* Deep Teal */
  --primary-hover: #0d9488;  /* Vibrant Teal */
  --primary-dark: #115e59;
  --primary-light: #ccfbf1;
  --accent: #d97706;         /* Amber Accent */
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --info: #2563eb;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Smooth Navigation Active States */
.nav-tab {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
}
.nav-tab.active {
  background-color: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}
.nav-tab.active svg {
  stroke: #ffffff;
}

/* Card Glow & Glass effects */
.fintech-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.fintech-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

/* Status Badges */
.badge-active, .badge-paid, .badge-verified {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.badge-pending, .badge-applied, .badge-under_review {
  background-color: #fef9c3;
  color: #a16207;
  border: 1px solid #fef08a;
}
.badge-approved {
  background-color: #e0e7ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}
.badge-rejected, .badge-defaulter, .badge-overdue {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.badge-closed {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Daily EMI highlight ticker */
.daily-emi-pill {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  color: #ffffff;
  border-radius: 9999px;
  padding: 4px 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.3);
}

/* Multi-loan cycle badge */
.cycle-badge {
  background-color: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 6px;
}

/* Responsive Table container */
.table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* Modal Backdrop */
.modal-overlay {
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

/* Thermal / Receipt Print Styling */
@media print {
  body * {
    visibility: hidden;
  }
  #printable-receipt-modal, #printable-receipt-modal * {
    visibility: visible;
  }
  #printable-receipt-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
    background: white !important;
  }
  .no-print {
    display: none !important;
  }
  .receipt-box {
    border: 2px solid #000 !important;
    box-shadow: none !important;
    max-width: 450px !important;
    margin: 0 auto;
  }
}
