:root {
  --bofa-blue: #012169;
  --bofa-blue-dark: #001040;
  --bofa-blue-light: #1a3a7a;
  --bofa-red: #E31837;
  --bofa-red-dark: #b8132d;
  --bofa-red-hover: #cc1530;
  --bofa-white: #FFFFFF;
  --bofa-gray-50: #f8f9fa;
  --bofa-gray-100: #f1f3f5;
  --bofa-gray-200: #e9ecef;
  --bofa-gray-300: #dee2e6;
  --bofa-gray-400: #ced4da;
  --bofa-gray-500: #adb5bd;
  --bofa-gray-600: #6c757d;
  --bofa-gray-700: #495057;
  --bofa-gray-800: #343a40;
  --bofa-gray-900: #212529;
  --bofa-green: #198754;
  --bofa-amber: #cc8a00;
  --bofa-bg: #f5f6f8;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bofa-bg);
  color: var(--bofa-gray-900);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c0c0c0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a0a0a0; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes checkmark {
  0% { stroke-dashoffset: 50; }
  100% { stroke-dashoffset: 0; }
}

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

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

@keyframes barGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.35s ease forwards; }
.slide-in { animation: slideInRight 0.35s ease forwards; }

.shimmer-bg {
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Header - BofA Top Bar */
.bofa-top-bar {
  background: var(--bofa-blue);
  height: 4px;
  width: 100%;
}

.bofa-header {
  background: var(--bofa-white);
  border-bottom: 1px solid var(--bofa-gray-200);
  position: sticky;
  top: 0;
  z-index: 1500;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.bofa-header-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
}

.bofa-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}

.bofa-logo-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--bofa-blue);
  letter-spacing: -0.3px;
}

.bofa-logo-tagline {
  font-size: 10px;
  color: var(--bofa-gray-500);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Main Nav */
.bofa-nav {
  display: flex;
  gap: 0;
  height: 100%;
}

.bofa-nav-item {
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--bofa-gray-700);
  cursor: pointer;
  border: none;
  background: none;
  height: 100%;
  border-bottom: 3px solid transparent;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
  position: relative;
}

.bofa-nav-item:hover {
  color: var(--bofa-blue);
  background: var(--bofa-gray-50);
}

.bofa-nav-item.active {
  color: var(--bofa-blue);
  font-weight: 700;
  border-bottom-color: var(--bofa-red);
}

/* Header Right */
.bofa-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bofa-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bofa-gray-600);
  transition: all 0.15s;
  position: relative;
  font-size: 18px;
}

.bofa-icon-btn:hover {
  background: var(--bofa-gray-100);
  color: var(--bofa-blue);
}

.bofa-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bofa-red);
  color: white;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.bofa-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 24px;
  border: 1px solid var(--bofa-gray-200);
  background: white;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  margin-left: 6px;
}

.bofa-user-btn:hover {
  border-color: var(--bofa-gray-400);
  background: var(--bofa-gray-50);
}

.bofa-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bofa-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.bofa-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--bofa-gray-800);
}

/* Content Layout */
.bofa-content {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px;
}

/* Card */
.bofa-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--bofa-gray-200);
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.bofa-card-hover:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}

/* Account cards */
.account-card {
  padding: 20px;
  cursor: pointer;
}

.account-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.account-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.account-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--bofa-gray-600);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.account-number {
  font-size: 11px;
  color: var(--bofa-gray-500);
  margin-top: 1px;
}

.account-balance {
  font-size: 28px;
  font-weight: 800;
  color: var(--bofa-gray-900);
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: -1px;
  line-height: 1.1;
}

.account-balance-small {
  font-size: 22px;
}

.account-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.account-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.account-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bofa-blue);
  cursor: pointer;
  margin-top: 14px;
  border: none;
  background: none;
  font-family: inherit;
  padding: 0;
  transition: color 0.15s;
}

.account-link:hover {
  color: var(--bofa-red);
}

