.ds-ops { min-width:0; padding:16px; color:var(--text,#18324b); font-size:14px; line-height:1.5; }
.ds-ops h2,.ds-ops h3,.ds-ops h4,.ds-ops-dialog>header h3 { color:var(--text,#18324b); font-weight:700; margin:0 0 8px; }
.ds-ops p { margin:8px 0; overflow-wrap:anywhere; }
.ds-ops label { display:block; margin:8px 0; font-size:14px; }
.ds-ops input:not([type=checkbox]),.ds-ops select,.ds-ops textarea { display:block; box-sizing:border-box; max-width:100%; width:100%; min-height:40px; border:1px solid #b9cfe1; border-radius:6px; padding:8px; background:#fff; color:#18324b; }
.ds-ops input[type=checkbox] { width:18px; height:18px; accent-color:#1260cf; flex-shrink:0; }
.ops-form-grid,.ops-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr)); gap:12px; }
.ops-grid article,.ds-ops fieldset { padding:12px; border:1px solid #d4e1ed; border-radius:8px; min-width:0; background:#fff; }
.ops-grid article[data-priority=critical] { border-color:#dc2626; }
.ops-grid article[data-priority=attention] { border-color:#b7791f; }
.ops-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:10px 0; }
.ops-key { overflow-wrap:anywhere; font-family:monospace; font-size:13px; }
.ds-ops [role=alert]:not(:empty) { color:#a11919; background:#fff0ef; border:1px solid #f2cccc; border-radius:7px; padding:10px; }
.ds-ops-dialog { box-sizing:border-box; width:min(960px,calc(100vw - 24px)); max-height:90dvh; overflow:auto; background:#fff; color:var(--text,#18324b); border:1px solid #b9cfe1; border-radius:12px; padding:16px; box-shadow:0 20px 80px #1235; color-scheme:light; }
.ds-ops-dialog::backdrop { background:#10253a77; }
.ds-ops-dialog>header { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.ds-ops-dialog>header h3 { margin:0; }
.ds-ops-dialog dt { font-weight:600; overflow-wrap:anywhere; }
.ds-ops-dialog dd { margin-left:12px; overflow-wrap:anywhere; }
.ds-ops-dialog details { margin:12px 0; }
.ds-ops-dialog summary { cursor:pointer; }
.ds-ops-dialog button,.ds-ops-dialog a.btn-secondary { min-height:40px; }
.ds-ops-dialog button:focus-visible,.ds-ops-dialog summary:focus-visible,.ds-ops-dialog a:focus-visible { outline:3px solid #1260cf; outline-offset:3px; }
/* Full-viewport workbench, with the same light surfaces as bank reconciliation. */
.ds-ops-fullscreen { position:fixed; inset:0; width:100%; max-width:none; height:100dvh; max-height:none; margin:0; padding:0; border:0; border-radius:0; overflow:hidden; background:#f5f8fc; }
.ds-ops-fullscreen[open] { display:flex; flex-direction:column; }
.ds-ops-fullscreen>header { flex-shrink:0; background:#fff; border-bottom:1px solid #d4e1ed; padding:14px 24px; z-index:1; }
.ds-ops-fullscreen>header [data-close] { flex-shrink:0; }
.ds-ops-fullscreen>[data-body] { overflow:auto; min-height:0; flex:1; overscroll-behavior:contain; }
body:has(.ds-ops-fullscreen[open]) { overflow:hidden; }
.ops-cte-workspace { padding:24px; }
.ops-cte-intro { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.ops-cte-intro h2 { font-size:24px; margin:0; }
.ops-cte-intro p.ops-eyebrow { color:#50657a; font-size:12px; margin:0 0 6px; }
.ops-subtitle { font-size:16px; font-weight:400; color:#50657a; }
.ops-muted { color:#50657a; font-size:13px; }
.ops-badge { display:inline-block; background:#edf3fa; color:#254c71; border:1px solid #d4e1ed; border-radius:16px; padding:4px 10px; font-size:12px; line-height:1.4; }
.ops-match-strong { background:#e5f5ec; color:#16613d; border-color:#b9dec9; }
.ops-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:18px 0 24px; }
.ops-stats>div { background:#edf5ff; border:1px solid #d4e1ed; border-radius:8px; padding:14px 16px; min-width:0; }
.ops-stats span { display:block; color:#50657a; font-size:13px; }
.ops-stats strong { display:block; margin-top:5px; font-size:18px; overflow-wrap:anywhere; }
.ops-cte-columns { display:grid; grid-template-columns:minmax(290px,1fr) minmax(0,2fr); gap:20px; align-items:start; }
.ops-cte-document { display:grid; gap:16px; min-width:0; }
.ops-surface { min-width:0; background:#fff; border:1px solid #d4e1ed; border-radius:10px; padding:18px; }
.ops-surface h3 { font-size:17px; }
.ops-surface h4 { font-size:14px; }
.ops-xml-link { max-width:100%; white-space:normal; overflow-wrap:anywhere; text-align:left; }
.ops-xml-link span { display:block; font-size:11px; font-weight:400; }
.ops-fiscal-details { border-top:1px solid #dce6ef; padding-top:12px; }
.ops-fiscal-details>summary { font-weight:600; color:#1260cf; }
.ops-fiscal-details h4 { margin-top:18px; }
.ops-linked+.ops-linked,.ops-reconciliation+.ops-reconciliation { border-top:1px solid #dce6ef; padding-top:12px; margin-top:12px; }
.ops-reconciliation dl { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; font-size:13px; }
.ops-reconciliation dd { margin:0; text-align:right; }
.ops-empty { color:#50657a; padding:12px 0; }
.ops-note { background:#f0f6ff; border:1px solid #c9dcef; border-radius:8px; padding:12px; }
.ops-cte-search { align-items:flex-end; border-bottom:1px solid #dce6ef; padding-bottom:16px; }
.ops-cte-search label { flex:1; min-width:160px; margin:0; }
.ops-cte-search button { margin:0; }
.ds-ops-dialog .ops-candidate,.ops-cte-inline .ops-candidate { border:1px solid #d4e1ed; border-radius:8px; margin:12px 0; background:#fff; }
.ops-candidate>summary { padding:16px; list-style:none; }
.ops-candidate>summary::-webkit-details-marker { display:none; }
.ops-candidate>summary:hover { background:#f5f9ff; border-radius:8px; }
.ops-candidate-heading { display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:space-between; }
.ops-candidate-heading strong { min-width:0; overflow-wrap:anywhere; }
.ops-route { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); gap:12px; align-items:start; margin:12px 0; }
.ops-route>span { overflow-wrap:anywhere; }
.ops-route small { display:block; color:#50657a; font-size:12px; margin-bottom:3px; }
.ops-candidate-prompt { color:#1260cf; font-weight:600; font-size:13px; }
.ops-candidate[open] { border-color:#80a8cd; }
.ops-candidate[open] .ops-candidate-prompt { display:none; }
.ops-candidate-body { padding:16px; border-top:1px solid #d4e1ed; background:#f7faff; border-radius:0 0 8px 8px; }
.ops-reasons { padding-left:20px; margin:8px 0 16px; }
.ds-ops .ops-check { display:flex; align-items:flex-start; gap:9px; margin:14px 0; }
.ops-check input { margin-top:2px; }
@media(max-width:800px) {
 .ds-ops-fullscreen>header { padding:12px 16px; }
 .ds-ops-fullscreen>header h3 { font-size:16px; }
 .ops-cte-workspace { padding:16px; }
 .ops-cte-columns { grid-template-columns:minmax(0,1fr); gap:16px; }
 .ops-stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:16px 0; }
 .ops-stats>div { padding:12px; }
 .ops-stats strong { font-size:16px; }
 .ops-cte-intro { flex-wrap:wrap; gap:8px; }
 .ops-cte-intro h2 { font-size:21px; }
 .ops-surface { padding:14px; }
 .ops-route { grid-template-columns:1fr; gap:6px; }
 .ops-route>span[aria-hidden] { display:none; }
 .ops-candidate-heading { align-items:flex-start; }
 .ops-candidate>summary,.ops-candidate-body { padding:12px; }
}
/* Do not inherit the legacy dark card/button theme on these light workspaces. */
.ds-ops:not(.ops-cte-workspace) { background:#fff; }
.ds-ops button,.ds-ops a.btn-secondary,.ds-ops-dialog>header button { background:#fff; color:#18324b; border:1px solid #b9cfe1; border-radius:7px; padding:8px 12px; box-shadow:none; text-decoration:none; cursor:pointer; }
.ds-ops button.btn-primary { background:#1260cf; border-color:#1260cf; color:#fff; }
.ds-ops button:disabled { opacity:.55; cursor:default; }
.ops-import-progress:not(:empty) { padding:12px 16px; background:#edf5ff; color:#18324b; border:1px solid #c9dcef; border-radius:8px; margin:12px 0; }
.ops-import-failed:not(:empty) { background:#fff0ef; color:#a11919; border-color:#f2cccc; }
.ops-match-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:14px; background:#f5f9ff; padding:12px; border-radius:7px; }
.ops-match-facts small { display:block; color:#50657a; font-size:12px; }
.ops-match-facts strong { display:block; font-size:16px; margin:4px 0; }
.ops-cte-workspace .ops-stats { grid-template-columns:repeat(5,minmax(0,1fr)); }
.ops-cte-search label:has(select) { flex-basis:100%; }
@media(max-width:800px) { .ops-cte-workspace .ops-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .ops-match-facts { gap:10px; padding:10px; } }

/* Fiscal comparison stays readable without expanding the technical XML details. */
.ops-cte-comparison dl { margin:14px 0 0; }
.ops-cte-comparison dl>div { min-width:0; }
.ops-cte-comparison dt { font-size:12px; font-weight:400; color:#50657a; }
.ops-cte-comparison dd { margin:4px 0 0; font-weight:600; color:#18324b; }
.ops-cte-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; background:#edf5ff; border-radius:7px; padding:12px; }
.ops-cte-facts dd { font-size:17px; }
.ops-cte-locations { display:grid; gap:12px; padding-bottom:14px; border-bottom:1px solid #dce6ef; }
.ops-cte-locations dd { font-size:15px; }
.ops-cte-parties { display:grid; gap:10px; }

/* CT-e is an in-page workspace: sidebar, module navigation and OS tabs remain usable. */
.ops-cte-inline { width:100%; min-width:0; border:1px solid #d4e1ed; border-radius:10px; background:#f5f8fc; color:#18324b; color-scheme:light; }
.ops-cte-inline>header { display:flex; flex-wrap:wrap; gap:12px; justify-content:space-between; align-items:center; padding:16px 24px; border-bottom:1px solid #d4e1ed; background:#fff; border-radius:10px 10px 0 0; }
.ops-cte-inline>header h3 { margin:0; color:#18324b; font-size:18px; font-weight:700; }
.ops-cte-inline>header button { background:#fff; color:#18324b; border:1px solid #b9cfe1; border-radius:7px; padding:8px 12px; cursor:pointer; }
.ops-cte-inline dd { overflow-wrap:anywhere; }
.ops-cte-inline summary { cursor:pointer; }
.ops-cte-inline [hidden] { display:none!important; }
.ops-service-cte { border:1px solid #d4e1ed; border-radius:10px; }
.ops-service-cte h3:not(:first-child) { margin-top:20px; }
.ops-service-search { margin-top:20px; padding-top:16px; border-top:1px solid #d4e1ed; }
.ops-service-search>summary { color:#1260cf; font-weight:600; cursor:pointer; }
@media(max-width:1100px) { .ops-cte-inline .ops-cte-columns { grid-template-columns:minmax(0,1fr); } }
@media(max-width:800px) { .ops-cte-inline>header { padding:12px 16px; } }
