.m1-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px}.m1-table{max-width:100%;overflow:auto;margin:12px 0}.m1-table td{vertical-align:top;overflow-wrap:anywhere}.m1-table td small{display:block;max-width:360px;color:var(--muted,#64748b);margin-top:5px}.m1-table td details{max-width:440px}.m1-counts{display:flex;gap:16px;flex-wrap:wrap;margin:16px 0}.m1-grid label{min-width:0}#split-children fieldset{border:1px solid var(--theme-border, #d8e0ea);border-radius:8px;margin:12px 0;padding:12px}#trusted-error{overflow-wrap:anywhere}#drawer-body dl dd{overflow-wrap:anywhere}

.pipeline-sources,.pipeline-rules{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.pipeline-sources fieldset,.pipeline-rule,#pipeline-map>fieldset{min-width:0;border:1px solid var(--theme-border, #d8e0ea);border-radius:8px;padding:12px;margin:8px 0}.pipeline-rule legend,.pipeline-sources legend{font-weight:600;overflow-wrap:anywhere}.pipeline-rule select,.pipeline-sources select{max-width:100%;width:100%}.pipeline-sample{font-size:12px;color:var(--muted,#64748b);overflow-wrap:anywhere;max-height:72px;overflow:auto}.pipeline-rule textarea{min-height:54px}#pipeline-map select[multiple]{height:auto;min-height:100px}#pipeline-map details{margin-top:10px}#pipeline-map summary{cursor:pointer}#pipeline-map button.primary{margin-top:14px}@media(max-width:700px){.pipeline-sources,.pipeline-rules,.m1-grid{grid-template-columns:1fr}.pipeline-rule .m1-grid{grid-template-columns:1fr}}
/* Full-page import workspaces; record reviews continue to use the shared drawer. */
body.import-workspace-view{min-width:0;background:var(--theme-accent-surface, #f5f7fb)}.import-workspace-view main{padding:20px 28px 0;max-width:none}.import-workspace-view main>:not(#import-workspace){display:none!important}.import-workspace-view #workspace>nav{overflow-x:auto;white-space:nowrap}.import-workspace-view #workspace>nav button{flex-shrink:0}#import-workspace{min-width:0}.import-page-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin:0 0 20px}.import-page-heading h1{font-size:26px;margin:8px 0 0}.import-environment{padding:8px 12px;background:var(--theme-accent-surface, #eaf1fb);border:1px solid var(--theme-border, #d4e1f3);border-radius:6px;color:var(--theme-accent-text, #375375);max-width:40%;overflow-wrap:anywhere}#import-page-body{min-width:0}#import-page-body label{font-size:13px}#import-page-body input,#import-page-body select,#import-page-body textarea,#import-page-body button{font-size:13px}#import-page-body h2{font-size:18px;margin:0 0 10px}#import-page-body h3{font-size:15px}.import-stepper{display:flex;gap:0;padding:0;margin:0 0 22px;border:1px solid var(--theme-border, #d8e0ea);background:var(--theme-surface, white);border-radius:8px;list-style:none;overflow:hidden}.import-stepper li{flex:1;min-width:0}.import-stepper button{width:100%;border:0;border-radius:0;display:flex;align-items:center;gap:12px;padding:15px 20px;background:var(--theme-surface, white);text-align:left;color:var(--theme-text-muted, #536279)}.import-stepper button span{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:var(--theme-accent-surface, #eef2f7);flex-shrink:0}.import-stepper button[aria-current=step]{color:var(--theme-accent-text, #164c89);background:var(--theme-accent-surface, #eaf2fc);font-weight:650;box-shadow:inset 0 -3px #2869b5}.import-stepper button[aria-current=step] span{background:#2869b5;color:white}.import-panel{min-width:0;padding:22px;background:var(--theme-surface, white);border:1px solid var(--theme-border, #d8e0ea);border-radius:8px}.import-panel>p{line-height:1.5;color:var(--theme-text-muted, #596779)}.import-upload-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:24px}.import-upload-layout input[type=file]{padding:28px;border:1px dashed var(--theme-border, #9aafc9);background:var(--theme-surface, #f8faff)}.import-step-footer{position:sticky;bottom:0;z-index:8;background:var(--theme-surface, #fff);border-top:1px solid var(--theme-border, #d4deeb);padding:14px 22px;display:flex;justify-content:space-between;align-items:center;gap:16px;margin:22px -1px 0;color:var(--theme-text-muted, #5d6b7d);font-size:12px;box-shadow:0 -4px 12px #23375606}.import-step-footer .actions{margin:0}.import-files-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:20px}.import-source-rail{align-self:start;padding:16px;background:var(--theme-surface, white);border:1px solid var(--theme-border, #d8e0ea);border-radius:8px;min-width:0}.import-source-rail h2{display:flex;justify-content:space-between;font-size:15px!important}.import-source-rail h2 span{color:var(--theme-text-muted, #66758a)}.import-source-rail button{display:block;text-align:left;width:100%;margin:10px 0;padding:12px;white-space:normal;overflow-wrap:anywhere}.import-source-rail button strong{display:block;font-size:13px}.import-source-rail button small{display:block;margin-top:7px;font-size:11px}.import-source-rail button[aria-pressed=true]{background:var(--theme-accent-surface, #edf4ff);border-color:var(--theme-accent-border, #8daed8);color:var(--theme-accent-text, #164c89)}.import-source-rail p{font-size:12px;line-height:1.5;color:var(--theme-text-muted, #66758a)}.import-section-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin:0 0 16px}.import-section-heading p{font-size:13px;margin:8px 0;color:var(--theme-text-muted, #66758a);line-height:1.5}.import-section-heading>label{width:300px;flex-shrink:0}.import-source-options{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:end;gap:18px}.import-source-options button{margin-bottom:10px}.import-source-scroll{max-height:calc(100vh - 470px);min-height:260px;overflow:auto;border:1px solid var(--theme-border, #e1e7f0);border-radius:6px}.import-source-table{width:100%;table-layout:fixed}.import-source-table th:first-child{width:28%}.import-source-table thead{position:sticky;top:0;z-index:1}.import-source-table tbody th{font-weight:500;text-transform:none;letter-spacing:normal;font-size:13px;background:var(--theme-surface, white);overflow-wrap:anywhere}.import-source-table td{min-width:0!important;max-width:none!important;vertical-align:top}.import-source-value{max-width:100%;margin:0}.import-source-value summary{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;color:var(--theme-text, #344960);line-height:1.7}.import-source-value summary:before{content:'▸ ';color:var(--theme-text-muted, #7589a3)}.import-source-value[open] summary:before{content:'▾ '}.import-source-value pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;overflow:auto;padding:12px;line-height:1.5;background:var(--theme-accent-surface, #f6f8fc);font-size:12px}.import-mapping-toolbar{display:flex;align-items:end;gap:18px;margin-bottom:18px}.import-mapping-toolbar label{width:220px}.import-mapping-toolbar>span{margin:auto auto 13px 0;font-size:13px;color:var(--theme-text-muted, #52667e)}.import-mapping-toolbar>button{margin-bottom:10px}.import-mapping-layout{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:20px;align-items:start}.import-mapping-table{background:var(--theme-surface, #fff);border:1px solid var(--theme-border, #d8e0ea);border-radius:8px;overflow:auto;max-height:calc(100vh - 395px);min-height:400px}.import-mapping-table table{width:100%;table-layout:fixed}.import-mapping-table th{font-size:11px}.import-mapping-table thead th{position:sticky;top:0;z-index:1}.import-mapping-table thead th:nth-child(1){width:26%}.import-mapping-table thead th:nth-child(2){width:29%}.import-mapping-table thead th:nth-child(3){width:25%}.import-mapping-table thead th:nth-child(4){width:20%}.import-mapping-table tbody th{background:var(--theme-surface, white);text-transform:none;letter-spacing:normal;padding:10px 12px}.import-mapping-table tbody th button{border:0;background:transparent;text-align:left;color:var(--theme-accent-text, #204c7e);line-height:1.4;font-weight:600;padding:6px 0;width:100%;overflow-wrap:anywhere}.import-mapping-table td{padding:12px;min-width:0!important;max-width:none!important;vertical-align:middle;font-size:12px}.import-mapping-table td>strong{font-size:11px;font-weight:500;color:var(--theme-text-muted, #65758a);display:block;margin-bottom:5px}.import-mapping-table td>span:not(.import-map-status){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.import-mapping-table tr.selected>th,.import-mapping-table tr.selected>td{background:var(--theme-accent-surface, #eef5ff)}.import-mapping-table tr.selected>th{box-shadow:inset 3px 0 #2869b5}.import-map-status{display:inline-block;color:var(--theme-text-muted, #456079);font-size:11px;white-space:normal;line-height:1.4}.import-map-status.attention{color:var(--theme-warning-text, #98530f);background:var(--theme-warning-surface, #fff2df);padding:5px 7px;border-radius:5px}.import-required{color:var(--theme-warning-text, #9f4b0d)}.import-field-editor{background:var(--theme-surface, white);border:1px solid var(--theme-border, #c7d8ed);border-radius:8px;padding:18px;min-width:0;max-height:calc(100vh - 395px);min-height:400px;overflow:auto}.import-field-editor>p{font-size:12px;line-height:1.5;color:var(--theme-text-muted, #66758a)}.import-field-editor .pipeline-rule{padding:0;border:0;margin:16px 0}.import-field-editor .pipeline-rule legend{font-size:16px;padding:0;margin-bottom:12px}.import-field-editor .m1-grid{grid-template-columns:1fr}.import-field-editor .pipeline-rule label{margin-bottom:12px}.import-field-editor .pipeline-rule select[multiple]{min-height:130px}.import-field-editor .pipeline-rule select{max-width:100%}.import-field-editor .pipeline-order{padding-left:20px;font-size:12px}.import-field-editor .pipeline-order button{padding:5px 9px;margin:4px}.import-result-sample{border-top:1px solid var(--theme-border, #e1e7f0);margin-top:20px;padding-top:14px}.import-result-sample pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.6;max-height:200px;overflow:auto;background:var(--theme-accent-surface, #f6f8fc);padding:10px}.import-enrichment-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:24px}.import-enrichment-layout [data-lookup]{padding:18px;border:1px solid var(--theme-border, #d8e0ea);border-radius:8px;margin:18px 0}.import-enrichment-layout [data-lookup] legend{font-weight:600;font-size:14px}.import-enrichment-layout select[multiple]{min-height:130px;height:auto}.import-enrichment-layout .m1-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.import-enrichment-layout aside label{margin:14px 0}#import-page-body>dl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px 18px;padding:18px;background:var(--theme-surface, white);border:1px solid var(--theme-border, #d8e0ea);border-radius:8px}#import-page-body>dl dt{font-size:11px;color:var(--theme-text-muted, #65758a)}#import-page-body>dl dd{margin:0;font-size:13px;overflow-wrap:anywhere}#import-page-body>.m1-table{background:var(--theme-surface, white);border:1px solid var(--theme-border, #d8e0ea);border-radius:8px;max-height:65vh}#import-page-body>.m1-table table{width:100%}#import-page-body>.m1-table td details{max-width:none}#import-page-body>.m1-table td small{max-width:none}#import-page-body #trusted-error:not(:empty){position:sticky;bottom:80px;background:var(--theme-danger-surface, #fff2ef);border:1px solid var(--theme-border, #e3ada4);padding:14px;z-index:9;border-radius:6px}
@media(min-width:1700px){.import-mapping-layout{grid-template-columns:minmax(0,1fr) 410px}.import-source-rail{padding:20px}.import-files-layout{grid-template-columns:260px minmax(0,1fr)}}
@media(max-width:1050px){.import-workspace-view main{padding:16px 16px 0}.import-mapping-layout{grid-template-columns:minmax(0,1fr) 310px;gap:12px}.import-mapping-table thead th:nth-child(3),.import-mapping-table td:nth-child(3){display:none}.import-enrichment-layout{grid-template-columns:minmax(0,1fr) 300px}.import-files-layout{grid-template-columns:190px minmax(0,1fr)}.import-source-options{grid-template-columns:1fr 1fr}.import-source-options button{grid-column:1/-1;justify-self:start}.import-source-scroll{max-height:50vh}.import-stepper button{padding:12px;gap:7px}}
@media(max-width:740px){.import-workspace-view #workspace>header{padding:12px;flex-wrap:wrap;gap:8px}.import-page-heading{align-items:flex-start}.import-page-heading h1{font-size:22px}.import-environment{font-size:11px}.import-stepper{flex-wrap:wrap}.import-stepper li{flex-basis:50%}.import-stepper button{font-size:12px!important}.import-files-layout,.import-upload-layout,.import-mapping-layout,.import-enrichment-layout{grid-template-columns:1fr}.import-source-rail{display:flex;flex-wrap:wrap;gap:6px}.import-source-rail h2{width:100%;margin:0!important}.import-source-rail button{width:auto;flex:1;min-width:130px;margin:4px 0}.import-source-rail p{display:none}.import-source-options{grid-template-columns:1fr}.import-panel{padding:16px}.import-section-heading{flex-wrap:wrap;gap:12px}.import-section-heading>label{width:100%;flex-shrink:1}.import-mapping-toolbar{flex-wrap:wrap;gap:8px}.import-mapping-toolbar label{flex:1;min-width:140px}.import-mapping-toolbar>span{margin:0;flex:1}.import-mapping-toolbar>button{margin:0}.import-mapping-table{min-height:240px;max-height:40vh}.import-field-editor{min-height:0;max-height:none}.import-mapping-table thead th:nth-child(2),.import-mapping-table td:nth-child(2){display:none}.import-mapping-table thead th:nth-child(1){width:60%}.import-mapping-table thead th:nth-child(4){width:40%}.import-step-footer{padding:12px;gap:8px;margin-top:16px}.import-step-footer>span{display:none}.import-step-footer>.actions{width:100%;display:flex;justify-content:space-between}.import-source-table th:first-child{width:35%}.import-enrichment-layout .m1-grid{grid-template-columns:1fr}#import-page-body>dl{grid-template-columns:1fr 1fr}.import-source-scroll{min-height:200px;max-height:50vh}}

#import-page-body .import-preview-actions{position:sticky;bottom:0;z-index:8;padding:14px 18px;margin:18px 0 0;background:var(--theme-surface, #fff);border-top:1px solid var(--theme-border, #d4deeb);box-shadow:0 -4px 12px #23375606;display:flex;flex-wrap:wrap;gap:8px}#import-page-body .import-preview-actions #stage-commit{margin-left:auto}@media(max-width:740px){#import-page-body .import-preview-actions{padding:10px}#import-page-body .import-preview-actions button{font-size:11px;padding:8px}#import-page-body .import-preview-actions #stage-commit{margin-left:0}}
.quality-overview{background:var(--theme-surface, #fff);border:1px solid var(--theme-border, #d8e0ea);border-radius:8px;padding:20px;margin:20px 0}.quality-heading{display:flex;align-items:start;justify-content:space-between;gap:20px}.quality-heading p{font-size:13px;color:var(--theme-text-muted, #617188);margin:8px 0 16px}.quality-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:12px 0 18px}.quality-metrics>div{padding:14px 18px;background:var(--theme-accent-surface, #f5f8fc);border:1px solid var(--theme-border, #e2e8f1);border-radius:6px;display:flex;align-items:center;gap:14px}.quality-metrics strong{font-size:25px;color:var(--theme-accent-text, #244c7b)}.quality-metrics span{font-size:12px;color:var(--theme-text-muted, #566a83)}.quality-scroll{overflow:auto;max-height:340px;border:1px solid var(--theme-border, #e0e7f0);border-radius:6px}.quality-table{width:100%;table-layout:fixed}.quality-table th:nth-child(1){width:27%}.quality-table th:nth-child(2){width:23%}.quality-table th:nth-child(3){width:30%}.quality-table th:nth-child(4){width:20%}.quality-table td{min-width:0!important;max-width:none!important;overflow-wrap:anywhere}.quality-table tbody th{text-transform:none;letter-spacing:normal;font-size:13px;background:var(--theme-surface, #fff)}.quality-overview details{margin-top:14px}.quality-overview summary{cursor:pointer}.quality-reasons{display:grid;gap:8px;margin:12px 0}.quality-reasons button{text-align:left;white-space:normal}.quality-ok{color:var(--theme-text, #315f4b);background:var(--theme-surface-subtle, #f2f8f4);padding:12px;border-radius:6px;font-size:13px}.quality-active-filter{display:flex;align-items:center;justify-content:space-between;gap:16px;background:var(--theme-accent-surface, #edf4ff);border:1px solid var(--theme-border, #b9cfea);padding:12px 16px;border-radius:6px}.inspect-row-button{margin-top:12px;color:var(--theme-accent-text, #20568f)}.row-inspect-heading{display:flex;align-items:center;gap:20px;margin:12px 0 20px}.row-inspect-heading>span{margin-right:auto;color:var(--theme-text-muted, #5d6f84);font-size:13px}.row-inspect-summary{border:1px solid var(--theme-border, #d8e0ea);background:var(--theme-surface, white);border-radius:8px;padding:18px;margin-bottom:18px}.row-inspect-summary dl{display:grid;grid-template-columns:140px minmax(0,1fr) 140px minmax(0,1fr);gap:10px 20px;margin:0}.row-inspect-summary dt{color:var(--theme-text-muted, #63758d);font-size:12px}.row-inspect-summary dd{margin:0;overflow-wrap:anywhere;font-size:13px}.row-missing-summary{background:var(--theme-warning-surface, #fff5e8);padding:12px;margin-top:14px;display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:13px}.row-missing-summary button{color:var(--theme-warning-text, #8c480a);border-color:var(--theme-border, #e7c99d);background:var(--theme-surface, white)}.inspect-tabs{display:flex;gap:10px;border-bottom:1px solid var(--theme-border, #d5dfed);margin-top:18px}.inspect-tabs button{border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;padding:14px 18px;color:var(--theme-text-muted, #516a88)}.inspect-tabs button[aria-selected=true]{color:var(--theme-accent-text, #18589b);border-bottom-color:var(--theme-accent-border, #2869b5);background:var(--theme-accent-surface, #edf4ff)}.inspect-toolbar{display:flex;align-items:center;gap:24px;margin:18px 0}.inspect-toolbar>label:first-child{width:320px}.inspect-toolbar>span{margin-left:auto;font-size:12px;color:var(--theme-text-muted, #62748b)}.row-inspect-table{background:var(--theme-surface, white);border:1px solid var(--theme-border, #d8e0ea);border-radius:8px;overflow:auto;max-height:65vh}.row-inspect-table table{table-layout:fixed;width:100%}.row-inspect-table th:first-child{width:20%}.row-inspect-table th:nth-child(2){width:40%}.row-inspect-table th:nth-child(3){width:18%}.row-inspect-table th:nth-child(4){width:22%}.row-inspect-table table:has(th:last-child:nth-child(2)) th:last-child{width:80%}.row-inspect-table table:has(th:last-child:nth-child(3)) th:nth-child(3){width:40%}.row-inspect-table th,.row-inspect-table td{padding:14px 18px;min-width:0!important;max-width:none!important;overflow-wrap:anywhere;vertical-align:top}.row-inspect-table thead th{position:sticky;top:0;z-index:1}.row-inspect-table tbody th{text-transform:none;letter-spacing:normal;font-size:13px;background:var(--theme-surface, white)}.row-inspect-table td{font-size:13px}.row-inspect-table td small{display:block;margin-top:6px;color:var(--theme-text-muted, #60748d);font-size:12px}.row-inspect-table pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:300px;overflow:auto;font-size:12px}.row-inspect-table .inspect-value{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}.missing-value{color:var(--theme-warning-text, #846334);font-style:italic}.gap-badge{display:block;font-size:12px;color:var(--theme-text-muted, #637286)}.gap-badge.required{font-weight:600;color:var(--theme-warning-text, #9c4a04)}.row-inspect-table .required-gap>td,.row-inspect-table .required-gap>th{background:var(--theme-warning-surface, #fff6eb)}.row-inspect-table .required-gap>th{box-shadow:inset 3px 0 #c47b24}#inspect-none{padding:18px}.source-gap{font-size:12px;color:var(--theme-warning-text, #8b510d)}.source-gap.none{color:var(--theme-text-muted, #59715d)}
@media(max-width:740px){.quality-overview{padding:14px}.quality-heading{flex-wrap:wrap}.quality-metrics{grid-template-columns:1fr;gap:6px}.quality-metrics>div{padding:10px}.quality-table{min-width:600px}.row-inspect-heading{flex-wrap:wrap;gap:10px}.row-inspect-heading>span{font-size:11px}.row-inspect-summary dl{grid-template-columns:110px minmax(0,1fr);gap:10px}.inspect-tabs{gap:0}.inspect-tabs button{padding:10px!important;font-size:12px!important}.inspect-toolbar{flex-wrap:wrap;gap:10px}.inspect-toolbar>label:first-child{width:100%}.inspect-toolbar>span{margin-left:0}.row-inspect-table table{min-width:650px}}

.import-source-table th:first-child{width:25%}.import-source-table th:nth-child(2){width:60%}.import-source-table th:nth-child(3){width:15%}.import-source-table td:nth-child(3){font-size:12px}.import-source-table td:nth-child(3) .source-gap{white-space:normal}

/* Import row headings scroll with their records; only column headings stay fixed. */
#import-workspace table th,#import-workspace table td{min-width:0;max-width:none}
#import-workspace table tbody th,#import-workspace table tbody td{position:static;top:auto;left:auto;z-index:auto}
#import-workspace table thead th{position:sticky;top:0;left:auto;z-index:2;background:var(--theme-surface-subtle, #f8fafc)}
.import-source-table thead{position:static;z-index:auto}
.import-section-heading>div{min-width:0;flex:1}
.import-section-heading h2{overflow-wrap:anywhere}
.import-section-heading>button{flex-shrink:0;max-width:100%}
.import-source-options>label{min-width:0;overflow-wrap:anywhere}
.import-source-options select{width:100%;min-width:0;max-width:100%}
.import-source-options>button{margin-bottom:0;min-height:36px}
.import-page-heading>div{min-width:0;flex:1}.import-page-heading h1{overflow-wrap:anywhere}

/* First-run setup shares the full-page import workspace. */
#setup-system { max-width: 780px; }
#setup-system input, #setup-system select { width: 100%; min-width: 0; box-sizing: border-box; }
#import-workspace:has(#setup-system) .card { padding: 24px; }
#import-workspace:has(#setup-system) .import-environment { display: none; }
@media (max-width: 600px) {
 body.import-workspace-view:has(#setup-system) main { padding: 16px; }
 #import-workspace:has(#setup-system) .card { padding: 12px; }
}
