*,:before,:after{box-sizing:border-box}body{background:#f3f4f6;min-height:100vh;margin:0}#root{min-height:100vh}.app{color:#1a1a1a;max-width:1200px;margin:0 auto;padding:1.5rem;font-family:system-ui,-apple-system,sans-serif}.app.loading,.app.error{text-align:center;padding:3rem}.app-header{border-bottom:1px solid #e0e0e0;justify-content:space-between;align-items:center;margin-bottom:1.5rem;padding-bottom:1rem;display:flex}.app-header-start{align-items:center;gap:.75rem;display:flex}.app-header h1{margin:0;font-size:1.5rem}.back-btn{color:#374151;cursor:pointer;white-space:nowrap;background:#fff;border:1px solid #ccc;border-radius:6px;padding:.5rem .75rem;font-size:.9rem;font-weight:500}.back-btn:hover{background:#f3f4f6}nav{gap:.5rem;display:flex}nav button{color:#374151;cursor:pointer;background:#fff;border:1px solid #ccc;border-radius:6px;padding:.5rem 1rem;font-weight:500}nav button:hover:not(.active){background:#f3f4f6}nav button.active{color:#fff;background:#2563eb;border-color:#2563eb}.tab-panel{flex-direction:column;gap:1rem;display:flex}.panel-header h2{margin:0 0 .25rem}.panel-header p{color:#555;margin:0}.drop-zone{text-align:center;cursor:pointer;background:#fff;border:2px dashed #cbd5e1;border-radius:12px;padding:2.5rem 1.5rem;transition:border-color .15s,background .15s}.drop-zone:hover,.drop-zone.dragging{background:#f0f6ff;border-color:#2563eb}.drop-zone-title{color:#1e293b;margin:0 0 .25rem;font-size:1.1rem;font-weight:600}.drop-zone-hint{color:#64748b;margin:0;font-size:.85rem}.mapping-list{flex-direction:column;gap:1.25rem;display:flex}.mapping-list h3{color:#475569;margin:0 0 .5rem;font-size:.95rem}.mapping-items{flex-direction:column;gap:.75rem;margin:0;padding:0;list-style:none;display:flex}.mapping-item{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:.75rem 1rem}.mapping-item.unmapped{background:#fffbeb;border-color:#fcd34d}.mapping-item-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:1rem;display:flex}.mapping-item-header select{border:1px solid #ccc;border-radius:4px;min-width:220px;padding:.4rem .5rem;font-size:.85rem}.warn-badge{color:#b45309;background:#fef3c7}.file-pill-list{flex-wrap:wrap;gap:.5rem;margin:0;padding:0;list-style:none;display:flex}.file-pill{background:#f1f5f9;border:1px solid #e2e8f0;border-radius:20px;padding:.35rem .75rem;font-size:.85rem}.upload-grid{grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:1rem;display:grid}.upload-slot{background:#fafafa;border:1px solid #e0e0e0;border-radius:8px;padding:1rem}.upload-slot-header{align-items:center;gap:.5rem;margin-bottom:.75rem;display:flex}.upload-slot h3{margin:0;font-size:1rem}.badge{color:#2563eb;background:#e8eef9;border-radius:4px;padding:.15rem .5rem;font-size:.75rem}.file-name,.meta{color:#555;margin:.25rem 0;font-size:.85rem}.actions{flex-wrap:wrap;gap:.5rem;display:flex}.actions button,.settings-section>button,.tab-panel>.actions button,button.btn{color:#fff;cursor:pointer;background:#2563eb;border:none;border-radius:6px;padding:.5rem 1rem;font-size:.9rem}.actions button:disabled,button.btn:disabled{opacity:.5;cursor:not-allowed}button.secondary,.actions button.secondary{color:#2563eb;background:#fff;border:1px solid #2563eb}button.danger,.actions button.danger,.settings-section button.danger,.editable-table button.danger{color:#fff;cursor:pointer;background:#dc2626;border:none;border-radius:6px}button.btn-sm,.editable-table button.btn-sm{padding:.25rem .5rem;font-size:.8rem}.settings-section button.secondary{color:#2563eb;cursor:pointer;background:#fff;border:1px solid #2563eb;border-radius:6px;padding:.5rem 1rem}.table-wrap{border:1px solid #e0e0e0;border-radius:6px;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:.85rem}th,td{text-align:left;border-bottom:1px solid #eee;padding:.5rem .75rem}th{background:#f5f5f5;font-weight:600}.col-desc{text-overflow:ellipsis;white-space:nowrap;max-width:280px;overflow:hidden}.col-amount{text-align:right;font-variant-numeric:tabular-nums}.row-uncategorized{background:#fff8e6}.error{color:#dc2626;font-size:.85rem}.success{color:#16a34a;font-size:.9rem}.warn{color:#d97706}.empty{color:#888;font-style:italic}.settings-section{border:1px solid #e0e0e0;border-radius:8px;margin-bottom:1rem;padding:1rem}.settings-section h3{margin:0 0 1rem}.settings-section h4{margin:0 0 .5rem;font-size:.9rem}.account-list{flex-wrap:wrap;gap:.5rem;margin-bottom:1rem;display:flex}.account-list .account-chip{color:#4b5563;cursor:pointer;background:#e5e7eb;border:1px solid #d1d5db;border-radius:20px;padding:.35rem .75rem;font-size:.85rem;font-weight:500}.account-list .account-chip:hover:not(.active){background:#d1d5db}.account-list .account-chip.active{color:#fff;background:#2563eb;border-color:#2563eb}.account-list .account-chip.add{color:#6b7280;background:#f9fafb;border:1px dashed #9ca3af}.form-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:.75rem;margin-bottom:1rem;display:grid}.form-grid label,.form-row label{flex-direction:column;gap:.25rem;font-size:.8rem;font-weight:500;display:flex}.form-grid .span-2{grid-column:span 2}.form-grid input,.form-grid select,.form-row input,.form-row select,.editable-table input,.editable-table select{border:1px solid #ccc;border-radius:4px;padding:.4rem .5rem;font-size:.85rem}.input-sm{width:70px}.test-panel{background:#f9f9f9;border-radius:6px;margin-bottom:1rem;padding:.75rem}.form-row{flex-wrap:wrap;gap:.75rem;display:flex}.editable-table input,.editable-table select,.editable-table .category-select{width:100%;min-width:80px}.category-select{width:100%}.col-actions{text-align:center;width:4rem}.row-edit-btn{color:#2563eb;cursor:pointer;white-space:nowrap;background:#fff;border:1px solid #2563eb;border-radius:4px;padding:.2rem .5rem;font-size:.75rem}.row-edit-btn:hover{background:#eff6ff}.dialog-overlay{z-index:1000;background:#0006;justify-content:center;align-items:center;padding:1rem;display:flex;position:fixed;inset:0}.dialog{background:#fff;border-radius:12px;width:100%;max-width:560px;max-height:90vh;padding:1.25rem;overflow-y:auto;box-shadow:0 8px 32px #00000026}.dialog-header{justify-content:space-between;align-items:center;margin-bottom:.75rem;display:flex}.dialog-header h2{margin:0;font-size:1.15rem}.dialog-close{color:#6b7280;cursor:pointer;background:0 0;border:none;padding:.25rem;font-size:1.5rem;line-height:1}.dialog-context{margin-bottom:1rem}.dialog-actions{border-top:1px solid #e5e7eb;justify-content:flex-end;gap:.5rem;margin-top:1rem;padding-top:1rem;display:flex}.dialog-actions button{color:#fff;cursor:pointer;background:#2563eb;border:none;border-radius:6px;padding:.5rem 1rem;font-size:.9rem}.dialog-actions button.secondary{color:#2563eb;background:#fff;border:1px solid #2563eb}.rule-form{border-bottom:1px solid #f0f0f0;margin-bottom:1rem;padding-bottom:1rem}.rule-form:last-of-type{border-bottom:none}.rule-form-label{color:#6b7280;margin:0 0 .5rem;font-size:.85rem}