/* Quick Actions */
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border-radius: 12px;
  border: 1px solid var(--bofa-gray-200);
  background: white;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 100px;
  font-family: inherit;
}

.quick-action:hover {
  border-color: var(--bofa-blue);
  background: rgba(1,33,105,0.02);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

.quick-action-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bofa-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  transition: background 0.15s;
}

.quick-action:hover .quick-action-icon {
  background: var(--bofa-red);
}

.quick-action-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--bofa-gray-700);
}

/* Transaction row */
.tx-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--bofa-gray-100);
  transition: background 0.1s;
}

.tx-row:hover {
  background: var(--bofa-gray-50);
}

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

.tx-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.tx-details {
  flex: 1;
  min-width: 0;
}

.tx-merchant {
  font-size: 14px;
  font-weight: 600;
  color: var(--bofa-gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.tx-category {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--bofa-gray-100);
  color: var(--bofa-gray-600);
  font-weight: 500;
}

.tx-date {
  font-size: 11px;
  color: var(--bofa-gray-500);
}

.tx-amount {
  font-size: 14px;
  font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
  white-space: nowrap;
}

.tx-amount.credit { color: var(--bofa-green); }
.tx-amount.debit { color: var(--bofa-gray-900); }

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--bofa-gray-100);
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--bofa-gray-900);
}

.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--bofa-blue);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
  transition: color 0.15s;
}

.section-link:hover {
  color: var(--bofa-red);
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--bofa-gray-100);
  padding: 0 20px;
}

.filter-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--bofa-gray-500);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  font-family: inherit;
  text-transform: capitalize;
}

.filter-tab:hover {
  color: var(--bofa-gray-700);
}

.filter-tab.active {
  color: var(--bofa-blue);
  font-weight: 600;
  border-bottom-color: var(--bofa-red);
}

/* Search input */
.bofa-search {
  padding: 10px 14px 10px 36px;
  border: 1px solid var(--bofa-gray-200);
  border-radius: 8px;
  font-size: 13px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
  background: var(--bofa-gray-50);
  color: var(--bofa-gray-900);
}

.bofa-search:focus {
  border-color: var(--bofa-blue);
  box-shadow: 0 0 0 3px rgba(1,33,105,0.08);
  background: white;
}

/* Buttons */
.bofa-btn-primary {
  padding: 12px 24px;
  background: var(--bofa-red);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}

.bofa-btn-primary:hover {
  background: var(--bofa-red-hover);
}

.bofa-btn-primary:active {
  transform: scale(0.98);
}

.bofa-btn-secondary {
  padding: 12px 24px;
  background: var(--bofa-gray-100);
  color: var(--bofa-gray-800);
  border: 1px solid var(--bofa-gray-200);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.bofa-btn-secondary:hover {
  background: var(--bofa-gray-200);
}

.bofa-btn-outline {
  padding: 10px 20px;
  background: white;
  color: var(--bofa-blue);
  border: 1px solid var(--bofa-blue);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.bofa-btn-outline:hover {
  background: var(--bofa-blue);
  color: white;
}

/* Form elements */
.bofa-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--bofa-gray-700);
  margin-bottom: 6px;
}

.bofa-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--bofa-gray-300);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--bofa-gray-900);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: white;
}

.bofa-input:focus {
  border-color: var(--bofa-blue);
  box-shadow: 0 0 0 3px rgba(1,33,105,0.08);
}

.bofa-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--bofa-gray-300);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--bofa-gray-900);
  outline: none;
  background: white;
  cursor: pointer;
  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='%236c757d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.15s;
}

.bofa-select:focus {
  border-color: var(--bofa-blue);
  box-shadow: 0 0 0 3px rgba(1,33,105,0.08);
}

/* Notification dropdown */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-height: 440px;
  overflow-y: auto;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--bofa-gray-200);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  z-index: 1001;
  animation: slideDown 0.2s ease;
}

.notif-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--bofa-gray-100);
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  transition: background 0.1s;
}

