/* ============================================================================
 *  MEDMECS — Medical Coding / Audit workstation UI
 *  Modern, dense, EHR-style theme layered on the app's --m-* tokens (dark-aware).
 * ========================================================================== */
.cw{
  --cw-accent:#4f46e5; --cw-accent-2:#0ea5e9; --cw-ink:#0b1220;
  --cw-good:#16a34a; --cw-bad:#e11d48; --cw-warn:#f59e0b;
}

/* ---- sticky EHR-style patient banner ---- */
.cw-banner{
  position:sticky; top:60px; z-index:40;
  background:linear-gradient(120deg, color-mix(in srgb, var(--cw-accent) 10%, var(--m-bg-elev)) 0%, var(--m-bg-elev) 60%);
  border:1px solid var(--m-border); border-left:4px solid var(--cw-accent);
  border-radius:12px; padding:7px 14px; margin:8px 0;
  box-shadow:var(--m-shadow-sm); display:flex; align-items:center; gap:12px;
}
.cw-banner .avatar-pt{ width:36px;height:36px;border-radius:9px;display:grid;place-items:center; flex:0 0 auto;
  background:linear-gradient(135deg,var(--cw-accent),var(--cw-accent-2)); color:#fff; font-weight:700; font-size:.85rem; box-shadow:0 4px 12px rgba(79,70,229,.3); }
.cw-bn-main{ flex:1 1 auto; min-width:0; }
.cw-bn-top{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.cw-bn-pills{ margin-left:auto; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.cw-banner .pt-name{ font-size:1.02rem; font-weight:750; line-height:1.1; color:var(--m-text); letter-spacing:.01em; }
.cw-banner .pt-sub{ font-size:.7rem; color:var(--m-text-soft); margin-top:1px; }
.cw-banner .pt-fields{ display:flex; gap:5px 16px; flex-wrap:wrap; margin-top:4px; }
.cw-fld{ display:flex; flex-direction:column; }
.cw-fld .l{ font-size:.6rem; text-transform:uppercase; letter-spacing:.07em; color:var(--m-text-soft); font-weight:700; }
.cw-fld .v{ font-size:.9rem; font-weight:650; color:var(--m-text); font-variant-numeric:tabular-nums; }
.cw-banner .ms-auto-actions{ margin-left:auto; display:flex; gap:8px; align-items:center; }
.cw-pill{ display:inline-flex; align-items:center; gap:5px; padding:3px 11px; border-radius:999px; font-size:.72rem; font-weight:650; text-transform:capitalize; }
/* ---- compact patient/provider card header (banner folded in) ---- */
.cw .page-body{ padding-top:10px; }
.cw-pt-head{ display:flex; align-items:center; gap:8px 12px; flex-wrap:wrap; padding:6px 12px !important; }
.cw-pt-name{ font-size:.92rem; font-weight:750; line-height:1.1; color:var(--m-text); }
.cw-pt-meta{ font-size:.66rem; color:var(--m-text-soft); margin-top:1px; }
.cw-pt-actions{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.cw-pt-actions .cw-pill{ padding:2px 9px; font-size:.66rem; }
/* ---- Submit block folded into the Codes card ---- */
.cw-submit{ border-top:1px solid var(--m-border); margin-top:10px; padding-top:10px; }
.cw-submit-h{ font-size:.7rem; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--m-text-soft); }
.cw-submit-h .ti{ color:var(--cw-accent); }
/* ---- tiny live DPO chip (replaces the big gauge card) ---- */
.cw-dpo-chip{ display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:999px; font-size:.74rem; font-weight:700;
    border:1px solid var(--m-border); background:var(--m-surface-2); white-space:nowrap; }
.cw-dpo-chip .cw-dpo-od{ font-size:.64rem; font-weight:600; color:var(--m-text-soft); }
.cw-dpo-chip strong{ font-variant-numeric:tabular-nums; }
.cw-dpo-chip.dpo-good{ border-color:#16a34a55; background:#16a34a14; color:#15803d; }
.cw-dpo-chip.dpo-warn{ border-color:#f59e0b55; background:#f59e0b18; color:#b45309; }
.cw-dpo-chip.dpo-bad{  border-color:#e11d4855; background:#e11d4814; color:#be123c; }
.cw-dpo-chip.dpo-good .cw-dpo-od,.cw-dpo-chip.dpo-warn .cw-dpo-od,.cw-dpo-chip.dpo-bad .cw-dpo-od{ color:inherit; opacity:.8; }

/* ---- section card ---- */
.cw-card{ background:var(--m-surface); border:1px solid var(--m-border); border-radius:14px; box-shadow:var(--m-shadow-sm); margin-bottom:16px; overflow:hidden; }
.cw-card>.cw-h{ display:flex; align-items:center; gap:8px; padding:11px 18px; border-bottom:1px solid var(--m-border);
  font-weight:700; font-size:.74rem; text-transform:uppercase; letter-spacing:.06em; color:var(--m-text-soft); }
.cw-card>.cw-h .ti{ color:var(--cw-accent); font-size:1.1rem; }
.cw-card>.cw-h .cw-h-actions{ margin-left:auto; display:flex; gap:8px; }
.cw-card>.cw-b{ padding:18px; }

/* ---- form polish ---- */
.cw .form-label{ font-size:.7rem; text-transform:uppercase; letter-spacing:.05em; color:var(--m-text-soft); font-weight:700; margin-bottom:3px; }
.cw .form-control, .cw .form-select{ border-radius:9px; }
.cw .form-control:focus, .cw .form-select:focus{ border-color:var(--cw-accent); box-shadow:0 0 0 3px rgba(79,70,229,.15); }

/* ---- compact demographics card ---- */
.cw-tight{ padding:8px 12px !important; }
.cw-tight .row{ --bs-gutter-y:.25rem; }                 /* tight vertical gap between field rows */
.cw-tight .form-label{ font-size:.6rem; margin-bottom:1px; letter-spacing:.02em; line-height:1.1; }
.cw-tight .form-label.req::after{ content:" *"; color:var(--cw-bad); font-weight:800; }
.cw-tight .form-control-sm, .cw-tight .form-select-sm{ font-size:.78rem; min-height:28px; height:28px; padding-top:1px; padding-bottom:1px; border-radius:6px; }
.cw-tight .btn-sm, .cw-tight .btn-xs{ height:28px; }
.cw-tight .mt-1{ margin-top:.25rem !important; }
.cw .is-invalid{ border-color:var(--cw-bad) !important; box-shadow:0 0 0 2px color-mix(in srgb,var(--cw-bad) 16%,transparent) !important; background-image:none !important; padding-right:9px !important; }

/* ---- reports: compact KPI tiles + dense insight tables (no charts) ---- */
.rpt-kpis{ display:grid; grid-template-columns:repeat(auto-fit,minmax(146px,1fr)); gap:10px; }
.rpt-kpi{ border:1px solid var(--m-border); border-left:3px solid var(--m-border-strong); border-radius:10px; background:var(--m-surface); padding:8px 12px; box-shadow:var(--m-shadow-sm); }
.rpt-kpi .l{ font-size:.57rem; text-transform:uppercase; letter-spacing:.05em; color:var(--m-text-soft); font-weight:800; }
.rpt-kpi .v{ font-size:1.5rem; font-weight:800; line-height:1.15; font-variant-numeric:tabular-nums; color:var(--m-text); }
.rpt-kpi .s{ font-size:.62rem; color:var(--m-text-soft); margin-top:1px; }
.rpt-kpi.rpt-success{ border-left-color:var(--cw-good); } .rpt-kpi.rpt-success .v{ color:var(--cw-good); }
.rpt-kpi.rpt-danger{ border-left-color:var(--cw-bad); }  .rpt-kpi.rpt-danger .v{ color:var(--cw-bad); }
.rpt-kpi.rpt-warning{ border-left-color:var(--cw-warn); } .rpt-kpi.rpt-warning .v{ color:#b45309; }
.rpt-kpi.rpt-orange{ border-left-color:#f59e0b; }         .rpt-kpi.rpt-orange .v{ color:#d97706; }

.rpt-h{ display:flex; align-items:center; gap:5px; padding:8px 12px; font-size:.72rem; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--m-text-soft); border-bottom:1px solid var(--m-border); }
.rpt-h .ti{ color:var(--cw-accent); font-size:1rem; }
.rpt-tbl{ font-size:.76rem; }
.rpt-tbl thead th{ font-size:.57rem; text-transform:uppercase; letter-spacing:.03em; color:var(--m-text-soft); font-weight:800; padding:6px 8px; }
.rpt-tbl td{ padding:5px 8px; }
.rpt-tbl tbody tr:hover{ background:color-mix(in srgb,var(--cw-accent) 4%,transparent); }
.rpt-chips{ display:flex; gap:4px; }
.rpt-chip{ font-size:.57rem; font-weight:800; padding:2px 6px; border-radius:6px; background:var(--m-surface-2); border:1px solid var(--m-border); color:var(--m-text-soft); }
.rpt-chip.cpt{ color:var(--cw-accent); } .rpt-chip.icd{ color:#0891b2; } .rpt-chip.mod{ color:#9333ea; }
.rpt-bar{ display:inline-flex; align-items:center; gap:6px; justify-content:flex-end; }
.rpt-bar i{ position:relative; display:block; height:5px; width:46px; border-radius:3px; background:var(--m-surface-2); overflow:hidden; }
.rpt-bar i::after{ content:''; position:absolute; left:0; top:0; bottom:0; width:var(--p,0%); border-radius:3px; background:linear-gradient(90deg,var(--cw-accent),var(--cw-accent-2)); }
.rpt-bar b{ font-size:.64rem; font-weight:700; color:var(--m-text-soft); min-width:28px; text-align:right; }
.rpt-tbl tr.rpt-total td{ font-weight:800; border-top:2px solid var(--m-border-strong); background:var(--m-surface-2); }
.nav-tabs .nav-link{ font-size:.82rem; font-weight:600; }
/* ---- dashboard breakdown panels ---- */
.rpt-section-h{ display:flex; align-items:center; gap:5px; font-size:.7rem; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--m-text); margin:2px 0 8px; }
.rpt-section-h .ti{ color:var(--cw-accent); font-size:1rem; }
.rpt-section-h .text-secondary{ text-transform:none; font-weight:600; letter-spacing:0; }
.rpt-panels{ display:grid; grid-template-columns:repeat(auto-fill,minmax(310px,1fr)); gap:12px; }
.rpt-panel .rpt-h{ padding:7px 12px; }
.rpt-panel .rpt-tbl{ font-size:.74rem; }
.rpt-panel .rpt-tbl td{ padding:4px 10px; }
.rpt-pn{ max-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rpt-pn a{ color:var(--m-text); font-weight:600; text-decoration:none; }
.rpt-pn a:hover{ color:var(--cw-accent); text-decoration:underline; }
.rpt-mini-link{ font-size:.6rem; font-weight:700; text-transform:none; letter-spacing:0; color:var(--m-text-soft); text-decoration:none; display:inline-flex; align-items:center; gap:2px; }
.rpt-mini-link:hover{ color:var(--cw-accent); }
.rpt-panel .rpt-bar i{ width:100%; min-width:40px; }
/* ---- KPI delta + scorecard gauges ---- */
.rpt-kpi .rpt-d{ font-size:.62rem; font-weight:800; margin-top:2px; display:flex; align-items:center; gap:3px; }
.rpt-kpi .rpt-d .ti{ font-size:.82rem; }
.rpt-kpi .rpt-d span{ color:var(--m-text-soft); font-weight:500; }
.rpt-kpi .rpt-d.up{ color:var(--cw-good,#16a34a); }
.rpt-kpi .rpt-d.down{ color:var(--cw-bad,#dc2626); }
.rpt-kpi .rpt-d.flat{ color:var(--m-text-soft); }
.cw-gauges{ display:grid; grid-template-columns:repeat(auto-fit,minmax(118px,1fr)); gap:2px; align-items:start; }
.cw-gauges-row{ grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); }
.cw-gauge{ text-align:center; }
.cw-gauge .cw-gsub{ font-size:.6rem; color:var(--m-text-soft); margin-top:-10px; padding:0 4px; line-height:1.25; }

/* ---- code rejection disclaimer ---- */
.code-note{ margin-top:7px; padding:7px 11px; border-radius:8px; font-size:.74rem; border:1px solid; display:flex; align-items:center; }
.code-note .ti{ font-size:1rem; }
.code-note.warn{ color:#92400e; background:color-mix(in srgb,#f59e0b 12%,var(--m-bg-elev)); border-color:color-mix(in srgb,#f59e0b 48%,var(--m-border)); }
.code-note b{ font-weight:800; }

/* DOS date warning (future = error, >45 days = overridable warning) */
.dos-warn{ margin:6px 12px 0; padding:5px 10px; border-radius:7px; font-size:.72rem; border:1px solid; display:flex; align-items:center; }
.dos-warn .ti{ font-size:.95rem; }
.dos-warn.warn{ color:#92400e; background:color-mix(in srgb,#f59e0b 12%,var(--m-bg-elev)); border-color:color-mix(in srgb,#f59e0b 48%,var(--m-border)); }
.dos-warn.err{ color:var(--cw-bad); background:color-mix(in srgb,var(--cw-bad) 8%,var(--m-bg-elev)); border-color:color-mix(in srgb,var(--cw-bad) 45%,var(--m-border)); }
.dos-warn b{ font-weight:800; }

/* ---- lightweight modal (Add CPT to validation set) ---- */
.cw-modal{ position:fixed; inset:0; z-index:1080; display:flex; align-items:center; justify-content:center; background:rgba(11,18,32,.45); padding:20px; }
.cw-modal-card{ width:100%; max-width:390px; background:var(--m-surface); border:1px solid var(--m-border); border-radius:14px; box-shadow:0 24px 60px rgba(0,0,0,.32); overflow:hidden; }
.cw-modal-h{ padding:12px 16px; font-weight:700; font-size:.84rem; border-bottom:1px solid var(--m-border); display:flex; align-items:center; color:var(--m-text); }
.cw-modal-h .ti{ color:var(--cw-accent); }
.cw-modal-b{ padding:14px 16px; }
.cw-modal-f{ padding:10px 16px; border-top:1px solid var(--m-border); display:flex; justify-content:flex-end; gap:8px; background:var(--m-bg-elev); }

/* ---- coding row: CPT box | ICD zone | Modifier zone | actions.
 *      The ICD and Modifier zones grow as the coder fills boxes; ultra-compact sizing throughout. ---- */
.cpt-line{ position:relative; display:flex; align-items:center; gap:5px; flex-wrap:wrap;
  border:1px solid var(--m-border); border-left:3px solid var(--cw-accent);
  border-radius:7px; background:var(--m-bg-elev); padding:3px 6px; margin-bottom:4px; transition:box-shadow .12s ease,border-color .12s ease; }
.cpt-line:hover{ box-shadow:var(--m-shadow-sm); }

.cpt-seq{ flex:0 0 15px; width:15px; height:15px; border-radius:4px; background:var(--cw-accent); color:#fff;
  display:grid; place-items:center; font-weight:800; font-size:.58rem; }
.cg-cpt{ flex:0 0 150px; }
.cg-units{ flex:0 0 50px; position:relative; }
.cg-units::before{ content:'×'; position:absolute; left:-9px; top:50%; transform:translateY(-50%); color:var(--m-text-soft); font-size:.7rem; }
.cg-units .units-in{ text-align:center; padding-right:2px; }
.cw-codernote{ background:var(--m-surface-2); border:1px solid var(--m-border); border-radius:8px; padding:7px 10px; }
.cw-codernote-body{ color:var(--m-text); white-space:pre-wrap; max-height:88px; overflow:auto; font-size:.78rem; }
.cg-icds{ flex:0 1 auto; display:flex; flex-wrap:wrap; gap:3px; align-items:center; padding-left:6px; border-left:1px dashed var(--m-border); }
.cg-mods{ flex:0 1 auto; display:flex; flex-wrap:wrap; gap:3px; align-items:center; padding-left:6px; border-left:1px dashed var(--m-border); }
.cg-act{ flex:0 0 auto; margin-left:auto; display:flex; gap:2px; align-items:center; }
.cg-act .btn{ padding:1px 5px; }
.cg-icd{ flex:0 0 62px; } .cg-mod{ flex:0 0 58px; }
.cpt-line .form-control, .cpt-line .form-select{ width:100%; height:26px; font-size:.72rem; padding:2px 5px; border-radius:6px; }
.cg-mod .mod-in{ padding-right:13px; padding-left:3px; }

.code-tag{ font-size:.6rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--m-text-soft);
  background:var(--m-surface-2); border:1px solid var(--m-border); border-radius:6px; padding:3px 7px; }
.code-tag.icd{ color:#0891b2; border-color:color-mix(in srgb,#0891b2 35%,var(--m-border)); }
.code-tag.mod{ color:#9333ea; border-color:color-mix(in srgb,#9333ea 35%,var(--m-border)); }

/* monospace code inputs */
.code-input, .cpt-in, .icd-in, .mod-in{ font-family:'JetBrains Mono',ui-monospace,monospace !important; font-weight:600; letter-spacing:.01em; }
.btn-xs{ padding:2px 7px; font-size:.72rem; line-height:1.4; border-radius:7px; }

/* widen the autocomplete popovers since the cells themselves are narrow */
.cg-cpt .ac-list{ min-width:440px; max-width:560px; }
.cg-icd .ac-list{ min-width:380px; max-width:520px; }
#codeAuditCard .ac-list{ min-width:360px; max-width:540px; }   /* audit grid: ICD/CPT picker wide enough to read code + description (its inputs are narrow cells) */
.ac-list .it{ white-space:normal; }   /* let CPT/ICD descriptions wrap so they are fully readable */

/* ---- DOS group: pick a date, then its code rows appear ---- */
/* NOTE: no overflow:hidden here — it would clip the CPT/ICD autocomplete dropdowns. */
.dos-group{ border:1px solid var(--m-border); border-radius:10px; background:var(--m-surface); margin-bottom:7px; box-shadow:var(--m-shadow-sm); }
.dos-head{ display:flex; align-items:center; gap:8px; padding:4px 9px; flex-wrap:wrap; border-radius:9px 9px 0 0;
  background:color-mix(in srgb,var(--cw-accent) 8%,var(--m-bg-elev)); border-bottom:1px solid var(--m-border); }
.dos-badge{ display:inline-flex; align-items:center; gap:4px; font-size:.6rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--cw-accent); }
.dos-head .dos-date{ width:148px; height:28px; font-weight:700; font-size:.78rem; }
.dos-age{ font-size:.68rem; color:var(--m-text-soft); font-weight:600; }
.dos-age b{ color:var(--m-text); font-size:.86rem; font-variant-numeric:tabular-nums; }
.dos-empty{ padding:9px 12px; font-size:.72rem; color:var(--m-text-soft); }
.dos-group .cpt-lines{ padding:4px 9px 6px; }
.dos-group .cpt-line:last-child{ margin-bottom:0; }
/* reveal: the code rows + Add-CPT button appear only after a DOS is chosen; the prompt hides once active */
.dos-group:not(.active) .cpt-lines,
.dos-group:not(.active) .add-cpt-here{ display:none; }
.dos-group.active .dos-empty{ display:none; }

@media (max-width:820px){
  .cg-cpt{ flex:1 1 100%; } .cg-icds, .cg-mods{ flex:1 1 100%; border-left:0; padding-left:0; }
  .dos-head .dos-date{ width:140px; }
}

/* ---- autocomplete dropdown ---- */
.ac-box{ position:relative; }
.ac-list{ position:absolute; z-index:60; left:0; right:0; top:calc(100% + 3px); background:var(--m-bg-elev);
  border:1px solid var(--m-border-strong); border-radius:11px; max-height:300px; overflow:auto; box-shadow:0 18px 44px rgba(0,0,0,.22); display:none; }
.ac-list .it{ padding:8px 13px; cursor:pointer; font-size:.86rem; border-bottom:1px solid var(--m-border); line-height:1.3; }
.ac-list .it:last-child{ border-bottom:0; }
.ac-list .it:hover, .ac-list .it.active{ background:rgba(79,70,229,.12); }
.ac-list .it code{ font-weight:800; color:var(--cw-accent); margin-right:8px; }

/* ---- sticky right rail ---- */
/* top must clear the 40px sticky page header but stay BELOW the rail's natural start
   (~y61) so sticky does not push the first card down and leave a gap at scroll 0. */
.cw-rail{ position:sticky; top:48px; }
.cw-rail .save-grid .btn{ font-weight:600; }

/* ---- history / table ---- */
.cw-hist td, .cw-hist th{ font-size:.78rem; }
.cw-hist thead th{ text-transform:uppercase; letter-spacing:.04em; font-size:.62rem; color:var(--m-text-soft); }

/* ---- past-DOS: ULTRA-COMPACT flat table — demographic columns (shown once per chart, grouped)
       + the chart's codes per DOS. Full width below the chart. ---- */
.cw-hist-flat td, .cw-hist-flat th{ font-size:.66rem; padding:1px 7px; vertical-align:middle; line-height:1.25; }
.cw-hist-flat thead th{ font-size:.52rem; text-transform:uppercase; letter-spacing:.02em; color:var(--m-text-soft); font-weight:800; white-space:nowrap; padding-top:3px; padding-bottom:3px; }
.cw-hist-flat td.cw-demo{ white-space:nowrap; max-width:160px; overflow:hidden; text-overflow:ellipsis; }
.cw-hist-flat td.cw-cpt{ font-family:'JetBrains Mono',ui-monospace,monospace; font-weight:700; color:var(--cw-accent); white-space:nowrap; }
.cw-hist-flat td.text-nowrap{ white-space:nowrap; }
.cw-hist-flat .badge{ font-size:.55rem; padding:.14em .38em; }
/* a heavier rule separates one prior chart's group of DOS lines from the next */
.cw-hist-flat tbody tr.cw-hist-grp td{ border-top:2px solid var(--m-border-strong); }
.cw-hist-flat tbody tr:first-child td{ border-top:0; }
.cw-hist-flat tbody tr:hover td{ background:color-mix(in srgb,var(--cw-accent) 6%,transparent); }

/* ---- audit: code review rows — EXCEL-LIKE compact grid (vertical cell dividers, tiny controls) ---- */
.aud-row{ display:flex; align-items:stretch; gap:0; flex-wrap:wrap;
  border:0 !important; border-left:3px solid var(--m-border) !important; border-bottom:1px solid var(--m-border) !important;
  border-radius:0 !important; padding:0 !important; margin:0 !important; background:transparent; font-size:.7rem; min-height:23px; }
.aud-row:hover{ background:color-mix(in srgb,var(--cw-accent) 5%,transparent); }
.aud-row.ok{ border-left-color:var(--cw-good) !important; }
.aud-row.bad{ border-left-color:var(--cw-bad) !important; background:color-mix(in srgb,var(--cw-bad) 6%,transparent); }
.aud-row > *:not([type="hidden"]){ display:flex; align-items:center; padding:1px 6px; border-right:1px solid var(--m-border); min-width:0; }
.aud-row .code-tag{ flex:0 0 auto; width:44px; justify-content:center; }
.aud-row .aud-code{ flex:0 0 auto; width:76px; font-family:'JetBrains Mono',ui-monospace,monospace; font-weight:700; }
.aud-row .seg{ flex:0 0 auto; padding:0 4px; }
.aud-row .seg .btn{ padding:0 7px; }
.aud-row .aud-detail{ flex:1 1 300px; flex-wrap:wrap; gap:4px; border-right:0; padding:1px 5px; }
.aud-row .aud-detail .form-select, .aud-row .aud-detail .form-control{ height:22px; font-size:.7rem; padding:0 5px; }
.aud-row .m-typesel, .aud-row .m-parent{ height:22px; font-size:.7rem; padding:0 4px; }
.aud-row .aud-move{ flex:0 0 auto; border-right:0; }
.aud-row .aud-dispute{ flex-basis:100%; border-right:0; }
.aud-cat{ width:138px !important; } .cc-in{ width:108px !important; } .cc-sel{ width:94px !important; }
.aud-note{ flex:1 1 90px; min-width:70px; }
.code-tag.cpt{ color:var(--cw-accent); border-color:color-mix(in srgb,var(--cw-accent) 35%,var(--m-border)); }
#codeAuditCard .card-body{ padding:6px 8px; }

/* ---- audit: per-DOS grouping of reviewed codes ---- */
.aud-dos-group{ border:1px solid var(--m-border); border-radius:6px; margin-bottom:8px; }   /* NOT overflow:hidden — it would clip the ICD/CPT autocomplete dropdown */
.aud-dos-head{ display:flex; align-items:center; gap:6px; padding:2px 8px; font-size:.7rem; color:var(--m-text); border-radius:6px 6px 0 0;
  background:color-mix(in srgb,#0ea5e9 8%,var(--m-bg-elev)); border-bottom:1px solid var(--m-border); }
.aud-dos-head .ti{ color:#0ea5e9; }
.aud-dos-age{ margin-left:auto; font-size:.66rem; color:var(--m-text-soft); font-weight:600; }
.aud-dos-group .aud-row{ margin:0 !important; }
.aud-dos-group .aud-row:last-child{ border-bottom:0 !important; }
#audMissing:not(:empty){ border-top:1px dashed var(--m-border); margin-top:4px; padding-top:4px; }
.aud-move{ display:inline-flex; gap:1px; align-items:center; }
.aud-move .btn{ padding:0 4px; line-height:1; }
/* coder's per-error rebuttal reason, shown to the auditor on re-audit (own line, full width) */
.aud-dispute{ flex-basis:100%; font-size:.68rem; color:var(--m-text);
  background:color-mix(in srgb,#f59e0b 12%,transparent); padding:1px 8px; }
/* three independent audit-outcome buttons — solid dark-teal, SIDE-BY-SIDE (per the requested reference).
   The clicked one flips green just before submit so the auditor sees which action is saving. */
.cw-outcome-btns{ display:flex; gap:8px !important; align-items:stretch; }
.cw-outcome{ flex:1 1 0; min-width:0; display:flex; align-items:center; justify-content:center; text-align:center;
  background:#15607d; border:1px solid #114b61; color:#fff; border-radius:7px; padding:9px 8px;
  font-weight:600; font-size:.82rem; line-height:1.15; font-family:inherit; cursor:pointer;
  box-shadow:0 1px 2px rgba(0,0,0,.12); transition:background .12s ease, transform .04s ease; }
.cw-outcome:hover{ background:#124f67; color:#fff; }
.cw-outcome:focus-visible{ outline:2px solid #38bdf8; outline-offset:1px; }
.cw-outcome:active{ transform:translateY(1px); }
.cw-outcome:disabled{ opacity:.5; cursor:not-allowed; }
.cw-outcome .cw-outcome-sub{ display:none; }   /* labels are terse now — the detail lives in the button tooltip */
.cw-outcome-on{ background:#16a34a !important; border-color:#15803d !important; color:#fff !important; }

/* ---- DPO gauge ---- */
.dpo-card{ text-align:center; }
.dpo-num{ font-size:2.4rem; font-weight:800; line-height:1; font-variant-numeric:tabular-nums; }
.dpo-od{ display:flex; justify-content:center; gap:26px; margin-top:6px; }
.dpo-od .n{ font-size:1.3rem; font-weight:700; }
.dpo-od .l{ font-size:.6rem; text-transform:uppercase; letter-spacing:.06em; color:var(--m-text-soft); }

/* make existing Tabler .card markup adopt the workstation look inside .cw */
.cw .card{ border-radius:14px; border:1px solid var(--m-border); box-shadow:var(--m-shadow-sm); overflow:visible; }
.cw .card-header{ border-bottom:1px solid var(--m-border); padding:6px 14px; background:transparent; min-height:0; }
.cw .card-title{ font-size:.74rem; text-transform:uppercase; letter-spacing:.06em; color:var(--m-text-soft); font-weight:700; display:flex; align-items:center; }
.cw .card-title .ti{ color:var(--cw-accent); }
.cw .card-body{ padding:10px 14px; }
.cw .card.mb-3{ margin-bottom:9px !important; }

/* responsive banner */
@media (max-width: 820px){ .cw-banner{ gap:12px; } .cw-banner .pt-fields{ gap:12px; } .cw-rail{ position:static; } }
