*{box-sizing:border-box}
body{margin:0;background:#f5f5f3;color:#171717;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.app{max-width:720px;margin:auto;min-height:100vh;padding:20px 18px 96px}
.top{display:flex;justify-content:space-between;align-items:flex-start;margin:8px 0 24px}
.eyebrow{font-size:10px;letter-spacing:.14em;font-weight:800;color:#777}
.top h1,h2,h3,p{margin:0}
.top h1{font-size:23px;margin-top:4px}
.year{font-weight:800;background:#111827;color:white;border-radius:999px;padding:8px 12px}
.hero{background:#111827;color:#fff;border-radius:24px;padding:24px;margin-bottom:14px}
.hero h2{font-size:27px;margin-bottom:8px}
.hero p{color:#d6d7da;line-height:1.5}
.scan-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.primary,.secondary{border:0;border-radius:16px;padding:15px 16px;font-weight:800;font-size:15px;cursor:pointer}
.primary{background:#111827;color:#fff}
.secondary{background:#fff;color:#111827;border:1px solid #ddd}
.big{min-height:110px;font-size:18px;display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center}
.cards,.tax-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:14px}
.card,.panel{background:#fff;border:1px solid #e6e6e2;border-radius:18px;padding:15px}
.card b{display:block;font-size:19px}
.card span{font-size:11px;color:#777}
.screen{display:none}
.screen.active{display:block}
.section-head{display:flex;gap:12px;align-items:center;margin-bottom:15px}
.section-head h2{font-size:24px}
.back{border:0;background:#fff;border-radius:12px;padding:10px;font-size:20px}
.receipt-preview{background:#fff;border-radius:18px;padding:10px;margin-bottom:8px;text-align:center}
.receipt-preview img{max-width:100%;max-height:300px;border-radius:12px}
.fields{background:#fff;border-radius:18px;border:1px solid #e6e6e2;overflow:hidden}
.field{padding:13px 15px;border-bottom:1px solid #eee}
.field:last-child{border:0}
.field label{display:block;font-size:10px;color:#777;text-transform:uppercase;letter-spacing:.08em;font-weight:800;margin-bottom:4px}
.field input,.field select,.optional input,.optional select,.search,.filters select,.add-row input{width:100%;border:1px solid #ddd;border-radius:11px;padding:10px;background:#fff;font:inherit}
.optional{margin-top:12px;background:#fff;border-radius:18px;padding:15px;border:1px solid #e6e6e2}
.optional h3{font-size:14px;margin-bottom:10px}
.optional .q{margin-bottom:12px}
.actions{display:flex;gap:10px;margin-top:14px}
.actions button{flex:1}
.disclaimer{font-size:10px;color:#777;margin-top:10px;line-height:1.4}
.hint{font-size:12px;color:#777;margin:6px 0 10px}
.search{margin-bottom:10px}
.filters{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:14px}
.filters select{font-size:12px;padding:9px}
.expense{background:#fff;border:1px solid #e6e6e2;border-radius:16px;padding:14px;margin-bottom:9px;display:flex;justify-content:space-between;gap:10px}
.expense .vendor{font-weight:800}
.expense small{display:block;color:#777;margin-top:4px}
.expense .amount{font-weight:900;white-space:nowrap}
.tax-grid{grid-template-columns:1fr 1fr}
.tax-card{background:#fff;border-radius:18px;border:1px solid #e6e6e2;padding:16px}
.tax-card b{font-size:20px;display:block}
.tax-card span{font-size:11px;color:#777}
.panel{margin:12px 0}
.review-item{padding:10px 0;border-bottom:1px solid #eee;font-size:13px}
.review-item:last-child{border:0}
.full{width:100%;margin-top:4px}
.nav{position:fixed;bottom:0;left:0;right:0;background:rgba(255,255,255,.96);border-top:1px solid #ddd;display:flex;justify-content:space-around;gap:4px;padding:10px 8px calc(10px + env(safe-area-inset-bottom));backdrop-filter:blur(10px)}
.nav button{border:0;background:none;font-weight:800;color:#777;display:flex;flex-direction:column;gap:3px;align-items:center;font-size:10px;flex:1}
.nav button.active{color:#111827}
.toast{position:fixed;left:50%;bottom:80px;transform:translateX(-50%);background:#111827;color:#fff;padding:11px 15px;border-radius:999px;display:none;z-index:20;font-size:13px;max-width:90%;text-align:center}
.toast.show{display:block}

/* Multi-page collector */
.page-thumbs{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}
.thumb{position:relative;background:#fff;border:1px solid #e6e6e2;border-radius:14px;padding:6px;text-align:center;font-size:10px;color:#777}
.thumb img{width:100%;height:80px;object-fit:cover;border-radius:10px}
.thumb-pdf{width:100%;height:80px;display:flex;align-items:center;justify-content:center;background:#f0f0ee;border-radius:10px;font-weight:800;color:#999}
.thumb span{display:block;margin-top:4px}
.thumb-remove{position:absolute;top:2px;right:2px;border:0;background:#111827;color:#fff;border-radius:999px;width:20px;height:20px;font-size:11px;cursor:pointer}

/* Confidence badge */
.confidence-badge{margin-bottom:10px}
.badge{display:inline-block;font-size:12px;font-weight:800;padding:6px 12px;border-radius:999px;background:#eee}
.badge.band-READY-TO-SAVE{background:#dcfce7;color:#166534}
.badge.band-QUICK-REVIEW{background:#fef9c3;color:#854d0e}
.badge.band-NEEDS-ATTENTION{background:#fee2e2;color:#991b1b}

/* Dashboard bars */
.bar-row{display:grid;grid-template-columns:110px 1fr 70px;align-items:center;gap:8px;margin-bottom:8px;font-size:12px}
.bar-label{color:#444;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bar-track{background:#eee;border-radius:999px;height:10px;overflow:hidden}
.bar-fill{background:#111827;height:100%;border-radius:999px}
.bar-value{text-align:right;font-weight:700}

/* Settings / categories */
.add-row{display:flex;gap:8px;margin-bottom:12px}
.add-row button{white-space:nowrap}
.chip-list{display:flex;flex-wrap:wrap;gap:8px}
.chip{background:#f0f0ee;border-radius:999px;padding:7px 10px;font-size:12px;display:flex;align-items:center;gap:6px}
.chip-x{border:0;background:none;color:#999;cursor:pointer;font-size:11px}

/* Duplicate modal */
.modal{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;align-items:flex-end;justify-content:center;z-index:30}
.modal.hidden{display:none}
.modal-card{background:#fff;border-radius:22px 22px 0 0;padding:20px;width:100%;max-width:720px}
.modal-card h3{margin-bottom:8px}
.modal-card p{color:#555;font-size:13px;margin-bottom:10px}
.dup-matches{margin-bottom:14px}
.dup-match{background:#f7f7f5;border-radius:12px;padding:10px;margin-bottom:6px;font-size:13px}

@media(max-width:480px){
  .scan-grid{grid-template-columns:1fr}
  .cards{grid-template-columns:1fr 1fr 1fr}
  .filters{grid-template-columns:1fr 1fr}
  .app{padding-left:13px;padding-right:13px}
  .page-thumbs{grid-template-columns:repeat(3,1fr)}
}

/* New feature additions */
.hidden{display:none!important}
.voice-note{margin-top:12px}
.voice-note .hint{margin:6px 0 0}
.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.panel-head h3{margin:0}
.secondary.small{padding:8px 12px;font-size:12px;border-radius:12px}
.muted{color:#999;font-size:11px}
.q-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.modal-card .q{margin-bottom:10px}
.modal-card label{display:block;font-size:11px;color:#777;margin-bottom:4px;font-weight:700}
#exportJobBtn{margin-bottom:12px}

