/* Reset & Base */
* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family:'Inter',sans-serif;
  background: linear-gradient(135deg, #ffcccc 0%, #ffe6e6 100%);
  color:#1E293B;
  line-height:1.6;
}

.container { max-width:1200px; margin:auto; padding:0 1rem; }

/* Typography */
h1,h2,h3,h4 { font-weight:700; line-height:1.2; }
h1 { font-size:3rem; }
h2 { font-size:2.25rem; margin-bottom:1.5rem; }
h3 { font-size:1.5rem; margin-bottom:.75rem; }
p { color:#475569; }
a { text-decoration:none; color:inherit; }

/* Navbar */
.navbar { 
  background:#FFF; 
  padding:1rem 0; 
  position:sticky; 
  top:0; 
  z-index:1000; 
  box-shadow:0 1px 3px rgba(0,0,0,.1); 
}
.nav-container { display:flex; justify-content:space-between; align-items:center; }
.logo h2 { color:#dc2626; font-size:1.75rem; }
.logo span { color:#1E293B; }
.nav-links { display:flex; list-style:none; gap:2rem; align-items:center; }
.nav-links a { color:#1E293B; font-weight:500; transition:color .3s; }
.nav-links a:hover,
.nav-links a.active { color:#dc2626; }
.btn-login { background:#dc2626; color:#fff; padding:.5rem 1.25rem; border-radius:8px; font-weight:600; font-size:.9rem; }
.mobile-menu-toggle { display:none; cursor:pointer; font-weight:600; }

/* Hero */
.hero { 
  padding:5rem 0 4rem; 
  background:linear-gradient(135deg, #fff5f5 0%, #ffffff 70%); 
}
.hero-container { display:grid; grid-template-columns:1fr 1fr; gap:3rem; align-items:center; }
.hero-content h1 { margin-bottom:1rem; }
.hero-content .accent { color:#dc2626; }
.hero-content p { font-size:1.125rem; margin-bottom:2rem; max-width:500px; }
.hero-buttons { display:flex; gap:1rem; flex-wrap:wrap; }
.btn-primary { 
  background:#dc2626; 
  color:#fff; 
  padding:.875rem 1.75rem; 
  border-radius:8px; 
  font-weight:600; 
  font-size:1rem; 
  transition:all .3s; 
  display:inline-block; 
}
.btn-primary:hover { 
  background:#b91c1c; 
  transform:translateY(-2px); 
  box-shadow:0 8px 20px rgba(220,38,38,.3); 
}
.btn-primary.large { padding:1rem 2rem; font-size:1.1rem; }
.btn-secondary { 
  background:transparent; 
  color:#dc2626; 
  border:2px solid #dc2626; 
  padding:.875rem 1.75rem; 
  border-radius:8px; 
  font-weight:600; 
  font-size:1rem; 
  transition:all .3s; 
  display:inline-block; 
}
.btn-secondary:hover { 
  background:#fff5f5; 
  transform:translateY(-2px); 
}

/* Hero Visual */
.hero-visual { position:relative; height:420px; }
.card-mockup { 
  position:absolute; top:50%; left:50%; 
  transform:translate(-50%,-50%) rotate(-6deg); 
  width:340px; height:220px; 
  background:linear-gradient(135deg,#dc2626,#ef4444); 
  border-radius:16px; 
  box-shadow:0 20px 40px rgba(220,38,38,.25); 
  overflow:hidden; 
}
.card-mockup::before { content:''; position:absolute; top:20px; left:20px; right:20px; height:40px; background:rgba(255,255,255,.2); border-radius:8px; }
.card-mockup::after { content:'•••• •••• •••• ••••'; position:absolute; bottom:30px; left:20px; color:#fff; font-family:monospace; font-size:1.1rem; letter-spacing:2px; }
.floating-element { position:absolute; border-radius:50%; background:rgba(220,38,38,.1); }
.circle { width:120px; height:120px; top:10%; right:10%; animation:float 6s ease-in-out infinite; }
.line { width:200px; height:8px; bottom:15%; left:5%; border-radius:4px; animation:float 5s ease-in-out infinite reverse; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-20px)} }

/* Features */
.features { 
  padding:5rem 0; 
  text-align:center; 
  background:#fff5f5; 
}
.feature-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:2rem; margin-top:2rem; }
.feature-card { 
  background:#fff; 
  padding:2rem; 
  border-radius:12px; 
  box-shadow:0 4px 12px rgba(0,0,0,.05); 
  transition:transform .3s,box-shadow .3s; 
}
.feature-card:hover { 
  transform:translateY(-8px); 
  box-shadow:0 12px 24px rgba(0,0,0,.1); 
}
.feature-card .icon { font-size:2.5rem; margin-bottom:1rem; }
.feature-card h3 { color:#dc2626; margin-bottom:.5rem; }

/* CTA */
.cta-section { 
  padding:4rem 0; 
  text-align:center; 
  background:#dc2626; 
  color:#fff; 
}
.cta-container h2 { color:#fff; margin-bottom:1rem; }
.cta-container p { color:#fee2e2; font-size:1.1rem; max-width:600px; margin:0 auto 2rem; }

/* Footer */
.footer { 
  background:#1E293B; 
  color:#94A3B8; 
  padding:3rem 0 1rem; 
  font-size:.95rem; 
}
.footer-container { display:grid; grid-template-columns:2fr 1fr 1fr 1.5fr; gap:2rem; margin-bottom:2rem; }
.footer-logo h3 { color:#dc2626; margin-bottom:.5rem; }
.footer-logo span { color:#fff; }
.footer-logo p { color:#94A3B8; margin-top:.5rem; }
.footer-col h4 { color:#fff; margin-bottom:1rem; font-size:1rem; }
.footer-col ul { list-style:none; }
.footer-col a { color:#94A3B8; display:block; margin-bottom:.5rem; transition:color .3s; }
.footer-col a:hover { color:#dc2626; }
.social-links { display:flex; gap:1rem; margin-top:1rem; }
.social-links a { width:36px; height:36px; background:#334155; border-radius:50%; display:flex; align-items:center; justify-content:center; transition:background .3s; }
.social-links a:hover { background:#dc2626; }
.footer-bottom { border-top:1px solid #334155; padding-top:1.5rem; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:1rem; }
.legal-links a { margin-left:1rem; color:#94A3B8; }
.legal-links a:hover { color:#dc2626; }

/* Login page */
.login-page { background:#fff5f5; }
.login-section { padding:4rem 0; }
.login-container { max-width:420px; margin:auto; }
.login-card { background:#fff; padding:2.5rem; border-radius:16px; box-shadow:0 20px 40px rgba(0,0,0,.1); text-align:center; }
.login-card h1 { margin-bottom:.5rem; }
.subtitle { margin-bottom:2rem; color:#64748b; }
.input-group { margin-bottom:1rem; text-align:left; }
.input-group label { display:block; margin-bottom:.4rem; font-weight:500; }
.input-group input { width:100%; padding:.75rem; border:1px solid #fca5a5; border-radius:8px; font-size:1rem; }
.full { width:100%; }
.login-footer { margin-top:1.5rem; }
.link-accent { color:#dc2626; font-weight:500; }

/* Page header (used on accounts, savings, etc.) */
.page-header { padding:3rem 0; background:#fff5f5; text-align:center; }
.page-header h1 { margin-bottom:.5rem; }
.page-header p { color:#64748b; }

/* Accounts page */
.accounts-section { padding:4rem 0; background:#fff5f5; }
.account-types { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:2rem; }
.account-card { background:#fff; padding:2rem; border-radius:12px; box-shadow:0 4px 12px rgba(0,0,0,.05); text-align:center; }
.account-card .account-icon { font-size:2.5rem; margin-bottom:.75rem; }
.account-card h3 { margin-bottom:.5rem; }

/* Savings hero */
.savings-hero { background:#dc2626; color:#fff; padding:5rem 0; text-align:center; }
.savings-hero h1 { margin-bottom:.5rem; }
.rate-highlight { margin:1.5rem 0; }
.rate { font-size:4rem; font-weight:700; }
.rate span { font-size:2rem; vertical-align:super; }
.rate-label { font-size:1rem; opacity:.9; }

/* Savings features */
.savings-features { padding:4rem 0; background:#fff5f5; }
.feature-item { background:#fff; padding:1.5rem; border-radius:10px; box-shadow:0 2px 8px rgba(0,0,0,.05); }

/* Comparison table */
.comparison { padding:4rem 0; background:#fff5f5; }
.rate-table { width:100%; border-collapse:collapse; margin-top:1rem; }
.rate-table th, .rate-table td { padding:.75rem; text-align:left; border-bottom:1px solid #fecaca; }
.rate-table th { background:#fee2e2; }
.rate-table tr.highlight { background:#fee2e2; }
.disclaimer { font-size:.85rem; color:#991b1b; margin-top:.5rem; }

/* Investing page */
.investing-hero { background:#dc2626; color:#fff; padding:5rem 0; text-align:center; }
.cd-rates { padding:4rem 0; background:#fff5f5; }
.rates-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:1.5rem; }
.rate-card { background:#fff; padding:1.5rem; border-radius:12px; box-shadow:0 4px 12px rgba(0,0,0,.05); text-align:center; }
.rate-card .term { font-size:1rem; color:#64748b; }
.rate-card .apy { font-size:2rem; font-weight:700; margin:.5rem 0; }
.rate-card.highlight { background:#fee2e2; border:2px solid #dc2626; }

/* Support page */
.support-hero { background:#dc2626; color:#fff; padding:4rem 0; text-align:center; }
.faq { padding:4rem 0; background:#fff5f5; }
.faq-grid { display:grid; gap:1rem; }
.faq-item { background:#fff; padding:1rem 1.5rem; border-radius:10px; box-shadow:0 2px 6px rgba(0,0,0,.05); }
.faq-item summary { cursor:pointer; font-weight:600; }
.contact-options { padding:4rem 0; background:#fff5f5; }
.options-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:2rem; text-align:center; }
.option h3 { margin-bottom:.5rem; }

/* Legal pages */
.legal-header { background:#fff5f5; padding:3rem 0; text-align:center; }
.legal-content { padding:4rem 0; background:#fff5f5; }
.legal-section { margin-bottom:2.5rem; }
.legal-section h2 { margin-bottom:.75rem; }
.legal-section ul { margin-left:1.5rem; list-style:disc; }
.legal-section ul li { margin-bottom:.4rem; }

/* Security page */
.security-hero { background:#dc2626; color:#fff; padding:5rem 0; text-align:center; }
.security-features { padding:4rem 0; background:#fff5f5; }
.security-tips { padding:4rem 0; background:#fff5f5; }
.tips-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:1.5rem; }
.tip { background:#fff; padding:1rem; border-radius:8px; box-shadow:0 2px 6px rgba(0,0,0,.05); }

/* Mobile */
@media (max-width:992px){
  .hero-container,.footer-container{grid-template-columns:1fr;text-align:center}
  .hero-visual{height:300px}
  .card-mockup{width:280px;height:180px}
}
@media (max-width:768px){
  .nav-links{position:fixed;top:0;right:-100%;height:100vh;width:280px;background:#fff;flex-direction:column;padding:5rem 2rem 2rem;box-shadow:-10px 0 20px rgba(0,0,0,.1);transition:right .3s}
  .nav-links.active{right:0}
  .mobile-menu-toggle{display:block}
  h1{font-size:2.5rem}
  .hero-buttons{justify-content:center}
}

/* ========================================
   CUSTOMER DASHBOARD — RED THEME
   ======================================== */

.dashboard-page {
  background: #fff5f5;
  min-height: 100vh;
}

.dashboard-header {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: white;
  padding: 4rem 0 3rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.15);
}

.dashboard-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: #ffffff;
}

.dashboard-header .highlight {
  color: #ffffff !important;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.dashboard-header p {
  font-size: 1.1rem;
  opacity: 0.9;
  color: #fee2e2;
}

.account-info {
  margin-top: 1rem;
  font-size: 1rem;
  color: #fee2e2;
}

.dashboard-content {
  padding: 3rem 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* PROFILE CARD */
.profile-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.4s ease;
  display: none;
}

.profile-card.visible {
  display: block;
  animation: fadeInUp 0.4s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-card .card-header {
  padding: 1.5rem 1.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
}

.profile-card .card-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #1e293b;
}

.profile-avatar {
  text-align: center;
  margin-bottom: 1.5rem;
}

.avatar-circle {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
  font-size: 2rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

.profile-details p {
  margin: 0.75rem 0;
  font-size: 0.95rem;
  color: #475569;
}

.profile-details strong {
  color: #1e293b;
  min-width: 120px;
  display: inline-block;
}

/* SHOW PROFILE BUTTON */
.show-profile-btn {
  background: #fee2e2;
  color: #991b1b;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
  margin: 1rem auto;
  display: block;
  width: fit-content;
}

.show-profile-btn:hover {
  background: #dc2626;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(220, 38, 38, 0.3);
}

.card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.12);
}

.card-header {
  padding: 1.5rem 1.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
}

.card-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #1e293b;
}

.badge {
  background: #ecfdf5;
  color: #059669;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.card-body {
  padding: 1.5rem;
}

.balance-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: #dc2626;
  margin: 1rem 0;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 12px;
  font-weight: 500;
  color: #991b1b;
  transition: all 0.3s;
  width: 100%;
  text-align: left;
}

.action-btn:hover {
  background: #fee2e2;
  border-color: #dc2626;
  color: #dc2626;
}

.action-btn .icon {
  font-size: 1.5rem;
}

.transactions-list {
  max-height: 300px;
  overflow-y: auto;
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-info strong {
  font-size: 1.1rem;
  display: block;
}

.transaction-info p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: #64748b;
}

.transaction-item.deposit strong { color: #16a34a; }
.transaction-item.withdraw strong { color: #dc2626; }

.no-data {
  text-align: center;
  color: #94a3b8;
  font-style: italic;
  padding: 2rem 0;
}

.link-sm {
  font-size: 0.875rem;
  color: #dc2626;
  text-decoration: none;
}

.link-sm:hover {
  text-decoration: underline;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.modal-header {
  padding: 1.5rem;
  background: #dc2626;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.modal-header .close {
  font-size: 1.75rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: 0.2s;
}

.modal-header .close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 2rem;
}

/* First-Time Banner */
.banner {
  padding: 1rem 0;
  animation: slideDown 0.6s ease-out;
}

.banner.info {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
}

.banner-content .icon {
  font-size: 1.5rem;
}

@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 992px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-header h1 {
    font-size: 2rem;
  }
  .balance-amount {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .dashboard-header {
    padding: 3rem 0 2rem;
  }
  .card-body {
    padding: 1.25rem;
  }
  .action-btn {
    font-size: 0.9rem;
  }
}

/* ===== COMPACT RECEIPT MODAL — NARROW & CLEAN ===== */
#receiptModal .modal-content {
  max-width: 380px;
  width: 90%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.receipt-body {
  padding: 0;
  font-family: 'Inter', sans-serif;
  background: #fff;
}

.receipt-header {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: 0.95rem;
}

.receipt-header h3 {
  margin: 0 0 0.2rem;
  font-size: 1.4rem;
  font-weight: 700;
}

.receipt-header p {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.9;
}

.receipt-details {
  padding: 1.25rem 1rem;
  background: #fff5f5;
  font-size: 0.9rem;
  line-height: 1.5;
}

.receipt-details p {
  display: flex;
  justify-content: space-between;
  margin: 0.6rem 0;
  padding: 0.4rem 0;
  border-bottom: 1px dashed #fecaca;
  flex-wrap: wrap;
}

.receipt-details p:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.receipt-details p strong {
  color: #1f2937;
  font-weight: 600;
  min-width: 100px;
  font-size: 0.85rem;
}

.receipt-details .badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}

.receipt-details .badge.success {
  background: #ecfdf5;
  color: #16a34a;
}

.receipt-details .badge.warning {
  background: #fff3cd;
  color: #856404;
}

.receipt-footer {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  background: #fff;
  border-top: 1px solid #fecaca;
}

.receipt-footer .btn-primary,
.receipt-footer .btn-secondary {
  flex: 1;
  padding: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  text-align: center;
  transition: all 0.2s;
}

.receipt-footer .btn-primary {
  background: #dc2626;
  color: white;
  border: none;
}

.receipt-footer .btn-secondary {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.receipt-footer .btn-primary:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

.receipt-footer .btn-secondary:hover {
  background: #fecaca;
  color: #dc2626;
}

/* View Receipt Button in Transaction List */
.transaction-item .btn-small {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.transaction-item .btn-small:hover {
  background: #fecaca;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

/* PRINT STYLES — CLEAN RECEIPT */
@media print {
  body * { visibility: hidden; }
  #receiptModal, #receiptModal * { visibility: visible; }
  #receiptModal {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  #receiptModal .modal-content {
    box-shadow: none;
    border: none;
    max-width: 100%;
  }
  .receipt-header, .receipt-details, .receipt-footer {
    box-shadow: none !important;
    border: none !important;
  }
  .receipt-footer { display: none; }
  .modal-header .close { display: none; }
  .receipt-details p { border-bottom: 1px solid #ccc !important; }
}

/* Mobile Adjustments */
@media (max-width: 480px) {
  #receiptModal .modal-content {
    width: 95%;
    margin: 1rem;
  }
  .receipt-details p {
    flex-direction: column;
    gap: 0.2rem;
  }
  .receipt-details p strong {
    min-width: auto;
    font-weight: 500;
    color: #475569;
  }
  .receipt-footer {
    flex-direction: column;
  }
}