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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8fafc;
  color: #1a1a2e;
  min-height: 100vh;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px;
}

h1 {
  font-size: 32px;
  margin-bottom: 8px;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.subtitle {
  color: #64748b;
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.5;
}

/* Trust bar */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
  font-size: 13px;
  color: #64748b;
}
.trust-item { font-weight: 500; }
.trust-sep {
  width: 4px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 50%;
}

/* Social proof */
.social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
  font-size: 14px;
  color: #166534;
  background: #f0fdf4;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #bbf7d0;
}
.proof-stat { font-weight: 400; }
.proof-stat strong { font-weight: 700; color: #15803d; }
.proof-sep {
  width: 4px;
  height: 4px;
  background: #86efac;
  border-radius: 50%;
}
@media (max-width: 500px) {
  .social-proof { flex-direction: column; gap: 4px; }
  .proof-sep { display: none; }
}

/* FAQ section */
.faq-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #e2e8f0;
}
.faq-section h2 {
  font-size: 22px;
  color: #0f172a;
  margin-bottom: 20px;
}
.faq-item {
  margin-bottom: 16px;
}
.faq-item h3 {
  font-size: 15px;
  color: #334155;
  margin-bottom: 4px;
  font-weight: 600;
}
.faq-item p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}
.site-footer a { color: #64748b; text-decoration: none; }
.site-footer a:hover { color: #334155; }

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: #e2e8f0;
  border-radius: 10px;
  padding: 4px;
}

.tab {
  flex: 1;
  padding: 10px 12px;
  background: none;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.tab.active {
  background: #fff;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.tab:hover:not(.active) { color: #334155; }

/* Upload areas */
.upload-area { margin-bottom: 16px; }

.drop-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.drop-zone.small {
  padding: 24px 16px;
}

.drop-icon { font-size: 40px; margin-bottom: 8px; }
.drop-icon.small { font-size: 28px; margin-bottom: 4px; }

.drop-content p { margin: 4px 0; }
.drop-sub { color: #94a3b8; font-size: 13px; }

.browse-btn {
  background: none;
  border: 1px solid #cbd5e1;
  color: #3b82f6;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 6px;
  margin-top: 8px;
  transition: all 0.2s;
}
.browse-btn:hover { background: #eff6ff; border-color: #3b82f6; }

/* Dual upload */
.dual-upload {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* File selected */
.file-selected {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 14px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  font-size: 13px;
}

.file-name { flex: 1; font-weight: 500; color: #065f46; }

.clear-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #6b7280;
  line-height: 1;
}

/* Analyze button */
#analyze-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
#analyze-btn:hover { background: #2563eb; }

.privacy-note {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 12px;
}

.hidden { display: none !important; }

/* Loading */
#loading-section {
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

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

#loading-status { color: #64748b; font-size: 16px; margin-bottom: 16px; }

#cancel-btn {
  padding: 8px 24px;
  background: none;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #64748b;
  transition: all 0.2s;
}
#cancel-btn:hover { background: #fee2e2; color: #dc2626; border-color: #dc2626; }

/* Error */
#error-section { text-align: center; padding: 40px 20px; }
#error-message { color: #dc2626; margin-bottom: 16px; font-size: 15px; }
#retry-btn {
  padding: 10px 24px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

/* Excel download bar */
.excel-download-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

#download-excel-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #15803d;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
#download-excel-btn:hover { background: #166534; }
#download-excel-btn:disabled { background: #86efac; cursor: default; }

.excel-icon { font-size: 16px; }
.excel-note { font-size: 13px; color: #64748b; }

/* Email gate */
.gate-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px;
  margin-top: 20px;
  text-align: center;
}
.gate-card h3 { font-size: 20px; margin-bottom: 6px; color: #0f172a; }
.gate-card > p { font-size: 14px; color: #64748b; margin-bottom: 16px; }

#gate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  margin: 0 auto;
}

#gate-form input {
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
#gate-form input:focus { border-color: #3b82f6; }

#gate-submit {
  padding: 12px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
#gate-submit:hover { background: #2563eb; }
#gate-submit:disabled { background: #94a3b8; cursor: default; }

.gate-fine-print { font-size: 11px; color: #94a3b8; margin-top: 10px; }

/* Responsive */
@media (max-width: 600px) {
  h1 { font-size: 24px; }
  .dual-upload { grid-template-columns: 1fr; }
  .tab { font-size: 12px; padding: 8px 6px; }
}
