/* Unified product UI v4. Loaded after all page styles; no data or media changes. */
:root {
  color-scheme: light;
  --primary:#355eea; --primary-d:#2344bc; --primary-l:#edf2ff;
  --bg:#f4f6fa; --surface:#fff; --surface-2:#f8fafd;
  --text:#1d293e; --text-2:#53647d; --muted:#68768b;
  --border:#e3e8f1; --border-hover:#b9c9ef;
  --radius:12px; --radius-sm:7px;
  --ui-font:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
}
html { -webkit-text-size-adjust:100%; }
body.unified-ui { font-family:var(--ui-font); font-size:15px; line-height:1.6; background:var(--bg); color:var(--text); }
body.unified-ui *, body.unified-ui *::before, body.unified-ui *::after { box-sizing:border-box; }
body.unified-ui :where(main,section,article,.container,.ws-main,.ws-panel,.card,.form-grid) { min-width:0; }
body.unified-ui :where(button,input,select,textarea) { font-family:inherit; }
body.unified-ui :where(input,select,textarea) { max-width:100%; }
body.unified-ui :where(input[type="checkbox"],input[type="radio"]) { accent-color:var(--primary); }
body.unified-ui :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]),select,textarea) {
  border:1px solid var(--border); border-radius:7px; color:var(--text); background:#fff;
  padding:9px 11px; min-height:40px; font-size:14px; line-height:1.5;
}
body.unified-ui textarea { resize:vertical; }
body.unified-ui input:disabled, body.unified-ui select:disabled, body.unified-ui textarea:disabled { color:#7f8da2; background:#f5f7fb; }
body.unified-ui input::placeholder, body.unified-ui textarea::placeholder { color:#98a4b5; }
body.unified-ui :where(a,button,input,select,textarea,summary):focus-visible { outline:3px solid #a5b9ff; outline-offset:3px; }
body.unified-ui :where(button,.btn) { touch-action:manipulation; }
body.unified-ui :where(.btn,.delivery-submit) { border-radius:7px; min-height:38px; font-size:14px; font-weight:550; box-shadow:none; }
body.unified-ui .btn-primary { background:var(--primary); border-color:var(--primary); color:#fff; }
body.unified-ui .btn-primary:hover { background:#244bce; border-color:#244bce; }
body.unified-ui .btn-secondary { background:#fff; border-color:#dce3ee; color:#3e4d66; }
body.unified-ui .btn-ghost { color:var(--primary); }
body.unified-ui .brand-mark { background:var(--primary); box-shadow:none; }
body.unified-ui :where(.card,.ws-panel,.pricing-card,.earnings-section) { background:#fff; border-color:var(--border); border-radius:12px; box-shadow:none; }
body.unified-ui :where(.card h2,.ws-panel h2,.pricing-card h2,.earnings-section h2) { font-size:17px; font-weight:650; color:#23334e; }
body.unified-ui :where(.muted,.hint,.help) { color:var(--muted); }
body.unified-ui :where(.card-head,.ws-panelhead,.ws-pagehead,.earnings-section-head,.pricing-card-title) { min-width:0; gap:16px; }
body.unified-ui :where(h1,h2,h3,p,label,summary,.sample-meta,.project-card__desc) { overflow-wrap:anywhere; }
body.unified-ui :where(.badge,.ws-pill) { border-radius:5px; font-weight:500; }
body.unified-ui :where(.badge-primary,.cnt-pending,.cnt-progress) { color:var(--primary); background:var(--primary-l); }
body.unified-ui :where(.badge-success,.cnt-done) { color:#158366; background:#eaf7f1; }
body.unified-ui :where(.badge-warning,.cnt-return) { color:#a56617; background:#fff4dd; }
/* Desktop management keeps the existing R3 shell and geometry. */
body.studio.unified-ui { padding-left:224px; }
body.unified-ui .studio-sidebar { width:224px; background:#111d35; }
body.unified-ui .studio-sidebar nav a.selected { background:var(--primary); }
body.unified-ui .studio-header { min-height:64px; background:#fff; }
body.studio.unified-ui > :where(.container,.ws-main) { width:100%; max-width:1600px; margin:0 auto; padding:32px; }
body.studio.unified-ui > .card { margin:32px; padding:28px; }
body.studio.unified-ui :where(.ws-pagehead h1,.workbench-hero h1,.pricing-heading h1) { font-size:26px; font-weight:650; line-height:1.35; letter-spacing:-.7px; }
body.studio.unified-ui .project-card { display:flex; flex-direction:column; }
body.studio.unified-ui .project-card__head { align-items:flex-start; gap:14px; }
body.studio.unified-ui .project-card__name { min-width:0; }
body.studio.unified-ui .project-card__status { flex-shrink:0; white-space:nowrap; }
body.studio.unified-ui .project-card__foot { margin-top:auto; }
body.studio.unified-ui .project-grid { align-items:stretch; }
/* Light blue table headers, independent horizontal scrolling for wide data. */
body.unified-ui .unified-table-wrap { max-width:100%; width:100%; overflow-x:auto; overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; border-radius:7px; }
body.unified-ui .unified-table-wrap:focus-visible { outline:3px solid #a5b9ff; outline-offset:3px; }
body.unified-ui :where(table.table,table.tbl,table.ws-table,table.med-table,.pricing-table-wrap table) { border-collapse:collapse; }
body.unified-ui :where(.table,.tbl,.ws-table,.med-table,.pricing-table-wrap table) th,
body.unified-ui .card table th { background:#edf2ff; color:#405a85; font-size:12px; font-weight:600; border-color:#dce5f5; }
body.unified-ui :where(.table,.tbl,.ws-table,.med-table,.pricing-table-wrap table) td { border-color:#edf1f6; }
body.unified-ui .card table:not(.med-table) th { padding:12px 14px; }
body.unified-ui .card table:not(.med-table) td { padding:12px 14px; }
body.unified-ui .med-table input { min-height:34px; font-size:13px; padding:5px; }
/* Delivery is a regular management page; its standalone sidebar was removed. */
body.unified-ui .delivery-app {
  --d-bg:#f4f6fa; --d-panel:#fff; --d-subtle:#f8fafd; --d-border:#e3e8f1;
  --d-border-hover:#b9c9ef; --d-text:#1d293e; --d-secondary:#53647d;
  --d-muted:#68768b; --d-accent:#355eea; --d-accent-hover:#244bce;
  display:block; min-height:0; background:var(--d-bg); font-family:inherit; font-size:14px; line-height:1.6;
}
body.unified-ui .delivery-sidebar, body.unified-ui .delivery-topbar { display:none; }
body.unified-ui .delivery-content { width:100%; max-width:1600px; padding:32px; margin:0 auto; }
body.unified-ui .delivery-title-row { align-items:flex-start; gap:24px; margin-bottom:26px; }
body.unified-ui .delivery-eyebrow { color:#8190a7; font-weight:600; letter-spacing:2px; }
body.unified-ui .delivery-app h1 { color:#1b2841; font-size:26px; font-weight:650; line-height:1.35; letter-spacing:-.7px; margin:0 0 8px; }
body.unified-ui .delivery-title-row p { color:#738199; font-size:14px; }
body.unified-ui .delivery-grid { gap:22px; grid-template-columns:minmax(0,1fr) 314px; }
body.unified-ui :where(.delivery-summary,.delivery-section,.delivery-inspector,.delivery-legacy) { border:1px solid var(--border); border-radius:12px; background:#fff; box-shadow:none; }
body.unified-ui :where(.delivery-section,.delivery-inspector) { padding:23px; min-width:0; }
body.unified-ui .delivery-summary { min-height:92px; flex-wrap:wrap; gap:0; }
body.unified-ui .delivery-summary > div { flex:1; min-width:120px; padding:12px 23px; }
body.unified-ui .delivery-summary strong { font-size:30px; font-weight:630; color:#182947; }
body.unified-ui .delivery-summary span { font-size:12px; }
body.unified-ui .delivery-summary-note { flex-basis:100%; padding:0 23px 12px; text-align:left; }
body.unified-ui .delivery-section h2, body.unified-ui .delivery-inspector h2 { font-size:17px; font-weight:650; color:#23334e; }
body.unified-ui .delivery-section-head { align-items:flex-start; flex-wrap:wrap; }
body.unified-ui .delivery-section-head p { font-size:12px; }
body.unified-ui .delivery-scope-option, body.unified-ui .delivery-content-row { border-radius:8px; background:#fff; }
body.unified-ui .delivery-scope-option:has(input:checked), body.unified-ui .delivery-content-row:has(input:checked) { background:#edf2ff; border-color:#a9bff8; }
body.unified-ui .delivery-scope-option small, body.unified-ui .delivery-content-copy small { font-size:12px; line-height:1.7; }
body.unified-ui .delivery-content-icon { color:#5d7edc; background:#edf2ff; border-radius:7px; width:32px; height:32px; }
body.unified-ui .delivery-submit { height:auto; min-height:40px; padding:9px 14px; background:var(--primary); border-color:var(--primary); }
body.unified-ui .delivery-submit:hover { background:#244bce; border-color:#244bce; }
body.unified-ui .delivery-security, body.unified-ui .delivery-form-message { font-size:12px; }
body.unified-ui .delivery-preview-note p, body.unified-ui .delivery-inspector-sub { font-size:12px; }
body.unified-ui .delivery-app input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), body.unified-ui .delivery-app select { min-height:40px; height:auto; border-radius:7px; padding:9px 11px; }
body.unified-ui .delivery-section form { min-width:0; }
body.unified-ui .delivery-section p, body.unified-ui .delivery-template-upload p { overflow-wrap:anywhere; }
/* Existing setup engine and task forms reuse the same shell; business IDs remain. */
body.unified-ui #project-setup-preview-v2 {
  color-scheme:light; --p2-bg:#f4f6fa; --p2-surface:#fff; --p2-ink:#1d293e;
  --p2-muted:#68768b; --p2-line:#e3e8f1; --p2-soft:#f8fafd;
  --p2-blue:#355eea; --p2-blue-ink:#fff; --p2-blue-soft:#edf2ff;
  --p2-orange:#c89741; --p2-orange-ink:#a56617; --p2-orange-solid-ink:#fff;
  --p2-orange-soft:#fff4dd; --p2-green:#158366; --p2-green-soft:#eaf7f1;
  --p2-red:#b42318; --p2-red-soft:#fff1f0;
  min-height:0; border:0; border-radius:0; overflow:visible;
  font-family:var(--ui-font); font-size:14px; line-height:1.6;
}
body.unified-ui #project-setup-preview-v2 .p2-shell { display:block; min-height:0; }
body.unified-ui #project-setup-preview-v2 .p2-sidebar, body.unified-ui #project-setup-preview-v2 .p2-chrome { display:none; }
body.unified-ui #project-setup-preview-v2 .p2-workspace { min-width:0; }
body.unified-ui #project-setup-preview-v2 .p2-main { width:100%; max-width:1600px; padding:32px; margin:0 auto; }
body.unified-ui #project-setup-preview-v2 h1 { font-size:26px; font-weight:650; line-height:1.35; color:#1b2841; }
body.unified-ui #project-setup-preview-v2 h2 { font-size:17px; font-weight:650; color:#23334e; }
body.unified-ui #project-setup-preview-v2 h3 { font-size:14px; font-weight:600; }
body.unified-ui #project-setup-preview-v2 .p2-title { gap:24px; margin-bottom:26px; }
body.unified-ui #project-setup-preview-v2 .p2-eyebrow { color:#8190a7; font-size:10px; letter-spacing:2px; }
body.unified-ui #project-setup-preview-v2 .p2-panel, body.unified-ui #project-setup-preview-v2 .p2-inspector { border-radius:12px; border-color:var(--border); box-shadow:none; }
body.unified-ui #project-setup-preview-v2 .p2-panel-head, body.unified-ui #project-setup-preview-v2 .p2-body { padding:23px; }
body.unified-ui #project-setup-preview-v2 .p2-panel-head { gap:16px; }
body.unified-ui #project-setup-preview-v2 .p2-panel-head p { font-size:13px; line-height:1.7; }
body.unified-ui #project-setup-preview-v2 .p2-btn { min-height:38px; border-radius:7px; padding:8px 13px; font-size:14px; font-weight:550; }
body.unified-ui #project-setup-preview-v2 .p2-input { min-height:40px; padding:9px 11px; border-radius:7px; font-size:14px; }
body.unified-ui #project-setup-preview-v2 .p2-step-no { background:#eef1f6; color:#68768b; border-radius:7px; }
body.unified-ui #project-setup-preview-v2 .p2-step[aria-current="step"] .p2-step-no { background:var(--primary); color:#fff; }
body.unified-ui #project-setup-preview-v2 .p2-step-label { font-size:14px; font-weight:600; }
body.unified-ui #project-setup-preview-v2 .p2-table th { background:#edf2ff; color:#405a85; font-size:12px; font-weight:600; }
body.unified-ui #project-setup-preview-v2 .p2-table td { font-size:13px; }
body.unified-ui #project-setup-preview-v2 .p2-footer { padding:18px 23px; }
body.unified-ui #project-setup-preview-v2 .p2-task-grid { gap:22px; }
/* Field pages share the same visual language with a mobile working layout. */
body.field-app.unified-ui { padding-left:0; background:#f4f6fa; }
body.field-app.unified-ui .topbar { min-height:64px; padding:14px 26px; background:#fff; color:#1d293e; border-color:#e3e8f1; }
body.field-app.unified-ui .topbar .brand { color:#23334e; }
body.field-app.unified-ui .topbar .user { color:#68768b; }
body.field-app.unified-ui .container { max-width:940px; padding:28px 26px; }
body.field-app.unified-ui .card { border-radius:12px; border-color:#e3e8f1; background:#fff; box-shadow:none; }
body.field-app.unified-ui .project-name, body.field-app.unified-ui .sample-name { color:#23334e; }
body.field-app.unified-ui .opt-btn { border-radius:8px; border-color:#dfe6f0; color:#334764; }
body.field-app.unified-ui .opt-btn.sel { border-color:#355eea; background:#edf2ff; color:#2344bc; }
body.field-app.unified-ui .fill-progress .bar span { background:#355eea; }
body.field-app.unified-ui .profile-hero { background:#fff; border-color:#e3e8f1; }
body.field-app.unified-ui .profile-badge { color:#355eea; background:#edf2ff; border-radius:5px; font-weight:500; }
body.field-app.unified-ui .profile-hero h1, body.field-app.unified-ui .earnings-heading h1 { font-size:26px; font-weight:650; line-height:1.35; }
body.field-app.unified-ui .profile-choice label { border-radius:7px; }
body.field-app.unified-ui .profile-choice label:has(input:checked) { background:#edf2ff; border-color:#a9bff8; color:#2344bc; }
body.field-app.unified-ui .profile-actions { border-top:1px solid var(--border); background:rgba(244,246,250,.96); z-index:5; }
body.unified-ui .earnings-total { background:#355eea; border-radius:12px; box-shadow:none; }
body.unified-ui .earnings-status-tabs a.active { background:#edf2ff; color:#355eea; border-color:#a9bff8; }
body.unified-ui .earnings-heading span, body.unified-ui .pricing-eyebrow { color:#355eea; }
/* Login belongs to the same product, without an authenticated sidebar. */
body.login-app.unified-ui { min-height:100vh; display:flex; align-items:flex-start; justify-content:center; }
body.login-app.unified-ui > .container { width:100%; max-width:480px; padding:26px; }
body.login-app.unified-ui .brand-mark { background:#355eea; box-shadow:none!important; }
body.login-app.unified-ui h2 { color:#1b2841; font-size:26px; font-weight:650; }
body.login-app.unified-ui .card { padding:26px; }
body.login-app.unified-ui .remember-login { font-size:13px; color:#68768b; }
/* Layout adapts by content, rather than clipping documents at narrow widths. */
@media(max-width:1200px) {
  body.studio.unified-ui { padding-left:200px; }
  body.unified-ui .studio-sidebar { width:200px; }
  body.studio.unified-ui > :where(.container,.ws-main), body.unified-ui .delivery-content,
  body.unified-ui #project-setup-preview-v2 .p2-main { padding:25px; }
  body.unified-ui .delivery-grid { grid-template-columns:minmax(0,1fr) 280px; }
  body.unified-ui .delivery-scope { grid-template-columns:1fr; }
}
@media(max-width:1060px) {
  body.unified-ui .delivery-grid { grid-template-columns:1fr; }
  body.unified-ui .delivery-inspector { position:static; }
}
@media(max-width:900px) {
  body.unified-ui #project-setup-preview-v2 .p2-workgrid, body.unified-ui #project-setup-preview-v2 .p2-task-grid { grid-template-columns:1fr; }
  body.unified-ui #project-setup-preview-v2 .p2-rule-body, body.unified-ui #project-setup-preview-v2 .p2-package,
  body.unified-ui #project-setup-preview-v2 .p2-test-layout { grid-template-columns:1fr; }
  body.unified-ui #project-setup-preview-v2 .p2-summary { flex-shrink:1; }
}
@media(max-width:680px) {
  body.studio.unified-ui { padding-left:0; }
  body.unified-ui .studio-sidebar { width:100%; }
  body.unified-ui .studio-header { min-height:50px; gap:10px; }
  body.studio.unified-ui > :where(.container,.ws-main), body.unified-ui .delivery-content,
  body.unified-ui #project-setup-preview-v2 .p2-main { padding:22px 16px; }
  body.studio.unified-ui > .card { margin:18px 16px; padding:18px; }
  body.unified-ui .delivery-title-row { flex-direction:column; gap:16px; }
  body.unified-ui .delivery-project-chip { max-width:100%; }
  body.unified-ui .delivery-app h1, body.studio.unified-ui .ws-pagehead h1,
  body.unified-ui #project-setup-preview-v2 h1 { font-size:23px; }
  body.unified-ui :where(.delivery-section,.delivery-inspector) { padding:18px; }
  body.unified-ui .delivery-summary > div { min-width:0; flex-basis:50%; padding:12px 18px; }
  body.unified-ui .delivery-summary-note { padding:0 18px 12px; }
  body.unified-ui .delivery-summary strong { font-size:28px; }
  body.unified-ui .delivery-picker-bar { flex-wrap:wrap; }
  body.unified-ui .delivery-search-label { flex-basis:100%; }
  body.unified-ui .delivery-content-row { gap:9px; padding:12px; }
  body.unified-ui .delivery-content-icon { display:none; }
  body.unified-ui .delivery-section form > .delivery-submit { margin-left:0!important; margin-top:12px; width:100%!important; }
  body.unified-ui .card-head, body.unified-ui .ws-panelhead { flex-wrap:wrap; }
  body.unified-ui .card-head h2 { margin:0; }
  body.unified-ui #project-setup-preview-v2 .p2-title { flex-wrap:wrap; gap:14px; }
  body.unified-ui #project-setup-preview-v2 .p2-panel-head, body.unified-ui #project-setup-preview-v2 .p2-body,
  body.unified-ui #project-setup-preview-v2 .p2-footer { padding:18px; }
  body.unified-ui #project-setup-preview-v2 .p2-btn { min-height:44px; }
  body.unified-ui #project-setup-preview-v2 .p2-mapping, body.unified-ui #project-setup-preview-v2 .p2-jump-fields,
  body.unified-ui #project-setup-preview-v2 .p2-grid { grid-template-columns:1fr; }
  body.field-app.unified-ui .container { padding:22px 16px; }
  body.field-app.unified-ui .topbar { min-height:60px; padding:12px 16px; }
  body.field-app.unified-ui .topbar .brand { font-size:15px; }
  body.field-app.unified-ui .profile-hero h1, body.field-app.unified-ui .earnings-heading h1 { font-size:23px; }
  body.field-app.unified-ui .profile-actions { flex-wrap:wrap; }
  body.unified-ui .pricing-grid { grid-template-columns:1fr; }
  body.unified-ui .form-grid { grid-template-columns:1fr; }
  body.unified-ui :where(.two-col,.identity-lookup,.merge-lookup) > div { min-width:0; }
  body.unified-ui :where(.modal-card,.modal-content) { max-width:calc(100vw - 32px); }
}
@media(max-width:440px) {
  body.unified-ui :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]),select,textarea) { font-size:16px; }
  body.studio.unified-ui :where(input.input,input.text-input,select.input,select.text-input) { min-width:0!important; }
  body.unified-ui #project-setup-preview-v2 .p2-input { font-size:16px; }
  body.unified-ui .studio-account { gap:6px; }
  body.unified-ui .studio-header>span:first-child { flex:1; }
  body.unified-ui .studio-account .ws-pill { display:none; }
  body.unified-ui .delivery-content-count { font-size:11px; }
  body.unified-ui .earnings-total { gap:12px; }
  body.unified-ui .earnings-total-amount { font-size:34px; }
  body.login-app.unified-ui > .container { padding:20px 16px; }
}
@media(prefers-reduced-motion:reduce) { body.unified-ui * { scroll-behavior:auto!important; transition:none!important; animation:none!important; } }

body.unified-ui #project-setup-preview-v2 .p2-config-context { display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:22px; border-bottom:1px solid var(--border); padding-bottom:18px; }
body.unified-ui #project-setup-preview-v2 .p2-config-context > div:first-child { flex:1; min-width:0; }
body.unified-ui #project-setup-preview-v2 .p2-config-context strong { display:block; font-size:14px; font-weight:600; margin-top:3px; }
body.unified-ui #project-setup-preview-v2 .p2-dot.current { background:#355eea; border-color:#355eea; }

/* Do not animate from the legacy accent while late shared CSS is applied. */
body.unified-ui :where(.btn,.delivery-submit) { transition:opacity .15s ease,transform .15s ease; }
