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

:root {
  --blue-900: #0d3b66;
  --blue-700: #14548c;
  --blue-500: #1c6fb0;
  --blue-100: #e6f0fa;
  --red-700:  #c62828;
  --red-100:  #ffebee;
  --green-700: #2e7d32;
  --green-100: #e8f5e9;
  --orange-700: #e65100;
  --orange-100: #fff3e0;
  --gray-900: #212121;
  --gray-700: #424242;
  --gray-500: #9e9e9e;
  --gray-200: #eeeeee;
  --gray-100: #f5f7fa;
  --white:    #ffffff;
  --shadow:   0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--gray-100);
  color: var(--gray-900);
  line-height: 1.5;
}

/* ─── LOGIN ─────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--blue-900) 0%, var(--blue-500) 100%);
}

.login-card {
  background: var(--white);
  border-radius: 14px;
  padding: 48px 40px 40px;
  width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,.28);
}

.login-logo {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo .brand-mark { font-size: 48px; display: block; line-height: 1; margin-bottom: 8px; }
.login-logo h1 { font-size: 26px; font-weight: 800; color: var(--blue-900); letter-spacing: -.02em; }
.login-logo p  { color: var(--gray-500); font-size: 13px; margin-top: 4px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--gray-700); }
.form-group input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--gray-200);
  border-radius: 8px; font-size: 15px; transition: border-color .2s;
}
.form-group input:focus { outline: none; border-color: var(--blue-500); }

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; transition: all .15s; text-decoration: none;
}
.btn-primary { background: var(--blue-700); color: #fff; width: 100%; padding: 13px; font-size: 15px; }
.btn-primary:hover { background: var(--blue-900); }
.btn-danger  { background: var(--red-700); color: #fff; }
.btn-danger:hover { opacity: .88; }
.btn-outline { background: transparent; border: 1.5px solid var(--blue-500); color: var(--blue-700); }
.btn-outline:hover { background: var(--blue-100); }
.btn-ghost   { background: transparent; color: var(--gray-700); }
.btn-ghost:hover { background: var(--gray-200); }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ─── ERROR / ALERT ──────────────────────────────────────── */
.error-msg {
  background: var(--red-100); color: var(--red-700);
  padding: 10px 14px; border-radius: 8px; font-size: 14px;
  margin-bottom: 16px; display: none;
}

.alert {
  padding: 13px 16px; border-radius: 8px; font-size: 14px;
  margin-bottom: 20px; border-left: 4px solid;
}
.alert-danger  { background: var(--red-100);    color: var(--red-700);    border-color: var(--red-700);    }
.alert-warning { background: var(--orange-100); color: var(--orange-700); border-color: var(--orange-700); }
.alert-info    { background: var(--blue-100);   color: var(--blue-700);   border-color: var(--blue-500);   }
.alert-success { background: var(--green-100);  color: var(--green-700);  border-color: var(--green-700);  }

/* ─── APP SHELL ──────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* ─── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  width: 256px; background: var(--blue-900); color: #fff;
  flex-shrink: 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}

.sidebar-header { padding: 22px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.1); }

.sidebar-brand { display: flex; align-items: center; gap: 9px; }
.sidebar-brand .brand-mark { font-size: 24px; line-height: 1; }
.sidebar-brand span        { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }

.sidebar-user { margin-top: 14px; }
.sidebar-user .user-name { font-size: 14px; font-weight: 600; }
.sidebar-user .user-role {
  font-size: 11px; color: rgba(255,255,255,.55); margin-top: 2px;
  text-transform: uppercase; letter-spacing: .06em;
}

.sidebar-nav { padding: 12px 0; flex: 1; overflow-y: auto; }

.nav-section {
  padding: 10px 20px 4px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.35);
}

.nav-link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 20px; color: rgba(255,255,255,.75); text-decoration: none;
  font-size: 14px; transition: all .12s; border-left: 3px solid transparent;
}
.nav-link:hover  { background: rgba(255,255,255,.08); color: #fff; }
.nav-link.active { background: rgba(255,255,255,.12); color: #fff; border-left-color: #fff; font-weight: 600; }
.nav-link .icon  { width: 20px; text-align: center; font-size: 15px; }

.sidebar-footer { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-footer button {
  background: none; border: none; color: rgba(255,255,255,.55);
  font-size: 13px; cursor: pointer; padding: 0;
}
.sidebar-footer button:hover { color: #fff; }

/* ─── MAIN CONTENT ───────────────────────────────────────── */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.page-header {
  background: var(--white); border-bottom: 1px solid var(--gray-200);
  padding: 18px 32px; display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.page-title    { font-size: 20px; font-weight: 700; color: var(--gray-900); }
.page-subtitle { font-size: 13px; color: var(--gray-500); margin-top: 2px; }

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

/* ─── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--white); border-radius: 10px;
  border: 1px solid var(--gray-200); box-shadow: var(--shadow);
}
.card-header {
  padding: 14px 20px; border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 14px; font-weight: 600; color: var(--gray-900); }
.card-body  { padding: 20px; }

/* ─── LISTS ──────────────────────────────────────────────── */
.item-list { list-style: none; }
.item-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--gray-100);
}
.item-row:last-child { border-bottom: none; }

