@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --secondary: #1d4ed8;
  --secondary-light: #3b82f6;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --bg: #f1f5f9;
  --bg-dark: #0f172a;
  --card: #ffffff;
  --card-dark: #1e293b;
  --text: #0f172a;
  --text-light: #64748b;
  --text-white: #f8fafc;
  --success: #10b981;
  --success-bg: #d1fae5;
  --danger: #ef4444;
  --danger-bg: #fee2e2;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --info: #3b82f6;
  --info-bg: #dbeafe;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary); }

/* Utilities */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.grid { display: grid; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none !important; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--secondary); color: white; }
.btn-primary:hover:not(:disabled) { background: #1e40af; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-secondary { background: var(--primary); color: white; }
.btn-secondary:hover:not(:disabled) { background: var(--primary-light); transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: var(--primary); }
.btn-accent:hover:not(:disabled) { background: var(--accent-light); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--secondary); border: 2px solid var(--secondary); }
.btn-ghost:hover:not(:disabled) { background: var(--secondary); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; }

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 18px; font-weight: 700; color: var(--primary); }
.card-subtitle { font-size: 13px; color: var(--text-light); margin-top: 4px; }

/* Form Elements */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: white;
  transition: var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}
.form-input.error { border-color: var(--danger); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.form-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; display: none; }
.form-input.error + .form-error { display: block; }

/* Input with icon */
.input-group {
  position: relative;
}
.input-group .form-input { padding-left: 40px; }
.input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 16px;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-success { background: var(--success-bg); color: #059669; }
.badge-danger { background: var(--danger-bg); color: #dc2626; }
.badge-warning { background: var(--warning-bg); color: #d97706; }
.badge-info { background: var(--info-bg); color: #2563eb; }
.badge-neutral { background: #f1f5f9; color: var(--text-light); }

/* Toast */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  min-width: 320px;
  max-width: 420px;
}
.toast-success { background: var(--success); color: white; }
.toast-error { background: var(--danger); color: white; }
.toast-warning { background: var(--warning); color: var(--primary); }
.toast-info { background: var(--secondary); color: white; }
.toast-icon { font-size: 20px; flex-shrink: 0; }
.toast-message { flex: 1; font-size: 14px; font-weight: 500; }
.toast-close { background: none; border: none; color: inherit; cursor: pointer; font-size: 18px; opacity: 0.7; padding: 0; }
.toast-close:hover { opacity: 1; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn 0.2s ease;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-light); padding: 4px; line-height: 1; border-radius: 4px; }
.modal-close:hover { color: var(--text); background: var(--bg); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Table */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
tr:hover td { background: #f8fafc; }

/* ===================== AUTH PAGES ===================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a5f 50%, var(--secondary) 100%);
  padding: 24px;
}
.auth-container {
  display: flex;
  width: 100%;
  max-width: 1000px;
  min-height: 600px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.auth-brand {
  flex: 1;
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a5f 100%);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-brand::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  top: -100px;
  right: -100px;
}
.auth-brand::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  bottom: -50px;
  left: -50px;
}
.auth-brand-content { position: relative; z-index: 1; }
.auth-logo {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 16px;
}
.auth-logo span { color: white; }
.auth-tagline {
  font-size: 32px;
  font-weight: 700;
  color: white;
  line-height: 1.3;
  margin-bottom: 16px;
}
.auth-description {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  max-width: 360px;
}
.auth-features { margin-top: 32px; display: flex; flex-direction: column; gap: 16px; }
.auth-feature { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.8); font-size: 14px; }
.auth-feature .feature-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.auth-form-container {
  flex: 1;
  background: white;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-form-header { margin-bottom: 32px; }
.auth-form-header h2 { font-size: 28px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.auth-form-header p { color: var(--text-light); font-size: 15px; }

.auth-form .btn { width: 100%; padding: 14px; }
.auth-form .form-group:last-child { margin-bottom: 0; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-light); }
.auth-switch a { color: var(--secondary); font-weight: 600; cursor: pointer; }
.auth-switch a:hover { text-decoration: underline; }
.password-toggle { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text-light); padding: 4px; }

/* ===================== APP LAYOUT ===================== */
.app-layout { display: none; min-height: 100vh; }
.app-layout.active { display: flex; }
.auth-page.hidden { display: none; }

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--primary);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: var(--transition);
}
.sidebar-brand {
  padding: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
}
.sidebar-logo span { color: white; }
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: var(--primary);
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 12px; color: rgba(255,255,255,0.6); }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-section { margin-bottom: 24px; }
.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  padding: 0 12px;
  margin-bottom: 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.1); color: white; }
