:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-border: #e2e8f0;
  --surface-hover: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.12);
  --success: #059669;
  --success-bg: #ecfdf5;
  --danger: #dc2626;
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Header */
header {
  background: #ffffff;
  border-bottom: 1px solid var(--surface-border);
  padding: 16px 0;
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.logo-badge {
  background: var(--success-bg);
  color: var(--success);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #a7f3d0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.btn-small {
  background: #ffffff;
  border: 1px solid var(--surface-border);
  color: var(--text);
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.2s;
}

.btn-small:hover {
  background: var(--surface-hover);
}

/* Hero */
.hero {
  padding: 55px 0 30px;
  text-align: center;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--surface-border);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  margin-bottom: 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
}

h1 {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  color: #0f172a;
}

h1 span {
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

/* Dropzone */
.dropzone-wrap {
  margin: 30px auto;
  max-width: 760px;
}

.dropzone {
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--primary);
  background: #f8faff;
  box-shadow: 0 0 25px var(--primary-glow);
}

.upload-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  background: #eff6ff;
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.dropzone h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.dropzone p {
  color: var(--text-muted);
  font-size: 14px;
}

.privacy-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--success);
  font-weight: 600;
}

/* Status Card */
.status-wrap {
  max-width: 760px;
  margin: 0 auto 30px;
}

.status-card {
  background: #ffffff;
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #334155;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.status-card.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: var(--danger);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Results / Table Section */
.results-card {
  background: #ffffff;
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 60px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

.results-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
}

.stats-pill {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.stats-pill strong {
  color: var(--text);
}

.actions-row {
  display: flex;
  gap: 10px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
  transition: all 0.2s;
}

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

.btn-secondary {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--surface-border);
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-secondary:hover {
  background: var(--surface-hover);
}

.table-wrap {
  overflow-x: auto;
  max-height: 480px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

th {
  background: #f1f5f9;
  padding: 12px 18px;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--surface-border);
}

td {
  padding: 11px 18px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

tr:hover td {
  background: #f8fafc;
}

td[contenteditable="true"]:focus {
  outline: 2px solid var(--primary);
  background: #eff6ff;
  border-radius: 4px;
}

.desc-cell {
  font-weight: 500;
}

.num-cell {
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 500;
}

.num-cell.debit {
  color: #dc2626;
}

.num-cell.credit {
  color: #059669;
}

.empty-state, .more-state {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
}

/* Comparison Section */
.comparison-section {
  padding: 50px 0;
  border-top: 1px solid var(--surface-border);
}

.section-head {
  text-align: center;
  margin-bottom: 35px;
}

.section-head h2 {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 15px;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.compare-card {
  background: #ffffff;
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.compare-card.winner {
  border-color: #93c5fd;
  background: #f0f7ff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.compare-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 14px;
}

.compare-card ul {
  list-style: none;
}

.compare-card li {
  font-size: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
}

/* Paywall Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.modal {
  background: #ffffff;
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  padding: 35px;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
}

.pricing-badge {
  background: #eff6ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 14px;
}

.modal h2 {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.price-tag {
  font-size: 42px;
  font-weight: 800;
  margin: 14px 0 6px;
  color: #0f172a;
}

.price-tag span {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
}

.feature-list {
  text-align: left;
  margin: 24px 0;
  font-size: 14px;
  color: #334155;
}

.feature-list li {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hidden {
  display: none !important;
}

footer {
  margin-top: auto;
  border-top: 1px solid var(--surface-border);
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: #ffffff;
}