.item-icon {
  width: 38px; height: 38px; border-radius: 8px; background: var(--blue-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.item-icon.red    { background: var(--red-100); }
.item-icon.orange { background: var(--orange-100); }
.item-icon.green  { background: var(--green-100); }

.item-info   { flex: 1; min-width: 0; }
.item-title  { font-size: 14px; font-weight: 600; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-meta   { font-size: 12px; color: var(--gray-500); margin-top: 1px; }
.item-action { flex-shrink: 0; }

.view-link { font-size: 13px; color: var(--blue-700); text-decoration: none; font-weight: 500; white-space: nowrap; }
.view-link:hover { text-decoration: underline; }

/* ─── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 100px; font-size: 11px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap;
}
.badge-blue   { background: var(--blue-100);   color: var(--blue-700);   }
.badge-red    { background: var(--red-100);    color: var(--red-700);    }
.badge-green  { background: var(--green-100);  color: var(--green-700);  }
.badge-orange { background: var(--orange-100); color: var(--orange-700); }
.badge-gray   { background: var(--gray-200);   color: var(--gray-700);   }

/* ─── DETAIL VIEW ────────────────────────────────────────── */
.detail-section { margin-bottom: 28px; }
.detail-section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--gray-500); margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 1px solid var(--gray-200);
}

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-field { margin-bottom: 18px; }
.detail-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--gray-500); margin-bottom: 4px; }
.detail-value { font-size: 15px; color: var(--gray-900); }

/* ─── FORM ROW ───────────────────────────────────────────── */
.import-form { display: flex; gap: 10px; }
.import-form input { flex: 1; }

/* ─── RESULT / RAW RESPONSE BOX ──────────────────────────── */
.result-box {
  margin-top: 18px; background: var(--gray-900); border-radius: 8px;
  overflow: hidden;
}
.result-box .result-header {
  padding: 8px 14px; background: #111; color: var(--gray-500);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.result-box pre {
  margin: 0; padding: 16px; color: #d4f5d4; font-size: 13px;
  font-family: 'Courier New', monospace; white-space: pre-wrap; word-break: break-word;
  max-height: 420px; overflow-y: auto;
}

/* ─── ACTION BAR ─────────────────────────────────────────── */
.action-bar { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* ─── LOADING ────────────────────────────────────────────── */
.loading {
  display: flex; align-items: center; justify-content: center;
  padding: 60px; color: var(--gray-500); font-size: 14px; gap: 10px;
}

/* ─── VULN ANNOTATION (dev teaching aid) ─────────────────── */
.vuln-note {
  font-size: 11px; font-family: 'Courier New', monospace;
  background: #fffde7; border: 1px solid #f9a825; border-radius: 4px;
  padding: 2px 7px; color: #f57f17; margin-left: 8px;
  vertical-align: middle; white-space: nowrap;
}

/* ─── PUBLIC SITE HEADER (marketing pages) ──────────────────────────── */
.public-header {
  background: var(--white); border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; z-index: 20;
}
.public-header-inner {
  max-width: 1160px; margin: 0 auto; padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.public-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--blue-900); }
.public-brand .brand-mark { font-size: 26px; line-height: 1; }
.public-brand span { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.public-nav { display: flex; align-items: center; gap: 28px; }
.public-nav a {
  color: var(--gray-700); text-decoration: none; font-size: 14px; font-weight: 600;
}
.public-nav a:hover { color: var(--blue-700); }
.public-nav .btn { white-space: nowrap; }

/* ─── HERO ───────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(150deg, var(--blue-900) 0%, var(--blue-700) 55%, var(--blue-500) 100%);
  color: #fff;
}
.hero-inner {
  max-width: 1160px; margin: 0 auto; padding: 64px 32px 80px;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(255,255,255,.12); padding: 6px 12px; border-radius: 100px; margin-bottom: 18px;
}
.hero h1 { font-size: 40px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; margin-bottom: 16px; }
.hero p.hero-sub { font-size: 16px; color: rgba(255,255,255,.85); max-width: 480px; margin-bottom: 28px; }
.hero-stats { display: flex; gap: 32px; margin-top: 36px; flex-wrap: wrap; }
.hero-stat .num { font-size: 24px; font-weight: 800; }
.hero-stat .label { font-size: 12px; color: rgba(255,255,255,.7); margin-top: 2px; }

.hero-login-card {
  background: var(--white); border-radius: 14px; padding: 34px 30px 28px;
  box-shadow: 0 24px 64px rgba(0,0,0,.28); color: var(--gray-900);
}
.hero-login-card h2 { font-size: 18px; font-weight: 700; color: var(--blue-900); margin-bottom: 4px; }
.hero-login-card .sub { font-size: 13px; color: var(--gray-500); margin-bottom: 22px; }

/* ─── TRUST STRIP ────────────────────────────────────────────────────── */
.trust-strip {
  background: var(--gray-100); border-bottom: 1px solid var(--gray-200);
}
.trust-strip-inner {
  max-width: 1160px; margin: 0 auto; padding: 22px 32px;
  display: flex; gap: 36px; flex-wrap: wrap; justify-content: center;
}
.trust-badge {
  display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--gray-700); font-weight: 600;
}
.trust-badge .icon { font-size: 20px; }

