/* ==========================================================================
   WORKLOAN SYSTEM - MODERN ADMIN PANEL STYLESHEET
   Aesthetics: Deep Space Slate Dark Mode with Emerald & Indigo Glassmorphism
   ========================================================================== */

:root {
  --bg-main: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.9);
  --bg-sidebar: #0b0f19;
  --bg-header: rgba(15, 23, 42, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-glow: rgba(99, 102, 241, 0.3);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.15);
  
  --emerald: #10b981;
  --emerald-light: rgba(16, 185, 129, 0.15);
  --amber: #f59e0b;
  --amber-light: rgba(245, 158, 11, 0.15);
  --rose: #f43f5e;
  --rose-light: rgba(244, 63, 94, 0.15);
  --sky: #06b6d4;
  --sky-light: rgba(6, 182, 212, 0.15);

  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
  --transition: all 0.25s ease-in-out;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%);
}

/* Layout Architecture */
.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--sky));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  box-shadow: var(--shadow-glow);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-nav {
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.nav-link svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  transition: var(--transition);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.nav-link:hover svg {
  stroke: var(--primary);
}

.nav-link.active {
  background: var(--primary-light);
  color: var(--text-main);
  border: 1px solid var(--border-color-glow);
}

.nav-link.active svg {
  stroke: var(--primary);
}

.sidebar-footer {
  padding: 20px 16px;
  border-top: 1px solid var(--border-color);
}

/* Main Content Area */
.main-content {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Header Navbar */
.top-navbar {
  height: 70px;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.page-title-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-title-badge h1 {
  font-size: 1.35rem;
  font-weight: 600;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--emerald), var(--primary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-logout {
  padding: 8px 16px;
  background: rgba(244, 63, 94, 0.1);
  color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-logout:hover {
  background: var(--rose);
  color: white;
}

/* Content Body */
.content-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Cards & Grid Layout */
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-color-glow);
  background: var(--bg-card-hover);
}

.stat-info .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-info .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.icon-indigo { background: var(--primary-light); color: var(--primary); }
.icon-emerald { background: var(--emerald-light); color: var(--emerald); }
.icon-amber { background: var(--amber-light); color: var(--amber); }
.icon-sky { background: var(--sky-light); color: var(--sky); }

/* Table Container & UI */
.panel-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-glow);
  transition: var(--transition);
  text-decoration: none;
}

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

/* Table Styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.custom-table th {
  background: rgba(15, 23, 42, 0.6);
  padding: 14px 18px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.8px;
}

.custom-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

.custom-table tbody tr {
  transition: var(--transition);
}

.custom-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-pending { background: var(--amber-light); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-approved { background: var(--sky-light); color: var(--sky); border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-disbursed { background: var(--emerald-light); color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-completed { background: var(--emerald-light); color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-rejected { background: var(--rose-light); color: var(--rose); border: 1px solid rgba(244, 63, 94, 0.3); }

/* Form Controls */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 11px 16px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Modal Window */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #1e293b;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  padding: 28px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  transform: scale(0.95);
  transition: var(--transition);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .sidebar { width: 80px; }
  .sidebar .brand-title, .sidebar .nav-link span { display: none; }
  .main-content { margin-left: 80px; }
  .nav-link { justify-content: center; padding: 12px; }
}

@media (max-width: 640px) {
  .top-navbar { padding: 0 16px; }
  .content-body { padding: 16px; }
  .grid-stats { grid-template-columns: 1fr; }
}

/* ==========================================================================
   MOBILE WELCOME SCREEN STYLES (SOURCE OF TRUTH MATCH)
   ========================================================================== */

.mobile-welcome-wrapper {
  background-color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.mobile-welcome-screen {
  background-color: #ffffff;
  color: #0f172a;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 32px 24px;
  max-width: 440px;
  margin: 0 auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  position: relative;
  box-sizing: border-box;
}

.mobile-status-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
  padding: 8px 4px 12px 4px;
}

.mobile-status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-header-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 8px;
}

.mobile-logo-img {
  width: 72px;
  height: auto;
  margin-bottom: 12px;
}

.mobile-brand-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: #0f172a;
}

.mobile-brand-title span.loan-highlight {
  color: #1d4ed8;
}

