@import url("./automation.css");

/* Kinspeed palette and local Montserrat assets, shared with the reference application. */
@font-face { font-family:Montserrat; src:url('/assets/fonts/montserrat-400.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:Montserrat; src:url('/assets/fonts/montserrat-600.woff2') format('woff2'); font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:Montserrat; src:url('/assets/fonts/montserrat-700.woff2') format('woff2'); font-weight:700; font-style:normal; font-display:swap; }

:root {
  font-family:Montserrat,"Segoe UI",Arial,sans-serif; font-synthesis:none; color-scheme:light;
  --primary:#0085ca; --primary-dark:#006b9f; --primary-soft:#eaf6fc;
  --ink:#172033; --muted:#647188; --border:#dfe5ed; --canvas:#f5f7fa; --surface:#fff;
  --success:#167446; --success-soft:#eaf7ef; --warning:#835a0c; --warning-soft:#fff8e5;
  --danger:#b83232; --danger-soft:#fff0f0; --radius:10px; --appbar-height:76px; --row-action-gap:8px;
}
* { box-sizing:border-box; }
html,body { margin:0; min-height:100%; background:var(--canvas); color:var(--ink); font-size:14px; }
body { min-width:320px; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
button:disabled { cursor:default; opacity:.6; }
a { color:var(--primary-dark); text-decoration:none; }
a:hover { color:#005782; text-decoration:none; }
button,a,input,select,textarea { outline-offset:3px; }
:focus-visible { outline:2px solid var(--primary); }
h1,h2,h3,p,dd,strong { overflow-wrap:anywhere; }
h1 { font-size:27px; line-height:1.3; letter-spacing:-.6px; font-weight:600; }
h2 { font-size:15px; line-height:1.5; font-weight:600; }
h3 { font-size:14px; line-height:1.6; font-weight:600; }
p { font-size:12px; line-height:1.8; }
[hidden] { display:none!important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link { position:fixed; top:-80px; left:16px; z-index:100; padding:12px 16px; background:white; border:2px solid var(--primary); border-radius:6px; }
.skip-link:focus { top:12px; }
.icon { width:19px; height:19px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; vertical-align:middle; }
.icon-bootstrap { fill:currentColor; stroke:none; }
.field-label { display:flex; align-items:center; gap:7px; }
.field-label .icon { width:14px; height:14px; color:var(--muted); }
.eyebrow { font-size:10px; font-weight:700; color:var(--primary-dark); text-transform:uppercase; letter-spacing:.11em; }
.button { min-height:40px; display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:9px 14px; border:1px solid transparent; border-radius:7px; font-size:12px; font-weight:600; line-height:1.4; text-align:center; }
.button { transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease; }
.button:hover { text-decoration:none; }
.button .icon { width:16px; height:16px; }
.button-primary { color:white; background:var(--primary-dark); border-color:var(--primary-dark); }
.button-primary:hover:not(:disabled) { background:#005782; border-color:#005782; }
.button-secondary { color:#354359; background:white; border-color:#cbd5e2; }
.button-secondary:hover:not(:disabled) { background:#f4f8fb; border-color:#9eafc1; }
.button-quiet { color:#52627a; background:transparent; }
.button-quiet:hover:not(:disabled) { background:#edf2f7; }
.button-danger { color:var(--danger); background:var(--danger-soft); border-color:#efcaca; }
.button-danger:hover:not(:disabled) { background:#ffe4e4; border-color:#dcaaaa; }
.icon-button { display:inline-grid; place-items:center; width:36px; height:36px; border:0; border-radius:7px; background:transparent; color:var(--muted); }
.icon-button:hover { background:#eef3f7; }
.badge { display:inline-flex; align-items:center; width:max-content; padding:5px 8px; border-radius:6px; font-size:10px; font-weight:600; line-height:1.5; white-space:nowrap; }
.badge-neutral { background:#eef1f5; color:#566278; }
.badge-blue { background:var(--primary-soft); color:var(--primary-dark); }
.badge-success { background:var(--success-soft); color:var(--success); }
.badge-warning { background:var(--warning-soft); color:var(--warning); }
.surface { min-width:0; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:0 1px 3px #17203305; }
.surface-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:19px 22px; border-bottom:1px solid var(--border); }
.surface-heading h2 { margin:0; }
.surface-heading p { margin:5px 0 0; color:var(--muted); font-size:11px; }
.surface-body { padding:23px; }
.surface-body h2,.surface-body h3 { margin:0 0 9px; }
.surface-body p { color:var(--muted); margin:0 0 16px; }
.surface-body p:last-child { margin-bottom:0; }
.surface-footer { display:flex; justify-content:flex-end; gap:10px; padding:14px 22px; border-top:1px solid var(--border); background:#fbfcfd; border-radius:0 0 var(--radius) var(--radius); }
.page-heading { display:flex; justify-content:space-between; align-items:center; gap:24px; margin-bottom:26px; }
.page-heading h1 { margin:8px 0 9px; }
.page-heading p { margin:0; color:var(--muted); }
.page-heading>.button,.page-actions { flex-shrink:0; }
.page-actions { display:flex; gap:9px; flex-wrap:wrap; }
.notice { display:flex; align-items:flex-start; gap:11px; padding:15px 17px; border:1px solid #d7e7f2; border-radius:8px; color:#456078; background:#f0f7fc; margin-bottom:23px; }
.notice>.icon { margin-top:2px; width:17px; }
.notice p { margin:0; font-size:12px; }
.notice strong { display:block; font-size:12px; margin-bottom:5px; }
.notice-warning { color:var(--warning); background:var(--warning-soft); border-color:#eadcb4; }
.form-error { padding:13px 15px; margin-bottom:20px; border:1px solid #edc7c7; border-radius:7px; color:#a42525; background:var(--danger-soft); font-size:12px; line-height:1.7; }

.brand { display:flex; align-items:center; flex-shrink:0; color:var(--ink); white-space:nowrap; }
.setup-form fieldset { border:0; padding:0; margin:0; min-width:0; }
.setup-form .field { margin:14px 0; }
.setup-form .form-grid { gap:14px; }
.setup-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:24px; flex-wrap:wrap; }
.brand:hover { color:var(--ink); text-decoration:none; }
.brand img { width:35px; height:35px; object-fit:contain; margin-right:10px; }
.brand>span:not(.brand-product) { font-size:21px; font-weight:700; letter-spacing:-.5px; }
.brand-product { margin-left:12px; padding-left:12px; border-left:1px solid var(--border); color:var(--muted); font-size:12px; }
.app-bar { display:flex; align-items:center; gap:17px; height:var(--appbar-height); position:sticky; top:0; z-index:10; background:white; border-bottom:1px solid var(--border); padding:0 25px; }
.app-bar-spacer { flex:1; }
.account { display:flex; align-items:center; gap:9px; min-width:0; }
.avatar { display:grid; place-items:center; width:33px; height:33px; flex-shrink:0; border-radius:50%; color:var(--primary-dark); background:var(--primary-soft); font-size:12px; font-weight:700; }
.account-copy { display:flex; flex-direction:column; gap:4px; max-width:180px; }
.account-copy strong { font-size:11px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.account-copy span { color:var(--muted); font-size:10px; }
.workspace-switch { display:flex; align-items:center; gap:8px; min-width:150px; max-width:245px; }
.workspace-switch>.icon { color:var(--primary-dark); }
.workspace-switch select { width:100%; min-width:0; font-size:11px; min-height:38px; padding:8px 30px 8px 10px; }
.workspace-layout { display:grid; grid-template-columns:232px minmax(0,1fr); min-height:calc(100vh - var(--appbar-height)); }
.sidebar { position:sticky; top:var(--appbar-height); height:calc(100vh - var(--appbar-height)); display:flex; flex-direction:column; padding:24px 14px; border-right:1px solid var(--border); background:white; }
.sidebar-workspace { padding:0 12px 25px; display:flex; flex-direction:column; gap:12px; }
.sidebar-workspace>strong { font-size:13px; line-height:1.6; }
.sidebar-workspace .eyebrow { color:#7a889e; font-size:9px; }
.nav-link { display:flex; align-items:center; gap:10px; padding:12px; border-radius:7px; margin:3px 0; font-size:11px; color:#4e5b72; line-height:1.5; }
.nav-link:hover { background:#f3f7fa; text-decoration:none; }
.nav-link .icon { width:18px; color:var(--primary-dark); }
.nav-link.active { background:var(--primary-soft); color:var(--primary-dark); font-weight:600; }
.nav-divider { height:1px; background:var(--border); margin:22px 12px; }
.sidebar-footer { display:flex; gap:8px; align-items:center; margin-top:auto; padding:25px 12px 0; font-size:10px; color:var(--muted); }
.sidebar-footer .icon { width:15px; color:var(--primary-dark); }
.workspace-main { min-width:0; padding:32px; }
.workspace-support-slot { min-width:0; max-width:260px; flex:0 1 260px; }
.workspace-support-access { position:relative; }
.workspace-support-access>summary { display:flex; align-items:center; gap:9px; min-height:42px; padding:6px 10px; border:1px solid var(--border); border-radius:7px; cursor:pointer; list-style:none; }
.workspace-support-access>summary::-webkit-details-marker { display:none; }
.workspace-support-access>summary>.icon { width:16px; height:16px; color:var(--primary-dark); }
.workspace-support-access>summary>.icon:last-child { width:12px; margin-left:auto; }
.support-access-label { display:flex; flex-direction:column; gap:3px; min-width:0; }
.support-access-label strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; font-weight:600; }
.support-access-label>span { font-size:10px; color:var(--muted); }
.workspace-support-access[data-state="warning"]>summary { border-color:#e8d5a1; background:var(--warning-soft); }
.workspace-support-access[data-state="warning"] .support-access-label>span { color:var(--warning); }
.support-access-panel { position:absolute; right:0; top:calc(100% + 8px); width:280px; max-width:calc(100vw - 24px); padding:16px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); box-shadow:0 8px 28px #17203320; }
.support-access-panel>strong { font-size:12px; }
.support-access-panel p { margin:6px 0; font-size:11px; }
.support-access-panel nav { display:grid; gap:4px; padding:10px 0; margin-top:10px; border-top:1px solid var(--border); }
.support-access-panel nav a { display:flex; align-items:center; gap:9px; padding:8px 0; font-size:12px; }
.support-access-panel>.button { width:100%; }
@media (max-width:600px) {
  .app-bar:has(.workspace-support-slot) .app-bar-spacer { display:none; }
  .workspace-support-slot { flex:1; max-width:none; }
  .workspace-support-access>summary { gap:6px; padding:6px 8px; }
  .workspace-support-access>summary>.icon:first-child { display:none; }
  .support-access-panel { position:fixed; top:calc(var(--appbar-height) + 8px); right:12px; }
  .workspace-support-slot+.account+.button .sign-out-label { display:none; }
}

#workspace-content { max-width:1280px; margin:0 auto; }
.workspace-directory { max-width:1370px; padding:38px 36px; margin:0 auto; }
.workspace-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:19px; }
.workspace-card { padding:22px; display:flex; flex-direction:column; }
.workspace-card-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.workspace-icon { display:grid; place-items:center; width:38px; height:38px; border-radius:9px; color:var(--primary-dark); background:var(--primary-soft); }
.workspace-card h2 { margin:22px 0 6px; font-size:17px; }
.workspace-slug { margin:0; font-size:11px; color:var(--muted); }
.workspace-meta { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:23px 0; font-size:10px; color:var(--muted); }
.workspace-card-link { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:auto; padding-top:16px; border-top:1px solid var(--border); font-size:11px; font-weight:600; }
.workspace-card-link .icon { width:16px; }
.directory-footer { display:flex; align-items:center; gap:8px; margin:24px 2px; color:var(--muted); }
.directory-footer>.icon { width:15px; }
.directory-footer p { margin:0; font-size:11px; }
.directory-footer .button { margin-left:auto; }
.directory-footer-empty { max-width:680px; margin:16px auto 0; padding:0 2px; }
.directory-empty { max-width:680px; margin:32px auto 0; padding:36px 40px; text-align:center; }
.large-icon { display:inline-grid; place-items:center; width:54px; height:54px; border-radius:12px; background:var(--primary-soft); color:var(--primary-dark); }
.large-icon .icon { width:25px; height:25px; }
.directory-empty h2 { font-size:20px; margin:17px 0 8px; }
.directory-empty p { color:var(--muted); max-width:490px; margin:0 auto 20px; }
.directory-empty-actions { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:10px; }
.readiness-surface { margin-bottom:23px; }
.status-list { margin:0; padding:0 22px; }
.status-list>div { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 0; border-bottom:1px solid #ebeff4; }
.status-list>div:last-child { border:0; }
.status-list dt { display:flex; align-items:center; gap:13px; }
.status-list dt strong { display:block; font-size:12px; font-weight:600; }
.status-list dt small { display:block; margin-top:5px; font-size:10px; line-height:1.7; color:var(--muted); }
.status-list dd { margin:0; }
.status-icon { display:grid; place-items:center; width:33px; height:33px; border:1px solid var(--border); border-radius:8px; color:#65829c; }
.status-icon .icon { width:17px; }
.overview-columns { display:grid; grid-template-columns:1.2fr 1fr; gap:23px; }
.feature-icon { display:inline-grid; place-items:center; width:34px; height:34px; margin:0 0 15px; border-radius:9px; color:#78899e; background:#f0f3f7; }
.feature-icon .icon { width:16px; }
.provider-pair { display:flex; flex-wrap:wrap; align-items:center; gap:15px; margin-bottom:20px; }
.provider-brand { display:inline-flex; align-items:center; justify-content:center; width:168px; min-height:58px; padding:16px; vertical-align:middle; flex-shrink:0; }
.provider-brand img { display:block; max-width:100%; height:auto; object-fit:contain; }
.provider-brand-simpro img { width:100px; }
.provider-brand-intacct img { width:140px; }
.provider-brand-fallback { font-size:12px; font-weight:600; overflow-wrap:anywhere; }
.provider-pair>.provider-brand { border:1px solid var(--border); border-radius:8px; background:white; }
.provider-pair>.icon { color:#8498aa; width:17px; }
.settings-surface { max-width:820px; margin-bottom:23px; }
.detail-list { margin:0; }
.detail-list>div { display:grid; grid-template-columns:155px minmax(0,1fr); gap:20px; padding:12px 0; font-size:12px; }
.detail-list dt { color:var(--muted); }
.detail-list dd { margin:0; }
.archive-surface { border-color:#ead9d9; }
.archive-surface h2 { color:#893434; }
.role-guide { display:flex; gap:22px; flex-wrap:wrap; margin:0 0 22px; color:var(--muted); font-size:10px; line-height:1.7; }
.role-guide strong { display:block; color:#435069; font-size:11px; margin-bottom:3px; }
.table-scroll { position:relative; overflow-x:auto; }
table { width:100%; border-collapse:collapse; text-align:left; }
th { padding:13px 19px; border-bottom:1px solid var(--border); background:#f8fafc; font-size:10px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); font-weight:600; white-space:nowrap; }
td { padding:18px 19px; border-bottom:1px solid #ebeff4; font-size:12px; }
tbody tr:last-child th,tbody tr:last-child td { border-bottom:0; }
td>strong { display:block; font-weight:600; }
td>small { display:block; font-size:11px; color:var(--muted); margin-top:6px; }
.table-actions { text-align:right; white-space:nowrap; }
.table-actions .button,.connection-row-actions .button { min-height:34px; padding:7px 9px; font-size:11px; }
.table-actions>.button+.button, .connection-row-actions>.button+.button { margin-inline-start:var(--row-action-gap); }
.workspace-list-table th,.workspace-list-table td,.connection-table th,.connection-table td,.workflow-table th,.workflow-table td { padding:14px 17px; }
.workspace-list-table td,.connection-table td,.workflow-table td { vertical-align:middle; }
.member-table { min-width:650px; }
.member-table td:first-child { overflow-wrap:anywhere; }
.workspace-list-guide { margin-top:24px; }
.workspace-access-roles { margin-top:24px; }
.workspace-role-heading { align-items:center; }
.workspace-role-heading h2 { display:flex; align-items:center; gap:9px; font-size:15px; }
.workspace-role-heading p { max-width:620px; font-size:12px; line-height:1.6; }
.workspace-role-list { display:grid; }
.workspace-role-card { padding:18px 22px; border-bottom:1px solid var(--border); }
.workspace-role-card:last-child { border-bottom:0; }
.workspace-role-card-top { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.workspace-role-card h3 { margin:0 0 4px; font-size:14px; }
.workspace-role-card p { margin:0; font-size:12px; }
.workspace-role-actions { display:flex; gap:var(--row-action-gap); flex-wrap:wrap; }
.workspace-role-actions .button { min-height:34px; padding:7px 9px; font-size:11px; }
.member-table th:first-child,.member-table td:first-child { padding-left:22px; }
.member-table th:last-child,.member-table td:last-child { padding-right:22px; }
.workspace-role-card ul { margin:12px 0 0; padding:0; list-style:none; color:#52627a; font-size:12px; line-height:1.8; }
.workspace-role-note { justify-content:flex-start; color:var(--muted); font-size:11px; }
dialog:has(.workspace-role-editor) { width:min(740px,calc(100% - 32px)); overflow:hidden; }
dialog:has(.workspace-role-editor) form { display:flex; flex-direction:column; max-height:calc(100dvh - 42px); }
dialog:has(.workspace-role-editor) .dialog-header,dialog:has(.workspace-role-editor) .dialog-footer { flex-shrink:0; }
dialog:has(.workspace-role-editor) .dialog-body { overflow-y:auto; min-height:0; }
.workspace-role-editor { display:grid; gap:20px; }
.workspace-role-members,.workspace-role-permissions { min-width:0; margin:0; border:0; padding:0; }
.workspace-role-members legend,.workspace-role-permissions legend { margin-bottom:9px; color:#425068; font-size:12px; font-weight:600; }
.workspace-role-members>input { width:100%; margin-bottom:9px; }
.workspace-role-member-list { display:grid; gap:8px; max-height:190px; overflow:auto; padding:3px; margin:-3px; }
.workspace-role-choice { align-items:center; min-width:0; font-weight:400; }
.workspace-role-choice[hidden] { display:none; }
.workspace-role-choice>span:last-child { min-width:0; overflow-wrap:anywhere; }
.workspace-role-choice small { display:block; color:var(--muted); font-size:11px; line-height:1.6; }
.workspace-role-editor-section,.workspace-role-grant-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.workspace-role-editor-section h3 { margin:0 0 3px; font-size:14px; }
.workspace-role-editor-section p { margin:0; }
.workspace-role-editor [data-grants] { display:grid; gap:12px; }
.workspace-role-grant { border:1px solid var(--border); border-radius:9px; min-width:0; }
.workspace-role-grant>summary { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px; cursor:pointer; list-style:none; }
.workspace-role-grant>summary::-webkit-details-marker { display:none; }
.workspace-role-grant>summary:hover { background:#f7f9fc; border-radius:9px; }
.workspace-role-grant>summary>span { min-width:0; }
.workspace-role-grant>summary strong { display:block; font-size:12px; }
.workspace-role-grant>summary small { display:block; margin-top:5px; color:var(--muted); font-size:11px; line-height:1.6; overflow-wrap:anywhere; }
.workspace-role-grant>summary>.icon { flex:none; color:var(--muted); }
.workspace-role-grant[open]>summary>.icon { transform:rotate(180deg); }
.workspace-role-grant-body { display:grid; gap:18px; border-top:1px solid var(--border); padding:18px 16px 12px; }
.workspace-role-grant-footer { display:flex; justify-content:flex-end; }
.workspace-role-grant-footer .button { min-height:34px; padding:7px 9px; font-size:11px; }
.workspace-role-checks,.workspace-role-routes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:9px; }
.workspace-role-routes { margin-top:0; max-height:200px; overflow:auto; padding:3px; margin-inline:-3px; }
.workspace-role-routes[hidden] { display:none; }
@media (max-width:650px) { .workspace-role-member-list,.workspace-role-checks,.workspace-role-routes { grid-template-columns:1fr; } .workspace-role-card-top { flex-direction:column; } }
.workspace-list-guide>summary { display:flex; align-items:center; gap:10px; padding:18px 22px; font-size:12px; font-weight:600; cursor:pointer; }
.workspace-list-guide>summary::after { content:"+"; margin-left:auto; color:var(--muted); }
.workspace-list-guide[open]>summary { border-bottom:1px solid var(--border); }
.workspace-list-guide[open]>summary::after { content:"−"; }
.workspace-list-guide .role-guide { margin-bottom:16px; font-size:11px; }
.list-toolbar { display:flex; align-items:flex-end; flex-wrap:wrap; gap:16px; padding:18px 22px; margin-bottom:20px; }
.list-search { flex:1 1 240px; min-width:200px; }
.list-filter { flex:0 1 180px; min-width:145px; }
.list-toolbar>.button { flex-shrink:0; margin-bottom:1px; }
.list-empty { padding:30px 24px; text-align:center; }
.list-empty .large-icon { margin-bottom:12px; }
.list-empty h2 { margin:0 0 10px; font-size:17px; }
.list-empty p { max-width:560px; margin:0 auto 18px; color:var(--muted); }
.list-empty p:last-child { margin-bottom:0; }
.list-pagination { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:15px; }
.list-range { color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; }
.list-page-controls { display:flex; align-items:center; flex-wrap:wrap; gap:20px; }
.list-page-size { display:flex; align-items:center; gap:9px; font-size:10px; color:var(--muted); }
.list-page-size select { min-height:34px; width:74px; padding-top:6px; padding-bottom:6px; font-size:11px; }
.list-page-nav { display:flex; align-items:center; flex-wrap:nowrap; gap:8px; }
.list-pagination .button { min-height:36px; padding:7px 10px; font-size:11px; }
.list-pagination .button:disabled,.list-toolbar>.button:disabled { cursor:default; }
.list-page-number { display:inline-flex; align-items:center; justify-content:center; min-width:56px; min-height:36px; padding:0 4px; white-space:nowrap; text-align:center; color:var(--muted); font-size:10px; font-variant-numeric:tabular-nums; }
@media(max-width:680px) {
  .list-toolbar { padding:16px; gap:13px; }
  .list-search { flex-basis:100%; }
  .list-filter { flex:1 1 135px; min-width:0; }
  .list-toolbar>.button { width:100%; }
  .list-pagination { padding:16px; }
  .list-page-controls { gap:12px; flex:1 1 100%; justify-content:space-between; }
  .list-page-controls nav { gap:5px; }
}

.field { display:flex; flex-direction:column; gap:8px; color:#425068; font-size:12px; font-weight:600; line-height:1.5; min-width:0; }
.field-wide { grid-column:1/-1; }
input:not([type=checkbox]),select { display:block; width:100%; min-height:43px; padding:10px 11px; background:white; color:var(--ink); border:1px solid #cbd4e0; border-radius:7px; font-size:12px; font-weight:400; transition:border-color .12s,box-shadow .12s; }
input::placeholder { color:#8b97a8; opacity:1; }
input:hover:not(:disabled),select:hover:not(:disabled) { border-color:#8ca1b5; }
input:focus,select:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px #0085ca20; }
input:disabled,select:disabled,input[readonly] { background:#f4f6f9; color:#68758b; }
select { appearance:none; padding-right:34px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23647188' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 11px center; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:21px; }
.form-hint { font-size:11px; font-weight:400; color:var(--muted); line-height:1.8; }
.checkbox-field { position:relative; display:flex; align-items:center; gap:10px; min-height:43px; padding:10px 12px; border:1px solid var(--border); border-radius:7px; background:white; color:#435069; font-size:12px; line-height:1.65; cursor:pointer; }
.checkbox-field input { position:absolute; left:12px; width:20px; height:20px; margin:0; opacity:0; }
.checkbox-mark { display:grid; place-items:center; width:20px; height:20px; flex:0 0 20px; border:1px solid #9dacbf; border-radius:5px; background:white; color:white; }
.checkbox-mark .icon { width:14px; height:14px; opacity:0; }
.checkbox-field:has(input:checked) { background:#f3faff; border-color:#b5d8e8; }
.checkbox-field input:checked+.checkbox-mark { background:var(--primary); border-color:var(--primary); }
.checkbox-field input:checked+.checkbox-mark .icon { opacity:1; }
.checkbox-field:has(input:focus-visible) { outline:2px solid var(--primary); outline-offset:3px; }
.checkbox-field:has(input:disabled) { opacity:.6; cursor:default; }
.checkbox-inline { width:max-content; min-height:32px; padding:4px 0; border:0; background:transparent!important; font-size:11px; }
.checkbox-inline input { left:0; }
.checkbox-inline .checkbox-mark { width:18px; height:18px; flex-basis:18px; }

dialog { width:min(550px,calc(100% - 32px)); max-height:calc(100dvh - 40px); padding:0; overflow:auto; border:1px solid #d7e1eb; border-radius:12px; box-shadow:0 20px 80px #162a4540; color:var(--ink); }
dialog.template-dialog { width:min(1120px,calc(100% - 32px)); }
.template-dialog[open] { display:flex; flex-direction:column; }
.template-dialog .dialog-body { min-height:0; overflow:auto; }
.template-dialog .dialog-header,.template-dialog .dialog-footer { flex-shrink:0; }
.template-dialog .dialog-footer { flex-wrap:wrap; gap:12px; }
.template-dialog .field,.template-dialog p { margin-bottom:18px; }
.template-dialog .field:last-child { margin-bottom:0; }
.template-dialog textarea { width:100%; padding:10px 12px; border:1px solid #c7d3e2; border-radius:6px; font:inherit; color:inherit; resize:vertical; }
.template-intro { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:22px; }
.template-intro h3 { margin:0 0 8px; font-size:16px; }
.template-intro p { margin:0; color:var(--muted); }
.template-tabs { display:flex; gap:10px; margin-bottom:24px; flex-wrap:wrap; }
.template-library-table { min-width:760px; }
.template-library-table td:first-child { min-width:220px; max-width:340px; }
.template-provenance { display:grid; gap:0; margin:0 0 24px; border:1px solid #dbe4ef; border-radius:8px; }
.template-provenance>div { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:14px 16px; }
.template-provenance>div+div { border-top:1px solid #e7edf4; }
.template-provenance>div>span:first-child { min-width:150px; }
.template-section-options { border:1px solid #dbe4ef; border-radius:8px; padding:16px; display:flex; gap:16px 24px; flex-wrap:wrap; margin:18px 0 24px; }
.template-section-options legend { padding:0 6px; font-weight:600; }
.template-section-cards,.template-rollout { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr)); gap:16px; margin:20px 0; }
.template-section-cards article,.template-rollout article { padding:18px; }
.template-section-cards h4 { display:flex; align-items:center; gap:9px; margin:0 0 12px; font-size:14px; }
.template-section-cards p { font-size:12px; color:var(--muted); margin:0; }
.template-review-layout { display:grid; grid-template-columns:220px minmax(0,1fr); gap:24px; }
.template-review-layout>section,.template-review-layout>[data-route-setup] { min-width:0; }
.template-route-list { border-right:1px solid #dbe4ef; padding-right:16px; max-height:55dvh; overflow:auto; }
.template-route-list .checkbox-field { padding:10px 0; }
.template-route-list>.button { font-size:11px; margin:0 0 14px 20px; }
.template-route-list .customer-route-option { border-radius:7px; }
.template-route-list [aria-current=true] { background:#ecf6fc; color:#2471b0; }
.template-binding { padding:16px 0; border-top:1px solid #e7edf4; }
.template-binding:first-child { border-top:0; }
.template-bindings summary { cursor:pointer; font-weight:600; padding:8px 0 16px; }
.template-review-toolbar { display:flex; gap:16px; flex-wrap:wrap; align-items:center; margin-bottom:18px; }
.template-review-toolbar>.field { flex:1; min-width:180px; margin:0; }
.template-change-table { border:1px solid #dbe4ef; border-radius:8px; }
.template-change-table table { table-layout:fixed; min-width:650px; }
.template-change-table th:first-child { width:23%; }
.template-change-table th:last-child { width:23%; }
.template-change-table td { padding:14px 12px; vertical-align:top; overflow-wrap:anywhere; }
.template-change-table td>small,.template-change-table td>strong { display:block; margin-bottom:8px; }
.template-change-table .field { margin:0; }
.template-value { font-size:11px; line-height:1.7; }
.template-value summary { cursor:pointer; white-space:pre-line; }
.template-value pre { font:inherit; white-space:pre-wrap; word-break:break-word; padding:8px; background:#f7f9fc; border-radius:6px; }
.template-usage { max-height:48dvh; overflow:auto; margin-bottom:22px; }
.template-route-provenance { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; padding:16px 20px; margin:16px 0; border:1px solid #d5e4f2; border-radius:8px; background:#f0f7fc; }
.template-route-provenance>div { display:grid; gap:7px; }
.template-route-provenance small { color:var(--muted); }
@media(max-width:760px) {
  .template-review-layout { grid-template-columns:minmax(0,1fr); }
  .template-route-list { border-right:0; border-bottom:1px solid #dbe4ef; padding:0 0 12px; max-height:180px; }
  .template-intro { flex-direction:column; }
  .template-dialog .dialog-footer .page-actions { flex-wrap:wrap; }
}
dialog:focus-visible { outline:none; }
dialog::backdrop { background:#10203978; }
.dialog-header { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; padding:22px 23px; border-bottom:1px solid var(--border); }
.dialog-header h2 { font-size:18px; margin:0; }
.dialog-header p { color:var(--muted); font-size:11px; margin:7px 0 0; }
.dialog-header .icon-button { margin:-6px -5px 0 0; flex-shrink:0; }
.dialog-body { padding:24px; }
.dialog-body>p:first-child { margin:0 0 19px; color:var(--muted); }
.dialog-footer { display:flex; justify-content:flex-end; gap:9px; padding:17px 23px; border-top:1px solid var(--border); background:#fbfcfe; }
.dialog-progress { align-self:center; margin-right:auto; color:var(--muted); font-size:11px; }
.toast { position:fixed; bottom:25px; left:50%; transform:translateX(-50%); z-index:100; width:max-content; max-width:calc(100vw - 34px); border:1px solid #ccd8e5; border-radius:9px; padding:14px 20px; background:#193750; color:white; box-shadow:0 6px 25px #18365020; font-size:12px; line-height:1.6; }
.spinner { width:18px; height:18px; flex-shrink:0; border:2px solid #dce6f0; border-top-color:var(--primary); border-radius:50%; animation:spin .8s linear infinite; }
.spinner-sm { width:14px; height:14px; border-width:2px; }
.button-primary .spinner { border-color:#ffffff55; border-top-color:white; }
.operation-pending { display:flex; align-items:center; gap:10px; padding:12px 14px; border:1px solid #d7e7f2; border-radius:7px; background:#f0f7fc; color:#456078; font-size:12px; }
.operation-progress { display:grid; gap:7px; margin:12px 0; padding:12px 14px; border:1px solid #d7e7f2; border-radius:7px; background:#f0f7fc; color:#456078; font-size:11px; }
.operation-progress-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.operation-progress progress { width:100%; height:6px; border:0; border-radius:6px; background:#dceaf4; overflow:hidden; }
.operation-progress progress::-webkit-progress-bar { background:#dceaf4; }
.operation-progress progress::-webkit-progress-value { background:var(--primary); border-radius:6px; transition:width .2s ease; }
.operation-progress progress::-moz-progress-bar { background:var(--primary); border-radius:6px; }
.loading-state { display:flex; align-items:center; justify-content:center; gap:12px; min-height:240px; color:var(--muted); font-size:12px; }
.boot-screen { min-height:100vh; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:18px; padding:28px; text-align:center; }
.boot-screen img { width:50px; height:50px; }
.boot-screen h1 { font-size:23px; }
.boot-screen p { margin:0; color:var(--muted); max-width:530px; }
.noscript { padding:25px; }

.login-page { display:grid; grid-template-columns:minmax(0,1fr) minmax(440px,.85fr); min-height:100vh; background:var(--canvas); }
.login-story { display:flex; flex-direction:column; padding:40px 48px; background:linear-gradient(140deg,#edf7fc,#f5f8fb 68%,#eef4f9); border-right:1px solid #e2eaf2; }
.login-story .brand-product { font-size:11px; }
.login-introduction { max-width:480px; margin:auto; padding:70px 0; }
.login-introduction h2 { font-size:36px; font-weight:600; line-height:1.28; letter-spacing:-1px; margin:18px 0 20px; color:#183750; }
.login-introduction>p { color:#5b7084; font-size:13px; line-height:1.8; max-width:430px; }
.login-provider-row { display:flex; flex-wrap:wrap; align-items:center; gap:16px; margin:32px 0; }
.login-provider-row>.provider-brand { background:white; border:1px solid #dce6ef; border-radius:9px; }
.login-provider-row>.icon { color:#7192ac; }
.login-principle { display:flex; align-items:center; gap:10px; font-size:11px; color:#526b81; line-height:1.8; }
.login-principle .icon { color:var(--primary); width:17px; }
.login-footer { font-size:10px; color:#75869b; margin:0; }
.login-main { display:flex; align-items:center; justify-content:center; padding:40px; background:#f8fafc; }
.login-form { width:100%; max-width:430px; padding:30px; background:white; border:1px solid var(--border); border-radius:12px; box-shadow:0 14px 40px #1720330a; }
.setup-form { max-width:500px; }
.login-form h1 { font-size:26px; margin:11px 0 9px; }
.auth-form-heading { margin-bottom:25px; }
.auth-form-heading p { margin:0; color:var(--muted); font-size:12px; line-height:1.7; }
.auth-fields { display:grid; gap:16px; }
.auth-fields>.field,.auth-fields>.checkbox-field,.auth-fields>.auth-help { margin:0; }
.auth-fields>.checkbox-inline { min-height:25px; }
.auth-options { display:grid; gap:6px; }
.auth-options .auth-help { margin:0 0 0 30px; }
.auth-help { color:var(--muted); font-size:11px; line-height:1.7; }
.auth-actions { margin-top:24px; }
.login-submit { width:100%; min-height:44px; margin:0; justify-content:center; padding:11px 16px; }
.auth-secondary-actions { display:flex; align-items:center; justify-content:space-between; gap:8px 18px; flex-wrap:wrap; margin-top:11px; }
.auth-text-action { display:inline-flex; align-items:center; gap:6px; min-height:32px; padding:4px 2px; border:0; background:transparent; color:var(--primary-dark); font-size:11px; font-weight:600; line-height:1.5; text-align:left; }
.auth-text-action:hover { color:#005782; }
.auth-text-action .icon { width:14px; height:14px; }
.mobile-brand { display:none; }

@keyframes spin { to { transform:rotate(360deg); } }
@media(max-width:1180px) {
  .account-copy { display:none; }
  .brand-product { font-size:10px; }
  .workspace-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .overview-columns { grid-template-columns:1fr; }
  .workspace-main { padding:28px; }
  .login-story { padding:35px; }
  .login-story .brand-product { display:none; }
}
@media(max-width:820px) {
  :root { --appbar-height:68px; }
  .brand-product { display:none; }
  .app-bar { padding:0 18px; gap:12px; }
  .workspace-layout { grid-template-columns:minmax(0,1fr); }
  .sidebar { height:auto; position:static; padding:10px 16px; border-right:0; border-bottom:1px solid var(--border); }
  .sidebar-workspace,.sidebar-footer { display:none; }
  .sidebar nav { display:flex; align-items:center; overflow-x:auto; gap:5px; }
  .nav-link { flex-shrink:0; margin:0; min-height:42px; font-size:10px; }
  .nav-divider { width:1px; height:25px; margin:0 5px; flex-shrink:0; }
  .workspace-main { padding:25px 22px; }
  .workspace-directory { padding:30px 23px; }
  .page-heading { align-items:flex-start; flex-wrap:wrap; gap:18px; }
  .page-heading h1 { font-size:25px; }
  .login-page { grid-template-columns:1fr; }
  .login-story { display:none; }
  .login-main { min-height:100vh; padding:32px; }
  .mobile-brand { display:block; margin-bottom:30px; }
  .mobile-brand .brand-product { display:inline; font-size:11px; }
}
@media(max-width:560px) {
  .app-bar { padding:0 12px; gap:6px; }
  .app-bar .brand>span { display:none; }
  .app-bar .brand img { margin-right:0; width:31px; height:31px; }
  .app-bar .account { display:none; }
  .app-bar .button { padding:8px 10px; }
  .workspace-switch { max-width:215px; min-width:0; flex:1; }
  .workspace-switch>.icon { display:none; }
  .workspace-switch select { font-size:10px; }
  .workspace-switch+.account+.button .sign-out-label { display:none; }
  .workspace-directory,.workspace-main { padding:25px 16px; }
  .workspace-grid { grid-template-columns:1fr; }
  .workspace-card { padding:20px; }
  .page-heading h1 { font-size:23px; }
  .sidebar { padding:8px; }
  .nav-link { gap:7px; padding:10px; }
  .nav-link .icon { width:16px; }
  .directory-empty { padding:28px 22px; margin-top:16px; }
  .directory-empty h2 { font-size:19px; }
  .directory-empty-actions .button { width:100%; }
  .directory-footer { flex-wrap:wrap; gap:7px; }
  .directory-footer p { flex:1; min-width:160px; }
  .surface-heading,.surface-body { padding:18px; }
  .status-list { padding:0 17px; }
  .status-list>div { gap:10px; }
  .status-icon { display:none; }
  .status-list dt strong { font-size:11px; }
  .status-list dt small { max-width:180px; font-size:10px; }
  .detail-list>div { grid-template-columns:1fr; gap:5px; }
  .form-grid { grid-template-columns:1fr; }
  .dialog-body { padding:20px; }
  .dialog-header,.dialog-footer { padding:18px; }
  .login-main { padding:18px; }
  .login-form { padding:23px; }
  .login-form h1 { font-size:23px; }
  .mobile-brand .brand-product { max-width:130px; white-space:normal; line-height:1.6; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}

.usage-filters { display:flex; align-items:flex-end; flex-wrap:wrap; gap:16px; padding:18px 22px; margin-bottom:20px; }
.usage-filters .field { min-width:190px; margin:0; flex:1; }
.usage-filters .button { margin-bottom:1px; }
.usage-totals { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:15px; }
.usage-total { padding:20px; display:flex; flex-direction:column; gap:9px; }
.usage-total>span { color:var(--muted); font-size:11px; }
.usage-total>strong { font-size:26px; font-weight:650; font-variant-numeric:tabular-nums; }
.usage-period { margin:14px 0 22px; }
.usage-empty { padding:35px 28px; text-align:center; }
.usage-empty .large-icon { margin:auto auto 16px; }
.usage-empty h2 { font-size:19px; }
.usage-empty p { max-width:560px; margin:12px auto 18px; color:var(--muted); line-height:1.8; }
.usage-empty small { color:var(--muted); font-size:10px; }
.usage-table { font-variant-numeric:tabular-nums; }
.usage-table td:not(:first-child),.usage-table th:not(:first-child) { white-space:nowrap; }
.usage-connection-id { font-family:monospace; font-size:10px; white-space:nowrap; }
.usage-hourly-surface { margin-top:22px; }
.usage-provider-quotas { margin-top:22px; }
.connection-callback { margin-top:25px; }
.connection-callback>summary { padding:17px 22px; cursor:pointer; color:#405570; font-size:12px; line-height:1.7; }
.connection-callback>summary>span { margin-left:15px; color:var(--muted); font-size:10px; }
.connection-callback[open]>summary { border-bottom:1px solid var(--border); }
.connection-table { min-width:780px; }
.connection-table td:first-child { min-width:170px; }
.connection-table td:nth-child(2) { min-width:150px; }
.connection-provider-cell .provider-brand { justify-content:flex-start; padding-left:0; width:152px; }
.connection-provider-cell .provider-brand-simpro { padding-left:16px; }
.connection-provider-cell>small { margin-top:0; }
.connection-table .connection-account-cell { max-width:240px; overflow-wrap:anywhere; font-size:11px; }
.connection-row-actions { text-align:right; white-space:nowrap; }
.connection-details-toggle { min-height:27px; padding:4px 0; margin-top:3px; gap:5px; font-size:10px; }
.connection-details-toggle .icon { width:12px; height:12px; }
.connection-details-toggle[aria-expanded=true] .icon { transform:rotate(90deg); }
.connection-expanded-row>td { background:#f7fafe; padding:15px 20px; }
.connection-expanded-row p { color:#52677d; font-size:11px; margin:0 0 12px; }
.connection-expanded-details { display:flex; flex-wrap:wrap; gap:14px 30px; margin:0; font-size:10px; line-height:1.8; }
.connection-expanded-details dt { color:var(--muted); }
.connection-expanded-details dd { margin:3px 0 0; color:#364b63; }
.callback-control { display:flex; gap:10px; align-items:center; }
.callback-control input { min-width:0; flex:1; font-family:monospace; font-size:11px; }
.callback-control button { flex-shrink:0; }
.callback-reference { display:block; margin-top:5px; overflow-wrap:anywhere; }
.connection-schema-fields { margin:22px 0; }
.connection-schema-fields .connection-build-part { align-self:start; }
.connection-edit-guidance { margin:18px 0; padding:12px 15px; border:1px solid #dae5ef; border-radius:7px; background:#f5f9fc; }
.connection-edit-guidance p { margin:0; font-size:11px; color:#52677d; }
.connection-edit-guidance p+p { margin-top:8px; }
dialog:has(>.connection-form) { width:min(720px,calc(100% - 32px)); }
.connection-form .form-grid { gap:16px; }
.connection-provider-heading { display:flex; align-items:center; margin:-8px 0 16px; border-bottom:1px solid var(--border); padding-bottom:8px; }
.connection-provider-heading .provider-brand { justify-content:flex-start; }
.connection-form .field { gap:6px; }
.connection-form .form-hint { line-height:1.65; }
.connection-form .connection-schema-fields { margin:18px 0; }
.connection-form .connection-credential-part { align-self:start; }
.connection-form .connection-edit-guidance { margin:16px 0; }
.connection-form #connection-form-callback { margin-bottom:0; }
@media(max-width:620px) { .connection-form .form-grid { grid-template-columns:1fr; } }
@media(max-width:560px) {
  .callback-control { flex-direction:column; align-items:stretch; }
}
.usage-pagination { display:flex; justify-content:space-between; align-items:center; gap:15px; font-size:10px; color:var(--muted); }
.usage-pagination>div { display:flex; gap:6px; }
.usage-budget-section { margin-top:30px; }
.usage-section-heading { padding:0 0 16px; border:0; }
.usage-budget-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.usage-budget-card .surface-heading h3 { margin:0; font-size:14px; }
.usage-window { margin-bottom:22px; }
.usage-window>div { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:9px; font-size:11px; }
.usage-window>div>span { color:var(--muted); font-variant-numeric:tabular-nums; }
.usage-window p { margin:9px 0 0; }
.usage-meter { width:100%; height:9px; display:block; border:0; border-radius:8px; overflow:hidden; background:#e8edf4; }
.usage-meter::-webkit-meter-bar { background:#e8edf4; border:0; border-radius:8px; }
.usage-meter::-webkit-meter-optimum-value { background:#2c62b6; border-radius:8px; }
.usage-meter.warning::-webkit-meter-optimum-value { background:#ad761f; }
.usage-meter.exhausted::-webkit-meter-optimum-value { background:#b84a48; }
.usage-meter::-moz-meter-bar { background:#2c62b6; }
.usage-meter.warning::-moz-meter-bar { background:#ad761f; }
.usage-meter.exhausted::-moz-meter-bar { background:#b84a48; }
.usage-budget-fields { margin-top:24px; }
.usage-budget-fields input[readonly] { background:#f3f5f8; color:var(--muted); }
.preview-form-fields { border:0; padding:0; margin:0; min-width:0; }
.preview-form-fields + .form-hint { margin:10px 0 16px; }
.customer-route-toolbar { display:flex; align-items:center; gap:24px; padding:20px 22px; margin-bottom:20px; }
.customer-route-picker { flex:1; min-width:0; }
.customer-route-picker>.field-label { margin-bottom:9px; }
.customer-route-picker details { position:relative; }
.customer-route-picker summary { display:flex; align-items:center; gap:16px; padding:13px 15px; border:1px solid var(--border); border-radius:7px; cursor:pointer; }
.customer-route-picker summary::-webkit-details-marker { display:none; }
.customer-route-picker summary>span,.customer-route-option>span { min-width:0; flex:1; }
.customer-route-picker summary strong,.customer-route-option strong { display:block; font-size:13px; font-weight:600; overflow-wrap:anywhere; }
.customer-route-picker summary small,.customer-route-option small { display:block; margin-top:5px; font-size:11px; font-weight:400; line-height:1.6; color:var(--muted); overflow-wrap:anywhere; }
.customer-route-picker summary>.icon,.customer-route-option>.icon { flex-shrink:0; color:var(--primary); }
.customer-route-picker details[open]>summary { background:var(--primary-soft); border-color:var(--primary); }
.customer-route-menu { position:absolute; z-index:30; top:calc(100% + 8px); left:0; right:0; padding:16px; border:1px solid var(--border); border-radius:9px; background:var(--surface); box-shadow:0 12px 30px #1a335322; }
.customer-route-menu>.field { margin-bottom:12px; }
#customer-route-options { max-height:min(300px,45dvh); overflow:auto; }
.customer-route-option { display:flex; align-items:center; gap:16px; text-align:left; width:100%; padding:12px; border:1px solid transparent; border-radius:6px; font:inherit; color:var(--ink); background:transparent; cursor:pointer; }
.customer-route-option+.customer-route-option { margin-top:4px; }
.customer-route-option:hover,.customer-route-option:focus-visible { background:#f6f8fb; }
.customer-route-option[aria-current] { background:var(--primary-soft); border-color:#d4e5f3; }
.customer-route-actions { display:flex; flex-direction:column; align-items:flex-end; gap:10px; flex-shrink:0; }
@media(max-width:680px) {
  .customer-route-toolbar { flex-direction:column; align-items:stretch; padding:18px; gap:16px; }
  .customer-route-actions { align-items:stretch; }
  .customer-route-actions .page-actions { flex-wrap:wrap; }
  .customer-route-menu { padding:12px; }
}
.customer-route-name { max-width:560px; }
.project-route-kind { display:flex; align-items:center; min-height:42px; padding:9px 12px; border:1px solid var(--border); border-radius:7px; background:var(--primary-soft); color:var(--ink); font-weight:600; }
.customer-route-editor .preview-account-grid { margin-top:18px; }
.provider-reference-picker { position:relative; display:flex; flex-direction:column; gap:8px; min-width:0; }
.provider-reference-picker:focus-within { z-index:30; }
.provider-reference-label { color:#425068; font-size:12px; font-weight:600; line-height:1.5; }
.provider-reference-choice { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:48px; padding:10px 12px; border:1px solid #cbd4e0; border-radius:7px; background:white; color:var(--ink); text-align:left; font-size:12px; }
.provider-reference-choice>span { min-width:0; }
.provider-reference-choice strong,.provider-reference-option strong { display:block; font-size:12px; font-weight:600; line-height:1.6; overflow-wrap:anywhere; }
.provider-reference-choice small,.provider-reference-option small { display:block; margin-top:2px; font-size:10px; color:var(--muted); line-height:1.6; overflow-wrap:anywhere; }
.provider-reference-choice>.icon { width:14px; height:14px; color:var(--muted); }
.provider-reference-choice[aria-expanded=true] { border-color:var(--primary); background:var(--primary-soft); }
.provider-reference-choice[aria-expanded=true]>.icon { transform:rotate(180deg); }
.provider-reference-choice:hover:not(:disabled) { border-color:#8ca1b5; }
.provider-reference-choice:disabled { cursor:default; background:#f4f6f9; }
.provider-reference-unconfirmed>.provider-reference-choice { border-color:#d6b461; }
.provider-reference-unconfirmed>.provider-reference-hint { color:var(--warning); }
.provider-reference-panel { position:absolute; z-index:15; top:calc(100% + 6px); left:0; width:100%; padding:12px; border:1px solid #cbd9e5; border-radius:8px; background:white; box-shadow:0 6px 24px #17203324; min-width:0; }
.provider-reference-tools { display:flex; align-items:center; gap:8px; }
.provider-reference-search { position:relative; display:block; flex:1; min-width:0; }
.provider-reference-search>.icon { position:absolute; width:14px; height:14px; top:13px; left:10px; color:var(--muted); pointer-events:none; }
.provider-reference-search input { min-height:40px; padding:9px 10px 9px 31px; font-size:11px; }
.provider-reference-tools>.button { flex-shrink:0; min-height:40px; padding:8px 10px; font-size:10px; }
.provider-reference-panel>.provider-reference-status { margin:10px 0 12px; color:var(--muted); font-size:10px; line-height:1.7; font-weight:400; }
.provider-reference-error { margin:10px 0; font-size:11px; }
.provider-reference-results { max-height:280px; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.provider-reference-options { margin:0; padding:0; list-style:none; }
.provider-reference-options>li+li { border-top:1px solid #edf1f6; }
.provider-reference-option { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px; width:100%; border:0; background:white; color:var(--ink); text-align:left; }
.provider-reference-option>span { min-width:0; }
.provider-reference-option>.icon { width:16px; height:16px; color:var(--primary-dark); }
.provider-reference-option:hover:not(:disabled),.provider-reference-option[aria-pressed=true] { background:var(--primary-soft); }
.provider-reference-option:focus-visible { outline:1px solid #718ba4; outline-offset:-2px; }
.provider-reference-option:disabled { cursor:default; }
.provider-reference-empty { margin:0; padding:22px 10px; text-align:center; color:var(--muted); font-size:11px; font-weight:400; }
.provider-reference-footer { display:flex; align-items:center; gap:8px; padding-top:8px; font-size:10px; color:var(--muted); }
.provider-reference-footer>span { flex:1; }
.provider-reference-footer>nav { display:flex; gap:2px; }
.provider-reference-footer .icon-button { width:30px; height:32px; }
.provider-reference-footer .icon-button:disabled { cursor:default; opacity:.4; }
.provider-reference-footer>.button { min-height:32px; padding:6px 8px; font-size:10px; }
.provider-reference-multiple .provider-reference-choice { min-height:42px; }
.provider-reference-multiple .provider-reference-option { justify-content:flex-start; min-height:48px; gap:10px; }
.provider-reference-option[aria-checked=true] { background:var(--primary-soft); }
.provider-reference-check { display:grid; place-items:center; flex:0 0 18px; width:18px; height:18px; border:1px solid #9bacbf; border-radius:4px; }
.provider-reference-check>.icon { width:12px; height:12px; }
[aria-checked=true]>.provider-reference-check { border-color:var(--primary); background:var(--primary); color:white; }
.provider-reference-selections { display:flex; flex-wrap:wrap; gap:6px; max-height:140px; overflow-y:auto; padding:2px; }
.provider-reference-chip { display:inline-flex; align-items:center; gap:8px; min-height:30px; max-width:100%; padding:5px 8px; border:1px solid #cbdde9; border-radius:6px; background:var(--primary-soft); color:var(--ink); font-size:11px; text-align:left; }
.provider-reference-chip>span { min-width:0; overflow-wrap:anywhere; }
.provider-reference-chip small { margin-left:7px; color:var(--muted); font-size:10px; }
.provider-reference-chip>.icon { flex-shrink:0; width:10px; height:10px; color:var(--muted); }
.provider-reference-chip:hover { background:#e1eff9; }
.customer-location-selection .form-grid { align-items:start; }
.customer-routing-policy { margin-top:24px; padding-top:22px; border-top:1px solid var(--border); }
.customer-routing-policy .form-grid { align-items:start; }
.customer-routing-policy .button-row { display:flex; align-items:center; gap:14px; }
.customer-routing-policy>p { margin:18px 0 0; }
@media(max-width:450px) { .provider-reference-tools { flex-wrap:wrap; } .provider-reference-search { flex-basis:100%; } .provider-reference-tools>.button { margin-left:auto; } }
.customer-policy-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; align-items:start; }
.customer-mapping-locked { background:#f8fafc; }
.customer-mapping-locked>div { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.customer-mapping-locked strong { font-size:12px; }
.customer-mapping-locked p { margin:10px 0 0; }
.customer-route-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin:0; }
.customer-route-summary dt { font-size:10px; color:var(--muted); margin-bottom:7px; }
.customer-route-summary dd { margin:0; font-size:12px; line-height:1.8; overflow-wrap:anywhere; }
.customer-route-summary small { display:block; font-size:10px; color:var(--muted); margin-top:3px; }
.customer-saved-route { margin-top:18px; padding:14px 16px; border:1px solid var(--border); border-radius:7px; background:#f8fafc; }
.customer-saved-route>summary,.customer-saved-snapshot>summary { cursor:pointer; font-size:11px; color:#486079; }
.customer-saved-route .customer-route-summary { grid-template-columns:1fr; gap:14px; margin-top:17px; }
.customer-saved-snapshot { margin:22px 0; padding:19px 22px; }
.customer-saved-snapshot .customer-route-summary { margin-top:20px; }
.customer-saved-snapshot>p { margin-bottom:0; }
.customer-preview-history { margin-top:28px; }
.customer-preview-history table { min-width:650px; }
.customer-preview-history td { font-size:11px; }
.customer-preview-meta { display:flex; align-items:center; gap:12px 18px; flex-wrap:wrap; margin-bottom:22px; color:var(--muted); font-size:11px; }
.customer-preview-meta>.page-actions { min-width:0; max-width:100%; flex-shrink:1; margin-left:auto; }
.customer-preview-reference { font-size:10px; margin:18px 0 22px; color:var(--muted); }
.customer-preview-reference>summary { cursor:pointer; }
.customer-preview-reference dl { display:grid; grid-template-columns:max-content 1fr; gap:8px 16px; }
.customer-preview-reference dd { margin:0; overflow-wrap:anywhere; }
.customer-preview-attempt { padding:20px 22px; display:flex; justify-content:space-between; align-items:center; gap:20px; flex-wrap:wrap; }
.customer-preview-attempt>div:first-child { max-width:680px; }
.customer-preview-attempt h2 { font-size:14px; margin:0 0 9px; }
.customer-preview-attempt p { font-size:12px; color:var(--muted); }
.customer-execution-notice { margin-top:22px; }
.preview-result-row { border-bottom:1px solid var(--border); }
.preview-result-row[data-page-last] { border-bottom:0; }
.preview-selectable-record { position:relative; }

.preview-selectable-record>.preview-record { border-bottom:0; min-width:0; }
.preview-selectable-record>.preview-record>summary { min-height:76px; }
.preview-selectable-record:has(>.preview-record-choice:not([hidden]))>.preview-record>summary { padding-left:64px; }
.preview-record-choice { position:absolute; top:22px; left:16px; z-index:1; justify-content:center; width:32px; min-height:32px; margin:0; padding:6px; border:0; background:transparent; }
.preview-record-choice:has(input:checked) { background:transparent; }
.preview-record-choice input { left:6px; }
.preview-record-choice:hover + .preview-record>summary { background:#f8fafc; }
.customer-execution-bar strong { font-size:12px; }
.customer-execution-bar p { margin:7px 0 0; max-width:680px; overflow-wrap:anywhere; }
.customer-execution-scope { grid-template-columns:repeat(2,minmax(0,1fr)); margin-bottom:22px; }
.customer-run-records { margin-top:24px; }
.customer-run-record { border-bottom:1px solid var(--border); }
.customer-run-record:last-of-type { border-bottom:0; }
.customer-run-record>summary { display:flex; align-items:center; gap:16px; padding:18px 22px; list-style:none; cursor:pointer; }
.customer-run-record>summary::-webkit-details-marker { display:none; }
.customer-run-record>summary>span:first-child { flex:1; min-width:0; }
.customer-run-record>summary strong { display:block; font-size:12px; }
.customer-run-record>summary small { display:block; font-size:10px; margin-top:6px; color:var(--muted); overflow-wrap:anywhere; }
.customer-run-record>summary>.icon { width:14px; height:14px; color:var(--muted); }
.customer-run-record[open]>summary>.icon { transform:rotate(180deg); }
.customer-run-record-body { padding:0 22px 20px; font-size:12px; }
.customer-run-record-body p { overflow-wrap:anywhere; }
.customer-recovery { display:flex; align-items:center; flex-wrap:wrap; gap:12px 18px; padding:14px 0; }
.customer-recovery .form-hint { flex:1 1 260px; margin:0; }
@media(max-width:680px) {
  .customer-policy-grid,.customer-route-summary { grid-template-columns:1fr; }
  .customer-preview-meta { gap:12px; }
  .customer-preview-meta>.page-actions { margin-left:0; }
  .customer-preview-attempt { padding:18px; }
  .customer-execution-bar { flex-direction:column; align-items:stretch; }
  .customer-execution-scope { grid-template-columns:1fr; }
}
.workflow-back { display:inline-flex; align-items:center; gap:7px; font-size:11px; margin:0 0 18px; }
.workflow-back>.icon { width:14px; height:14px; }
.workflow-table { min-width:740px; }
.workflow-date { white-space:nowrap; color:var(--muted); font-size:11px; }
.workflow-summary,.workflow-management { margin-bottom:22px; }
.workflow-summary .provider-pair { margin:0; }
.workflow-summary .surface-body>.form-hint { margin-top:18px; }
.workflow-access-note { padding:12px 14px; border-radius:7px; background:var(--warning-soft); color:var(--warning)!important; }
.workflow-management>.surface-body { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:18px; }
.workflow-management>.surface-body>div { max-width:680px; }
.workflow-management>.surface-body p { margin:0; }
.workflow-management .surface-footer { align-items:center; justify-content:space-between; flex-wrap:wrap; }
.workflow-management .surface-footer p { margin:0; }
.workflow-audit>summary { padding:18px 22px; cursor:pointer; font-size:12px; font-weight:600; line-height:1.8; }
.workflow-audit>summary>span { margin-left:18px; font-size:10px; font-weight:400; color:var(--muted); }
.workflow-audit[open]>summary { border-bottom:1px solid var(--border); }
.workflow-audit td { vertical-align:top; font-size:11px; }
.workflow-audit-pages { align-items:center; justify-content:space-between; flex-wrap:wrap; }
.workflow-audit-pages>div { display:flex; gap:8px; }
.workflow-trace { min-width:70px; }
.workflow-trace>summary { cursor:pointer; color:var(--primary-dark); }
.workflow-trace dl { font-size:10px; line-height:1.7; }
.workflow-trace dt { color:var(--muted); margin-top:7px; }
.workflow-trace dd { margin:0; max-width:260px; overflow-wrap:anywhere; }
.workflow-access-fields { border:0; padding:0; margin:0; min-width:0; }
.workflow-role-list { display:flex; flex-direction:column; gap:14px; }
.workflow-role>summary { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:17px 21px; cursor:pointer; list-style:none; }
.workflow-role>summary::-webkit-details-marker { display:none; }
.workflow-role>summary strong { display:block; font-size:12px; font-weight:600; }
.workflow-role>summary small { display:block; font-size:10px; line-height:1.8; color:var(--muted); margin-top:6px; }
.workflow-role>summary>.icon { color:var(--muted); width:15px; height:15px; }
.workflow-role[open]>summary { border-bottom:1px solid var(--border); }
.workflow-role[open]>summary>.icon { transform:rotate(180deg); }
.workflow-role-body { padding:21px; }
.workflow-role-body>.field { max-width:560px; }
.workflow-permissions { border:0; padding:0; margin:22px 0 0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.workflow-permissions>legend { font-size:12px; font-weight:600; color:#425068; margin-bottom:12px; }
.workflow-permission { align-items:flex-start; }
.workflow-permission>.checkbox-mark { margin-top:2px; }
.workflow-permission strong,.workflow-member-choice strong { display:block; font-size:11px; font-weight:600; }
.workflow-permission small,.workflow-member-choice small { display:block; font-size:10px; color:var(--muted); margin-top:4px; line-height:1.7; }
.workflow-permission:has(input:disabled),.workflow-member-choice:has(input:disabled) { cursor:default; }
.workflow-unavailable-permissions { margin-top:17px; }
.workflow-unavailable-permissions>summary { cursor:pointer; color:var(--muted); font-size:11px; }
.workflow-unavailable-permissions .workflow-permissions { margin-top:12px; }
.workflow-role-members { margin-top:25px; }
.workflow-role-members>h3 { font-size:12px; margin:0 0 12px; }
.workflow-role-members>h3>span { display:inline-flex; align-items:center; justify-content:center; min-width:22px; padding:3px 6px; margin-left:6px; border-radius:6px; background:var(--primary-soft); color:var(--primary-dark); font-size:10px; }
.workflow-role-members>.list-toolbar { margin:0; padding:14px; border:1px solid var(--border); border-radius:8px 8px 0 0; background:#f8fafc; }
.workflow-role-members>[data-member-results] { border:1px solid var(--border); border-top:0; border-radius:0 0 8px 8px; }
.workflow-member-choices { display:flex; flex-direction:column; }
.workflow-member-choice { border:0; border-radius:0; border-bottom:1px solid var(--border); padding:10px 14px; min-height:56px; }
.workflow-member-choice:last-child { border-bottom:0; }
.workflow-member-choice>span:nth-of-type(2) { flex:1; min-width:0; }
.workflow-member-choice small { overflow-wrap:anywhere; }
.workflow-role-footer { display:flex; justify-content:flex-end; margin-top:20px; }
.workflow-role-footer>.button { font-size:11px; }
.workflow-role-paging { margin-top:16px; }
.workflow-save-bar { position:sticky; bottom:16px; z-index:5; display:flex; align-items:center; justify-content:space-between; gap:15px; margin:22px -16px 0; padding:15px 20px; background:white; border:1px solid var(--border); border-radius:9px; box-shadow:0 3px 20px #17203312; }
@media(max-width:680px) {
  .workflow-permissions { grid-template-columns:1fr; }
  .workflow-role>summary,.workflow-role-body { padding:17px; }
  .workflow-audit>summary>span { display:block; margin-left:15px; }
  .workflow-member-choice { flex-wrap:wrap; }
  .workflow-member-choice>.badge { margin-left:30px; }
  .workflow-save-bar { bottom:8px; margin-inline:0; padding:13px; flex-wrap:wrap; }
  .workflow-management .surface-footer { gap:13px; }
}
.preview-section { margin-bottom:22px; }
.preview-direction { max-width:400px; margin-bottom:22px; }
.preview-account-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.preview-account-grid ~ .form-hint { margin:18px 0 0; }
.preview-account { padding:18px; border:1px solid var(--border); border-radius:8px; background:#fbfcfe; }
.preview-account h3 { margin-bottom:16px; }
.preview-account .form-grid { gap:16px; }
.preview-account>.form-hint { margin:14px 0 0; }
.routing-scope-note { display:flex; align-items:flex-start; gap:.625rem; margin-top:.875rem; padding:.75rem; border:1px solid #cbdde9; border-radius:7px; background:var(--primary-soft); }
.routing-scope-note[hidden] { display:none; }
.routing-scope-note p { margin:0; color:#425068; font-size:11px; line-height:1.6; }
.routing-scope-badge { flex:none; padding:.2rem .4rem; border-radius:4px; background:#dceefa; color:var(--primary-dark); font-size:10px; font-weight:700; white-space:nowrap; }
.preview-mapping { padding:18px 22px; border-bottom:1px solid var(--border); }
.preview-mapping:last-child { border-bottom:0; }
.preview-mapping-main { display:grid; grid-template-columns:minmax(135px,1fr) minmax(130px,.8fr) minmax(160px,1.3fr) auto; align-items:end; gap:16px; }
.preview-target { display:flex; flex-direction:column; gap:7px; min-height:70px; justify-content:center; }
.preview-target>span { font-size:10px; color:var(--muted); }
.preview-target>strong { font-size:12px; font-weight:600; }
.preview-target>small { font-size:10px; color:var(--muted); }
.preview-remove { align-self:center; font-size:10px; }
.preview-condition { margin-top:14px; font-size:11px; }
.preview-condition>summary { cursor:pointer; width:fit-content; color:#486079; padding:6px 0; line-height:1.7; }
.preview-condition>summary>span { margin-left:12px; color:var(--primary-dark); font-size:10px; }
.preview-condition-body { padding:13px 16px; margin-top:8px; border-radius:7px; background:#f5f8fb; border:1px solid #e3eaf2; }
.preview-condition-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-top:14px; }
.preview-condition-body>.form-hint { margin-bottom:0; }
.preview-condition .checkbox-inline { max-width:100%; }
.preview-add-mapping { align-items:center; justify-content:flex-start; }
.preview-add-mapping>.field { flex:1; max-width:330px; }
.preview-no-mappings { margin:0; padding:22px; color:var(--muted); }
.preview-selection-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:28px; align-items:start; }
.customer-discovery-route { display:grid; grid-template-columns:minmax(220px,1fr) minmax(260px,1fr); gap:12px 28px; align-items:start; }
.customer-discovery-route>.form-hint { grid-column:1/-1; margin:0; }
.customer-discovery-route .customer-saved-route { margin:0; }
.preview-section:has(.workflow-record-entry-body) > .customer-discovery-route { padding-bottom:20px; }
.preview-section:has(.workflow-record-entry-body) > .customer-discovery-route > .customer-saved-route { align-self:end; }
.preview-section:has(.workflow-record-entry-body) [data-route]:disabled { opacity:1; color:var(--ink); }
.workflow-record-entry-body { border-top:1px solid var(--border); padding-top:20px; }
.workflow-record-entry-body [data-entry-error]:not([hidden]) { margin:16px 0 0; }
.customer-discovery { border-top:1px solid var(--border); }
.customer-discovery-heading { display:flex; justify-content:space-between; align-items:start; gap:15px; margin-bottom:16px; }
.customer-discovery-heading h3 { margin:0 0 4px; }
.customer-discovery-heading p { margin:0; }
.customer-discovery-filters { display:grid; grid-template-columns:minmax(180px,1fr) 145px 85px auto; gap:12px; align-items:end; }
.customer-discovery-filters>.button { min-height:43px; }
.customer-discovery-caption { display:flex; justify-content:space-between; gap:15px; padding:12px 0; font-size:11px; color:var(--muted); }
.customer-discovery-caption small { flex-shrink:0; }
.customer-discovery-exclusions { margin:4px 0 14px; border:1px solid var(--border); border-radius:8px; background:#fff; overflow:hidden; }
.customer-discovery-exclusions summary { display:flex; align-items:center; gap:9px; padding:9px 13px; cursor:pointer; font-weight:600; list-style:none; }
.customer-discovery-exclusions summary::-webkit-details-marker { display:none; }
.customer-discovery-exclusions summary>.icon { width:14px; height:14px; color:var(--muted); transition:transform .15s ease; }
.customer-discovery-exclusions[open] summary>.icon { transform:rotate(90deg); }
.customer-discovery-exclusion-count { margin-left:auto; padding:2px 8px; border-radius:999px; background:#f1f5f9; color:var(--muted); font-size:10px; font-weight:600; }
.customer-discovery-exclusion-list { border-top:1px solid var(--border); }
.customer-discovery-exclusion { display:grid; grid-template-columns:minmax(150px,1fr) minmax(0,2fr); gap:8px 16px; align-items:start; padding:9px 13px; border-bottom:1px solid var(--border); font-size:11px; }
.customer-discovery-exclusion:last-child { border-bottom:0; }
.customer-discovery-exclusion strong,.customer-discovery-exclusion small { display:block; overflow-wrap:anywhere; }
.customer-discovery-exclusion small,.customer-discovery-exclusion-values,.customer-discovery-exclusions>.form-hint { color:var(--muted); }
.customer-discovery-exclusion-values { display:flex; flex-wrap:wrap; gap:3px 12px; margin-top:3px; font-size:10px; }
.customer-discovery-exclusion-values b { font-weight:600; color:var(--ink); }
.customer-discovery-exclusions>.form-hint { margin:0; padding:8px 13px; border-top:1px solid var(--border); font-size:10px; }
@media(max-width:700px) { .customer-discovery-exclusion { grid-template-columns:1fr; } }
.customer-discovery-table { max-height:385px; overflow:auto; border:1px solid var(--border); border-radius:7px; }
.customer-discovery-table table { table-layout:fixed; min-width:0; width:100%; }
.customer-discovery-table th { position:sticky; top:0; z-index:1; background:#f6f8fb; white-space:normal; }
.customer-discovery-table td,.customer-discovery-table th { padding:9px 14px; }
.customer-discovery-table th:first-child { width:54px; }
.customer-discovery-table th:last-child { width:120px; }
.customer-discovery-table strong { display:block; font-size:11px; line-height:1.7; }
.customer-discovery-table small { display:block; margin-top:3px; color:var(--muted); font-size:10px; overflow-wrap:anywhere; }
.customer-discovery-table .is-selected { background:var(--primary-soft); }
.customer-discovery-table .checkbox-field:has(input:disabled) { cursor:default; }
.customer-discovery-pagination { display:flex; align-items:center; justify-content:space-between; padding:14px 0; border-bottom:1px solid var(--border); }
.customer-preview-history .table-scroll { position:relative; }
.customer-discovery .customer-selection-empty { margin:16px 0 0; color:var(--muted); font-size:11px; }
.customer-selection-review { margin-top:16px; border:1px solid var(--border); border-radius:7px; }
.customer-selection-review>summary { display:flex; align-items:center; gap:12px; padding:10px 14px; font-size:11px; font-weight:600; cursor:pointer; list-style:none; }
.customer-selection-review>summary::-webkit-details-marker { display:none; }
.customer-selection-review>summary>.icon { margin-left:auto; width:14px; }
.customer-selection-review[open]>summary>.icon { transform:rotate(180deg); }
.customer-selection-actions { display:flex; align-items:center; padding:12px 14px; border-top:1px solid var(--border); background:#fbfcfd; border-radius:0 0 7px 7px; }
.customer-selection-review + .form-hint { margin:10px 0 0; }
.customer-selected-list { max-height:220px; overflow:auto; padding:0 14px; }
.customer-selected-list>div { display:flex; justify-content:space-between; align-items:center; gap:15px; border-top:1px solid var(--border); padding:7px 0; }
.customer-selected-list strong { font-size:11px; }
.customer-selected-list small { display:block; margin-top:4px; font-size:10px; color:var(--muted); }
@media(max-width:900px) {
  .customer-discovery-route { grid-template-columns:1fr; }
  .customer-discovery-filters { grid-template-columns:minmax(100px,1fr) 125px 70px; }
  .customer-discovery-filters>.field:first-child { grid-column:1/-1; }
  .customer-discovery-filters>.button { grid-column:3; padding:9px; }
}
@media(max-width:680px) {
  .customer-discovery-heading { flex-direction:column; gap:8px; }
  .customer-discovery-caption { flex-direction:column; gap:5px; }
  .customer-discovery-table td,.customer-discovery-table th { padding:8px; }
  .customer-discovery-table th:first-child { width:36px; }
  .customer-discovery-table th:last-child { width:72px; }
  .customer-discovery-pagination { align-items:start; gap:12px; flex-direction:column; }
  .customer-discovery-filters { grid-template-columns:minmax(110px,1fr) 64px auto; }
}
.preview-policy { display:flex; flex-direction:column; gap:12px; }
.preview-policy .checkbox-field { align-items:flex-start; }
.preview-policy .checkbox-mark { margin-top:2px; }
.preview-policy .checkbox-field strong { font-weight:600; font-size:11px; }
.preview-policy .checkbox-field small { display:block; color:var(--muted); font-size:10px; line-height:1.8; margin-top:4px; }
.preview-policy>.field:last-child { margin-top:5px; }
.preview-selection-grid textarea { display:block; width:100%; resize:vertical; min-height:120px; max-height:330px; border:1px solid #cbd4e0; border-radius:7px; padding:11px; font-size:12px; font-weight:400; line-height:1.8; color:var(--ink); background:white; }
.preview-selection-grid textarea:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px #0085ca20; }
.preview-selection-grid textarea:disabled { background:#f4f6f9; color:#68758b; }
.preview-submit { align-items:center; justify-content:space-between; }
.preview-submit p { margin:0; max-width:520px; }
.preview-submit .button { flex-shrink:0; }
.preview-empty { padding:35px 28px; text-align:center; }
.preview-empty p { max-width:580px; color:var(--muted); margin:15px auto 24px; }
.preview-stale { align-items:center; }
.preview-results { margin-top:32px; }
.preview-results>.page-heading { margin-bottom:15px; }
.preview-results h2 { font-size:19px; margin:0 0 8px; }
.preview-result-totals { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:18px; }
.preview-result-browser { overflow:hidden; }
.preview-result-toolbar { margin:0; border-bottom:1px solid var(--border); }
.preview-result-toolbar .list-filter { flex-basis:210px; }
.preview-record-list { overflow:hidden; }
.preview-record>summary:focus-visible { outline-offset:-2px; }
.preview-record+.preview-record { border-top:1px solid var(--border); }
.preview-record>summary { display:flex; align-items:center; gap:15px; padding:18px 22px; cursor:pointer; list-style:none; }
.preview-record>summary::-webkit-details-marker { display:none; }
.preview-record>summary:hover { background:#f8fafc; }
.preview-record-name { display:flex; flex-direction:column; gap:7px; flex:1; min-width:0; }
.preview-record-name strong { font-size:12px; font-weight:600; }
.preview-record-name small { font-size:10px; color:var(--muted); overflow-wrap:anywhere; }
.preview-record-chevron { color:var(--muted); }
.preview-record-chevron .icon { width:16px; height:16px; }
.preview-record[open]>.preview-record-chevron,.preview-record[open]>summary>.preview-record-chevron { transform:rotate(90deg); }
.preview-record-body { padding:0 22px 22px; }
.preview-record-body h3 { font-size:12px; margin-top:20px; }
.preview-record-body table { table-layout:fixed; }
.preview-record-body td,.preview-record-body th { padding:12px; font-size:11px; vertical-align:top; overflow-wrap:anywhere; }
.preview-value { white-space:pre-wrap; }
.preview-issues { padding:12px 16px 12px 30px; margin:0 0 18px; background:var(--warning-soft); border-radius:7px; color:var(--warning); font-size:11px; line-height:1.9; }
.preview-explanations { margin-top:18px; color:var(--muted); font-size:11px; line-height:1.8; }
.preview-explanations>summary { cursor:pointer; color:var(--primary-dark); }
.preview-explanations dl>div { display:grid; grid-template-columns:140px minmax(0,1fr); gap:15px; padding:7px 0; }
.preview-explanations dt { font-weight:600; }
.preview-explanations dd { margin:0; }
@media(max-width:1100px) {
  .preview-account-grid,.preview-selection-grid { grid-template-columns:1fr; }
  .preview-mapping-main { grid-template-columns:minmax(110px,.8fr) minmax(110px,.8fr) minmax(120px,1fr) auto; gap:10px; }
}
@media(max-width:680px) {
  .preview-add-mapping { flex-wrap:wrap; }
  .preview-add-mapping>.field { flex-basis:100%; max-width:none; }
  .preview-mapping { padding:18px; }
  .preview-mapping-main { grid-template-columns:1fr 1fr; gap:14px; }
  .preview-target { grid-column:1; grid-row:1; }
  .preview-remove { grid-column:2; grid-row:1; justify-self:end; }
  .preview-condition-grid { grid-template-columns:1fr; }
  .preview-condition>summary>span { display:block; margin-left:15px; }
  .preview-account .form-grid { grid-template-columns:1fr; }
  .preview-submit { flex-direction:column; align-items:stretch; }
  .preview-record>summary { gap:10px; padding:17px; flex-wrap:wrap; }
  .preview-record-name { min-width:170px; }
  .preview-record-body { padding:0 17px 18px; }
  .preview-record-chevron { display:none; }
  .preview-record-body table { min-width:440px; }
  .preview-explanations dl>div { grid-template-columns:1fr; gap:3px; }
}
@media(max-width:1100px) { .usage-totals { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:820px) { .usage-budget-grid { grid-template-columns:1fr; } }
@media(max-width:560px) {
  .usage-filters { padding:18px; }
  .usage-filters .field { min-width:100%; }
  .usage-filters .button { width:100%; }
  .usage-totals { gap:10px; }
  .usage-total { padding:16px; }
  .usage-total>strong { font-size:23px; }
  .usage-pagination { flex-wrap:wrap; }
  .usage-window>div { flex-wrap:wrap; gap:5px; }
}

/* Pair selection and review share one bounded workspace, rather than stacked result cards. */
#customer-preview-form { container:customer-selection / inline-size; }
.customer-pair-pickers.is-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.customer-pair-pickers.is-pair>#customer-pair-section { border-left:1px solid var(--border); min-width:0; }
.customer-pair-pickers.is-pair .customer-discovery { min-width:0; }
.customer-pair-pickers.is-pair .customer-discovery-filters { grid-template-columns:minmax(140px,1fr) 90px max-content; gap:14px; }
.customer-pair-pickers.is-pair .customer-discovery-filters>.field:first-child { grid-column:1/-1; }
.customer-pair-pickers.is-pair .customer-discovery-filters>.button { grid-column:auto; min-width:110px; padding-inline:16px; justify-content:center; }
.customer-pair-pickers.is-pair .customer-discovery-table { max-height:350px; overflow:auto; }
.customer-pair-pickers.is-pair .customer-discovery-heading { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:16px; margin-bottom:22px; }
.customer-pair-pickers.is-pair .customer-discovery-heading h3 { margin-bottom:10px; }
.customer-pair-pickers.is-pair .provider-pair { gap:12px; margin:0; min-height:42px; }
.customer-pair-pickers.is-pair .provider-brand { width:128px; height:42px; min-height:42px; padding:10px 12px; }
.customer-pair-pickers.is-pair .provider-brand img { max-height:22px; }
.customer-pair-pickers.is-pair .customer-discovery-heading>.button { margin-top:-4px; }
.customer-pair-pickers.is-pair [id$="discovery-help"] { min-height:40px; margin:12px 0 16px; }
.customer-pair-pickers.is-pair [id$="discovery-results"]>.list-empty { padding:24px 16px; border:1px dashed var(--border); border-radius:7px; background:#fbfcfd; }
.customer-pair-pickers.is-pair .preview-selection-grid { grid-template-columns:minmax(0,1fr); }
.customer-pair-pickers.is-pair .customer-discovery-pagination { flex-wrap:wrap; gap:10px; }
.customer-pair-drafts { border-top:1px solid var(--border); }
.customer-pair-draft-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:16px; }
.customer-pair-draft-heading h3 { margin:0 0 6px; font-size:13px; }
.customer-pair-draft-heading p { margin:0; }
.customer-pair-draft-heading>.button { flex-shrink:0; }
.customer-pair-draft-table { max-height:240px; overflow:auto; border:1px solid var(--border); border-radius:7px; }
.customer-pair-draft-table table { min-width:440px; }
.customer-pair-draft-table td:last-child { text-align:right; }
.customer-pair-draft-table + .form-hint { margin:14px 0 6px; }
.customer-pair-drafts > .form-hint { margin:6px 0 0; }
.customer-link-workspace.has-queue { display:grid; grid-template-columns:260px minmax(0,1fr); }
.customer-link-queue { max-height:570px; overflow:auto; padding:14px; border-right:1px solid var(--border); background:#f8fafc; }
.customer-link-queue>p { margin:0 8px 12px; font-size:10px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.customer-link-queue-item { display:flex; align-items:flex-start; gap:10px; width:100%; padding:12px; margin-bottom:6px; border:1px solid transparent; border-radius:7px; background:transparent; color:var(--ink); text-align:left; cursor:pointer; }
.customer-link-queue-item:hover { background:var(--surface); }
.customer-link-queue-item.is-current { background:var(--primary-soft); border-color:#c9ddec; }
.customer-link-queue-item>span:last-child { min-width:0; }
.customer-link-queue-item strong,.customer-link-queue-item small { display:block; overflow-wrap:anywhere; }
.customer-link-queue-item strong { font-size:11px; line-height:1.6; }
.customer-link-queue-item small { margin-top:4px; font-size:10px; color:var(--muted); line-height:1.5; }
.customer-link-queue-number { display:grid; place-items:center; width:23px; height:23px; border-radius:50%; background:var(--surface); color:var(--primary-dark); font-size:10px; flex-shrink:0; }
.customer-link-detail { min-width:0; padding:22px; }
.customer-pair-identities { display:grid; grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr); gap:16px; align-items:center; padding-bottom:20px; }
.customer-pair-identities>span { color:var(--primary); }
.customer-pair-identity { min-width:0; }
.customer-pair-identity>span,.customer-pair-identity>strong,.customer-pair-identity>small { display:block; overflow-wrap:anywhere; }
.customer-pair-identity>span { color:var(--muted); font-size:10px; margin-bottom:8px; }
.customer-pair-identity>strong { font-size:13px; line-height:1.6; }
.customer-pair-identity>small { color:var(--muted); font-size:10px; margin-top:5px; }
.customer-pair-comparison-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 0; border-top:1px solid var(--border); }
.customer-pair-comparison-heading h3 { font-size:12px; margin:0; }
.customer-pair-comparison-heading label { font-size:11px; }
.customer-pair-comparison { max-height:280px; overflow:auto; border:1px solid var(--border); border-radius:7px; }
.customer-pair-comparison table { table-layout:fixed; width:100%; min-width:420px; }
.customer-pair-comparison th,.customer-pair-comparison td { padding:11px 14px; font-size:11px; overflow-wrap:anywhere; white-space:pre-wrap; }
.customer-pair-comparison th:first-child { width:25%; }
.customer-pair-comparison thead th { position:sticky; top:0; background:#f7f9fb; z-index:1; }
.customer-pair-comparison tbody th { text-transform:none; letter-spacing:normal; font-weight:500; color:var(--ink); }
.customer-pair-comparison [data-different] td { background:#f5faff; }
.customer-pair-comparison-note { margin:0 0 14px; }
.customer-pair-additional { margin-top:16px; font-size:11px; }
.customer-pair-additional>summary { cursor:pointer; color:var(--primary-dark); }
.customer-pair-additional>p { margin:12px 0; }
.customer-pair-additional-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:24px; max-height:280px; overflow:auto; }
.customer-pair-additional-grid h4 { margin:0 0 10px; }
.customer-pair-additional-grid dl { margin:0; }
.customer-pair-additional-grid dl>div { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; padding:10px 0; border-top:1px solid var(--border); }
.customer-pair-additional-grid dt,.customer-pair-additional-grid dd { margin:0; overflow-wrap:anywhere; white-space:pre-wrap; }
.customer-pair-additional-grid dt { color:var(--muted); }
.customer-link-decision { display:grid; gap:14px; margin-top:18px; }
.customer-link-decision>p { margin:0; }
.customer-link-decision .notice { font-size:11px; line-height:1.7; align-items:flex-start; }
.customer-link-decision .checkbox-control { width:100%; }
.customer-link-review-footer { align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px; }
.customer-link-review-footer>.form-hint { margin:0; }
.customer-link-review-footer .page-actions { flex-wrap:wrap; gap:10px; }
@media(max-width:1000px) {
  .customer-link-workspace.has-queue { grid-template-columns:210px minmax(0,1fr); }
}
@container customer-selection (max-width:1000px) {
  .customer-pair-pickers.is-pair { grid-template-columns:minmax(0,1fr); }
  .customer-pair-pickers.is-pair>#customer-pair-section { border-left:0; }
}
@container customer-selection (max-width:520px) {
  .customer-pair-pickers.is-pair .customer-discovery-filters { grid-template-columns:minmax(0,1fr) 90px; }
  .customer-pair-pickers.is-pair .customer-discovery-filters>.button { grid-column:1/-1; width:100%; }
  .customer-pair-pickers.is-pair .customer-discovery-heading { grid-template-columns:minmax(0,1fr); gap:12px; }
  .customer-pair-pickers.is-pair .customer-discovery-heading>.button { justify-self:start; margin:0; }
}
@media(max-width:680px) {
  .customer-link-workspace.has-queue { grid-template-columns:minmax(0,1fr); }
  .customer-link-queue { display:flex; gap:8px; max-height:none; border-right:0; border-bottom:1px solid var(--border); }
  .customer-link-queue>p { display:none; }
  .customer-link-queue-item { flex:0 0 210px; margin:0; }
  .customer-link-detail { padding:18px; }
  .customer-pair-identities { gap:10px; }
  .customer-pair-draft-heading { align-items:flex-start; flex-direction:column; gap:12px; }
  .customer-link-review-footer .page-actions { width:100%; }
  .customer-link-review-footer [data-approve-link] { margin-left:auto; }
}

.execution-controls { margin-block:22px; }
.execution-checks { display:flex; flex-wrap:wrap; gap:14px 24px; margin-bottom:16px; }
.execution-checks>span { display:flex; align-items:center; gap:10px; }
.execution-controls .surface-footer { align-items:center; flex-wrap:wrap; gap:12px; }
.execution-controls .surface-footer p { flex:1 1 260px; margin:0; }
.workflow-bulk-actions { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:16px 0; }
.workflow-select { width:56px; }
.workflow-select .checkbox-field { min-height:32px; width:32px; padding:5px; border:0; background:transparent; }
.workflow-select .checkbox-field>span:last-child { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.workflow-delete-list { max-height:240px; overflow:auto; padding-left:24px; }
.execution-audit { display:grid; gap:10px; padding-left:20px; }


/* Workflow overview: operational controls share one grid and administration stays secondary. */
.workflow-overview-heading,.workflow-title-meta,.workflow-overview-nav {display:flex;align-items:center;gap:14px;}
.workflow-overview-heading {justify-content:space-between;align-items:flex-start;margin-bottom:22px;}
.workflow-overview-heading h1 {font-size:27px;line-height:1.25;margin:10px 0;overflow-wrap:anywhere;}
.workflow-overview-heading p {font-size:12px;color:var(--muted);margin:0;line-height:1.7;}
.workflow-overview-heading .page-actions {flex-shrink:0;align-self:center;}
.workflow-overview-nav {gap:5px;margin-bottom:22px;padding:5px;border:1px solid var(--border);border-radius:9px;background:white;overflow-x:auto;scrollbar-width:thin;}
.workflow-overview-nav a {display:flex;align-items:center;gap:8px;min-height:40px;white-space:nowrap;padding:8px 13px;color:var(--muted);border:1px solid transparent;border-radius:6px;font-size:12px;font-weight:500;}
.workflow-overview-nav a:hover {color:var(--ink);background:#f1f6fa;}
.workflow-overview-nav a[aria-current] {color:var(--primary-dark);background:var(--primary-soft);border-color:#c9dfee;font-weight:600;}
.workflow-overview-nav a[aria-current]>.icon {color:var(--primary);}
.workflow-overview-nav a:focus-visible {outline-offset:-2px;}
.workflow-overview-grid {display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:20px;margin-bottom:22px;}
.workflow-overview-grid>*,.workflow-recent-row>* {min-width:0;}
.workflow-routes-panel,.workflow-readiness {display:flex;flex-direction:column;height:100%;}
.workflow-overview .surface-heading {align-items:center;gap:12px;}
.workflow-overview .surface-heading h2 {font-size:14px;}
.workflow-overview .surface-heading p {font-size:11px;line-height:1.6;}
.workflow-route-list {padding:18px;max-height:360px;overflow-y:auto;}
.workflow-route-card {padding:16px;border:1px solid var(--border);border-radius:8px;background:#fafcfe;}
.workflow-route-card+.workflow-route-card {margin-top:12px;}
.workflow-route-card h3 {font-size:12px;margin:0 0 18px;overflow-wrap:anywhere;}
.workflow-route-direction {display:grid;grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr);align-items:center;gap:12px;}
.workflow-route-direction>div {display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-width:0;}
.workflow-route-direction .provider-brand {height:28px;max-width:100%;}
.workflow-route-direction .provider-brand img {max-width:100%;max-height:28px;width:auto;object-fit:contain;}
.workflow-route-direction>div>span:last-child {font-size:11px;color:var(--muted);overflow-wrap:anywhere;}
.workflow-route-arrow {color:var(--primary);}
.workflow-route-facts {display:flex;gap:8px 16px;flex-wrap:wrap;font-size:10px;color:var(--muted);border-top:1px solid var(--border);padding-top:14px;margin-top:18px;}
.workflow-panel-note {margin-top:auto;border-top:1px solid var(--border);padding:14px 20px;display:flex;align-items:center;gap:8px;color:var(--muted);font-size:10px;}
.workflow-readiness-state {display:flex;align-items:flex-start;gap:12px;padding:16px 20px;background:#f5f8fb;border-bottom:1px solid var(--border);}
.workflow-readiness-state.is-ready {background:#f1faf7;}
.workflow-readiness-state>.icon {margin-top:2px;flex-shrink:0;}
.workflow-readiness-state strong {font-size:12px;}
.workflow-readiness-state p {font-size:11px;line-height:1.6;color:var(--muted);margin:5px 0 0;}
.workflow-gates {list-style:none;padding:0 20px;margin:0;}
.workflow-gates li {display:grid;grid-template-columns:26px minmax(0,1fr) auto;align-items:center;gap:9px;padding:12px 0;border-bottom:1px solid var(--border);}
.workflow-gates strong {display:block;font-size:11px;font-weight:600;}
.workflow-gates small {display:block;font-size:10px;color:var(--muted);margin-top:4px;line-height:1.5;}
.workflow-gate-icon {color:var(--muted);}
.workflow-gate-icon.is-ready,.workflow-readiness-state.is-ready>.icon {color:#16806a;}
.workflow-readiness-actions {display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:16px 20px 10px;margin-top:auto;}
.workflow-execution-help {padding:0 20px 16px;color:var(--muted);font-size:10px;line-height:1.7;}
.workflow-execution-help p {margin:8px 0 0;}
.workflow-recent {margin-bottom:22px;}
.workflow-recent-row {display:grid;grid-template-columns:32px minmax(0,1fr) auto 16px;align-items:center;gap:12px;padding:16px 22px;color:var(--ink);}
.workflow-recent-row+.workflow-recent-row {border-top:1px solid var(--border);}
.workflow-recent-row:hover {background:#f7fafc;text-decoration:none;}
.workflow-recent-row strong {font-size:12px;}
.workflow-recent-row small {display:block;font-size:10px;color:var(--muted);margin-top:5px;}
.workflow-run-icon {display:grid;place-items:center;width:32px;height:32px;background:#eef6fc;color:var(--primary-dark);border-radius:8px;}
.workflow-empty {padding:22px;text-align:center;}
.workflow-empty h3 {font-size:13px;margin:10px 0 6px;}
.workflow-empty p {font-size:11px;line-height:1.7;color:var(--muted);margin:0 0 12px;}
.workflow-empty-inline {display:flex;align-items:center;gap:16px;text-align:left;}
.workflow-empty-inline h3 {margin-top:0;}
.workflow-empty-inline p {margin-bottom:0;}
.workflow-actions-menu {position:relative;font-size:11px;}
.workflow-actions-menu>summary {display:flex;align-items:center;gap:8px;list-style:none;cursor:pointer;padding:8px;color:var(--muted);border-radius:6px;}
.workflow-actions-menu>summary::-webkit-details-marker {display:none;}
.workflow-actions-menu>summary:hover {background:#eaf0f6;}
.workflow-actions-popover {position:absolute;right:0;top:100%;z-index:8;min-width:215px;background:white;border:1px solid var(--border);border-radius:8px;padding:6px;box-shadow:0 6px 24px #17203318;}
.workflow-actions-popover>a,.workflow-actions-popover>button {display:flex;align-items:center;gap:10px;width:100%;border:0;background:none;padding:12px;text-align:left;font:inherit;color:var(--ink);cursor:pointer;border-radius:5px;}
.workflow-actions-popover>a:hover,.workflow-actions-popover>button:hover {background:#f3f7fb;}
.workflow-actions-popover>.workflow-delete-action {color:#b42318;border-top:1px solid var(--border);border-radius:0;margin-top:4px;}
@media(max-width:1000px){.workflow-overview-heading{flex-direction:column;}.workflow-overview-heading .page-actions{align-self:flex-start;}}
@media(max-width:820px){.workflow-overview-grid{grid-template-columns:minmax(0,1fr);}.workflow-readiness{height:auto;}.workflow-route-list{max-height:320px;}}
@media(max-width:480px){.workflow-actions-menu>summary{font-size:10px;}.workflow-overview-heading h1{font-size:23px;}.workflow-overview-nav{gap:4px;}.workflow-overview-nav a{padding:8px 10px;}.workflow-recent-row{padding:14px;gap:8px;grid-template-columns:minmax(0,1fr) auto 14px;}.workflow-run-icon{display:none;}.workflow-route-direction{gap:8px;}.workflow-route-card{padding:12px;}}
.customer-conflict-action {display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px;margin:18px 0;background:#f6f9fc;border:1px solid var(--border);border-radius:8px;}
.customer-conflict-action strong {font-size:12px;}
.customer-conflict-action p {font-size:11px;line-height:1.6;color:var(--muted);margin:6px 0 0;max-width:650px;}
.customer-conflict-action button {flex-shrink:0;}
.preview-record-choice[hidden] {display:none;}
@media(max-width:680px){.customer-conflict-action{align-items:stretch;flex-direction:column;}}


/* Shared workflow navigation and guided customer runs. */
[data-workflow-panel] { min-width:0; }
.workflow-section-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; margin:22px 0; }
.workflow-section-heading h2 { font-size:18px; margin:0 0 6px; }
.workflow-section-heading p { color:var(--muted); font-size:12px; margin:0; }
.workflow-detail-heading.workflow-section-heading { flex-wrap:wrap; margin:22px 0 18px; }
.workflow-detail-heading.page-heading { flex-wrap:wrap; }
.workflow-detail-heading .page-actions { margin-left:auto; }
.workflow-routes-panel { height:auto; align-self:start; }
.workflow-route-row { padding:16px; border:1px solid var(--border); border-radius:8px; background:#f8fafc; }
.workflow-route-row+.workflow-route-row { margin-top:10px; }
.workflow-route-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.workflow-route-heading h3 { min-width:0; font-size:12px; line-height:1.5; margin:0; overflow-wrap:anywhere; }
.workflow-route-count { flex-shrink:0; padding:4px 7px; border-radius:5px; background:#edf1f6; color:var(--muted); font-size:10px; white-space:nowrap; }
.workflow-route-endpoints { display:grid; grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr); gap:14px; align-items:center; }
.workflow-route-endpoints>div { min-width:0; }
.workflow-route-endpoints strong { display:block; font-size:12px; line-height:1.5; }
.workflow-route-endpoints>div>span { display:block; color:var(--muted); font-size:10px; margin-top:3px; overflow-wrap:anywhere; }
.workflow-route-endpoints .workflow-route-arrow { display:grid; place-items:center; width:28px; height:28px; color:var(--primary-dark); background:var(--primary-soft); border-radius:50%; }
.workflow-route-behavior { margin:14px 0 0; color:var(--muted); font-size:10px; }
.customer-run-steps { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); list-style:none; padding:0; margin:20px 0; border:1px solid var(--border); border-radius:10px; background:var(--surface); overflow:hidden; }
.customer-run-steps li { display:flex; align-items:center; gap:10px; padding:14px; font-size:11px; color:var(--muted); border-right:1px solid var(--border); }
.customer-run-steps li:last-child { border-right:0; }
.customer-run-steps li.is-current { color:var(--primary-dark); background:var(--primary-soft); font-weight:600; }
.customer-run-steps li.is-complete { color:#21715d; }
.customer-run-steps li>span:first-child { display:grid; place-items:center; border-radius:50%; width:24px; height:24px; flex-shrink:0; background:#f2f5f9; }
.customer-run-steps .is-current>span:first-child { background:var(--primary); color:white; }
.customer-run-steps .icon { width:14px; height:14px; }
.customer-run-live { display:flex; align-items:center; gap:9px; padding:10px 0 18px; color:var(--muted); font-size:11px; }
.customer-run-live strong { color:#21715d; font-size:11px; }
.live-dot { width:7px; height:7px; border-radius:50%; background:#278368; box-shadow:0 0 0 4px #27836812; }
[data-state="checking"] .live-dot { animation:live-pulse 1s ease-in-out infinite; }
[data-state="reconnecting"] .live-dot,[data-state="paused"] .live-dot { background:#af7920; }
@keyframes live-pulse { 50% { opacity:.3; } }
.customer-confirm-list { list-style:none; padding:0; max-height:220px; overflow:auto; }
.customer-confirm-list li { display:flex; gap:16px; justify-content:space-between; padding:10px 0; border-bottom:1px solid var(--border); font-size:12px; }
.customer-preview-history>summary { padding:18px 22px; cursor:pointer; font-weight:600; font-size:12px; }
.mapping-field-footer { display:flex; align-items:center; justify-content:space-between; color:var(--muted); font-size:10px; padding-top:8px; }
.provider-reference-results { max-height:none; overflow:visible; scrollbar-gutter:auto; }
.provider-reference-option { padding:7px 10px; }
.provider-reference-option strong { font-size:12px; }
.provider-reference-option small { font-size:10px; }
/* Customizable native menus preserve native forms, validation and keyboard behaviour. */
@supports (appearance:base-select) {
  select:not([multiple]), select:not([multiple])::picker(select) { appearance:base-select; }
  select:not([multiple]) { background-image:none; display:flex; align-items:center; min-height:42px; padding:8px 12px; gap:10px; }
  select:not([multiple])::picker-icon { content:""; color:var(--muted); width:6px; height:6px; border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(45deg); transition:transform .15s; }
  select:not([multiple]):open::picker-icon { transform:rotate(225deg); }
  select:not([multiple])::picker(select) { font:inherit; color:var(--ink); background:var(--surface); border:1px solid var(--border); border-radius:8px; box-shadow:0 6px 24px #17203324; padding:5px; margin-top:4px; max-height:280px; overflow:auto; }
  select:not([multiple]) option { min-height:34px; padding:8px 10px; border-radius:4px; font-size:12px; gap:12px; }
  select:not([multiple]) option:checked { background:var(--primary-soft); color:var(--primary-dark); }
  select:not([multiple]) option:hover { background:#f2f6fa; }
  select:not([multiple]) option:focus-visible { background:#f2f6fa; outline:1px solid #718ba4; outline-offset:-2px; }
  select:not([multiple]) option::checkmark { color:var(--primary); order:1; margin-left:auto; }
}
@media(max-width:650px) {
  .customer-run-steps { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .customer-run-steps li { padding:10px; font-size:10px; }
  .workflow-route-heading { align-items:flex-start; flex-wrap:wrap; gap:6px; }
  .workflow-route-endpoints { gap:8px; }
  .customer-run-live { flex-wrap:wrap; }
}
@media(prefers-reduced-motion:reduce) { .live-dot { animation:none !important; } }

.customer-run-steps-short { grid-template-columns:repeat(2,minmax(0,1fr)); }
.workflow-breadcrumb { margin-bottom:22px; color:var(--muted); font-size:11px; }
.workflow-breadcrumb ol { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; list-style:none; margin:0; padding:0; }
.workflow-breadcrumb li { display:flex; align-items:center; gap:12px; min-width:0; }
.workflow-breadcrumb a { color:var(--muted); overflow-wrap:anywhere; }
.workflow-breadcrumb a:hover { color:var(--primary-dark); text-decoration:none; }
.workflow-breadcrumb [aria-current] { color:var(--ink); }
.workflow-breadcrumb .icon { width:11px; height:11px; flex-shrink:0; }
.workflow-topbar { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:50px; margin-bottom:22px; padding:6px 8px; border:1px solid var(--border); border-radius:9px; background:#f8fafc; }
.workflow-topbar .workflow-breadcrumb { flex:1 1 auto; min-width:0; margin:0; }
.workflow-topbar .workflow-breadcrumb ol { flex-wrap:nowrap; gap:0; overflow:hidden; }
.workflow-topbar .workflow-breadcrumb li { min-width:0; gap:0; }
.workflow-topbar .workflow-breadcrumb li:first-child { flex:none; }
.workflow-topbar .workflow-breadcrumb li>a,.workflow-topbar .workflow-breadcrumb li>.workflow-crumb-current { display:inline-flex; align-items:center; gap:7px; min-width:0; min-height:34px; max-width:100%; padding:5px 9px; border-radius:6px; white-space:nowrap; }
.workflow-topbar .workflow-breadcrumb li>a:hover { background:#f1f6fa; }
.workflow-topbar .workflow-breadcrumb li>.workflow-crumb-current { color:var(--ink); background:transparent; font-weight:600; }
.workflow-topbar .workflow-crumb-root { color:var(--primary-dark); font-weight:600; }
.workflow-topbar .workflow-crumb-root>.icon { width:15px; height:15px; }
.workflow-topbar .workflow-crumb-label { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.workflow-topbar .workflow-breadcrumb li:nth-child(2) .workflow-crumb-label { max-width:min(42vw,460px); }
.workflow-topbar .workflow-breadcrumb li:nth-child(n+3) .workflow-crumb-label { max-width:min(25vw,240px); }
.workflow-topbar .workflow-crumb-separator { display:inline-flex; align-items:center; color:#9aa9bb; padding:0 2px; }
.workflow-topbar .workflow-topbar-actions { flex:none; margin-left:auto; }
.workflow-topbar .workflow-actions-menu>summary { min-height:34px; padding:6px 10px; border:1px solid transparent; color:#425068; font-weight:600; }
.workflow-topbar .workflow-actions-menu>summary:hover,.workflow-topbar .workflow-actions-menu[open]>summary { background:#f1f6fa; border-color:#dce6ef; }
@media(max-width:640px) {
  .workflow-topbar { flex-wrap:wrap; gap:4px 10px; }
  .workflow-topbar .workflow-breadcrumb { flex-basis:100%; }
  .workflow-topbar .workflow-breadcrumb ol { overflow-x:auto; scrollbar-width:thin; }
  .workflow-topbar .workflow-breadcrumb li:nth-child(n+3) { flex:none; }
  .workflow-topbar .workflow-breadcrumb li:nth-child(2) .workflow-crumb-label { max-width:50vw; }
  .workflow-topbar .workflow-breadcrumb li:nth-child(n+3) .workflow-crumb-label { max-width:35vw; }
}
.page-heading > .financial-return-actions { align-items:center; min-width:0; flex-shrink:1; }
.financial-return-actions > .button { max-width:100%; text-align:left; overflow-wrap:anywhere; }
.financial-return-actions > .button > .icon { flex-shrink:0; }



/* Confirmation keeps its actions visible while the selected list grows. */
dialog:has(.customer-run-confirmation,.financial-run-confirmation) { width:min(740px,calc(100% - 32px)); overflow:hidden; }
dialog:has(.customer-run-confirmation,.financial-run-confirmation)>form { display:flex; flex-direction:column; max-height:calc(100dvh - 42px); }
dialog:has(.customer-run-confirmation,.financial-run-confirmation) .dialog-header,dialog:has(.customer-run-confirmation,.financial-run-confirmation) .dialog-footer { flex-shrink:0; }
dialog:has(.customer-run-confirmation,.financial-run-confirmation) .dialog-body { overflow-y:auto; min-height:0; }
.customer-confirm-route { display:grid; grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr); align-items:center; gap:18px; padding:14px 16px; border:1px solid var(--border); border-radius:8px; background:#f8fafc; }
.customer-confirm-route>div { display:grid; gap:5px; min-width:0; }
.customer-confirm-route small,.customer-confirm-route span { color:var(--muted); font-size:10px; }
.customer-confirm-route strong { font-size:12px; }
.customer-confirm-route>div>span { overflow-wrap:anywhere; }
.customer-confirm-route .icon { width:18px; }
.customer-confirm-message { margin:16px 0; color:var(--muted); font-size:11px; line-height:1.7; }
.customer-confirm-message strong { color:var(--ink); }
.customer-confirm-selection { border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.customer-confirm-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; background:#f8fafc; border-bottom:1px solid var(--border); }
.customer-confirm-toolbar>strong { font-size:12px; }
.customer-confirm-toolbar>.field { flex:0 1 240px; min-width:0; }
.customer-confirm-toolbar input { min-height:36px; padding:7px 10px; font-size:11px; }
.customer-confirm-rows { list-style:none; margin:0; padding:0; }
.customer-confirm-rows>li { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:10px 14px; border-bottom:1px solid var(--border); font-size:11px; }
.customer-confirm-rows>li:last-child { border-bottom:0; }
.customer-confirm-rows>li>span:first-child { min-width:0; overflow-wrap:anywhere; }
.customer-confirm-rows>li>span:last-child:not(:first-child) { text-align:right; flex-shrink:0; }
.customer-confirm-rows small { display:block; color:var(--muted); font-size:10px; margin-top:4px; }
.customer-confirm-selection .list-pagination { padding:12px 14px; }
.customer-confirm-help { margin:12px 0; }
.customer-confirm-reference { color:var(--muted); font-size:10px; }
.customer-confirm-reference summary { cursor:pointer; }
.customer-confirm-reference p { overflow-wrap:anywhere; }
@media(max-width:580px) { .customer-confirm-toolbar { align-items:stretch; flex-direction:column; } .customer-confirm-toolbar>.field { flex-basis:auto; } }

/* Shared relationship list and guided resolution use the same control geometry as workflow lists. */
.record-links table { min-width:850px; }
.record-link-pair small { display:block; margin-top:6px; font-size:11px; color:var(--muted); }
.record-links .table-actions { white-space: nowrap; }
.record-resolution-fields { display: grid; gap: 16px; }
.record-resolution-fields[hidden] { display: none; }
.record-link-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.record-link-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: center; margin: 16px 0; }
[data-review-result]:not(:empty) { margin-top: 20px; }
[data-review-result] .notice { display: block; }
.dialog-body:has(.record-resolution-fields) > .field,
.dialog-body:has(.record-resolution-fields) > .record-resolution-fields { margin-bottom: 20px; }
.record-link-history { padding: 16px 0; border-bottom: 1px solid var(--border, #dbe2ed); }
.record-link-history small { display: block; margin-top: 6px; color: var(--muted); }
.record-presence { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11px; color: var(--success); }
.record-presence-warning { color: var(--warning); font-weight: 600; }
.record-presence .icon { width: 14px; height: 14px; flex-shrink: 0; }
.record-link-health { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border: 1px solid #eadcb4; border-radius: 7px; background: var(--warning-soft); color: var(--warning); font-size: 12px; line-height: 1.6; }
.record-link-health > .icon { flex-shrink: 0; margin-top: 2px; }
.record-link-health p { margin: 4px 0 0; color: inherit; }
.dialog-body > .record-link-health { margin-bottom: 20px; }
.dialog-body:has(.record-resolution-fields) textarea { padding: 10px 12px; min-height: 76px; border: 1px solid #c7d3e2; border-radius: 6px; font: inherit; font-weight: 400; color: var(--text); background: white; resize: vertical; }
dialog:has(.record-resolution-fields) { width: min(680px, calc(100vw - 32px)); max-width: 680px; max-height: calc(100dvh - 32px); overflow: hidden; }
dialog:has(.record-resolution-fields) form { display: flex; flex-direction: column; max-height: calc(100dvh - 36px); }
dialog:has(.record-resolution-fields) .dialog-header,
dialog:has(.record-resolution-fields) .dialog-footer { flex-shrink: 0; }
dialog:has(.record-resolution-fields) .dialog-body { min-height: 0; overflow-y: auto; }
@media (max-width: 640px) {
  .record-links .table-actions>.button { display:block; margin:0; }
  .record-links .table-actions>.button+.button { margin-inline-start:0; margin-block-start:var(--row-action-gap); }
}


/* Shared progressive discovery and platform controls. */
.customer-discovery-progress { display:flex; align-items:center; gap:10px; margin:12px 0; padding:10px 0; border-bottom:1px solid var(--border); }
.customer-discovery-progress > div { flex:1; min-width:0; }
.customer-discovery-status { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 16px; font-size:12px; }
.customer-discovery-status>span { color:var(--muted); font-size:11px; }
.customer-discovery-progress small { display:block; margin-top:5px; color:var(--muted); }
.customer-discovery-progress-icon { color:var(--primary); display:flex; }
.customer-discovery-elapsed { color:var(--muted); font-variant-numeric:tabular-nums; }
.platform-permission-cell { display:flex; align-items:center; justify-content:space-between; gap:1rem; max-width:15rem; }
.rule-value [data-composition] { display:grid; gap:14px; padding-top:22px; }
.composition-heading { display:flex; flex-wrap:wrap; align-items:baseline; gap:8px 14px; }
.composition-heading strong,.composition-preview strong { font-size:12px; }
.composition-heading>span,.composition-add>span,.composition-preview small { font-size:11px; color:var(--muted); line-height:1.6; }
.composition-parts { list-style:none; display:grid; gap:8px; margin:0; padding:0; }
.composition-part { display:grid; grid-template-columns:24px 34px minmax(0,1fr) auto; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:var(--surface); }
.composition-number { display:grid; place-items:center; width:24px; height:24px; border-radius:50%; background:var(--primary-soft); color:var(--primary-dark); font-size:11px; font-weight:600; }
.composition-kind { font-size:11px; color:var(--muted); }
.composition-input,.composition-joining { min-width:0; }
.composition-input .field,.composition-joining .field { margin:0; }
.composition-input input,.composition-input .provider-reference-choice { width:100%; min-height:40px; }
.composition-input .provider-reference-label { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.composition-actions { display:flex; align-items:center; gap:2px; }
.composition-actions .icon-button { width:32px; height:36px; }
.composition-add { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.composition-add>span { margin-left:auto; }
.composition-settings { display:grid; grid-template-columns:minmax(190px,.7fr) minmax(0,1.3fr); gap:20px; padding-top:6px; }
.composition-joining { display:grid; align-content:start; gap:12px; }
.composition-joining .checkbox-field { justify-self:start; }
.composition-preview { display:grid; align-content:start; gap:12px; padding:16px; border:1px solid var(--border); border-radius:8px; background:var(--surface); }
.composition-tokens { display:flex; flex-wrap:wrap; align-items:center; gap:7px; min-height:32px; }
.composition-token { border:1px solid #c4deee; border-radius:5px; background:var(--primary-soft); color:var(--primary-dark); padding:5px 9px; font-size:12px; overflow-wrap:anywhere; max-width:100%; }
.composition-literal { white-space:pre-wrap; overflow-wrap:anywhere; max-width:100%; font-size:12px; }
.composition-join { color:var(--muted); white-space:pre-wrap; overflow-wrap:anywhere; max-width:100%; }
.composition-join:empty { display:none; }
.composition-tokens:has(.composition-line-break) { flex-direction:column; align-items:flex-start; }
.composition-line-break { display:none; }
.composition-help { font-size:11px; color:var(--muted); }
.composition-help summary { cursor:pointer; padding:4px 0; }
.composition-help p { margin:8px 0 0; line-height:1.7; }
.customer-pair-value-note { display:block; margin-top:6px; color:var(--muted); font-size:11px; line-height:1.6; }
@media(max-width:700px) {
  .composition-settings { grid-template-columns:minmax(0,1fr); gap:14px; }
  .composition-part { grid-template-columns:24px minmax(0,1fr) auto; gap:8px; }
  .composition-kind { display:none; }
  .composition-actions { gap:0; }
  .composition-actions .icon-button { width:28px; }
}
@media(max-width:440px) {
  .composition-part { grid-template-columns:24px minmax(0,1fr); }
  .composition-actions { grid-column:2; justify-self:end; }
}
@media (max-width:680px) { .customer-discovery-progress { flex-wrap:wrap; }.customer-discovery-progress > div { flex-basis:75%; } }

/* Financial workflows share the existing surfaces, field rules and reference controls. */

/* Financial workflows share the workflow shell and route configuration components. */
.financial-config-group { margin-top:24px; padding-top:22px; border-top:1px solid var(--border); }
.financial-config-group h3 { margin:0 0 10px; font-size:14px; }
.financial-config-group > .form-hint { margin:10px 0 0; }
.financial-policy-options { display:grid; gap:12px; }
.financial-route-editor .preview-account>[data-company-picker],.financial-route-editor .preview-account>[data-entity-picker] { margin-top:16px; }
[data-route-options] { max-height:min(300px,45dvh); overflow:auto; }
.financial-tax-rule { grid-template-columns:1fr 1.5fr 1fr .8fr auto; align-items:end; gap:14px; padding:18px 0; border-bottom:1px solid var(--border); }
.financial-document-search { display:flex; gap:14px; align-items:end; }
.financial-document-search>.field { flex:1; max-width:520px; }
.financial-preview-totals { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin:20px 0; padding:18px; background:var(--canvas); border:1px solid var(--border); border-radius:8px; }
.financial-preview-totals p { margin:0; line-height:1.8; }
[data-sales-work] .surface-footer { flex-wrap:wrap; }
[data-sales-work] td small { display:block; margin-top:5px; color:var(--muted); }
[data-sales-work] .notice ul { margin:0; padding-left:18px; }
@media(max-width:1000px) { .financial-tax-rule { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:620px) { .financial-tax-rule { grid-template-columns:1fr; } .financial-document-search { align-items:stretch; flex-direction:column; } .financial-preview-totals { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Shared record routing and entity-aware tax profile editors. */
.entity-routing-editor { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.routing-heading, .routing-step-title, .routing-source-row, .routing-row-actions, .tax-library-toolbar, .tax-library-actions, .routing-decision { display: flex; align-items: center; gap: .75rem; }
.routing-heading { justify-content: space-between; gap: 1rem; }
.routing-heading h3, .routing-step-title h4 { margin: 0; }
.routing-heading p, .routing-step-title p, .routing-decision p { margin: .25rem 0 0; }
.routing-content { display: grid; gap: .875rem; margin-top: 1rem; }
.routing-step { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.125rem 1.25rem 1.25rem; background: var(--surface); }
.routing-step-title { align-items: flex-start; margin-bottom: 1rem; }
.routing-number, .routing-order { flex: 0 0 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; color: var(--primary); background: var(--canvas); font-size: .8rem; font-weight: 600; }
.routing-step > [data-routing-sources], .routing-step > [data-routing-mappings], .routing-step > .form-grid { margin-left: 2.35rem; }
.routing-source-row { margin: 0 0 .5rem; }
.routing-source-row:last-child { margin-bottom: 0; }
.routing-source-row > .field { flex: 1; }
.routing-row-actions { gap: .125rem; }
.routing-step [data-source-add], .routing-step [data-mapping-add] { margin: 1rem 0 0 2.35rem; }
.routing-mapping-row { display: grid; align-items: start; gap: .75rem; padding: .9rem 0; border-bottom: 1px solid var(--border); }
.routing-mapping-row, .routing-fallback .form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; column-gap: .75rem; }
.routing-mapping-row:first-child { padding-top: 0; }
.routing-mapping-row:last-child { padding-bottom: 0; border-bottom: 0; }
.routing-values-field { gap: 8px; }
.routing-values-control { display:flex; align-items:center; flex-wrap:wrap; gap:.35rem; min-height:43px; padding:4px 6px; border:1px solid #cbd4e0; border-radius:7px; background:white; transition:border-color .12s,box-shadow .12s; }
.routing-values-control:hover { border-color:#8ca1b5; }
.routing-values-control:focus-within { border-color:var(--primary); box-shadow:0 0 0 3px #0085ca20; }
.routing-values-control input:not([type=checkbox]) { flex:1 1 8rem; width:auto; min-width:6rem; min-height:31px; padding:5px 6px; border:0; box-shadow:none; background:transparent; }
.routing-values-control input:not([type=checkbox]):focus { border:0; box-shadow:none; }
.routing-value-chip { display:inline-flex; align-items:center; gap:.35rem; max-width:100%; min-height:28px; padding:3px 7px; border:1px solid #cbdde9; border-radius:5px; background:var(--primary-soft); color:var(--ink); font-size:11px; font-weight:500; cursor:pointer; }
.routing-value-chip span { overflow-wrap:anywhere; }
.routing-value-chip .icon { flex-shrink:0; width:10px; height:10px; color:var(--muted); }
.routing-value-chip:hover { background:#e1eff9; }
.entity-routing-editor .provider-reference-compact > .provider-reference-choice { height:43px; min-height:43px; padding:9px 11px; }
.routing-mapping-remove { margin-top:30px; }
.routing-fallback { background: var(--canvas); }
.routing-fallback .form-grid { row-gap: .75rem; }
.routing-fallback select { height:43px; min-height:43px; }
.entity-routing-editor + [data-entity-location] { margin-top: .875rem; }
[data-entity-location-hint] { margin: .5rem 0 0; padding-left: .25rem; }
.routing-decision strong { font-size:12px; font-weight:600; line-height:1.6; }
.routing-decision { border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem; margin-bottom: 1rem; }
.tax-profile-intro { display: grid; grid-template-columns: minmax(15rem, 1fr) 1fr; align-items: center; gap: 1.25rem; margin-bottom: 1rem; }
.tax-library-toolbar { flex-wrap: wrap; margin-bottom: 1rem; }
.tax-library-toolbar > .field { flex: 1; min-width: 15rem; }
.tax-profile-setup-heading { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:12px 20px; }
.tax-profile-setup-heading h3 { margin:0 0 5px; font-size:14px; }
.tax-profile-setup-heading .form-hint { margin:0; }
.tax-profile-setup-heading .workspace-tax-manage-link { margin:0; flex:none; }
.tax-profile-setup .tax-profile-intro { grid-template-columns:minmax(0,1fr); gap:8px; margin:16px 0 0; }
.tax-profile-setup .tax-profile-intro > .field { max-width:38rem; }
.tax-profile-setup .tax-profile-intro > .form-hint { margin:0; }
.tax-library-selection > .field { max-width:48rem; }
.tax-library-selection .tax-library-toolbar { justify-content:flex-start; gap:10px; margin:16px 0 0; padding-top:16px; border-top:1px solid var(--border); }
.tax-profile-fallback-label { display:block; margin-bottom:8px; font-size:12px; font-weight:600; }
.tax-profile-fallback > strong { display:block; padding:11px 12px; border:1px solid var(--border); border-radius:7px; background:var(--surface); font-size:12px; font-weight:600; }
.tax-profile-fallback > .form-hint { margin:8px 0 0; }
.tax-profile-card { margin: 1rem 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.tax-profile-card > summary { display: flex; align-items: center; gap: .8rem; padding: 1rem; cursor: pointer; list-style: none; }
.tax-profile-summary { display: grid; gap: .25rem; flex: 1; }
.tax-profile-summary > span { font-size: .85rem; color: var(--muted); }
.tax-profile-body { border-top: 1px solid var(--border); padding: 1rem; }
.tax-profile-rule { padding: 1rem 0; border-top: 1px solid var(--border); }
.tax-profile-rule:first-child { margin-top: 1rem; }
.tax-code-row { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(8rem, 1fr) minmax(12rem, 2fr) auto; gap: .75rem; align-items: center; margin-bottom: .65rem; }
.tax-profile-fallback { margin-top: 1.25rem; padding: 1rem; background: var(--canvas); border-radius: var(--radius); }
.tax-library-actions { justify-content: space-between; margin-top: 1rem; }
.entity-routing-editor .provider-reference-compact > .provider-reference-label,
.tax-profile-body .provider-reference-compact > .provider-reference-label { position: static; width: auto; height: auto; clip: auto; overflow: visible; white-space: normal; margin-bottom: .4rem; }
.entity-routing-editor .provider-reference-compact > .provider-reference-label { margin-bottom:8px; }
.entity-routing-editor .provider-reference-compact > .provider-reference-panel,
.tax-profile-body .provider-reference-compact > .provider-reference-panel { top: calc(100% + 6px); }
@media (max-width: 720px) {
 .routing-heading, .tax-library-actions { align-items: stretch; flex-direction: column; }
 .routing-mapping-row { grid-template-columns: minmax(0,1fr) 36px; }
 .routing-values-field { grid-column:1/-1; }
 .routing-mapping-row > [data-routing-entity] { grid-column:1; grid-row:2; }
 .routing-mapping-remove { grid-column:2; grid-row:2; margin-top:30px; }
 .tax-code-row, .tax-profile-intro { grid-template-columns: 1fr; }
 .routing-step > [data-routing-sources], .routing-step > [data-routing-mappings], .routing-step > .form-grid { margin-left: 0; }
 .routing-step [data-source-add], .routing-step [data-mapping-add] { margin-left: 0; }
 .routing-fallback .form-grid { grid-template-columns: 1fr; }
 .routing-source-row { flex-wrap: wrap; }
 .routing-row-actions { margin-left: auto; }
 .tax-profile-card > summary { flex-wrap: wrap; }
}
.financial-source-status { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.financial-source-status .form-hint { margin: 0; }
.financial-field-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.financial-field-heading h3 { margin-bottom: .25rem; }
.financial-field-heading .form-hint { margin: 0; }
.financial-field-heading + [data-target-status] { margin: .75rem 0 1rem; }
.financial-definition-scope { margin-top: 1.5rem; }
.financial-definition-scope > .form-hint { margin: .35rem 0 1rem; }
@media (max-width: 700px) { .financial-source-status, .financial-field-heading { align-items: flex-start; flex-direction: column; } }

/* Keep reviewed restoration comparisons readable with fixed dialog actions. */
dialog:has(.party-restoration-review) { width:min(980px,calc(100% - 32px)); overflow:hidden; }
dialog:has(.party-restoration-review)>form { display:flex; flex-direction:column; max-height:calc(100dvh - 42px); }
dialog:has(.party-restoration-review) :is(.dialog-header,.dialog-footer) { flex-shrink:0; }
dialog:has(.party-restoration-review) .dialog-body { min-height:0; overflow-y:auto; }
dialog:has(.party-restoration-review) .dialog-footer { flex-wrap:wrap; }
.party-restoration-review { display:grid; gap:12px; }
.party-restoration-review>p { margin:0; }
.party-restoration-review .table-scroll { margin-top:8px; border:1px solid var(--border); border-radius:8px; overflow-x:auto; }
.party-restoration-review table { min-width:660px; }
.party-restoration-review td { white-space:pre-line; }
/* Shared record result presentation: preview comparisons and execution history. */
.run-outcome-panel { margin-bottom:18px; border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.run-outcome-panel .run-outcome-summary { margin:0; border:0; border-radius:0; }
.run-outcome-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 28px; padding:18px; margin:0; border-top:1px solid var(--border); }
.run-outcome-facts dt { font-size:10px; color:var(--muted); margin-bottom:6px; }
.run-outcome-facts dd { margin:0; font-size:12px; font-weight:500; overflow-wrap:anywhere; }
.run-outcome-facts small { display:block; font-size:10px; font-weight:400; color:var(--muted); line-height:1.8; margin-top:4px; }
.run-conflict-approval { margin:0 0 18px; padding:18px; border:1px solid var(--border); border-radius:8px; background:var(--primary-soft); }
.run-section-heading { display:flex; align-items:flex-start; gap:12px; }
.run-section-heading>div { flex:1; min-width:0; }
.run-section-heading h3,.run-restoration-copy h3 { margin:0; font-size:12px; font-weight:600; line-height:1.7; }
.run-section-heading p { margin:5px 0 0; font-size:11px; color:var(--muted); line-height:1.8; }
.run-section-heading>.badge { flex-shrink:0; }
.run-section-icon { display:grid; place-items:center; width:28px; height:28px; flex:0 0 28px; border-radius:6px; background:var(--surface); color:var(--primary-dark); }
.run-section-icon .icon { width:14px; height:14px; }
.run-approved-fields { display:flex; flex-wrap:wrap; gap:8px; list-style:none; padding:0; margin:16px 0; }
.run-approved-fields li { background:var(--surface); border:1px solid var(--border); border-radius:6px; padding:7px 10px; font-size:11px; line-height:1.6; }
.run-approval-footer { display:flex; align-items:center; flex-wrap:wrap; gap:10px 20px; padding-top:13px; border-top:1px solid var(--border); }
.run-approval-footer p { flex:1; min-width:200px; margin:0; font-size:10px; color:var(--muted); line-height:1.8; }
.run-approval-footer a { display:inline-flex; align-items:center; gap:8px; font-size:11px; }
.run-approval-footer .icon { width:13px; height:13px; }
.run-record-actions>.customer-recovery[data-restore-row] { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:18px; }
.run-restoration-copy { flex:1; min-width:0; }
.run-restoration-copy .form-hint { margin:6px 0 0; }
.run-restoration-copy .run-restoration-limit { font-size:10px; }
.run-record-actions [data-review-restore] { flex-shrink:0; }
@media(max-width:680px) {
  .run-outcome-facts { grid-template-columns:1fr; gap:16px; padding:16px; }
  .run-conflict-approval { padding:16px; }
  .run-record-actions>.customer-recovery[data-restore-row] { flex-direction:column; align-items:stretch; gap:14px; padding:16px; }
}
.customer-run-record[open]>summary,.preview-record[open]>summary { background:#f8fafc; border-bottom:1px solid var(--border); }
.customer-run-record-body,.preview-record-body { padding-top:20px; }
.run-outcome-summary { display:flex; align-items:flex-start; gap:14px; padding:18px; margin-bottom:18px; border:1px solid var(--border); border-radius:8px; background:#f8fafc; }
.run-outcome-icon { display:grid; place-items:center; flex:0 0 32px; width:32px; height:32px; border-radius:50%; background:var(--primary-soft); color:var(--primary-dark); }
.run-outcome-icon>.icon { width:16px; height:16px; }
.run-outcome-summary[data-tone=success] .run-outcome-icon { background:var(--success-soft); color:var(--success); }
.run-outcome-summary[data-tone=warning] .run-outcome-icon { background:var(--warning-soft); color:var(--warning); }
.run-outcome-copy { flex:1; min-width:0; }
.run-outcome-copy strong { display:block; font-size:12px; font-weight:600; line-height:1.7; }
.run-outcome-copy p { margin:5px 0 0; color:var(--muted); font-size:11px; line-height:1.8; }
.run-outcome-destination { display:grid; gap:10px; margin:0; padding-left:20px; border-left:1px solid var(--border); min-width:145px; }
.run-outcome-destination dt { color:var(--muted); font-size:10px; margin-bottom:5px; }
.run-outcome-destination dd { margin:0; font-size:12px; font-weight:600; }
.run-record-actions { margin:0 0 18px; border:1px solid var(--border); border-radius:8px; }
.run-record-actions:empty { display:none; }
.run-record-actions>.customer-recovery { padding:14px 16px; margin:0; }
.run-record-actions>.customer-recovery+.customer-recovery { border-top:1px solid var(--border); }
.run-record-actions .form-hint { font-size:11px; line-height:1.8; }
.result-disclosure { margin-top:12px; border:1px solid var(--border); border-radius:8px; color:var(--ink); background:var(--surface); overflow:hidden; }
.result-disclosure>summary { display:flex; align-items:center; gap:12px; padding:15px 16px; list-style:none; cursor:pointer; color:var(--ink); }
.result-disclosure>summary::-webkit-details-marker { display:none; }
.result-disclosure>summary::marker { content:""; }
.result-disclosure>summary:hover { background:#f8fafc; }
.result-disclosure>summary>span { flex:1; min-width:0; }
.result-disclosure>summary strong { font-size:12px; font-weight:600; line-height:1.6; }
.result-disclosure>summary small { display:block; margin-top:3px; font-size:10px; color:var(--muted); line-height:1.7; }
.result-disclosure>summary>.icon { width:15px; height:15px; flex-shrink:0; color:var(--muted); }
.result-disclosure>summary>.icon:last-child { width:13px; height:13px; }
.result-disclosure[open]>summary { border-bottom:1px solid var(--border); background:#f8fafc; }
.result-disclosure[open]>summary>.icon:last-child { transform:rotate(180deg); }
.result-disclosure>[data-steps-content] { padding:0; }
.result-disclosure>[data-steps-content]:not(:has(table)) { padding:16px; color:var(--muted); font-size:11px; }
.run-execution-table { table-layout:fixed; }
.run-execution-table th:first-child { width:64%; }
.run-execution-table th:last-child { width:14%; text-align:right; }
.run-execution-table td:last-child { text-align:right; }
.run-execution-table :is(th,td) { padding:14px 16px; }
.run-execution-table td { font-size:11px; }
.run-execution-table small { display:inline-block; margin-top:5px; line-height:1.7; color:var(--muted); overflow-wrap:anywhere; }
.run-step-description { display:flex; align-items:flex-start; gap:12px; min-width:0; line-height:1.8; }
.run-step-description>div { min-width:0; overflow-wrap:anywhere; }
.run-step-number { display:grid; place-items:center; flex:0 0 24px; height:24px; border:1px solid var(--border); border-radius:50%; background:#f8fafc; color:var(--muted); font-size:10px; }
.run-record-references .run-reference-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 28px; margin:0; padding:18px 16px; }
.run-record-references .run-reference-grid dt { margin:0 0 6px; font-size:10px; }
.run-record-references .run-reference-grid dd { max-width:none; font-size:11px; line-height:1.8; }
.result-change-panel { border:1px solid var(--border); border-radius:8px; overflow:hidden; margin:0 0 16px; }
.result-change-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:15px 16px; border-bottom:1px solid var(--border); }
.preview-record-body .result-change-heading h3 { margin:0; font-size:12px; font-weight:600; }
.result-change-heading>span { color:var(--muted); font-size:10px; }
.result-change-panel table :is(th,td) { padding:14px 16px; }
.result-change-panel tbody tr:last-child td,.run-execution-table tbody tr:last-child td { border-bottom:0; }
.preview-explanations.result-disclosure { margin-top:12px; }
.preview-explanations.result-disclosure>dl { padding:12px 16px; margin:0; }
.preview-explanations.result-disclosure>p { margin:14px 16px; }
.preview-explanations.result-disclosure dl>div+div { border-top:1px solid var(--border); }
.preview-explanations.result-disclosure dl>div { padding:12px 0; grid-template-columns:minmax(140px,1fr) minmax(0,2fr); }
@media(max-width:680px) {
  .run-outcome-summary { flex-wrap:wrap; padding:16px; }
  .run-outcome-copy { flex-basis:calc(100% - 48px); }
  .run-outcome-destination { display:flex; flex-wrap:wrap; gap:20px; width:100%; padding:12px 0 0 46px; border-left:0; border-top:1px solid var(--border); }
  .run-record-actions>.customer-recovery { align-items:stretch; gap:10px; }
  .run-record-actions .button { justify-content:center; }
  .run-record-actions .form-hint { flex-basis:100%; }
  .run-execution-table { min-width:520px; }
  .run-record-references .run-reference-grid { grid-template-columns:1fr; gap:14px; }
  .preview-explanations.result-disclosure dl>div { grid-template-columns:1fr; gap:5px; }
  .result-disclosure>summary { padding:14px; }
}

/* Optional child record matching uses the same surfaces and form controls as route configuration. */
.related-matching-section { margin:26px 0 22px; }
.related-matching-heading { margin:0 2px 14px; }
.related-matching-heading h2 { margin:0; font-size:16px; font-weight:600; }
.related-matching-title h4,.related-matching-rule-heading h4 { margin:0; font-size:13px; font-weight:600; }
.related-matching-heading p,.related-matching-title p { margin:.4rem 0 0; }
.related-matching-card { border:1px solid var(--border); border-radius:var(--radius-md, 8px); background:var(--surface); }
.related-matching-card + .related-matching-card { margin-top:1rem; }
.related-matching-title { display:flex; gap:1rem; align-items:center; padding:18px 20px; margin:0; cursor:pointer; list-style:none; border-bottom:1px solid transparent; border-radius:7px; transition:background-color 160ms ease,border-color 160ms ease; }
.related-matching-title::-webkit-details-marker { display:none; }
.related-matching-title::marker { content:""; }
.related-matching-title>span:first-child { flex:1; min-width:0; }
.related-matching-title strong { font-size:13px; font-weight:600; }
.related-matching-title small { display:block; margin-top:5px; font-size:11px; color:var(--muted); line-height:1.7; }
.related-matching-title>.icon { flex-shrink:0; transition:transform 220ms cubic-bezier(.2,0,0,1); }
.related-matching-title:hover { background:var(--surface-subtle,#f7f9fc); }
.related-matching-card:is([open],[data-expanded="true"]):not([data-expanded="false"])>.related-matching-title { background:var(--surface-subtle,#f7f9fc); border-bottom-color:var(--border); border-radius:7px 7px 0 0; }
.related-matching-card:is([open],[data-expanded="true"]):not([data-expanded="false"])>.related-matching-title>.icon { transform:rotate(180deg); }
.related-matching-body { padding:20px; }
.related-matching-body .rule-mapping-list { padding:0; }
.related-matching-scope { display:flex; gap:.6rem; align-items:flex-start; color:var(--muted); font-size:.8rem; margin:1.25rem 0; }
.related-matching-scope svg { flex-shrink:0; width:1rem; height:1rem; }
.related-matching-rule-heading { display:flex; flex-wrap:wrap; justify-content:space-between; gap:.5rem; margin:1.5rem 0 .75rem; }
.related-matching-card .customer-matching-footer { padding:1rem 0; }
.related-matching-note { border-top:1px solid var(--border); padding-top:1rem; margin:0; line-height:1.7; }
.related-match-review-list { padding:0 1rem; }
.related-match-review-row { display:grid; grid-template-columns:minmax(0,1fr) 1rem minmax(0,1fr) auto; gap:1rem; align-items:center; padding:1rem 0; }
.related-match-review-row + .related-match-review-row { border-top:1px solid var(--border); }
.related-match-review-row strong { font-weight:600; font-size:12px; overflow-wrap:anywhere; }
.related-match-review-row small { display:block; margin-top:.4rem; color:var(--muted); font-size:.75rem; overflow-wrap:anywhere; }
.related-match-arrow svg { width:1rem; height:1rem; color:var(--muted); }
.related-match-review-note { border-top:1px solid var(--border); padding:1rem; margin:0; }
@media (max-width:640px) {
  .related-match-review-row { grid-template-columns:minmax(0,1fr) auto; }
  .related-match-roles { grid-column:1/-1; }
  .related-match-arrow { display:none; }
  .related-matching-title,.related-matching-body { padding:1rem; }
}

.date-time-field { min-width:0; }
.date-time-trigger { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:42px; text-align:left; padding:10px 12px; border:1px solid #cbd5e2; border-radius:7px; background:var(--surface); color:var(--ink); font-size:12px; font-weight:400; }
.date-time-trigger:hover,.date-time-trigger[aria-expanded="true"] { border-color:var(--primary); }
.date-time-trigger .icon { width:16px; height:16px; color:var(--muted); }
.date-time-placeholder { color:var(--muted); }
.date-time-panel { position:fixed; inset:auto; margin:0; width:min(336px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow-y:auto; border:1px solid var(--border); border-radius:8px; background:var(--surface); padding:12px; box-shadow:0 12px 32px #17203329; color:var(--ink); }
.date-time-month { display:grid; grid-template-columns:28px minmax(90px,1fr) 72px 28px; align-items:center; gap:5px; margin-bottom:12px; }
.date-time-month .icon-button { width:28px; height:32px; }
.date-time-month select,.date-time-month input { width:100%; min-width:0; min-height:34px; padding:6px; font-size:11px; }
.date-time-weekdays,.date-time-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; }
.date-time-weekdays { padding:0 0 6px; color:var(--muted); font-size:10px; font-weight:600; text-align:center; }
.date-time-days button { min-width:0; min-height:32px; border:1px solid transparent; border-radius:6px; background:transparent; color:var(--ink); font-size:11px; }
.date-time-days button:hover { background:var(--primary-soft); color:var(--primary-dark); }
.date-time-days button[aria-current="date"] { border-color:var(--primary); }
.date-time-days button.outside-month { color:#929dac; }
.date-time-days button.selected { background:var(--primary-dark); color:white; font-weight:600; }
.date-time-clock { display:flex; align-items:flex-end; gap:14px; border-top:1px solid var(--border); padding-top:12px; margin-top:12px; }
.date-time-clock .field { flex:0 1 116px; margin:0!important; font-size:11px; }
.date-time-clock input { width:100%; font-variant-numeric:tabular-nums; }
.date-time-clock>.form-hint { margin-bottom:5px; line-height:1.6; }
.date-time-actions { display:flex; justify-content:flex-end; gap:6px; margin-top:12px; }
.date-time-actions .button { min-height:32px; padding:6px 9px; font-size:11px; }
.date-time-actions [data-date-clear] { margin-right:auto; }

.run-approval-groups { display: grid; gap: 12px; margin-top: 16px; }
.run-approval-fields { padding: 14px 16px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface, #fff); }
.run-approval-fields h4 { margin: 0; font-size: 12px; font-weight: 600; }
.run-approval-fields .run-approved-fields { margin: 12px 0 0; }
.run-approval-groups .result-change-panel { margin: 0; background: var(--surface, #fff); }

.automation-live { margin: 0; padding: 12px 22px; border-bottom: 1px solid var(--border); }

.automation-job-reason { max-width: 34rem; margin: 8px 0 0; font-size: 12px; line-height: 1.6; color: var(--text-muted); }

.automation-scan-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin:0; padding:20px; gap:20px; border-bottom:1px solid var(--border); }
.automation-scan-metrics dt { font-size:12px; color:var(--text-muted); }
.automation-scan-metrics dd { margin:8px 0 0; font-size:22px; font-weight:600; }
.automation-batches small { display:block; margin-top:6px; color:var(--text-muted); }
@media(max-width:640px) { .automation-scan-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }

dialog:has(.conflict-review) { width:min(900px,calc(100% - 32px)); overflow:hidden; }
dialog:has(.conflict-review)>form { display:flex; flex-direction:column; max-height:calc(100dvh - 42px); }
dialog:has(.conflict-review) .dialog-body { overflow-y:auto; min-height:0; }
dialog:has(.conflict-review) .dialog-header,dialog:has(.conflict-review) .dialog-footer { flex-shrink:0; }
.conflict-review .table-scroll { border:1px solid var(--border); border-radius:8px; margin:20px 0; }
.conflict-review table { table-layout:fixed; width:100%; }
.conflict-review th,.conflict-review td { overflow-wrap:anywhere; }
.conflict-review .preview-value { white-space:pre-wrap; }

/* Financial document reviews share the record workflow's surfaces and disclosures. */
.financial-review-body { display:grid; gap:16px; font-size:11px; line-height:1.7; }
.financial-review-body strong { font-weight:600; }
.financial-review-body > :is(.routing-decision,.result-disclosure), .financial-review-lines > .result-disclosure { margin:0; }
.financial-review-body :is(.notice,.inline-notice) { display:flex; align-items:flex-start; gap:10px; font-size:12px; line-height:1.8; }
.financial-review-body :is(.notice,.inline-notice) > .icon { flex-shrink:0; }
.financial-review-body > .run-reference-grid { margin: 0; }
.financial-review-body .financial-preview-totals { margin: 0; }
.financial-preview-totals p { display: grid; gap:6px; margin:0; }
.financial-preview-totals p > span { color:var(--muted); font-size:10px; }
.financial-preview-totals strong { font-size:12px; font-weight:600; color:var(--ink); }
.financial-review-holds { border: 1px solid var(--border); border-radius: .5rem; padding: 1.1rem; background: var(--canvas); }
.financial-review-holds li { margin-block: .6rem; }
.financial-review-holds small { display: block; margin-top: .25rem; }
.financial-review-lines { display: grid; gap: .65rem; min-width: 0; }
.financial-review-lines > .surface-heading { padding:0 0 16px; }
.financial-review-lines > .surface-heading h3 { margin:0; font-size:12px; font-weight:600; }
.financial-review-lines .run-reference-grid dd { overflow-wrap: anywhere; }

/* Financial workflows use the shared surfaces, references and progressive discovery. */
.financial-catalogue-toolbar { display:flex; justify-content:space-between; align-items:center; gap:1.25rem; flex-wrap:wrap; padding:1rem 1.25rem; margin-bottom:1.25rem; border:1px solid var(--border); border-radius:var(--radius); background:var(--canvas); }
.financial-catalogue-toolbar .form-hint { margin:.35rem 0 0; }
.financial-definition-advice { margin:1rem 0; }
.financial-definition-advice > .icon { flex:none; }
.financial-definition-advice-body { display:grid; gap:.65rem; min-width:0; }
.financial-definition-advice-body > strong { margin:0; }
.financial-definition-advice-body .page-actions { flex-wrap:wrap; }
.financial-definition-advice details { font-size:12px; }
.financial-definition-advice summary { cursor:pointer; }
.financial-definition-advice details p { margin-top:.5rem; }
.financial-settings-card { border:1px solid var(--border); border-radius:var(--radius); padding:1.25rem; margin-bottom:1.25rem; }
.financial-settings-card > h3 { margin:0 0 .4rem; font-size:14px; }
.financial-settings-card > .form-hint { margin:0 0 1.25rem; }
.financial-settings-card .financial-field-heading { margin-bottom:1.25rem; }
.financial-settings-card .tax-profile-intro { margin:1.25rem 0 0; }
.financial-behaviour-body { display:grid; gap:1.25rem; }
.financial-behaviour-body .financial-settings-card { margin:0; }
.financial-behaviour-body .result-disclosure .surface-body > .form-hint { margin:0 0 1.25rem; }
.financial-behaviour-body .form-grid + .checkbox-field { margin-top:1.25rem; }
.financial-exchange-settings .financial-field-heading { margin-bottom:16px; }
.financial-exchange-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:20px; }
.financial-exchange-grid > div { min-width:0; }
.financial-exchange-grid .form-hint { margin:7px 0 0; }
.financial-exchange-label { display:block; margin-bottom:8px; color:#425068; font-size:12px; font-weight:600; line-height:1.5; }
.financial-exchange-prices .checkbox-field { width:100%; }
.financial-exchange-grid .financial-exchange-context { align-self:end; margin:0 0 2px; }
.financial-exchange-inherited { margin:0; }
.financial-exchange-details { margin-top:14px; font-size:11px; }
.financial-exchange-details summary { width:max-content; max-width:100%; color:var(--primary-dark); font-weight:600; cursor:pointer; }
.financial-exchange-details > div { margin-top:9px; padding:11px 13px; border:1px solid var(--border); border-radius:7px; background:var(--canvas); }
.financial-exchange-details p { margin:0 0 7px; font-size:11px; line-height:1.7; }
.financial-exchange-details p:last-child { margin-bottom:0; }
@media(max-width:760px) { .financial-exchange-grid { grid-template-columns:1fr; gap:16px; } }
.purchase-order-update-settings .financial-field-heading { margin-bottom:16px; }
.purchase-order-update-settings > .checkbox-field { width:fit-content; max-width:100%; }
.purchase-order-update-eligibility { margin:8px 0 0; }
.purchase-order-update-settings .financial-config-group { margin-top:18px; padding-top:18px; }
.purchase-order-update-settings .financial-config-group h4 { margin:0 0 12px; font-size:13px; line-height:1.5; }
.purchase-order-update-settings .financial-config-group > .form-hint { margin:8px 0 0; }
.purchase-order-update-settings [data-update-condition] .rule-condition-editor > .form-hint { margin:6px 0 0; }
.purchase-order-update-settings .form-grid { gap:12px 16px; }
.purchase-order-update-footnote { margin:8px 0 0; }
.accounting-currency-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1.25rem; }
.accounting-currency-heading h3 { margin:0; font-size:14px; font-weight:600; }
.accounting-currency-heading .form-hint { margin:.35rem 0 0; }
.accounting-currency-heading .button { flex:none; }
.accounting-currency-row { display:grid; grid-template-columns:minmax(9rem,1fr) minmax(14rem,20rem) minmax(14rem,2fr); gap:1.5rem; padding:1.25rem 0; border-top:1px solid var(--border); align-items:start; }
.accounting-currency-entity, .accounting-currency-verification { min-width:0; display:grid; gap:8px; }
.accounting-currency-label { color:#425068; font-size:12px; font-weight:600; line-height:1.5; }
.accounting-currency-entity > strong { display:flex; align-items:center; min-height:42px; font-size:12px; font-weight:600; overflow-wrap:anywhere; }
.accounting-currency-row .field { min-width:0; }
.accounting-currency-row .field select { width:100%; min-width:0; }
.accounting-currency-verification [data-currency-verification] { padding-top:6px; }
.accounting-currency-verification .form-hint { margin:.35rem 0 0; }
.accounting-currency-footer { display:flex; align-items:center; justify-content:space-between; gap:1rem; border-top:1px solid var(--border); padding-top:1rem; }
.accounting-currency-footer [data-currency-status]:empty { display:none; }
.accounting-currency-details { font-size:11px; line-height:1.8; }
.accounting-currency-details summary { cursor:pointer; color:var(--muted); }
.accounting-currency-details .form-hint { margin:.5rem 0 0; max-width:80ch; }
@media (max-width:760px) {
  .accounting-currency-heading { align-items:flex-start; flex-direction:column; }
  .accounting-currency-row { grid-template-columns:minmax(0,1fr) minmax(12rem,18rem); gap:1rem; }
  .accounting-currency-verification { grid-column:1/-1; }
  .accounting-currency-verification [data-currency-verification] { padding-top:0; }
  .accounting-currency-footer { align-items:flex-start; flex-direction:column; }
}
@media (max-width:420px) {
  .accounting-currency-row { grid-template-columns:1fr; }
  .accounting-currency-entity > strong { min-height:0; }
  .accounting-currency-heading .button { width:100%; }
}
.financial-retention-fields { margin-top:1.25rem; }
.financial-retention-fields[hidden] { display:none; }
.financial-discovery-controls { display:flex; align-items:end; gap:1rem; }
.financial-discovery-controls .field { min-width:10rem; }
.financial-review-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:1rem; margin:1.25rem 0; }
.financial-tax-rule { display:grid; grid-template-columns:minmax(10rem,1fr) minmax(12rem,1.4fr) minmax(8rem,1fr) minmax(8rem,.8fr) auto; }
.financial-tax-rule > [hidden], .tax-code-row > [hidden], .financial-route-editor .form-grid > [hidden] { display:none; }
.financial-route-editor [data-location-routing-notice] { margin-block:1rem; }
.tax-profile-body .tax-code-row { align-items:end; }
@media(max-width:900px) { .financial-tax-rule { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:620px) { .financial-catalogue-toolbar, .financial-discovery-controls, .financial-review-toolbar { align-items:stretch; flex-direction:column; } .financial-tax-rule { grid-template-columns:1fr; } .financial-catalogue-toolbar .page-actions { flex-wrap:wrap; } }

/* Financial line mappings retain the shared controls with a consistent row grid. */
.financial-line-configuration .financial-catalogue-toolbar { margin-bottom:1rem; }
.financial-routing-notice { margin:0 0 1.5rem; line-height:1.65; }
.financial-routing-notice[hidden] { display:none; }
.financial-routing-notice > .icon { flex:none; }
.financial-routing-notice > div { min-width:0; }
.financial-routing-notice details { margin-top:.6rem; font-size:12px; }
.financial-routing-notice summary { cursor:pointer; font-weight:600; }
.financial-routing-notice details p { margin-top:.6rem; }
.financial-routing-notice .financial-scope-value { display:inline; margin:0; }
.financial-mapping-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.financial-mapping-heading h3 { margin:0 0 .35rem; font-size:14px; }
.financial-mapping-heading .form-hint { margin:0; }
.financial-mapping-tips { flex:0 1 26rem; min-width:0; font-size:12px; }
.financial-mapping-tips > summary { display:flex; align-items:center; justify-content:flex-end; gap:.5rem; padding:.25rem 0; cursor:pointer; list-style:none; color:var(--primary); }
.financial-mapping-tips > summary::-webkit-details-marker { display:none; }
.financial-mapping-tips[open] > summary > .icon:last-child { transform:rotate(180deg); }
.financial-mapping-tips > div { margin-top:.65rem; padding:1rem; border:1px solid var(--border); border-radius:var(--radius); background:var(--canvas); line-height:1.6; }
.financial-mapping-tips p { margin:0 0 .75rem; }
.financial-mapping-tips p:last-child { margin-bottom:0; }
.financial-mapping-tips strong { display:block; margin-bottom:.25rem; }
.financial-line-configuration .rule-mapping > summary { display:grid; grid-template-columns:minmax(15rem, 32%) minmax(0, 1fr) auto; gap:1.25rem; }
.financial-line-configuration .rule-mapping-title { min-width:0; overflow-wrap:anywhere; }
.financial-line-configuration .rule-mapping-summary { min-width:0; line-height:1.6; overflow-wrap:anywhere; }
@media(max-width:900px) {
  .financial-line-configuration .rule-mapping > summary { grid-template-columns:minmax(0,1fr) auto; gap:.5rem 1rem; }
  .financial-line-configuration .rule-mapping > summary > .rule-mapping-summary { grid-column:1; grid-row:2; width:auto; }
  .financial-line-configuration .rule-mapping > summary > .icon:last-child { grid-column:2; grid-row:1 / span 2; }
}
@media(max-width:620px) {
  .financial-mapping-heading { flex-direction:column; }
  .financial-mapping-tips { flex:auto; width:100%; }
  .financial-mapping-tips > summary { justify-content:flex-start; }
  .financial-line-configuration .rule-mapping-list { padding:0; }
}

/* Editable disclosures must allow reference choices to extend beyond the card. */
.financial-behaviour-body .result-disclosure { overflow:visible; }
.financial-behaviour-body .result-disclosure:focus-within { position:relative; z-index:31; }
.financial-behaviour-body .result-disclosure > summary { border-radius:8px; }
.financial-behaviour-body .result-disclosure[open] > summary { border-radius:8px 8px 0 0; }
.financial-tax-rule { display:block; padding:0; margin:1rem 0; border:1px solid var(--border); border-radius:var(--radius); }
.financial-tax-rule-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.6rem 1rem; background:var(--canvas); border-bottom:1px solid var(--border); border-radius:var(--radius) var(--radius) 0 0; }
.financial-tax-rule-heading > strong { font-size:12px; }
.financial-tax-rule-fields { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:start; gap:1rem; padding:1rem; }
.financial-tax-rule-fields > [hidden] { display:none; }
.financial-tax-rule-fields > .field { margin:0; }
.financial-tax-rule-fields .provider-reference-label { line-height:1.5; }
@media(max-width:1100px) { .financial-tax-rule-fields { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:620px) { .financial-tax-rule-fields { grid-template-columns:minmax(0,1fr); } }

/* Financial selection follows the shared record chooser's spacing. */
.financial-selection-card > .surface-body { padding-bottom:24px; }
.financial-saved-route { margin-top:12px; padding:12px 16px; background:var(--canvas); border:1px solid var(--border); border-radius:6px; }
.financial-saved-route > summary { cursor:pointer; }
.financial-saved-route .workflow-route-row { margin-top:16px; }
.financial-source-discovery { border-top:1px solid var(--border); }
.financial-source-discovery .surface-body { padding:24px; }
.financial-source-scope { display:flex; align-items:center; gap:16px; margin:12px 0 24px; }
.financial-source-scope img { max-width:140px; max-height:48px; }
.financial-source-discovery .financial-discovery-controls { display:grid; grid-template-columns:minmax(0,1fr) 90px auto; gap:12px; align-items:end; }
.financial-source-discovery .financial-discovery-controls .field { margin:0; }
.financial-source-discovery [data-results] { margin-top:20px; }
.financial-selection-summary { border-top:1px solid var(--border); padding-top:18px; margin-top:16px; color:var(--muted); font-size:12px; }
.financial-selection-footer { display:flex; justify-content:space-between; align-items:center; gap:24px; padding:18px 24px; background:var(--canvas); border-top:1px solid var(--border); border-radius:0 0 10px 10px; }
.financial-selection-footer p { margin:0; max-width:640px; }
.financial-selection-footer .button { flex-shrink:0; }
.financial-selection-card .financial-review-toolbar { padding:20px 24px; border-top:1px solid var(--border); }
.financial-selection-card [data-sales-work] > .surface { margin:0 24px 24px; }
@media(max-width:620px) {
 .financial-source-discovery .surface-body { padding:18px; }
 .financial-source-discovery .financial-discovery-controls { grid-template-columns:1fr auto; }
 .financial-discovery-controls > div { grid-column:1 / -1; }
 .financial-selection-footer { align-items:stretch; flex-direction:column; padding:18px; }
}
.financial-source-discovery .financial-discovery-controls .field { min-width:0; }
.financial-source-scope { margin-bottom:8px; }
.financial-source-scope .provider-brand { border:1px solid var(--border); border-radius:7px; }
.financial-source-discovery .financial-discovery-controls p { margin:4px 0 0; }
.financial-discovery-table table { min-width:640px; }
.financial-discovery-table th:nth-child(2) { width:22%; }
.financial-discovery-table th:nth-child(4) { width:150px; }
.financial-discovery-table th:last-child { width:140px; }
.financial-discovery-table td:nth-child(2) strong,
.financial-discovery-table td:nth-child(4),
.financial-discovery-table td:last-child { white-space:nowrap; }
.financial-discovery-table th:last-child,
.financial-discovery-table td:last-child { text-align:right; font-variant-numeric:tabular-nums; }
.financial-discovery-table input[type=radio] { width:18px; height:18px; margin:0; accent-color:var(--primary); vertical-align:middle; }
.financial-review-body > .run-reference-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 28px; padding:18px 16px; border:1px solid var(--border); border-radius:8px; }
.financial-review-body .run-reference-grid dt { font-size:10px; color:var(--muted); margin-bottom:6px; }
.financial-review-body .run-reference-grid dd { margin:0; font-size:11px; line-height:1.8; overflow-wrap:anywhere; }
.financial-review-body > .notice { display:flex; gap:10px; align-items:start; margin:0; }
.financial-review-holds { background:var(--warning-soft); }
.financial-review-holds h3 { margin:0 0 12px; }
.financial-review-holds ul { list-style:none; padding:0; margin:0; }
.financial-review-holds li { padding:12px 0; border-top:1px solid var(--border); }
.financial-review-holds li > strong { font-size:12px; line-height:1.6; }
.financial-issue-details { font-size:11px; color:var(--muted); margin-top:6px; }
.financial-issue-details summary { cursor:pointer; }
.financial-issue-details dl { margin:12px 0 0; }
.financial-issue-details dd { margin:4px 0 12px; overflow-wrap:anywhere; }
.financial-value-table { border:1px solid var(--border); border-radius:7px; margin:12px 0; }
.financial-value-table table { width:100%; table-layout:fixed; }
.financial-value-table th:first-child { width:35%; }
.financial-value-table tbody th { font-weight:400; text-transform:none; font-size:11px; background:transparent; letter-spacing:normal; }
.financial-value-table :is(th,td) { padding:14px 16px; font-size:11px; }
.financial-value-table td { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.7; }
.financial-review-lines h4 { font-size:12px; font-weight:600; margin:24px 0 12px; }
.financial-source-values { margin-top:20px; }
.financial-values-empty { padding:16px; background:var(--canvas); border-radius:7px; }
.financial-review-footer { align-items:center; justify-content:space-between; gap:16px; padding:18px 24px; }
.financial-review-footer p { margin:0; }
.financial-review-footer > p:last-child:not(:first-child) { flex-basis:100%; }
@media(max-width:620px) {
 .financial-review-body > .run-reference-grid { grid-template-columns:1fr; }
 .financial-review-footer { flex-direction:column; align-items:stretch; }
}

/* Financial reviews share the record browser spacing with master-data reviews. */
.preview-record-body > .financial-review-body,
.financial-return-detail > .financial-review-body { padding:0; }
.preview-record-body > .financial-review-body + .page-actions { margin-top:1rem; }
.preview-record-body [data-run-progress] { margin:0 0 12px; }
.preview-record-body [data-inline-recovery] { display:grid; gap:16px; }
.preview-record-body [data-inline-recovery] > .page-actions:empty { display:none; }
.preview-record-body [data-inline-recovery] + p { margin:16px 0 18px; }
.financial-review-holds.result-disclosure { padding:0; }
.financial-review-holds.result-disclosure > summary { background:var(--warning-soft,#fff9e7); }
.financial-review-holds.result-disclosure li { padding:10px 0; }
.financial-review-holds.result-disclosure .surface-body { padding:16px 20px; }
/* Keep financial search controls on one baseline; wrap by available panel width. */
.financial-source-discovery { container-type:inline-size; }
.financial-source-discovery .customer-discovery-filters.has-search-by { grid-template-columns:180px minmax(180px,1fr) 145px 85px auto; gap:16px 12px; }
.financial-source-discovery .customer-discovery-filters.has-search-by > .field,
.financial-source-discovery .customer-discovery-filters.has-search-by > .button { grid-column:auto; }
@container (max-width:850px) {
  .financial-source-discovery .customer-discovery-filters.has-search-by { grid-template-columns:repeat(6,minmax(0,1fr)); }
  .financial-source-discovery .customer-discovery-filters.has-search-by > .field,
  .financial-source-discovery .customer-discovery-filters.has-search-by > .button { grid-column:span 2; }
  .financial-source-discovery .customer-discovery-filters.has-search-by > .field:nth-child(2) { grid-column:span 4; }
}
@container (max-width:480px) {
  .financial-source-discovery .customer-discovery-filters.has-search-by { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .financial-source-discovery .customer-discovery-filters.has-search-by > .field { grid-column:auto; }
  .financial-source-discovery .customer-discovery-filters.has-search-by > .field:first-child,
  .financial-source-discovery .customer-discovery-filters.has-search-by > .field:nth-child(2),
  .financial-source-discovery .customer-discovery-filters.has-search-by > .button { grid-column:1/-1; }
}

.financial-run-confirmation .customer-run-steps { margin-top:0; }
.financial-run-confirmation .customer-confirm-rows strong { font-size:12px; font-weight:600; }

.financial-run-history table { min-width:660px; }
.financial-run-history th:first-child { width:180px; }
.financial-run-history th:nth-child(2) { width:220px; }
.financial-run-history th:nth-child(3) { width:190px; }
.financial-history-actions small { display:block; margin-top:8px; font-size:10px; line-height:1.7; color:var(--muted); }
.financial-run-confirmation .customer-run-steps { margin-bottom:16px; }
.financial-run-confirmation .customer-confirm-rows { max-height:320px; overflow-y:auto; }

/* Shared route and profile tax mappings. */
.tax-mapping-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.tax-mapping-heading h3 { margin:0; }
.tax-mapping-heading .form-hint { margin:.4rem 0 0; }
.tax-mapping-columns,.tax-mapping-row { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1.3fr) minmax(8rem,.8fr) minmax(9rem,.9fr) 36px; gap:1rem; align-items:center; }
.tax-mapping-columns { padding:.75rem 0; border-bottom:1px solid var(--border); font-size:12px; font-weight:500; color:var(--muted); }
.tax-mapping-row { padding:1rem 0; border-bottom:1px solid var(--border); }
.tax-mapping-no-currency { grid-template-columns:minmax(0,1.2fr) minmax(0,1.3fr) minmax(8rem,.8fr) 36px; }
.tax-mapping-row > [hidden],.tax-mapping-row > input[type=hidden] { display:none; }
.tax-mapping-row > .field { margin:0; min-width:0; gap:0; }
.tax-mapping-row .provider-reference-picker { gap:0; }
.tax-mapping-row .provider-reference-hint { display:none; }
.tax-mapping-row > .field > span,.tax-mapping-row .provider-reference-label { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; }
.tax-mapping-row .provider-reference-compact > .provider-reference-choice,.tax-mapping-row > .field select { height:42px; min-height:42px; }
.tax-mapping-row .provider-reference-compact > .provider-reference-choice { padding:3px 12px; }
.tax-mapping-row .provider-reference-described .provider-reference-choice small { line-height:1.4; display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.tax-mapping-row .provider-reference-panel { top:calc(100% + 6px); width:max(100%,340px); }
.tax-mapping-row .provider-reference-selection { min-width:0; }
.tax-mapping-row .provider-reference-choice > span { min-width:0; }
.tax-mapping-row .provider-reference-choice strong { font-weight:500; line-height:1.4; }
.tax-mapping-row .tax-mapping-remove { color:var(--muted); }
.tax-mapping-row .tax-mapping-remove:hover { color:var(--danger); }
.tax-mapping-empty { padding:1.5rem 0; }
[data-add-tax] { margin-top:1rem; }
.tax-profile-rule { padding:0 0 1rem; border:0; }
.tax-profile-rule:first-child { margin-top:0; }
.tax-profile-rule .tax-mapping-row { border:0; }
.tax-profile-rule + .tax-profile-rule { border-top:1px solid var(--border); }
@media(max-width:1000px) {
 .tax-mapping-columns { display:none; }
 .tax-mapping-row,.tax-mapping-no-currency { grid-template-columns:repeat(2,minmax(0,1fr)) 36px; align-items:start; }
 .tax-mapping-row > .field > span,.tax-mapping-row .provider-reference-label { position:static!important; width:auto!important; height:auto!important; overflow:visible!important; clip:auto!important; white-space:normal!important; margin-bottom:8px; }
 .tax-mapping-row > .field { display:grid; gap:0; }
 .tax-mapping-row > .tax-mapping-remove { grid-column:3; grid-row:1; margin-top:30px; }
 .tax-mapping-row > .field { grid-column:1; }
 .tax-mapping-row [data-tax-currency] { grid-column:2; }
}
@media(max-width:620px) {
 .tax-mapping-row,.tax-mapping-no-currency { grid-template-columns:minmax(0,1fr) 32px; }
 .tax-mapping-row > :not(input):not(.tax-mapping-remove) { grid-column:1; }
 .tax-mapping-row > .tax-mapping-remove { grid-column:2; }
 .tax-mapping-row .provider-reference-panel { width:100%; max-width:none; }
}

/* Workspace tax library shares the route editor and reference pickers. */
.workspace-tax-list { display:grid; gap:18px; }
.workspace-tax-list .workspace-tax-guide,.workspace-tax-list .list-toolbar,.workspace-tax-list .workspace-tax-card { margin:0; }
.workspace-tax-list [data-tax-cards] { display:grid; gap:14px; }
.workspace-tax-guide { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; padding:20px 22px; }
.workspace-tax-guide > div { display:flex; align-items:flex-start; gap:12px; min-width:0; }
.workspace-tax-guide-number { display:grid; place-items:center; flex:none; width:24px; height:24px; border-radius:50%; background:var(--primary-soft); color:var(--primary-dark); font-size:11px; font-weight:700; }
.workspace-tax-guide h2 { margin:0 0 4px; font-size:12px; line-height:1.5; }
.workspace-tax-guide p { margin:0; color:var(--muted); font-size:11px; line-height:1.6; }
.workspace-tax-card { overflow:hidden; }
.workspace-tax-card-title { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.workspace-tax-card-title h2 { font-size:15px; }
.workspace-tax-entities { padding:0 22px; }
.workspace-tax-entity-head,.workspace-tax-entity { display:grid; grid-template-columns:minmax(120px,.4fr) minmax(0,1fr) minmax(110px,.35fr); align-items:center; gap:20px; }
.workspace-tax-entity-head { padding:12px 0; border-bottom:1px solid var(--border); color:var(--muted); font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
.workspace-tax-entity { padding:15px 0; font-size:12px; }
.workspace-tax-entity + .workspace-tax-entity { border-top:1px solid var(--border); }
.workspace-tax-entity-name { display:flex; align-items:center; gap:9px; min-width:0; font-size:12px; }
.workspace-tax-entity-name .icon { width:16px; height:16px; color:var(--muted); }
.workspace-tax-entity-profile { display:grid; gap:4px; min-width:0; }
.workspace-tax-entity-profile strong { font-size:12px; }
.workspace-tax-entity-profile span { color:var(--muted); font-size:11px; line-height:1.5; }
.workspace-tax-entity-currency { color:var(--ink); font-size:12px; }
.workspace-tax-entities-empty { margin:0; padding:20px 0; color:var(--muted); }
.workspace-tax-card-footer { display:flex; gap:12px; align-items:center; background:var(--canvas); border-top:1px solid var(--border); padding:14px 22px; font-size:11px; }
.workspace-tax-card-footer small { margin-left:auto; white-space:nowrap; color:var(--muted); }
.workspace-tax-context { display:grid; grid-template-columns:1fr 1fr; gap:16px 28px; margin-bottom:20px; padding:24px; }
.workspace-tax-context [data-context-scope] { grid-column:2; }
.workspace-tax-usage { overflow:hidden; }
.workspace-tax-usage .surface-heading { padding:16px 22px; }
.workspace-tax-route-list { margin:0; padding:0; list-style:none; }
.workspace-tax-route-list li + li { border-top:1px solid var(--border); }
.workspace-tax-route-list a { display:grid; grid-template-columns:28px minmax(0,1fr) 16px; align-items:center; gap:12px; min-height:56px; padding:10px 22px; color:var(--ink); }
.workspace-tax-route-list a:hover { background:var(--canvas); text-decoration:none; }
.workspace-tax-route-list a:focus-visible { outline-offset:-3px; }
.workspace-tax-route-icon { display:grid; place-items:center; width:28px; height:28px; border-radius:7px; background:var(--primary-soft); color:var(--primary-dark); }
.workspace-tax-route-icon .icon,.workspace-tax-route-list a > .icon { width:15px; height:15px; }
.workspace-tax-route-list a > .icon { color:var(--muted); }
.workspace-tax-route-copy { display:grid; gap:3px; min-width:0; }
.workspace-tax-route-copy strong { font-size:12px; font-weight:600; }
.workspace-tax-route-copy small { color:var(--muted); font-size:11px; }
.workspace-tax-usage-empty { margin:0; padding:16px 22px; color:var(--muted); font-size:11px; }
.workspace-tax-save { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 22px; }
.workspace-tax-save-copy { display:grid; gap:4px; min-width:0; }
.workspace-tax-save-copy strong { font-size:12px; font-weight:600; }
.workspace-tax-save-copy [data-tax-save-status] { color:var(--muted); font-size:11px; }
.workspace-tax-manage-link { margin-top:12px; }
@media (max-width:760px) {
 .workspace-tax-guide, .workspace-tax-context { grid-template-columns:1fr; }
 .workspace-tax-guide { gap:16px; }
 .workspace-tax-context [data-context-scope] { grid-column:1; }
 .workspace-tax-entity-head { display:none; }
 .workspace-tax-entity { grid-template-columns:minmax(0,1fr) auto; gap:6px 12px; }
 .workspace-tax-entity-name { grid-column:1; grid-row:1; }
 .workspace-tax-entity-currency { grid-column:2; grid-row:1; }
 .workspace-tax-entity-profile { grid-column:1/-1; grid-row:2; }
 .workspace-tax-card-footer { flex-wrap:wrap; }
 .workspace-tax-card .surface-heading { align-items:flex-start; gap:12px; flex-wrap:wrap; }
 .workspace-tax-save { align-items:stretch; flex-direction:column; }
 .workspace-tax-save .button { width:100%; }
}

/* Workspace profile editing uses the same surfaces and control geometry as workflow setup. */
.workspace-tax-editor { display: grid; gap: 16px; }
.workspace-tax-scope-body { padding: 24px; }
.workspace-tax-setup-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.workspace-tax-accounts { margin-top: 20px; align-items: stretch; }
.workspace-tax-account { min-width:0; }
.workspace-tax-account h3 { margin:0 0 16px; }
.workspace-tax-account [data-company] { margin-top:16px; }
.workspace-tax-account .form-hint.workspace-tax-account-note { margin:16px 0 0; }
.workspace-tax-editor [data-profile-content] { background: var(--surface); margin: 0; padding: 24px; }
.workspace-tax-editor [data-profile-content] > h3 { margin: 0 0 8px; font-size: 1rem; }
.workspace-tax-editor [data-profile-content] > .form-hint { margin: 0 0 18px; }
.workspace-tax-editor .tax-profile-body { padding: 20px; }
.workspace-tax-editor [data-profile-list] { display:grid; gap:12px; }
.workspace-tax-editor .tax-profile-card { margin:0; }
.workspace-tax-editor [data-profile-add] { margin-top:14px; }
.workspace-tax-editor .tax-profile-fallback { margin-top:18px; }
.workspace-tax-editor .workspace-tax-usage { margin: 0; }
.workspace-tax-editor .workspace-tax-save { margin: 0; }
.workspace-tax-pending { display:flex; align-items:center; gap:16px; min-height:96px; padding:20px 24px; }
.workspace-tax-pending .feature-icon { flex:none; margin:0; }
.workspace-tax-pending h2 { font-size: 1rem; margin: 0 0 8px; }
.workspace-tax-pending p { color: var(--muted); margin: 0; }
.tax-profile-entity-picker { min-width: 0; }
[data-profile-content] [data-profile-list] { display:grid; gap:12px; }
[data-profile-content] .tax-profile-card { margin:0; }
[data-profile-content] > .form-hint { margin:0 0 18px; }
.tax-profile-fields { display:grid; gap:16px; }
.tax-profile-fields .form-grid { gap:16px 20px; align-items:start; }
.tax-profile-fields .form-grid > [hidden] { display:none; }
.tax-profile-scope-fields { display:grid; align-content:start; gap:16px; min-width:0; }
.tax-profile-solution-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.tax-profile-solution-row > div { min-width:0; }
.tax-profile-entity-picker .provider-reference-choice { min-height:43px; height:43px; }
.tax-profile-mappings { margin-top:20px; padding-top:20px; }
.tax-profile-mappings-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:12px; }
.tax-profile-mappings-heading h4 { margin:0; font-size:14px; line-height:1.5; }
.tax-profile-mappings-heading .form-hint { margin:6px 0 0; }
.tax-profile-mappings-heading .button { flex:none; }
.tax-profile-mappings-empty { margin:0; padding:16px; border:1px dashed var(--border); border-radius:var(--radius); background:var(--canvas); color:var(--muted); font-size:.8125rem; }
.tax-profile-mappings .tax-mapping-columns { padding:8px 0; }
.tax-profile-mappings .tax-profile-rule { padding:12px 0; }
.tax-profile-mappings .tax-profile-rule:first-child { padding-top:12px; }
.tax-profile-mappings .tax-profile-rule:last-child { padding-bottom:0; }
.tax-profile-mappings .tax-profile-rule .tax-mapping-row { padding:0; }
.tax-profile-actions { display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap; margin-top:16px; padding-top:12px; border-top:1px solid var(--border); }
.tax-rule-conditions { margin-top: 6px; }
.tax-rule-conditions > summary { color: var(--muted); cursor: pointer; font-size: .8125rem; padding: 4px 0; }
.tax-rule-conditions[open] > summary { margin-bottom: 12px; }
.tax-rule-conditions .condition-editor { margin-top: 0; }
@media (max-width: 700px) {
  .workspace-tax-scope-body, .workspace-tax-editor [data-profile-content] { padding: 16px; }
  .workspace-tax-setup-grid { grid-template-columns:1fr; gap:16px; }
  .workspace-tax-editor .tax-profile-body { padding: 16px; }
  .tax-profile-solution-row { grid-template-columns:1fr; }
}

.workspace-tax-account .provider-reference-label,
.tax-profile-fields .provider-reference-label { display: block; }
.workspace-tax-editor .field input,
.workspace-tax-editor .field select,
.workspace-tax-editor .provider-reference-choice { min-height: 42px; height: 42px; }
@media (max-width: 700px) {
  .tax-profile-mappings-heading { flex-wrap:wrap; }
  .tax-profile-mappings-heading .button { width:100%; justify-content:center; }
}

.financial-rejection, .financial-review-body .notice.financial-rejection { display: block; }
.financial-rejection h3 { font-size: .9375rem; margin: 0 0 12px; }
.financial-rejection ul { padding-left: 20px; margin: 0 0 16px; }
.financial-rejection li + li { margin-top: 12px; }
.financial-rejection li small { display: block; color: var(--muted); margin-top: 4px; }
.financial-rejection-details { margin-top: 18px; border: 1px solid #e6d8b6; border-radius: 8px; overflow: hidden; background: #fffdfa; color: var(--ink); font-size: .8125rem; }
.financial-rejection-details > summary { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 10px 14px; cursor: pointer; list-style: none; font-weight: 600; }
.financial-rejection-details > summary::-webkit-details-marker { display: none; }
.financial-rejection-details > summary::marker { content: ""; }
.financial-rejection-details > summary:hover { background: #fff7e7; }
.financial-rejection-details > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -3px; }
.financial-rejection-details-title { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.financial-rejection-details-title .icon { width: 16px; height: 16px; color: var(--warning); }
.financial-rejection-details-count { margin-left: auto; color: var(--muted); font-size: .75rem; font-weight: 400; white-space: nowrap; }
.financial-rejection-details > summary > .icon { width: 15px; height: 15px; color: var(--muted); transition: transform .18s ease; }
.financial-rejection-details[open] > summary > .icon { transform: rotate(180deg); }
.financial-rejection-details-body { border-top: 1px solid #ede4d0; background: #fff; }
.financial-rejection-errors { margin: 0; padding: 0; list-style: none; }
.financial-rejection-errors li { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: start; gap: 14px; padding: 11px 14px; line-height: 1.6; }
.financial-rejection-errors li + li { margin: 0; border-top: 1px solid var(--border); }
.financial-rejection-errors code { width: fit-content; max-width: 100%; padding: 3px 6px; border: 1px solid #dfe6ed; border-radius: 4px; background: #f5f8fb; color: #41536b; font: 600 .75rem/1.4 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.financial-rejection-errors li span { min-width: 0; overflow-wrap: anywhere; }
.financial-rejection .financial-rejection-no-errors { margin: 0; padding: 14px; color: var(--muted); }
.financial-rejection-reference { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; padding: 12px 14px; border-top: 1px solid var(--border); background: #f8fafc; }
.financial-rejection-reference div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; min-width: 0; }
.financial-rejection-reference dt { color: var(--muted); }
.financial-rejection-reference dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .financial-rejection-errors li { grid-template-columns: 1fr; gap: 5px; }
  .financial-rejection-details-count { display: none; }
}

.workspace-tax-account .provider-reference-compact > .provider-reference-label {
  position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; margin-bottom: 8px;
}

.financial-date-settings > .form-hint:last-child { margin: 12px 0 0; }
.financial-review-body .notice.financial-date-adjustments { display:block; padding:12px 16px; }
.financial-date-adjustments h3 { margin:0 0 5px; font-size:12px; line-height:1.5; }
.financial-date-adjustments dl { margin:0; }
.financial-date-adjustment { display:grid; grid-template-columns:minmax(130px,200px) minmax(0,1fr); align-items:baseline; gap:12px; padding:7px 0; }
.financial-date-adjustment + .financial-date-adjustment { border-top:1px solid #d7e7f2; }
.financial-date-adjustment dt { font-size:11px; font-weight:600; }
.financial-date-adjustment dd { display:flex; align-items:baseline; flex-wrap:wrap; gap:5px 8px; min-width:0; margin:0; font-size:11px; }
.financial-date-new { color:var(--ink); font-weight:600; }
.financial-date-arrow { color:var(--muted); }
.financial-date-adjustment small { margin-left:auto; color:var(--muted); font-size:10px; }
@media(max-width:620px) { .financial-date-adjustment { grid-template-columns:1fr; gap:2px; } .financial-date-adjustment small { margin-left:0; } }

/* Operations uses the shared surface, typography, form and button tokens. */
.operations-live { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:0 0 18px; padding:10px 14px; border:1px solid var(--border); border-radius:9px; background:var(--surface); font-size:11px; }
.operations-live label { display:inline-flex; align-items:center; gap:8px; font-weight:600; cursor:pointer; }
.operations-live input { width:15px; height:15px; margin:0; accent-color:var(--primary-dark); }
.operations-live-status { display:inline-flex; align-items:center; gap:7px; color:var(--muted); }
.operations-live-dot { width:7px; height:7px; border-radius:50%; background:var(--success); box-shadow:0 0 0 4px #eaf5ef; }
.operations-live[data-state="loading"] .operations-live-dot { background:var(--primary-dark); box-shadow:0 0 0 4px var(--primary-soft); }
.operations-live[data-state="error"] .operations-live-dot { background:var(--warning); box-shadow:0 0 0 4px #fbf3df; }
.operations-live:has([data-operation-live]:not(:checked)) .operations-live-dot { background:#a8b3c4; box-shadow:0 0 0 4px #f0f3f7; }
.operations-live-interval { margin-left:auto; color:var(--muted); }
.operations-filters { margin-bottom:1.25rem; }
.operations-filters .list-toolbar { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; align-items:end; }
.operations-filters select { width:100%; }
.operation-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:1rem; margin-bottom:1.5rem; }
.operation-stat { background:var(--surface,#fff); color:inherit; font:inherit; border:1px solid var(--border,#d9e1ec); border-radius:10px; padding:1.125rem; text-align:left; display:flex; flex-direction:column; gap:.55rem; min-width:0; }
button.operation-stat { cursor:pointer; }
button.operation-stat:hover { border-color:var(--primary,#346fa0); }
.operation-stat strong { font-size:1.6rem; overflow-wrap:anywhere; }
.operation-stat small { display:flex; align-items:center; gap:.5rem; }
.operation-stat .operation-stat-date { font-size:1rem; }
.operation-explanation { max-width:32rem; line-height:1.5; }
.operations-layout { display:grid; gap:1.5rem; margin-bottom:1.5rem; }
.operations-layout .operation-stats { margin:0; }
.operations-worker { display:grid; grid-template-columns:1fr 1fr; gap:2rem; padding:1.5rem; border-top:1px solid var(--border,#d9e1ec); }
.operations-worker:first-child { border-top:0; }
.operations-worker h3 { margin-top:0; font-size:1rem; }
.operations-worker p { line-height:1.6; }
.operations-worker dl, .operations-details dl { margin:0; }
.operations-worker dl>div, .operations-details dl>div { margin-bottom:.75rem; }
.operations-worker dt, .operations-details dt { font-size:.8rem; opacity:.8; }
.operations-worker dd, .operations-details dd { margin:.25rem 0 0; overflow-wrap:anywhere; }
.operations-details { margin-top:1rem; }
.operations-details summary { cursor:pointer; padding:.5rem 0; }
.operations-guidance li { margin-bottom:1rem; line-height:1.6; }
@media(max-width:850px) { .operations-filters .list-toolbar { grid-template-columns:1fr 1fr; } .operations-worker { grid-template-columns:1fr; gap:.5rem; } }
@media(max-width:500px) { .operations-filters .list-toolbar, .operation-stats { grid-template-columns:1fr; } }

.security-review-layout { display:grid; gap:24px; }
.security-review-layout > .notice { margin:0; }
