/* ============================================
   Quest BANK - Main Stylesheet
   Theme: Blue & Yellow Banking
   ============================================ */

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

:root {
  --blue-dark:    #0B2D6E;
  --blue-mid:     #1652B7;
  --blue-light:   #2563EB;
  --blue-pale:    #EFF4FF;
  --yellow:       #F5C518;
  --yellow-dark:  #D4A017;
  --yellow-light: #FFF8E1;
  --white:        #FFFFFF;
  --gray-100:     #F8F9FC;
  --gray-200:     #E9ECF3;
  --gray-300:     #CED4DA;
  --gray-500:     #6C757D;
  --gray-700:     #495057;
  --gray-900:     #212529;
  --success:      #16A34A;
  --danger:       #DC2626;
  --warning:      #D97706;
  --info:         #0284C7;
  --shadow-sm:    0 1px 3px rgba(11,45,110,0.08);
  --shadow:       0 4px 16px rgba(11,45,110,0.12);
  --shadow-lg:    0 8px 32px rgba(11,45,110,0.18);
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --transition:   all 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--gray-100);
  color: var(--gray-900);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; }

/* ─── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-200); }
::-webkit-scrollbar-thumb { background: var(--blue-mid); border-radius: 10px; }

/* ─── Utility ───────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--gray-500); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-blue    { color: var(--blue-mid); }
.text-yellow  { color: var(--yellow-dark); }
.font-bold    { font-weight: 700; }
.font-semi    { font-weight: 600; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.w-100 { width: 100%; }
.hidden { display: none !important; }

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue-dark);
  color: var(--white);
  border-color: var(--blue-dark);
}
.btn-primary:hover { background: var(--blue-mid); border-color: var(--blue-mid); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-yellow {
  background: var(--yellow);
  color: var(--blue-dark);
  border-color: var(--yellow);
}
.btn-yellow:hover { background: var(--yellow-dark); border-color: var(--yellow-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--blue-dark);
  border-color: var(--blue-dark);
}
.btn-outline:hover { background: var(--blue-dark); color: var(--white); }
.btn-danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}
.btn-danger:hover { background: #b91c1c; }
.btn-success {
  background: var(--success);
  color: white;
  border-color: var(--success);
}
.btn-success:hover { background: #15803d; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ─── Form Elements ─────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--gray-900);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(22,82,183,0.12);
}
.form-control::placeholder { color: var(--gray-300); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }
.input-group { position: relative; }
.input-group .form-control { padding-left: 44px; }
.input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  font-size: 16px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ─── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h3 { font-size: 16px; font-weight: 700; color: var(--blue-dark); }
.card-body { padding: 24px; }
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-100);
}

/* ─── Alerts / Flash Messages ───────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: #DCFCE7; color: #166534; border-left: 4px solid var(--success); }
.alert-danger   { background: #FEE2E2; color: #991B1B; border-left: 4px solid var(--danger); }
.alert-warning  { background: #FEF3C7; color: #92400E; border-left: 4px solid var(--warning); }
.alert-info     { background: #E0F2FE; color: #075985; border-left: 4px solid var(--info); }

/* ─── Badges ────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.badge-success  { background: #DCFCE7; color: #166534; }
.badge-danger   { background: #FEE2E2; color: #991B1B; }
.badge-warning  { background: #FEF3C7; color: #92400E; }
.badge-info     { background: #E0F2FE; color: #075985; }
.badge-pending  { background: #F3F4F6; color: #374151; }
.badge-blue     { background: var(--blue-pale); color: var(--blue-dark); }

/* ─── Tables ────────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--blue-dark);
  color: var(--white);
  padding: 12px 16px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
thead th:first-child { border-radius: 8px 0 0 0; }
thead th:last-child  { border-radius: 0 8px 0 0; }
tbody tr { border-bottom: 1px solid var(--gray-200); transition: background 0.15s; }
tbody tr:hover { background: var(--blue-pale); }
tbody td { padding: 12px 16px; color: var(--gray-700); vertical-align: middle; }
tfoot td { padding: 12px 16px; font-weight: 700; background: var(--gray-100); }

/* ─── Modals ────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11,45,110,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(20px);
  transition: var(--transition);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
  color: white;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
  background: rgba(255,255,255,0.2);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  font-size: 18px;
  transition: var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,0.35); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ─── Sidebar ───────────────────────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--blue-dark) 0%, #071d47 100%);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo .logo-icon {
  width: 44px;
  height: 44px;
  background: var(--yellow);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.sidebar-logo .logo-text h2 { font-size: 18px; font-weight: 800; line-height: 1; }
.sidebar-logo .logo-text span { font-size: 11px; opacity: 0.7; text-transform: uppercase; letter-spacing: 1px; }
.sidebar-user {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-user img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--yellow);
}
.sidebar-user .user-info h4 { font-size: 13px; font-weight: 600; }
.sidebar-user .user-info span { font-size: 11px; opacity: 0.65; }
.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-section {
  padding: 8px 20px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.5;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: rgba(255,255,255,0.75);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border-left: 3px solid transparent;
}
.nav-link:hover { color: white; background: rgba(255,255,255,0.08); }
.nav-link.active {
  color: var(--yellow);
  background: rgba(245,197,24,0.12);
  border-left-color: var(--yellow);
  font-weight: 700;
}
.nav-link .icon { width: 20px; text-align: center; font-size: 16px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1); }

/* ─── Main Content ───────────────────────────────────────────────────────── */
.main-content {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-title { font-size: 18px; font-weight: 700; color: var(--blue-dark); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--gray-700);
  transition: var(--transition);
  position: relative;
  text-decoration: none;
}
.topbar-btn:hover { background: var(--blue-pale); color: var(--blue-mid); }
.topbar-btn .notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid white;
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--blue-dark);
  padding: 4px;
}
.page-content { padding: 24px; flex: 1; }

