:root{--ink:#17211d;--muted:#68736d;--line:#dce3df;--line-strong:#bdc9c2;--surface:#fff;--surface-muted:#f4f7f5;--canvas:#edf3f0;--green:#147a55;--green-dark:#0f6043;--green-light:#e1f3e9;--teal:#247b83;--yellow:#a36a06;--yellow-light:#fff4d6;--red:#bb302f;--red-dark:#982322;--red-light:#fde9e7;--focus:#2c7665;--shadow:0 12px 34px #17211d17}*{box-sizing:border-box;letter-spacing:0;margin:0;padding:0}html,body{min-height:100%}body{background:var(--canvas);color:var(--ink);-webkit-font-smoothing:antialiased;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}button,input,select{color:inherit;font:inherit}button,select{cursor:pointer}button:disabled,select:disabled{cursor:not-allowed;opacity:.55}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid color-mix(in srgb, var(--focus) 32%, transparent);outline-offset:2px}a{color:inherit;text-decoration:none}.visually-hidden{clip:rect(0, 0, 0, 0);white-space:nowrap;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.spin{animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.centered-screen{text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:12px;min-height:100vh;padding:32px;display:flex}.centered-screen h1{font-size:24px}.centered-screen p{color:var(--muted)}.auth-page{background:linear-gradient(90deg, #147a550f 1px, transparent 1px), linear-gradient(#147a550f 1px, transparent 1px), var(--canvas);background-size:40px 40px;place-items:center;min-height:100vh;padding:36px 20px;display:grid}.auth-panel{background:var(--surface);border:1px solid var(--line);width:min(100%,430px);box-shadow:var(--shadow);border-radius:8px;padding:34px}.brand-lockup{align-items:center;gap:12px;display:flex}.brand-mark{background:var(--green);color:#fff;border-radius:7px;flex:none;place-items:center;width:44px;height:44px;font-size:15px;font-weight:800;display:grid}.brand-lockup>div{flex-direction:column;gap:2px;display:flex}.brand-lockup strong{font-size:18px}.brand-lockup span:not(.brand-mark){color:var(--muted);font-size:13px}.auth-copy{margin:38px 0 24px}.auth-copy h1{font-size:28px;line-height:1.2}.auth-copy p{color:var(--muted);margin-top:9px;line-height:1.5}.auth-form{flex-direction:column;gap:18px;display:flex}.auth-form label,.target-picker>label{flex-direction:column;gap:7px;font-size:13px;font-weight:700;display:flex}.auth-form input,.search-input input,.mapping-row select{border:1px solid var(--line-strong);background:#fff;border-radius:6px;width:100%;height:44px;padding:0 12px}.auth-footnote{color:var(--muted);text-align:center;margin-top:22px;font-size:12px}.form-error,.inline-alert{border-radius:6px;align-items:flex-start;gap:8px;padding:11px 13px;font-size:13px;line-height:1.4;display:flex}.form-error,.inline-alert.error{background:var(--red-light);color:var(--red-dark)}.inline-alert.warning{background:var(--yellow-light);color:#795007}.inline-alert.neutral{color:#245e64;background:#e7f0f1}.inline-alert svg{flex:none;margin-top:1px}.inline-alert button{background:0 0;border:0;margin-left:auto}.primary-button,.secondary-button,.danger-button,.danger-outline-button,.back-button{white-space:nowrap;border:1px solid #0000;border-radius:6px;justify-content:center;align-items:center;gap:8px;min-height:40px;padding:0 15px;font-size:13px;font-weight:750;display:inline-flex}.primary-button{background:var(--green);color:#fff}.primary-button:hover:not(:disabled){background:var(--green-dark)}.secondary-button{border-color:var(--line-strong);background:#fff}.secondary-button:hover:not(:disabled){background:var(--surface-muted)}.danger-button{background:var(--red);color:#fff}.danger-button:hover:not(:disabled){background:var(--red-dark)}.danger-outline-button{min-height:36px;color:var(--red-dark);background:#fff;border-color:#e4a3a0}.full-button{width:100%;margin-top:4px}.app-header{z-index:20;border-bottom:1px solid var(--line);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#fffffff5;height:70px;position:sticky;top:0}.header-inner{grid-template-columns:minmax(210px,1fr) auto minmax(250px,1fr);align-items:center;gap:24px;width:min(100% - 40px,1240px);height:100%;margin:0 auto;display:grid}.brand-lockup.compact .brand-mark{width:38px;height:38px;font-size:13px}.brand-lockup.compact strong{font-size:15px}.brand-lockup.compact span:not(.brand-mark){font-size:11px}.header-tabs{background:var(--surface-muted);border-radius:7px;align-items:center;gap:4px;padding:4px;display:flex}.header-tabs button{height:34px;color:var(--muted);background:0 0;border:0;border-radius:5px;align-items:center;gap:7px;padding:0 13px;font-size:13px;font-weight:700;display:flex}.header-tabs button.active{color:var(--ink);background:#fff;box-shadow:0 1px 4px #17211d1f}.user-menu{justify-content:flex-end;align-items:center;gap:12px;display:flex}.user-menu>span{flex-direction:column;align-items:flex-end;gap:2px;min-width:0;display:flex}.user-menu strong{text-overflow:ellipsis;white-space:nowrap;max-width:230px;font-size:12px;overflow:hidden}.user-menu small{color:var(--muted);align-items:center;gap:4px;font-size:11px;display:flex}.user-menu button{border:1px solid var(--line);background:#fff;border-radius:6px;place-items:center;width:36px;height:36px;display:grid}.portal-main{width:min(100% - 40px,1180px);margin:0 auto;padding:42px 0 72px}.page-intro{justify-content:space-between;align-items:flex-end;gap:36px;display:flex}.page-intro h1{font-size:30px;line-height:1.2}.page-intro>div:first-child p,.section-heading p,.results-title p{color:var(--muted);margin-top:7px;line-height:1.5}.target-summary{border-left:3px solid var(--green);align-items:center;gap:10px;min-width:310px;padding:6px 0 6px 14px;display:flex}.target-summary>div{flex-direction:column;gap:2px;display:flex}.target-summary span{color:var(--muted);text-transform:uppercase;font-size:11px}.target-summary strong{font-size:13px}.target-picker{width:340px;position:relative}.target-trigger{border:1px solid var(--line-strong);text-align:left;background:#fff;border-radius:6px;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;width:100%;min-height:48px;padding:6px 12px;display:grid}.target-trigger>span,.target-options button span{flex-direction:column;gap:2px;min-width:0;display:flex}.target-trigger strong,.target-options strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.target-trigger small,.target-options small{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}.target-menu{z-index:30;border:1px solid var(--line);width:min(430px,90vw);box-shadow:var(--shadow);background:#fff;border-radius:7px;padding:10px;position:absolute;top:calc(100% + 8px);right:0}.search-input{position:relative}.search-input svg{color:var(--muted);position:absolute;top:13px;left:12px}.search-input input{padding-left:38px}.target-options{max-height:290px;margin-top:8px;overflow-y:auto}.target-options button{text-align:left;background:0 0;border:0;border-radius:5px;justify-content:space-between;align-items:center;gap:12px;width:100%;min-height:50px;padding:8px 10px;display:flex}.target-options button:hover{background:var(--surface-muted)}.menu-state{color:var(--muted);justify-content:center;align-items:center;gap:8px;padding:18px;font-size:13px;display:flex}.step-track{border:1px solid var(--line);background:var(--line);border-radius:7px;grid-template-columns:repeat(3,1fr);gap:1px;margin:38px 0 18px;display:grid;overflow:hidden}.step-track>div{color:#87918c;background:#f8faf9;justify-content:center;align-items:center;gap:9px;height:52px;font-size:13px;display:flex}.step-track span{border:1px solid var(--line-strong);border-radius:50%;place-items:center;width:24px;height:24px;font-size:11px;display:grid}.step-track .active{color:var(--ink);background:#fff}.step-track .active span{border-color:var(--green);background:var(--green);color:#fff}.step-track .complete{color:var(--green-dark)}.step-track .complete span{border-color:var(--green);background:var(--green-light)}.workflow-section,.history-section{border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:30px;box-shadow:0 5px 18px #17211d0a}.section-heading,.results-title{justify-content:space-between;align-items:flex-start;gap:24px;display:flex}.eyebrow{color:var(--green-dark);text-transform:uppercase;margin-bottom:5px;font-size:11px;font-weight:800;display:block}.section-heading h2,.results-title h2{font-size:22px;line-height:1.3}.drop-zone{text-align:center;background:#f9fbfa;border:2px dashed #aebdb5;border-radius:7px;flex-direction:column;justify-content:center;align-items:center;gap:12px;min-height:300px;margin-top:24px;padding:34px;transition:background .15s,border-color .15s;display:flex}.drop-zone.dragging{border-color:var(--green);background:var(--green-light)}.drop-icon{background:var(--green-light);width:58px;height:58px;color:var(--green-dark);border-radius:50%;place-items:center;display:grid}.drop-zone h3{margin-top:4px;font-size:17px}.drop-zone p{color:var(--muted);margin-bottom:6px;font-size:13px}.workflow-section>.inline-alert{margin-top:16px}.field-summary{grid-template-columns:1fr 1fr;gap:20px;margin-top:22px;display:grid}.field-summary>div{color:var(--muted);align-items:flex-start;gap:9px;font-size:12px;line-height:1.5;display:flex}.field-summary svg{color:var(--green);flex:none;margin-top:1px}.field-summary strong{color:var(--ink);display:block}.mapping-header{display:block}.back-button{min-height:auto;color:var(--green-dark);background:0 0;justify-content:flex-start;margin-bottom:20px;padding:0}.mapping-grid{grid-template-columns:minmax(520px,1.65fr) minmax(250px,.75fr);gap:24px;margin-top:26px;display:grid}.mapping-fields,.unmapped-panel,.preview-table-wrap{border:1px solid var(--line);border-radius:7px;overflow:hidden}.table-title{border-bottom:1px solid var(--line);background:var(--surface-muted);justify-content:space-between;align-items:center;gap:14px;min-height:58px;padding:12px 16px;display:flex}.table-title h3{font-size:14px}.table-title span{color:var(--muted);font-size:11px}.mapping-row{border-bottom:1px solid var(--line);grid-template-columns:minmax(170px,.7fr) minmax(250px,1fr);align-items:center;gap:20px;min-height:66px;padding:10px 16px;display:grid}.mapping-row:last-child{border-bottom:0}.mapping-row>div{flex-direction:column;gap:3px;display:flex}.mapping-row strong{font-size:13px}.mapping-row span{color:var(--muted);font-size:11px}.disabled-row{background:#fafbfa}.column-list{flex-wrap:wrap;align-content:flex-start;gap:8px;min-height:150px;padding:16px;display:flex}.column-list span{border:1px solid var(--line);height:29px;color:var(--muted);background:#fff;border-radius:5px;align-items:center;padding:0 9px;font-size:11px;display:inline-flex}.column-list p{color:var(--muted);font-size:12px}.preview-table-wrap{margin-top:24px}.table-scroll{overflow-x:auto}table{border-collapse:collapse;text-align:left;width:100%;font-size:12px}th,td{border-bottom:1px solid var(--line);overflow-wrap:anywhere;vertical-align:top;max-width:300px;padding:11px 13px}th{color:var(--muted);text-transform:uppercase;white-space:nowrap;background:#fafbfa;font-size:10px}tbody tr:last-child td{border-bottom:0}.empty-cell{color:#a1aaa5;font-style:italic}.workflow-actions{justify-content:space-between;align-items:center;gap:20px;margin-top:24px;display:flex}.workflow-actions p{color:var(--muted);align-items:center;gap:7px;font-size:12px;display:flex}.workflow-actions p svg{color:var(--green)}.results-title{align-items:center}.success-mark{background:var(--green-light);width:54px;height:54px;color:var(--green-dark);border-radius:50%;flex:none;place-items:center;display:grid}.results-title>div:nth-child(2){flex:1}.metric-strip{border:1px solid var(--line);background:var(--line);border-radius:7px;grid-template-columns:repeat(5,1fr);gap:1px;margin:28px 0;display:grid;overflow:hidden}.metric{background:#fff;flex-direction:column;justify-content:center;gap:5px;min-height:82px;padding:14px 18px;display:flex}.metric span{color:var(--muted);font-size:11px}.metric strong{font-size:24px}.metric.success strong{color:var(--green-dark)}.metric.warning strong{color:var(--yellow)}.metric.danger strong{color:var(--red-dark)}.report-buckets{flex-direction:column;gap:10px;display:flex}.result-bucket{border:1px solid var(--line);border-left-width:4px;border-radius:6px;overflow:hidden}.bucket-new_record_added{border-left-color:var(--green)}.bucket-duplicate_customer{border-left-color:#75817b}.bucket-matches_existing_lead{border-left-color:var(--yellow)}.bucket-validation_error,.bucket-identity_conflict{border-left-color:var(--red)}.bucket-heading{text-align:left;background:#fff;border:0;justify-content:space-between;align-items:center;width:100%;min-height:58px;padding:10px 15px;display:flex}.bucket-heading:hover{background:#fafbfa}.bucket-heading>span{flex-direction:column;gap:3px;display:flex}.bucket-heading strong{font-size:13px}.bucket-heading small{color:var(--muted);font-size:11px}.bucket-content{border-top:1px solid var(--line)}.empty-state{color:var(--muted);padding:18px;font-size:12px}.history-section>.section-heading{margin-bottom:24px}.history-section>.inline-alert{margin-bottom:18px}.history-loading,.history-empty{min-height:240px;color:var(--muted);flex-direction:column;justify-content:center;align-items:center;gap:9px;display:flex}.history-empty h3{color:var(--ink);font-size:16px}.history-empty p,.history-loading{font-size:13px}.history-list{flex-direction:column;gap:10px;display:flex}.history-item{border:1px solid var(--line);background:#fff;border-radius:7px;overflow:hidden}.history-summary{text-align:left;background:#fff;border:0;grid-template-columns:auto minmax(220px,1fr) 80px 140px auto;align-items:center;gap:14px;width:100%;min-height:70px;padding:10px 16px;display:grid}.history-summary:hover{background:#fafbfa}.status-icon{background:var(--green-light);width:38px;height:38px;color:var(--green-dark);border-radius:6px;place-items:center;display:grid}.status-icon.rolled_back,.status-icon.partially_rolled_back{background:var(--yellow-light);color:var(--yellow)}.history-file,.history-count{flex-direction:column;gap:3px;min-width:0;display:flex}.history-file strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.history-file small,.history-count small{color:var(--muted);font-size:11px}.history-count{align-items:flex-end}.history-count strong{font-size:18px}.status-label{background:var(--green-light);color:var(--green-dark);text-transform:capitalize;border:1px solid #a8d5bf;border-radius:4px;justify-self:start;padding:5px 7px;font-size:10px;font-weight:800}.status-label.rolled_back,.status-label.partially_rolled_back{background:var(--yellow-light);color:#76500b;border-color:#e7c373}.history-detail{border-top:1px solid var(--line);background:#fafbfa;padding:18px}.history-meta{align-items:center;gap:34px;margin-bottom:18px;display:flex}.history-meta>span{flex-direction:column;gap:3px;display:flex}.history-meta small{color:var(--muted);text-transform:uppercase;font-size:10px}.history-meta strong{font-size:12px}.history-meta button{margin-left:auto}.modal-backdrop{z-index:100;background:#0d19147a;place-items:center;padding:20px;display:grid;position:fixed;inset:0}.modal{background:#fff;border-radius:8px;width:min(100%,470px);padding:26px;box-shadow:0 24px 70px #0d191442}.modal-icon{border-radius:50%;place-items:center;width:46px;height:46px;margin-bottom:18px;display:grid}.modal-icon.warning{background:var(--yellow-light);color:var(--yellow)}.modal-icon.danger{background:var(--red-light);color:var(--red)}.modal h2{font-size:20px}.modal>p{color:var(--muted);margin-top:10px;font-size:14px;line-height:1.55}.checkbox-row{align-items:flex-start;gap:9px;margin-top:20px;font-size:13px;line-height:1.4;display:flex}.checkbox-row input{width:17px;height:17px;accent-color:var(--green);flex:none;margin-top:1px}.modal-actions{justify-content:flex-end;gap:10px;margin-top:26px;display:flex}@media (max-width:980px){.header-inner{grid-template-columns:auto 1fr auto}.user-menu>span{display:none}.mapping-grid{grid-template-columns:1fr}.metric-strip{grid-template-columns:repeat(3,1fr)}.history-summary{grid-template-columns:auto minmax(180px,1fr) 70px auto}.status-label{display:none}}@media (max-width:700px){.app-header{height:auto}.header-inner{grid-template-columns:1fr auto;grid-template-areas:"brand user""tabs tabs";gap:9px;width:min(100% - 24px,1240px);padding:10px 0}.brand-lockup{grid-area:brand}.header-tabs{grid-area:tabs;width:100%}.header-tabs button{flex:1;justify-content:center}.user-menu{grid-area:user}.portal-main{width:min(100% - 24px,1180px);padding-top:28px}.page-intro,.section-heading,.results-title,.workflow-actions{flex-direction:column;align-items:stretch}.target-picker,.target-summary{width:100%;min-width:0}.step-track>div{flex-direction:column;gap:3px;height:64px;font-size:10px}.workflow-section,.history-section{padding:20px 16px}.drop-zone{min-height:260px;padding:28px 18px}.field-summary,.metric-strip{grid-template-columns:1fr}.mapping-row{grid-template-columns:1fr;gap:8px}.results-title>button,.workflow-actions>button{width:100%}.history-summary{grid-template-columns:auto minmax(120px,1fr) auto}.history-count{display:none}.history-meta{flex-direction:column;align-items:stretch;gap:12px}.history-meta button{margin-left:0}.auth-panel{padding:26px 20px}}
