/* ZeroFee Tools - PDF to Excel/CSV */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: #f8fafc; color: #1e293b; line-height: 1.6; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

.site-header { background: linear-gradient(135deg, #1d4ed8, #7c3aed); color: #fff; padding: 40px 0 32px; }
.crumb { color: #dbeafe; text-decoration: none; font-size: .9rem; }
.crumb:hover { text-decoration: underline; }
.site-header h1 { font-size: 2rem; margin: 8px 0 4px; }
.site-header .sub { opacity: .92; }
.estimate-badge { display: inline-block; margin-top: 14px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.4); padding: 8px 16px; border-radius: 10px; font-weight: 700; font-size: .9rem; }

main.wrap { padding-top: 28px; padding-bottom: 40px; }
.card { background: #fff; border-radius: 14px; padding: 24px; margin-bottom: 20px; box-shadow: 0 2px 16px rgba(15,23,42,.06); }
.card h2 { font-size: 1.2rem; margin-bottom: 14px; }
.small-note { font-size: .85rem; color: #64748b; font-weight: 400; }
.hidden { display: none !important; }

/* Upload */
.dropzone { border: 2px dashed #c7d2fe; border-radius: 14px; padding: 44px 20px; text-align: center; cursor: pointer; transition: .15s; background: #f8faff; }
.dropzone:hover, .dropzone:focus, .dropzone.drag { border-color: #1d4ed8; background: #eff6ff; outline: none; }
.dz-icon { font-size: 2.6rem; display: block; margin-bottom: 10px; }
.file-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-weight: 600; }
.progress { margin-top: 16px; height: 10px; background: #e2e8f0; border-radius: 6px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, #1d4ed8, #7c3aed); transition: width .2s; border-radius: 6px; }
.progress p { margin-top: 8px; }

/* Buttons */
.btn { border: none; border-radius: 10px; padding: 12px 22px; font-weight: 700; font-size: .95rem; cursor: pointer; }
.btn.primary { background: #1d4ed8; color: #fff; }
.btn.primary:hover { background: #1e40af; }
.btn.primary:disabled { background: #93c5fd; cursor: not-allowed; }
.btn.secondary { background: #7c3aed; color: #fff; }
.btn.secondary:hover { background: #6d28d9; }
.btn.ghost { background: #f1f5f9; color: #334155; padding: 8px 14px; font-size: .85rem; }
.btn.ghost:hover { background: #e2e8f0; }

/* Page picker */
.page-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.page-chip { display: inline-flex; align-items: center; gap: 6px; border: 2px solid #e2e8f0; border-radius: 10px; padding: 8px 12px; font-weight: 600; cursor: pointer; background: #fff; font-size: .9rem; }
.page-chip input { accent-color: #1d4ed8; }
.page-chip.on { border-color: #1d4ed8; background: #eff6ff; }

/* Grid */
.sheet-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.sheet-tab { border: 2px solid #e2e8f0; background: #fff; border-radius: 10px; padding: 8px 16px; font-weight: 700; cursor: pointer; color: #475569; }
.sheet-tab.active { border-color: #1d4ed8; color: #1d4ed8; background: #eff6ff; }
.table-wrap { overflow: auto; max-height: 480px; border: 1px solid #e2e8f0; border-radius: 10px; }
table#grid { border-collapse: collapse; width: 100%; font-size: .88rem; }
#grid td { border: 1px solid #e2e8f0; padding: 8px 10px; min-width: 90px; }
#grid td:focus { outline: 2px solid #1d4ed8; background: #eff6ff; }
#grid tr:nth-child(even) td { background: #f8fafc; }
.grid-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.export-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
#statLine { margin-top: 12px; }

/* FAQ */
.faq { border-bottom: 1px solid #f1f5f9; padding: 12px 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin-top: 8px; color: #475569; font-size: .94rem; }
.faq a { color: #1d4ed8; }

.site-footer { text-align: center; padding: 24px 0 36px; color: #94a3b8; font-size: .85rem; }

@media (max-width: 640px) {
  .site-header h1 { font-size: 1.5rem; }
  .export-row .btn { flex: 1; }
}