/* ─── Dashboard Stats ───────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  border-left: 4px solid transparent;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card.blue   { border-left-color: var(--blue-mid); }
.stat-card.yellow { border-left-color: var(--yellow); }
.stat-card.green  { border-left-color: var(--success); }
.stat-card.red    { border-left-color: var(--danger); }
.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.stat-icon.blue   { background: var(--blue-pale); }
.stat-icon.yellow { background: var(--yellow-light); }
.stat-icon.green  { background: #DCFCE7; }
.stat-icon.red    { background: #FEE2E2; }
.stat-info h4 { font-size: 22px; font-weight: 800; color: var(--blue-dark); line-height: 1; margin-bottom: 4px; }
.stat-info p  { font-size: 12px; color: var(--gray-500); font-weight: 500; }

/* ─── Balance Card ───────────────────────────────────────────────────────── */
.balance-card {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 60%, #2563EB 100%);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: white;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}
.balance-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: rgba(245,197,24,0.15);
  border-radius: 50%;
}
.balance-card::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: 60px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
}
.balance-card .bank-name { font-size: 12px; font-weight: 700; letter-spacing: 2px; opacity: 0.7; text-transform: uppercase; margin-bottom: 6px; }
.balance-card .acct-num { font-size: 13px; letter-spacing: 2px; opacity: 0.85; margin-bottom: 20px; font-family: 'Courier New', monospace; }
.balance-card .balance-label { font-size: 12px; opacity: 0.75; margin-bottom: 4px; }
.balance-card .balance-amount { font-size: 36px; font-weight: 800; color: var(--yellow); line-height: 1; }
.balance-card .card-user { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; }
.balance-card .user-name { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.balance-card .card-type { font-size: 11px; opacity: 0.65; background: rgba(255,255,255,0.15); padding: 4px 12px; border-radius: 20px; }

/* ─── Quick Actions ──────────────────────────────────────────────────────── */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.quick-action {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.quick-action:hover { border-color: var(--yellow); transform: translateY(-2px); box-shadow: var(--shadow); }
.quick-action .qa-icon { font-size: 26px; margin-bottom: 6px; }
.quick-action p { font-size: 11px; font-weight: 600; color: var(--blue-dark); }

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.page-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  background: var(--white);
  color: var(--blue-dark);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  cursor: pointer;
}
.page-btn:hover, .page-btn.active { background: var(--blue-dark); color: white; border-color: var(--blue-dark); }

/* ─── Login Page ─────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 50%, #2563EB 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: '';
  position: absolute;
  top: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: rgba(245,197,24,0.12);
  border-radius: 50%;
}
.auth-page::after {
  content: '';
  position: absolute;
  bottom: -120px;
  right: -80px;
  width: 350px;
  height: 350px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.auth-container {
  width: 100%;
  max-width: 460px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  z-index: 2;
}
.auth-header {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
  padding: 32px;
  text-align: center;
  color: white;
}
.auth-header .logo-circle {
  width: 72px;
  height: 72px;
  background: var(--yellow);
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.auth-header h1 { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.auth-header p  { font-size: 13px; opacity: 0.75; }
.auth-body { padding: 32px; }
.auth-tabs { display: flex; margin-bottom: 24px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid var(--blue-dark); }
.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--blue-dark);
  transition: var(--transition);
  border: none;
  background: white;
}
.auth-tab.active { background: var(--blue-dark); color: white; }
.auth-footer { text-align: center; padding: 0 32px 32px; font-size: 13px; color: var(--gray-500); }
.auth-footer a { color: var(--blue-mid); font-weight: 600; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-toggle { display: block; }
  .overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
  }
  .overlay.active { display: block; }
}
@media (max-width: 768px) {
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .form-row { grid-template-columns: 1fr; }
  .balance-card .balance-amount { font-size: 28px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Print Styles ───────────────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main-content { margin-left: 0; }
  body { background: white; }
}

/* ─── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideIn { from { transform:translateX(-20px); opacity:0; } to { transform:translateX(0); opacity:1; } }
@keyframes pulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.05); } }
.fade-in { animation: fadeIn 0.4s ease both; }
.slide-in { animation: slideIn 0.4s ease both; }

/* ─── Transaction Icons ───────────────────────────────────────────────────── */
.txn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.txn-icon.credit  { background: #DCFCE7; }
.txn-icon.debit   { background: #FEE2E2; }
.txn-icon.pending { background: #FEF3C7; }

/* ─── Avatar ─────────────────────────────────────────────────────────────── */
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gray-200);
}
.avatar-lg { width: 80px; height: 80px; }
.avatar-xl { width: 110px; height: 110px; border: 4px solid white; box-shadow: var(--shadow); }

/* ─── Empty State ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-500);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--gray-700); margin-bottom: 6px; }

/* ─── Sidebar Overlay ─────────────────────────────────────────────────────── */
#sidebarOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}