.nav-item.active { background: rgba(255,255,255,0.15); color: white; }
.nav-item .nav-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}
.sidebar-footer { padding: 16px 12px; border-top: 1px solid rgba(255,255,255,0.1); }

/* Main area */
.main-area {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.main-header {
  background: white;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.main-header-left { display: flex; align-items: center; gap: 16px; }
.main-header h1 { font-size: 20px; font-weight: 700; }
.main-header-right { display: flex; align-items: center; gap: 16px; }
.header-date { font-size: 13px; color: var(--text-light); }
.header-notif {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: var(--transition);
}
.header-notif:hover { background: var(--border); }
.header-notif .notif-dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid white;
}

.main-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

/* ===================== PAGE SECTIONS ===================== */
.page-section { display: none; animation: fadeIn 0.3s ease; }
.page-section.active { display: block; }

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.page-header h2 { font-size: 24px; font-weight: 800; color: var(--primary); }
.page-header p { color: var(--text-light); font-size: 14px; margin-top: 4px; }

/* ===================== DASHBOARD ===================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.stat-card .stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.stat-icon.blue { background: var(--info-bg); color: var(--secondary); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.gold { background: var(--warning-bg); color: var(--accent); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-label { font-size: 13px; color: var(--text-light); font-weight: 500; margin-bottom: 4px; }
.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}
.stat-change {
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.dashboard-grid .card:first-child { grid-column: 1 / -1; }

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.quick-action:hover { background: var(--secondary); color: white; transform: translateY(-2px); }
.quick-action .qa-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  transition: var(--transition);
}
.quick-action:hover .qa-icon { background: rgba(255,255,255,0.2); }

/* Transaction list */
.transaction-list { display: flex; flex-direction: column; gap: 8px; }
.transaction-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  transition: var(--transition);
  cursor: pointer;
}
.transaction-item:hover { background: var(--border); }
.tx-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.tx-icon.credit { background: var(--success-bg); color: var(--success); }
.tx-icon.debit { background: var(--danger-bg); color: var(--danger); }
.tx-icon.transfer { background: var(--info-bg); color: var(--secondary); }
.tx-info { flex: 1; min-width: 0; }
.tx-title { font-size: 14px; font-weight: 600; color: var(--text); }
.tx-date { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.tx-amount { font-size: 15px; font-weight: 700; text-align: right; }
.tx-amount.credit { color: var(--success); }
.tx-amount.debit { color: var(--danger); }

.view-all-link { text-align: center; padding-top: 12px; }
.view-all-link a { color: var(--secondary); font-size: 14px; font-weight: 600; cursor: pointer; }
.view-all-link a:hover { text-decoration: underline; }

/* Chart container */
.chart-container { position: relative; width: 100%; height: 280px; }
.chart-container canvas { width: 100% !important; height: 100% !important; }

/* ===================== ACCOUNTS ===================== */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.account-card {
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a5f 100%);
  border-radius: var(--radius);
  padding: 28px;
  color: white;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}
