/* ============================================================
   Bank Statement to Excel Converter — Stylesheet
   Design: clean, minimal, professional financial SaaS
   ============================================================ */

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #F8FAFC;
  color: #111827;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
img, svg { display: block; }

/* ── Layout ──────────────────────────────────────────────────── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ──────────────────────────────────────────────────── */
.site-header {
  background: #fff;
  border-bottom: 1px solid #E5E7EB;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #1E3A5F;
  letter-spacing: -0.3px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: #F3F4F6; color: #1E3A5F; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  transition: background 0.15s, box-shadow 0.15s, opacity 0.15s, transform 0.1s;
  line-height: 1;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: #1E3A5F;
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background: #163152; box-shadow: 0 2px 8px rgba(30,58,95,0.25); }

.btn-secondary {
  background: #EEF4FB;
  color: #1E3A5F;
}
.btn-secondary:hover:not(:disabled) { background: #DDE9F6; }

.btn-ghost {
  background: transparent;
  color: #374151;
}
.btn-ghost:hover:not(:disabled) { background: #F3F4F6; }

.btn-full { width: 100%; justify-content: center; padding: 12px 18px; }
.btn-sm { font-size: 0.82rem; padding: 6px 12px; }

.btn-download {
  font-size: 0.95rem;
  padding: 11px 22px;
}

/* ── Main content ────────────────────────────────────────────── */
.main-content {
  padding: 56px 0 80px;
  min-height: calc(100vh - 60px - 120px);
}

/* ── Page states ─────────────────────────────────────────────── */
.page-state { animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero { text-align: center; margin-bottom: 40px; }

.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.8px;
  line-height: 1.25;
  margin-bottom: 14px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #6B7280;
  max-width: 480px;
  margin: 0 auto 24px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: #374151;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  padding: 5px 12px;
}

/* ── Upload card ─────────────────────────────────────────────── */
.upload-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 32px;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.upload-zone {
  border: 2px dashed #CBD5E1;
  border-radius: 12px;
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}
.upload-zone:hover, .upload-zone:focus { border-color: #2D7DD2; background: #F8FBFF; }
.upload-zone.dragover { border-color: #1E3A5F; background: #EEF4FB; }

.upload-icon { margin: 0 auto 16px; }

.upload-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1E3A5F;
  margin-bottom: 4px;
}
.upload-sublabel { font-size: 0.85rem; color: #9CA3AF; margin-bottom: 10px; }
.upload-types { font-size: 0.8rem; color: #9CA3AF; }

.upload-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.78rem;
  color: #9CA3AF;
  margin-top: 16px;
}

/* ── Processing card ─────────────────────────────────────────── */
.processing-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 60px 32px;
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.processing-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #E5E7EB;
  border-top-color: #1E3A5F;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

.processing-spinner.small {
  width: 28px;
  height: 28px;
  border-width: 2.5px;
  margin: 20px auto 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.processing-step {
  font-size: 1rem;
  font-weight: 600;
  color: #1E3A5F;
  margin-bottom: 6px;
}
.processing-note { font-size: 0.82rem; color: #9CA3AF; }

/* ── Preview ─────────────────────────────────────────────────── */
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.preview-success {
  display: flex;
  align-items: center;
  gap: 12px;
}

.success-icon { flex-shrink: 0; }

.preview-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.3;
}
.preview-count { font-size: 0.85rem; color: #6B7280; }

.preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Preview table */
.preview-table-wrapper {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.preview-table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 480px;
}

.preview-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.preview-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.preview-table th {
  background: #1E3A5F;
  color: #fff;
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  white-space: nowrap;
  letter-spacing: 0.1px;
}

.preview-table td {
  padding: 8px 14px;
  color: #374151;
  white-space: nowrap;
  border-bottom: 1px solid #F3F4F6;
}

.preview-table tbody tr:nth-child(even) td { background: #F8FAFC; }
.preview-table tbody tr:hover td { background: #EEF4FB; }

/* ── Paywall card ────────────────────────────────────────────── */
.paywall-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.paywall-header { text-align: center; margin-bottom: 32px; }
.paywall-icon { margin: 0 auto 16px; }
.paywall-title { font-size: 1.3rem; font-weight: 700; color: #111827; margin-bottom: 6px; }
.paywall-subtitle { font-size: 0.9rem; color: #6B7280; }

/* ── Pricing cards ───────────────────────────────────────────── */
.pricing-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 520px) {
  .pricing-cards { grid-template-columns: 1fr; }
}

.pricing-card {
  border: 1.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pricing-card:hover { border-color: #2D7DD2; box-shadow: 0 2px 10px rgba(30,58,95,0.1); }
.pricing-card.featured { border-color: #1E3A5F; }

.pricing-card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #2D7DD2;
  margin-bottom: 4px;
}

.pricing-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}

.pricing-card-desc {
  font-size: 0.82rem;
  color: #6B7280;
  margin-bottom: 4px;
  flex: 1;
}

.pricing-card-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1E3A5F;
  margin: 6px 0;
}

.pricing-card-price sup {
  font-size: 0.9rem;
  font-weight: 600;
  vertical-align: top;
  margin-top: 4px;
}

.pricing-card .btn { margin-top: 8px; width: 100%; justify-content: center; }

/* ── Pricing section ─────────────────────────────────────────── */
.pricing-section-outer {
  background: #F1F5F9;
  border-top: 1px solid #E5E7EB;
  padding: 64px 0;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111827;
  text-align: center;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 0.95rem;
  color: #6B7280;
  text-align: center;
  margin-bottom: 36px;
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: #fff;
  border-top: 1px solid #E5E7EB;
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-logo { font-weight: 700; color: #1E3A5F; font-size: 0.9rem; }
.footer-copy { font-size: 0.78rem; color: #9CA3AF; }

/* ── Modals ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7280;
  transition: background 0.15s;
}
.modal-close:hover { background: #F3F4F6; }

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 0.875rem;
  color: #6B7280;
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal-switch {
  text-align: center;
  font-size: 0.83rem;
  color: #6B7280;
  margin-top: 18px;
}

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #D1D5DB;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #111827;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus { border-color: #2D7DD2; box-shadow: 0 0 0 3px rgba(45,125,210,0.12); }
.form-input::placeholder { color: #9CA3AF; }

.form-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.83rem;
  color: #B91C1C;
  margin-bottom: 12px;
}

.link-btn {
  background: none;
  border: none;
  color: #2D7DD2;
  font-weight: 600;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.link-btn:hover { color: #1E3A5F; }

/* ── Toast notifications ─────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #111827;
  color: #fff;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: slideUp 0.25s ease;
  max-width: 320px;
}
.toast.error { background: #B91C1C; }
.toast.success { background: #15803D; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Utility ─────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .main-content { padding: 36px 0 60px; }

  .hero-title { font-size: 1.7rem; }

  .preview-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .preview-actions { width: 100%; }
  .btn-download { width: 100%; justify-content: center; }

  .upload-card { padding: 20px 16px; }
  .paywall-card { padding: 24px 16px; }
  .modal-box { padding: 28px 20px; }

  .pricing-section-outer { padding: 40px 0; }
}