/* ─── FEATURE GRID ───────────────────────────────────────────────────── */
.section { max-width: 1160px; margin: 0 auto; padding: 64px 32px; }
.section-heading { text-align: center; margin-bottom: 40px; }
.section-heading h2 { font-size: 28px; font-weight: 800; color: var(--blue-900); letter-spacing: -.02em; }
.section-heading p { color: var(--gray-500); font-size: 15px; margin-top: 8px; }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: 12px;
  padding: 26px 22px; box-shadow: var(--shadow);
}
.feature-card .icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--blue-100);
  display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px;
}
.feature-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--gray-500); }

/* ─── PUBLIC FOOTER ──────────────────────────────────────────────────── */
.public-footer { background: var(--gray-900); color: rgba(255,255,255,.65); }
.public-footer-inner { max-width: 1160px; margin: 0 auto; padding: 48px 32px 28px; }
.footer-columns { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-col h4 { color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .06em; }
.footer-col a { display: block; color: rgba(255,255,255,.6); text-decoration: none; font-size: 13px; margin-bottom: 9px; }
.footer-col a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.footer-brand span { font-size: 17px; font-weight: 800; color: #fff; }
.footer-col p { font-size: 13px; line-height: 1.6; max-width: 320px; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px;
  font-size: 11.5px; line-height: 1.7; color: rgba(255,255,255,.4);
}
.footer-legal p { margin-bottom: 8px; }

/* ─── BALANCE SUMMARY CARDS ──────────────────────────────────────────── */
.balance-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-bottom: 28px; }
.balance-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: 12px;
  padding: 20px 22px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.balance-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--blue-500);
}
.balance-card.savings::before { background: var(--green-700); }
.balance-card .balance-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--gray-500);
}
.balance-card .balance-acct { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.balance-card .balance-amount { font-size: 28px; font-weight: 800; color: var(--gray-900); margin-top: 10px; }
.balance-card .balance-foot { font-size: 12px; color: var(--gray-500); margin-top: 8px; }

/* ─── DATA TABLE (transactions / statements) ─────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
  text-align: left; padding: 10px 14px; color: var(--gray-500); font-weight: 700;
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 2px solid var(--gray-200); white-space: nowrap;
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--gray-100); color: var(--gray-900); }
.data-table tr:last-child td { border-bottom: none; }
.data-table td.amount { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.data-table td.amount.negative { color: var(--red-700); }
.data-table td.amount.positive { color: var(--green-700); }
.data-table .merchant-icon { display: inline-flex; margin-right: 8px; }
.table-scroll { overflow-x: auto; }

/* ─── STATEMENTS / DOCUMENTS LIST ─────────────────────────────────────── */
.doc-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--gray-100);
}
.doc-row:last-child { border-bottom: none; }
.doc-icon {
  width: 40px; height: 40px; border-radius: 8px; background: var(--red-100); color: var(--red-700);
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; flex-shrink: 0;
}
.doc-info { flex: 1; min-width: 0; }
.doc-title { font-size: 14px; font-weight: 600; }
.doc-meta { font-size: 12px; color: var(--gray-500); margin-top: 1px; }

/* ─── COMING SOON / DISABLED FEATURE ─────────────────────────────────── */
.coming-soon-badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; background: var(--gray-200); color: var(--gray-700);
  padding: 3px 10px; border-radius: 100px; margin-left: 10px; vertical-align: middle;
}
fieldset[disabled] { opacity: .55; }
.disabled-overlay-note {
  font-size: 13px; color: var(--gray-500); background: var(--gray-100); border-radius: 8px;
  padding: 12px 16px; margin-top: 16px;
}

/* ─── FAQ / SUPPORT ──────────────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--gray-200); }
.faq-item:last-child { border-bottom: none; }
.faq-question {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: none; text-align: left; cursor: pointer;
  padding: 16px 4px; font-size: 14.5px; font-weight: 600; color: var(--gray-900);
}
.faq-question .chev { transition: transform .15s; color: var(--gray-500); font-size: 13px; }
.faq-item.open .faq-question .chev { transform: rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height .18s ease;
  font-size: 13.5px; color: var(--gray-500); line-height: 1.6;
}
.faq-item.open .faq-answer { max-height: 240px; padding-bottom: 16px; }

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contact-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: 12px;
  padding: 22px; text-align: center; box-shadow: var(--shadow);
}
.contact-card .icon { font-size: 26px; margin-bottom: 10px; }
.contact-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.contact-card p { font-size: 13px; color: var(--gray-500); }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { width: 200px; }
  .detail-grid { grid-template-columns: 1fr; }
  .content-area { padding: 20px 16px; }
  .import-form { flex-direction: column; }
  .hero-inner { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-columns { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