.account-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.account-card::before {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  top: -60px; right: -60px;
}
.account-card::after {
  content: '';
  position: absolute;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  bottom: -40px; left: -40px;
}
.account-card.savings { background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%); }
.account-card.current { background: linear-gradient(135deg, #1e293b 0%, #059669 100%); }
.account-card.fixed { background: linear-gradient(135deg, #1e293b 0%, #d97706 100%); }
.account-card .card-content { position: relative; z-index: 1; }
.account-type {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  margin-bottom: 8px;
}
.account-number {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 20px;
  font-family: 'Courier New', monospace;
}
.account-balance-label { font-size: 12px; opacity: 0.7; }
.account-balance {
  font-size: 32px;
  font-weight: 800;
}
.account-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.account-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
}
.status-dot.inactive { background: var(--danger); }

/* ===================== TRANSACTIONS ===================== */
.transaction-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.transaction-filters .form-input,
.transaction-filters .form-select {
  width: auto;
  min-width: 160px;
}
.transaction-filters .btn { flex-shrink: 0; }

/* ===================== LOANS ===================== */
.loans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.loan-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border-top: 4px solid var(--secondary);
}
.loan-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.loan-card.approved { border-top-color: var(--success); }
.loan-card.pending { border-top-color: var(--warning); }
.loan-card.rejected { border-top-color: var(--danger); }
.loan-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.loan-card .loan-type { font-size: 13px; color: var(--text-light); margin-bottom: 16px; }
.loan-card .loan-amount { font-size: 24px; font-weight: 800; color: var(--primary); margin-bottom: 12px; }
.loan-details { display: flex; justify-content: space-between; font-size: 13px; padding-top: 12px; border-top: 1px solid var(--border); }
.loan-details span { color: var(--text-light); }
.loan-details strong { color: var(--text); display: block; margin-top: 2px; }

.loan-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.loan-type-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 2px solid var(--border);
  cursor: pointer;
}
.loan-type-card:hover { border-color: var(--secondary); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.loan-type-card .lt-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.loan-type-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.loan-type-card p { font-size: 13px; color: var(--text-light); margin-bottom: 12px; }
.loan-type-card .lt-rate { font-size: 24px; font-weight: 800; color: var(--secondary); }

/* ===================== BILL PAY ===================== */
.bills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.bill-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 2px solid var(--border);
  cursor: pointer;
}
.bill-card:hover { border-color: var(--secondary); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.bill-card .bill-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.bill-card h3 { font-size: 14px; font-weight: 600; }

/* ===================== ADMIN ===================== */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.admin-stat {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.admin-stat .admin-stat-value { font-size: 32px; font-weight: 800; color: var(--primary); }
.admin-stat .admin-stat-label { font-size: 13px; color: var(--text-light); margin-top: 4px; }

/* ===================== PROFILE ===================== */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.profile-grid .card:first-child { grid-column: 1 / -1; }
.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
}
.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.profile-info h2 { font-size: 24px; font-weight: 700; }
.profile-info p { color: var(--text-light); font-size: 14px; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form-container { flex: none; width: 100%; }
}

@media (max-width: 768px) {
  .sidebar {
    width: 72px;
  }
  .sidebar .sidebar-logo span,
  .sidebar .sidebar-user-info,
  .sidebar .sidebar-user-role,
  .sidebar .nav-section-title,
  .sidebar .nav-item span:not(.nav-icon),
  .sidebar .nav-item .nav-badge,
  .sidebar .sidebar-user-name {
    display: none;
  }
  .sidebar .nav-item { justify-content: center; padding: 12px; }
  .sidebar .sidebar-user { justify-content: center; }
  .sidebar-brand { text-align: center; }
  .sidebar .sidebar-logo { font-size: 20px; }
  .main-area { margin-left: 72px; }
  .main-header { padding: 12px 16px; }
  .main-header h1 { font-size: 16px; }
  .main-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .auth-form-container { padding: 32px 24px; }
  .accounts-grid { grid-template-columns: 1fr; }
  .transaction-filters .form-input,
  .transaction-filters .form-select {
    width: 100%;
  }
  .loans-grid { grid-template-columns: 1fr; }
  .bills-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .modal { width: 95%; }
  .loan-types-grid { grid-template-columns: 1fr; }
  .toast-container { left: 16px; right: 16px; }
  .toast { min-width: auto; }
}

@media (max-width: 480px) {
  .sidebar { width: 0; overflow: hidden; }
  .sidebar.open { width: 260px; }
  .main-area { margin-left: 0; }
  .bills-grid { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr; }
}

/* Mobile hamburger */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
}
@media (max-width: 768px) {
  .mobile-toggle { display: block; }
}
