/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #0A2540;
  --primary-light: #1A3A5C;
  --primary-dark: #061628;
  --accent: #00A86B;
  --bg: #F0F7FF;
  --card: #FFFFFF;
  --text: #1A1A2E;
  --muted: #6B7280;
  --border: #E5E7EB;
  --danger: #DC2626;
  --success: #059669;
  --warning: #D97706;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(10, 37, 64, 0.08);
  --shadow-lg: 0 10px 40px rgba(10, 37, 64, 0.12);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
html { font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-light); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-outline {
  border: 1.5px solid var(--border);
  color: var(--text);
  background: white;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-full { width: 100%; }

/* ===== LOGIN PAGE ===== */
.login-body {
  background: linear-gradient(135deg, #0A2540 0%, #1A3A5C 50%, #0A2540 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-wrapper { width: 100%; max-width: 420px; }
.login-card {
  background: white;
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
}
.login-header { text-align: center; margin-bottom: 32px; }
.login-header h1 {
  font-size: 1.75rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: -0.5px;
}
.login-header p { color: var(--muted); margin-top: 4px; font-size: 0.95rem; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.form-group input, .form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
  background: white;
}
.form-group input:focus, .form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.1);
}
.error-msg { display: block; color: var(--danger); font-size: 0.8rem; margin-top: 4px; min-height: 18px; }
.login-footer { text-align: center; margin-top: 24px; }
.forgot-link { color: var(--primary); font-size: 0.9rem; font-weight: 500; }
.forgot-link:hover { text-decoration: underline; }
.demo-note { margin-top: 16px; font-size: 0.8rem; color: var(--muted); background: #F8FAFC; padding: 10px; border-radius: 8px; }
.login-page-footer { text-align: center; margin-top: 32px; color: rgba(255,255,255,0.7); font-size: 0.8rem; }

/* ===== APP HEADER ===== */
.app-header {
  background: var(--primary);
  color: white;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.3px; }
.header-right { display: flex; align-items: center; gap: 16px; }
.icon-btn { position: relative; color: white; padding: 6px; border-radius: 8px; }
.icon-btn:hover { background: rgba(255,255,255,0.1); }
.badge {
  position: absolute;
  top: 0; right: 0;
  background: #EF4444;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.user-menu { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
}
.user-name { font-size: 0.9rem; font-weight: 500; }
@media (max-width: 640px) {
  .user-name { display: none; }
}

/* ===== NAV ===== */
.main-nav {
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  padding: 0 16px;
  overflow-x: auto;
  position: sticky;
  top: 60px;
  z-index: 90;
}
.nav-item {
  padding: 14px 20px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
}
.nav-item:hover { color: var(--primary); }
.nav-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}
.app-footer {
  text-align: center;
  padding: 24px 16px;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  background: white;
}

/* ===== DASHBOARD ===== */
.summary-section { margin-bottom: 28px; }
.summary-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.summary-label { font-size: 0.9rem; opacity: 0.85; margin-bottom: 4px; }
.summary-balance { font-size: 2.25rem; font-weight: 700; letter-spacing: -1px; }
.summary-sub { font-size: 0.85rem; opacity: 0.7; margin-top: 4px; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.section-header h3 { font-size: 1.15rem; font-weight: 600; }
.link { color: var(--primary); font-size: 0.9rem; font-weight: 500; }
.link:hover { text-decoration: underline; }

.accounts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
@media (min-width: 640px) {
  .accounts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .accounts-grid { grid-template-columns: repeat(3, 1fr); }
}
.account-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.account-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.account-card-type {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.account-card-name { font-weight: 600; font-size: 1.05rem; margin-bottom: 2px; }
.account-card-number { font-size: 0.85rem; color: var(--muted); margin-bottom: 16px; }
.account-card-balance { font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.account-card-label { font-size: 0.75rem; color: var(--muted); }

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}
.action-btn {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 0.9rem;
}
.action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}
.action-icon {
  font-size: 1.4rem;
  width: 40px; height: 40px;
  background: var(--bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.transactions-list { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.tx-item {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.tx-item:last-child { border-bottom: none; }
.tx-item:hover { background: #F8FAFC; }
.tx-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary);
  margin-right: 14px;
  flex-shrink: 0;
}
.tx-details { flex: 1; min-width: 0; }
.tx-merchant { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-date { font-size: 0.8rem; color: var(--muted); }
.tx-amount { font-weight: 600; font-size: 0.95rem; text-align: right; }
.tx-amount.credit { color: var(--success); }
.tx-amount.debit { color: var(--text); }
.tx-status { font-size: 0.7rem; color: var(--muted); text-align: right; }

/* ===== ACCOUNT DETAIL ===== */
.breadcrumb { margin-bottom: 20px; }
.breadcrumb a { color: var(--primary); font-weight: 500; font-size: 0.95rem; }
.account-detail-header {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}
.account-detail-header h2 { font-size: 1.4rem; margin-bottom: 4px; }
.account-detail-header .number { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; }
.balance-row { display: flex; gap: 32px; flex-wrap: wrap; }
.balance-block label { font-size: 0.8rem; color: var(--muted); display: block; }
.balance-block .value { font-size: 1.5rem; font-weight: 700; color: var(--primary); }

.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-input, .date-input {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: white;
}
.search-input { flex: 1; min-width: 180px; }
.date-input { width: 150px; }

/* ===== TRANSFER WIZARD ===== */
.transfer-wizard {
  background: white;
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  max-width: 560px;
  margin: 0 auto;
}
.wizard-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 8px;
}
.step {
  flex: 1;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 8px;
  border-bottom: 3px solid var(--border);
}
.step.active { color: var(--primary); border-bottom-color: var(--primary); }
.wizard-panel { display: none; }
.wizard-panel.active { display: block; animation: fadeIn 0.3s ease; }
.wizard-panel h2 { font-size: 1.3rem; margin-bottom: 20px; }
.account-select-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.select-account-card {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.select-account-card:hover, .select-account-card.selected {
  border-color: var(--primary);
  background: #F0F7FF;
}
.select-account-card .name { font-weight: 600; }
.select-account-card .bal { color: var(--primary); font-weight: 600; margin-top: 4px; }
.radio-group { display: flex; gap: 20px; margin-top: 8px; }
.radio-group label { display: flex; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; }
.amount-input { font-size: 1.4rem !important; font-weight: 600; }
.wizard-nav { display: flex; gap: 12px; margin-top: 28px; }
.wizard-nav .btn { flex: 1; }
.review-card {
  background: #F8FAFC;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 8px;
}
.review-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.review-row:last-child { border-bottom: none; }
.review-row .label { color: var(--muted); font-size: 0.9rem; }
.review-row .value { font-weight: 600; }

/* ===== PROFILE ===== */
.profile-section { max-width: 560px; margin: 0 auto; }
.profile-card {
  background: white;
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.profile-avatar-wrap { margin-bottom: 16px; }
.profile-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  border: 4px solid var(--bg);
  box-shadow: var(--shadow);
}
.profile-card h2 { font-size: 1.4rem; margin-bottom: 4px; }
.profile-email { color: var(--muted); }
.info-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.info-card h3 { font-size: 1.1rem; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #F1F5F9;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--muted); font-size: 0.9rem; }
.info-value { font-weight: 500; }
.security-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  font-weight: 500;
  transition: all 0.2s;
  background: white;
}
.security-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #F0F7FF;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--primary);
  color: white;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: transform 0.3s ease;
  max-width: 90%;
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary-light); }

/* ===== MODAL ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 37, 64, 0.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.modal-backdrop.show { opacity: 1; }
.modal {
  background: white;
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: scale(0.92);
  transition: transform 0.25s ease;
}
.modal-backdrop.show .modal { transform: scale(1); }
.modal h3 { font-size: 1.25rem; margin-bottom: 12px; }
.modal #modal-body { margin-bottom: 24px; color: var(--text); line-height: 1.6; }
.modal-actions { display: flex; gap: 12px; }
.modal-actions .btn { flex: 1; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.skeleton {
  background: linear-gradient(90deg, #E5E7EB 25%, #F3F4F6 50%, #E5E7EB 75%);
  background-size: 200% 100%;
  animation: pulse 1.5s ease-in-out infinite;
  border-radius: 6px;
}

/* ===== UTILS ===== */
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }

/* ===== Premium Recent Activity (Dashboard) ===== */
.transactions-list {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(10, 37, 64, 0.07);
  border: 1px solid #E8EEF5;
}

.tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #F1F5F9;
  transition: background 0.15s ease;
}

.tx-row:last-child {
  border-bottom: none;
}

.tx-row:hover {
  background: #F8FAFC;
}

.tx-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.tx-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  color: white;
}

.tx-avatar.debit-bg {
  background: linear-gradient(135deg, #0A2540, #1A3A5C);
}

.tx-avatar.credit-bg {
  background: linear-gradient(135deg, #059669, #10B981);
}

.tx-info {
  min-width: 0;
}

.tx-merchant {
  font-weight: 600;
  font-size: 0.95rem;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-meta {
  font-size: 0.78rem;
  color: #64748B;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tx-status-pill {
  background: #F1F5F9;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tx-right {
  text-align: right;
  flex-shrink: 0;
  margin-left: 12px;
}

.tx-amount {
  font-weight: 700;
  font-size: 0.98rem;
}

.tx-amount.credit {
  color: #059669;
}

.tx-amount.debit {
  color: #0F172A;
}

.tx-empty {
  padding: 32px;
  text-align: center;
  color: #64748B;
  font-size: 0.95rem;
}



.select-account-card .select-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.select-account-card .bal {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.05rem;
}
.amount-highlight {
  color: var(--primary);
  font-size: 1.15rem;
}