@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* EasyLoansMitra Custom Brand Theme */
  --primary-blue: #0B3475;        /* Primary Blue */
  --dark-blue: #082653;           /* Dark Blue */
  --primary-green: #55B52C;       /* Primary Green (Primary Button 🟢) */
  --dark-green: #3E8F20;          /* Dark Green (Button Hover) */

  --accent-blue: #0B3475;
  --accent-blue-hover: #082653;
  
  --text-heading: #082653;        /* Heading */
  --text-title: #0B3475;          /* Title */
  --text-primary: #475467;        /* Paragraph */
  --text-secondary: #667085;      /* Secondary Text */
  --text-muted: #667085;
  
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #EEF4FC;
  --bg-light-green: #F1F9ED;      /* Light Green BG */
  --bg-light-blue: #EEF4FC;       /* Light Blue BG */
  
  --card-bg: #FFFFFF;             /* Card */
  --border-color: #D9E2EC;        /* Border */
  --border-hover: #0B3475;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(8, 38, 83, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(8, 38, 83, 0.08), 0 2px 4px -2px rgba(8, 38, 83, 0.03);
  --shadow-lg: 0 12px 24px -4px rgba(8, 38, 83, 0.12), 0 4px 8px -4px rgba(8, 38, 83, 0.04);
  
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-blue-hover);
}

/* Premium White Banking Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #FFFFFF;
  color: var(--text-primary);
  border-bottom: 1px solid #D9E2EC;
  padding: 0.85rem 0;
  box-shadow: 0 2px 10px rgba(8, 38, 83, 0.06);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Navbar Brand & Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.35rem;
  color: #0B3475;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: #082653;
  opacity: 0.95;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: #EEF4FC;
  color: #0B3475;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(8, 38, 83, 0.1);
}

.brand-text {
  font-weight: 700;
  color: #0B3475;
}

.brand-text-accent {
  color: #55B52C;
  font-weight: 600;
}

/* Navbar Profile Pill & Logout Icon */
.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-profile-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #EEF4FC;
  border: 1px solid #D9E2EC;
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-full);
  color: #0B3475;
  font-weight: 600;
  font-size: 0.9rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: #55B52C;
  box-shadow: 0 0 0 2px rgba(85, 181, 44, 0.35);
}

.status-dot.admin {
  background: #0B3475;
  box-shadow: 0 0 0 2px rgba(11, 52, 117, 0.35);
}

.pending-pill-badge {
  background: #F59E0B;
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.btn-settings-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #EEF4FC;
  border: 1px solid #D9E2EC;
  color: #0B3475;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-settings-icon:hover {
  background: #0B3475;
  border-color: #0B3475;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(11, 52, 117, 0.25);
  transform: translateY(-1px);
}

.btn-logout-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-logout-icon:hover {
  background: #DC2626;
  border-color: #DC2626;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  transform: translateY(-1px);
}

/* Classic & Modern Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-green);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(85, 181, 44, 0.25);
}

.btn-primary:hover {
  background: var(--dark-green);
  box-shadow: 0 6px 16px rgba(62, 143, 32, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--primary-blue);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(11, 52, 117, 0.2);
}

.btn-secondary:hover {
  background: var(--dark-blue);
  box-shadow: 0 6px 16px rgba(8, 38, 83, 0.3);
  transform: translateY(-1px);
}

.btn-success {
  background: #059669;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.btn-success:hover {
  background: #047857;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.3);
  transform: translateY(-1px);
}

.btn-danger {
  background: #DC2626;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.btn-danger:hover {
  background: #B91C1C;
  transform: translateY(-1px);
}

.btn-outline {
  background: #FFFFFF;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* Main Layout */
.main-content {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 2.25rem 2rem;
  overflow-y: auto;
}