.notif-item:hover {
  background: var(--bofa-gray-50);
}

.notif-item.unread {
  background: rgba(1,33,105,0.03);
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bofa-blue);
  margin-top: 5px;
  flex-shrink: 0;
}

/* Toast */
.toast-enter { animation: toastIn 0.3s ease forwards; }
.toast-exit { animation: toastOut 0.3s ease forwards; }

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  animation: fadeIn 0.15s ease;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 32px;
  max-width: 480px;
  width: 90%;
  animation: slideDown 0.25s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

/* Budget bar */
.budget-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--bofa-gray-200);
  overflow: hidden;
}

.budget-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

/* Bar chart animation */
.bar-chart-bar {
  transform-origin: bottom;
  animation: barGrow 0.6s ease forwards;
}

/* Doughnut */
.doughnut-segment {
  transition: opacity 0.2s;
}
.doughnut-segment:hover {
  opacity: 0.8;
}

/* Toggle */
.toggle-track {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--bofa-gray-300);
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}
.toggle-track.on {
  background: var(--bofa-blue);
}
.toggle-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-track.on .toggle-thumb {
  transform: translateX(20px);
}

/* Welcome section */
.bofa-welcome {
  background: linear-gradient(135deg, #012169 0%, #0a3d91 100%);
  border-radius: 12px;
  padding: 24px 28px;
  color: white;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.bofa-welcome::before {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
}

.bofa-welcome::after {
  content: '';
  position: absolute;
  right: 60px;
  bottom: -60px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.02);
}

/* Secondary nav under header */
.bofa-subnav {
  background: var(--bofa-gray-50);
  border-bottom: 1px solid var(--bofa-gray-200);
  padding: 0 24px;
}

.bofa-subnav-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 42px;
  font-size: 13px;
}

.bofa-subnav-item {
  color: var(--bofa-gray-600);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
  text-decoration: none;
}

.bofa-subnav-item:hover {
  color: var(--bofa-blue);
}

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100vh;
  background: white;
  z-index: 2000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}
.mobile-drawer.open {
  transform: translateX(0);
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--bofa-gray-700);
  cursor: pointer;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.drawer-nav-item:hover {
  background: var(--bofa-gray-50);
  color: var(--bofa-blue);
}

.drawer-nav-item.active {
  color: var(--bofa-blue);
  font-weight: 700;
  background: rgba(1,33,105,0.04);
  border-left-color: var(--bofa-red);
}

/* Bottom nav (mobile) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  display: flex;
  justify-content: space-around;
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
  z-index: 1000;
  border-top: 1px solid var(--bofa-gray-200);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--bofa-gray-500);
  font-size: 10px;
  font-weight: 600;
  gap: 2px;
  cursor: pointer;
  padding: 4px 12px;
  transition: color 0.15s;
}
.bottom-nav-item.active {
  color: var(--bofa-red);
}
.bottom-nav-item span:first-child {
  font-size: 20px;
}

/* Hamburger */
.hamburger-line {
  width: 20px;
  height: 2px;
  background: var(--bofa-gray-800);
  transition: all 0.3s;
}

/* Footer */
.bofa-footer {
  background: var(--bofa-blue);
  color: white;
  padding: 40px 24px 24px;
  margin-top: 40px;
}

.bofa-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
}

.bofa-footer a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.15s;
}

.bofa-footer a:hover {
  color: white;
}

/* Sparkline */
.sparkline-path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* Biller card pay button */
.biller-pay-btn {
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  background: var(--bofa-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}

.biller-pay-btn:hover {
  background: var(--bofa-red);
}

.biller-pay-btn:active {
  transform: scale(0.98);
}

@media (max-width: 768px) {
  .bofa-content { padding: 16px; }
  .bofa-header-inner { padding: 0 12px; height: 50px; }
  .notif-dropdown {
    width: calc(100vw - 24px);
    right: -60px;
  }
  .bofa-welcome { padding: 18px 20px; }
  .account-balance { font-size: 22px; }
}