/* ── Bank Analyzer Tool CSS ─────────────────────────────────────
   Inherits base styles from ../../assets/css/style.css
   All tool-specific styles use ba- prefix.
   FinsyncX palette: navy #0A1E4E · green #3AB54A · blue #1A73E8
   Fonts: DM Sans (body) · Sora (headings)
──────────────────────────────────────────────────────────────── */

/* ── Section wrapper ─────────────────────────────────────────── */
#bank-tool {
  padding: 48px 0 72px;
  background: #f8f9fc;
  min-height: 60vh;
}

/* ── Trust badges row ────────────────────────────────────────── */
.tool-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #0A1E4E;
  box-shadow: 0 2px 8px rgba(10,30,78,.06);
}
.trust-badge i { color: #3AB54A; }

/* ── Stepper ─────────────────────────────────────────────────── */
.ba-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 36px;
  gap: 0;
}
.ba-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.4;
  transition: opacity 0.3s;
}
.ba-step.ba-active,
.ba-step.done { opacity: 1; }

.ba-step-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 700; font-size: 0.85rem;
  transition: background 0.3s, color 0.3s;
}
.ba-step.ba-active .ba-step-num {
  background: #1A73E8;
  color: #fff;
}
.ba-step.done .ba-step-num {
  background: #3AB54A;
  color: #fff;
}
.ba-step-label {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
  font-weight: 500;
}
.ba-step.ba-active .ba-step-label,
.ba-step.done .ba-step-label { color: #0A1E4E; }

.ba-step-line {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  min-width: 48px; max-width: 100px;
  margin: 0 12px;
  margin-bottom: 22px;
}

/* ── Panel (card wrapper) ────────────────────────────────────── */
.ba-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 36px;
  box-shadow: 0 4px 24px rgba(10,30,78,.08);
  margin-bottom: 28px;
}

/* ── Drop zone ───────────────────────────────────────────────── */
.ba-drop-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 56px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.ba-drop-zone:hover,
.ba-drop-zone.drag-over {
  border-color: #1A73E8;
  background: rgba(26,115,232,0.04);
}
.ba-drop-icon {
  font-size: 3rem;
  color: #1A73E8;
  opacity: 0.7;
}
.ba-drop-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0A1E4E;
}
.ba-drop-sub {
  font-size: 0.88rem;
  color: #64748b;
}

/* ── File info row ───────────────────────────────────────────── */
.ba-file-info {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(26,115,232,0.05);
  border: 1px solid rgba(26,115,232,0.18);
  border-radius: 10px;
  padding: 14px 20px;
}
.ba-file-icon {
  font-size: 1.8rem;
  color: #1A73E8;
}
.ba-file-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ba-file-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: #0A1E4E;
}
.ba-file-size {
  font-size: 0.78rem;
  color: #64748b;
}
.ba-hint {
  margin-top: 18px;
  font-size: 0.78rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.7;
}

/* ── Processing panel ────────────────────────────────────────── */
.ba-proc-inner {
  display: flex; flex-direction: column;
  align-items: center; gap: 20px;
  padding: 40px 0;
}
.ba-spinner {
  width: 48px; height: 48px;
  border: 3px solid #e2e8f0;
  border-top-color: #1A73E8;
  border-radius: 50%;
  animation: ba-spin 0.9s linear infinite;
}
@keyframes ba-spin { to { transform: rotate(360deg); } }

.ba-proc-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0A1E4E;
}
.ba-proc-sub {
  font-size: 0.88rem;
  color: #64748b;
}
.ba-prog-track {
  width: 100%; max-width: 360px;
  height: 5px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}
.ba-prog-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #1A73E8, #3AB54A);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ── Results header ──────────────────────────────────────────── */
.ba-results-header {
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  margin-bottom: 28px;
}
.ba-results-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ba-results-actions { display: flex; gap: 10px; }

.ba-bank-badge {
  display: inline-block;
  background: rgba(26,115,232,0.08);
  color: #1A73E8;
  border: 1px solid rgba(26,115,232,0.2);
  padding: 5px 16px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
}
.ba-acct-label {
  font-size: 0.82rem;
  color: #64748b;
}

/* ── Summary cards ───────────────────────────────────────────── */
.ba-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 820px) { .ba-cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .ba-cards-grid { grid-template-columns: 1fr; } }