/* Admin Sidebar Layout */
body.admin-body-fixed {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.admin-main-wrapper {
  flex: 1;
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  background: var(--bg-primary);
  overflow: hidden; /* Crucial: Locks layout from double scrollbars */
}

.admin-layout {
  display: flex;
  flex: 1;
  width: 100%;
  background: var(--bg-primary);
  overflow: hidden;
}

.admin-sidebar {
  width: 260px;
  min-width: 260px;
  height: 100%;
  background: #FFFFFF;
  border-right: 1px solid var(--border-color);
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 2px 0 12px rgba(15, 23, 42, 0.01);
  overflow-y: auto;
}

.sidebar-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  padding-left: 0.65rem;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.sidebar-link:hover {
  background: var(--bg-tertiary);
  color: var(--primary-blue);
  transform: translateX(3px);
}

.sidebar-link.active {
  background: #EFF6FF;
  color: var(--accent-blue);
  font-weight: 700;
  border-left: 4px solid var(--accent-blue);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.admin-main {
  flex: 1;
  padding: 2.5rem 3rem;
  height: 100%;
  overflow-y: auto; /* THIS ALONE WILL SCROLL */
  background: var(--bg-primary);
}

/* Modern Clean Cards with Soft Elevation */
.card,
.glass-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.85rem;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

.card:hover {
  border-color: #CBD5E1;
  box-shadow: var(--shadow-lg);
}

/* Authentication & Onboarding Pages */
.auth-wrapper {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 470px;
}

.auth-header {
  text-align: center;
  margin-bottom: 1.85rem;
}

.auth-header h1 {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.4rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* Login Tabs */
.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 1.75rem;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 0.85rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
}

.auth-tab.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

/* Demo OTP Banner */
.otp-alert-banner {
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  color: #B45309;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-align: center;
  font-size: 0.95rem;
}

/* KYC Onboarding Wizard Progress */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2.25rem;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.step-item.active {
  color: var(--accent-blue);
}

.step-item.completed {
  color: #059669;
}

.step-circle {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.step-item.active .step-circle {
  background: var(--accent-blue);
  color: #FFFFFF;
}

.step-item.completed .step-circle {
  background: #059669;
  color: #FFFFFF;
}

/* Blurred Dashboard Layout for Pending / Unverified Users */
.dashboard-blur-layout {
  filter: blur(9px);
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
  transition: all 0.3s ease;
  width: 100%;
  height: 100%;
}

.dashboard-blur-container {
  filter: blur(9px);
  pointer-events: none;
  user-select: none;
  opacity: 0.4;
  transition: all 0.3s ease;
}

/* Centered Floating Verification Overlay Card */
.pending-modal-overlay {
  position: fixed;
  top: 65px;
  left: 0;
  right: 0;
  bottom: 40px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: auto;
}

.pending-modal-card {
  background: #FFFFFF;
  border: 2px solid #3B82F6;
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.25rem;
  max-width: 550px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
  animation: popupCenter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pending-modal-card.rejected {
  border-color: #EF4444;
}

@keyframes popupCenter {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Dashboard Header & KPI Grids */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.dashboard-title h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-blue);
  margin-bottom: 0.25rem;
  letter-spacing: -0.03em;
}

.dashboard-title p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 1.35rem;
  margin-bottom: 2.5rem;
}

.kpi-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.kpi-info h3 {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.45rem;
}

.kpi-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.kpi-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: #EFF6FF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  font-size: 1.45rem;
}

/* Modern Crisp Data Tables */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  padding: 1rem 1.35rem;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.93rem;
  color: var(--text-primary);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover {
  background: #F8FAFC;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-badge.active,
.status-badge.approved {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.status-badge.pending {
  background: #FEF3C7;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.status-badge.rejected {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 5.5rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: #FFFFFF;
  border: 1px solid #D9E2EC;
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.35rem;
  box-shadow: 0 10px 25px -4px rgba(8, 38, 83, 0.15);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 320px;
  max-width: 420px;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  font-size: 0.92rem;
  color: #082653;
}

.toast.success {
  border-left: 4px solid #55B52C;
}

.toast.error {
  border-left: 4px solid #DC2626;
}

.toast.warning {
  border-left: 4px solid #F59E0B;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding: 0.75rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  background: var(--bg-secondary);
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 1rem;
  }
  .main-content {
    padding: 1.5rem 1rem;
  }
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