.mobile-brand-subtitle {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sub-blue-light {
  color: #2563eb;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.sub-blue-dark {
  color: #1e40af;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.mobile-illustration-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px 0 10px 0;
}

.mobile-illustration-img {
  width: 100%;
  max-width: 320px;
  height: auto;
}

.mobile-features-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 24px;
}

.bullet-dot {
  color: #1d4ed8;
  font-size: 1.1rem;
}

.mobile-actions-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.btn-mobile-primary {
  width: 100%;
  height: 52px;
  background: #1d4ed8;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.3);
  transition: all 0.2s ease;
}

.btn-mobile-primary:active {
  background: #1e40af;
  transform: scale(0.98);
}

.btn-mobile-outline {
  width: 100%;
  height: 52px;
  background: #ffffff;
  color: #1d4ed8;
  border: 1.5px solid #2563eb;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-mobile-outline:active {
  background: #eff6ff;
  transform: scale(0.98);
}

.btn-mobile-link {
  color: #1d4ed8;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  padding: 8px;
  margin-top: 4px;
}

/* ==========================================================================
   MOBILE INPUT FIELD & ICON STYLES (CREATE ACCOUNT SCREEN)
   ========================================================================== */

.input-icon-group {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}

.input-icon-group svg.left-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  stroke: #64748b;
  fill: none;
  pointer-events: none;
}

.input-icon-group svg.right-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  stroke: #64748b;
  fill: none;
  cursor: pointer;
}

.input-with-icon {
  width: 100%;
  height: 54px;
  padding: 0 46px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.98rem;
  color: #0f172a;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
  font-family: inherit;
}

.input-with-icon::placeholder {
  color: #94a3b8;
}

.input-with-icon:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 18px 0 24px 0;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.45;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #2563eb;
  margin-top: 1px;
  cursor: pointer;
  border-radius: 4px;
}

.terms-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

/* ==========================================================================
   WEB ADMIN PANEL LOGIN STYLES (SOURCE OF TRUTH MATCH)
   ========================================================================== */

.admin-login-wrapper {
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
}

.admin-login-card {
  background: #ffffff;
  width: 100%;
  max-width: 920px;
  min-height: 580px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.admin-card-header-bar {
  grid-column: 1 / -1;
  background: #0f2942;
  color: #ffffff;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}


/* Left Form Section */
.admin-login-left {
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
}

.admin-login-header {
  text-align: center;
  margin-bottom: 24px;
}

.admin-login-logo {
  width: 60px;
  height: auto;
  margin-bottom: 10px;
}

.admin-brand-title {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.admin-brand-title span.loan-blue {
  color: #1d4ed8;
}

.admin-panel-badge {
  color: #2563eb;
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 4px;
  display: block;
}

.admin-login-subtitle {
  font-size: 0.92rem;
  color: #64748b;
  margin-top: 6px;
}

/* Admin Input Fields */
.admin-input-group {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}

.admin-input-group svg.left-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  stroke: #64748b;
  fill: none;
  pointer-events: none;
}

.admin-input-group svg.right-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  stroke: #64748b;
  fill: none;
  cursor: pointer;
}

.admin-input {
  width: 100%;
  height: 50px;
  padding: 0 46px;
  background: #f0f7ff;
  border: 1.5px solid #dbeafe;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #0f172a;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
  font-family: inherit;
  font-weight: 500;
}

.admin-input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.admin-form-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 24px 0;
  font-size: 0.88rem;
}

.remember-me-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-weight: 500;
  cursor: pointer;
}

.remember-me-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  border-radius: 4px;
}

.forgot-password-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.btn-admin-submit {
  width: 100%;
  height: 48px;
  background: #1d4ed8;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.25);
  transition: all 0.2s ease;
}

.btn-admin-submit:hover {
  background: #1e40af;
  transform: translateY(-1px);
}

.admin-footer-text {
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 20px;
}

/* Right Banner Section */
.admin-login-right {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
  overflow: hidden;
}

.admin-login-right::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(15, 35, 60, 0.88), rgba(15, 23, 42, 0.92));
  z-index: 1;
}

.admin-banner-content {
  position: relative;
  z-index: 2;
}

.admin-banner-heading {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 32px;
  color: #ffffff;
}

.feature-pills-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-pill-item {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
}

.pill-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .admin-login-card {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  .admin-login-right {
    display: none;
  }
}