.ba-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 12px rgba(10,30,78,.06);
  transition: box-shadow 0.2s, transform 0.2s;
}
.ba-card:hover {
  box-shadow: 0 6px 24px rgba(10,30,78,.12);
  transform: translateY(-2px);
}
.ba-card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.ba-icon-green { background: rgba(58,181,74,.12); color: #3AB54A; }
.ba-icon-red   { background: rgba(239,68,68,.10);  color: #ef4444; }
.ba-icon-blue  { background: rgba(26,115,232,.10); color: #1A73E8; }
.ba-icon-navy  { background: rgba(10,30,78,.08);   color: #0A1E4E; }

.ba-card-body { display: flex; flex-direction: column; gap: 4px; }
.ba-card-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ba-card-value {
  font-family: 'Sora', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0A1E4E;
}
.ba-card-value.green { color: #3AB54A; }
.ba-card-value.red   { color: #ef4444; }
.ba-card-value.navy  { color: #0A1E4E; }

/* ── Charts row ──────────────────────────────────────────────── */
.ba-charts-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  margin-bottom: 28px;
  align-items: start;
}
@media (max-width: 900px) { .ba-charts-row { grid-template-columns: 1fr; } }

.ba-chart-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 2px 12px rgba(10,30,78,.06);
}
.ba-chart-sm {
  min-width: 260px; max-width: 300px;
}
@media (max-width: 900px) { .ba-chart-sm { max-width: 100%; min-width: unset; } }

.ba-chart-label {
  font-family: 'Sora', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0A1E4E;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 7px;
}
.ba-chart-label i { color: #1A73E8; }

/* ── Transaction table ───────────────────────────────────────── */
.ba-table-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(10,30,78,.06);
  margin-bottom: 28px;
}
.ba-table-topbar {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #f8f9fc;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap; gap: 10px;
}
.ba-table-title {
  font-family: 'Sora', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0A1E4E;
}
.ba-txn-count {
  margin-left: 6px;
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 400;
  font-family: 'DM Sans', sans-serif;
}
.ba-search {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 50px;
  color: #0A1E4E;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  padding: 7px 16px;
  width: 220px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ba-search:focus {
  border-color: #1A73E8;
  box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}

.ba-table-scroll {
  overflow-x: auto;
  max-height: 520px;
  overflow-y: auto;
}
.ba-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  font-family: 'DM Sans', sans-serif;
}
.ba-table thead {
  position: sticky; top: 0; z-index: 1;
  background: #f8f9fc;
}
.ba-table th {
  padding: 11px 14px;
  text-align: left;
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}
.ba-table th.num,
.ba-table td.num { text-align: right; }

.ba-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #0A1E4E;
  vertical-align: middle;
}
.ba-table tbody tr:hover { background: rgba(26,115,232,0.03); }
.ba-table tbody tr:last-child td { border-bottom: none; }

/* row tints */
.row-credit { background: rgba(58,181,74,0.02); }
.row-debit  { background: #fff; }

.amount-debit  { color: #ef4444; font-weight: 600; }
.amount-credit { color: #3AB54A; font-weight: 600; }

.cat-badge {
  display: inline-block;
  background: rgba(26,115,232,0.08);
  color: #1A73E8;
  border-radius: 50px;
  padding: 2px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}
.conf-pill {
  display: inline-block;
  border-radius: 50px;
  padding: 2px 9px;
  font-size: 0.74rem;
  font-weight: 700;
}
.conf-high { background: rgba(58,181,74,0.12);   color: #3AB54A; }
.conf-mid  { background: rgba(234,179,8,0.12);   color: #b45309; }
.conf-low  { background: rgba(239,68,68,0.10);   color: #ef4444; }

/* ── CTA box ─────────────────────────────────────────────────── */
.ba-cta-box {
  background: linear-gradient(135deg, #0A1E4E 60%, #1A73E8);
  border-radius: 14px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 8px;
  box-shadow: 0 4px 24px rgba(10,30,78,.18);
}
.ba-cta-text {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  color: #fff;
  flex: 1;
}
.ba-cta-text > i {
  font-size: 1.6rem;
  color: #3AB54A;
  flex-shrink: 0;
  margin-top: 2px;
}
.ba-cta-text strong {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.ba-cta-text p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  margin: 0;
}

/* ── Toast ───────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #ef4444;
  color: #0A1E4E;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 0.88rem;
  z-index: 9999;
  max-width: 460px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(239,68,68,.15);
  animation: ba-fadeIn 0.2s;
}
@keyframes ba-fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
}

/* ── Scrollbar ───────────────────────────────────────────────── */
.ba-table-scroll::-webkit-scrollbar { width: 5px; height: 5px; }
.ba-table-scroll::-webkit-scrollbar-track { background: transparent; }
.ba-table-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.ba-table-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Password modal ──────────────────────────────────────────── */
.ba-pwd-overlay {
  position: fixed; inset: 0;
  background: rgba(10,30,78,.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.ba-pwd-card {
  background: #fff;
  border-radius: 20px;
  padding: 44px 40px;
  max-width: 420px; width: 92%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(10,30,78,.28);
}
.ba-pwd-icon {
  font-size: 2.6rem;
  color: #1A73E8;
  margin-bottom: 16px;
}
.ba-pwd-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #0A1E4E;
  margin-bottom: 8px;
}
.ba-pwd-sub {
  font-size: 0.86rem;
  color: #64748b;
  margin-bottom: 20px;
  line-height: 1.6;
}
.ba-pwd-card input[type="password"] {
  width: 100%;
  padding: 13px 18px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  margin-bottom: 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ba-pwd-card input[type="password"]:focus {
  border-color: #1A73E8;
  box-shadow: 0 0 0 3px rgba(26,115,232,.12);
}
.ba-pwd-actions {
  display: flex; gap: 12px; justify-content: center;
}

/* ── File queue (multi-file) ─────────────────────────────────── */
.ba-file-queue {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ba-queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8f9fc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.84rem;
}
.ba-queue-status {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  white-space: nowrap;
}
.ba-queue-status.pending { background: #fef3c7; color: #b45309; }
.ba-queue-status.done    { background: rgba(58,181,74,.13); color: #2d9040; }
.ba-queue-status.error   { background: rgba(239,68,68,.10); color: #dc2626; }
.ba-queue-status.active  { background: rgba(26,115,232,.10); color: #1A73E8; }

/* ── btn-outline (used by password cancel / browse) ──────────── */
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  border: 2px solid #1A73E8;
  color: #1A73E8;
  padding: 10px 22px;
  border-radius: 50px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: #1A73E8; color: #fff; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .ba-panel { padding: 20px; }
  .ba-drop-zone { padding: 36px 16px; }
  .ba-results-header { flex-direction: column; align-items: flex-start; }
  .ba-cta-box { flex-direction: column; text-align: center; }
  .ba-cta-text { flex-direction: column; align-items: center; text-align: center; }
  .ba-pwd-card { padding: 32px 24px; }
  .ba-pwd-actions { flex-direction: column; }
}
