/* Same border, color and height as the existing sortable headers. */
button.ukd-sort-header.ukd-select-header{display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;min-width:0;padding:6px 7px!important;cursor:pointer;}
.clearing-table col:first-child{width:92px!important;}
.claims-page .charges-grid table thead th:has(>.ukd-select-header),
table thead th:has(>.ukd-select-header){width:92px!important;min-width:92px!important;max-width:none!important;box-sizing:border-box;}
.ukd-select-mark{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:12px;height:12px;border:1px solid #76999e;border-radius:2px;background:#fff;flex:0 0 12px;}
.ukd-select-header[aria-pressed=true] .ukd-select-mark{background:#007981;border-color:#007981;color:#fff;}
.ukd-select-header[aria-pressed=true] .ukd-select-mark:after{content:'✓';font-size:10px;line-height:1;}
.ukd-select-header[aria-pressed=mixed] .ukd-select-mark:after{content:'';width:6px;height:2px;background:#007981;}
.ukd-select-header:hover:not(:disabled){background:#eaf4f5;}
.ukd-select-header:focus-visible{outline:2px solid #008b95;outline-offset:2px;}
.ukd-select-header:disabled{cursor:default;opacity:.55;}
.ukd-state-control{display:block;position:relative;width:100%;min-width:0;}
.ukd-state-control>input{width:100%!important;min-width:0;box-sizing:border-box;padding-right:48px!important;text-transform:uppercase;}
.ukd-state-control>button.ukd-state-picker{position:absolute;right:1px;top:1px;bottom:1px;height:calc(100% - 2px)!important;min-height:0!important;width:44px!important;min-width:44px!important;max-width:44px!important;padding:0!important;margin:0!important;border:0!important;border-radius:0 4px 4px 0!important;background:transparent!important;color:#174c56;cursor:pointer;display:flex!important;align-items:center;justify-content:center;box-shadow:none!important;}
.ukd-state-picker:after{content:'';width:9px;height:9px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg);}
.ukd-state-picker:hover:not(:disabled),.ukd-state-picker[aria-expanded=true]{background:#eaf4f5!important;}
.ukd-state-picker:disabled{opacity:.45;cursor:default;}
.ukd-state-picker:focus-visible{outline:2px solid #008b95;outline-offset:1px;}
.ukd-state-list{position:fixed;z-index:10000;box-sizing:border-box;margin:0;padding:4px;background:#fff;border:1px solid #aebfc5;border-radius:6px;box-shadow:0 5px 18px #173f5026;overflow-y:auto;overscroll-behavior:contain;color:#173f50;font-size:13px;font-weight:normal;}
.ukd-state-list[hidden]{display:none!important;}
.ukd-state-option{display:flex;align-items:center;gap:12px;padding:9px 10px;min-height:36px;box-sizing:border-box;border-radius:4px;cursor:pointer;line-height:1.35;}
.ukd-state-option b{flex:0 0 24px;}
.ukd-state-option:hover,.ukd-state-option.is-active{background:#eaf4f5;}
.ukd-state-option[aria-selected=true]{background:#dff1f1;color:#075d63;}
.billing-dx-step #additionalDiagnoses[hidden]{display:none!important;}
.billing-dx-step #additionalDiagnoses{margin-top:12px;}
.billing-dx-step .additional-dx-toggle{margin:12px 0 4px;display:inline-flex;align-items:center;justify-content:center;gap:6px;line-height:1.2;}
.billing-tax-summary{display:flex;flex-wrap:wrap;gap:8px 20px;margin:12px 0;padding:10px 12px;background:#f2f8f8;border:1px solid #c6d7da;border-radius:5px;}
.billing-tax-summary [hidden]{display:none!important;}
.cpt-entry-table .evaluation-inline-header #evaluationCptToggle{display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important;height:30px!important;min-height:30px!important;padding:0 10px!important;vertical-align:middle!important;box-sizing:border-box!important;}
.billing-entry-header .billing-authorization-panel{margin-left:auto;align-self:flex-start;min-width:220px;padding:12px 14px;border:1px solid #b6cdd0;border-radius:6px;background:#f8fbfb;}
.claim-authorization{display:flex;flex-wrap:wrap;gap:10px 22px;margin-top:8px;}
.billing-authorization-panel .claim-authorization{flex-direction:column;gap:8px;}
.claim-authorization .authorization-check{display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;width:auto!important;margin:0!important;}
.claim-authorization input[type=checkbox]{width:16px!important;min-width:16px!important;height:16px!important;margin:0!important;flex:0 0 16px;}
.claim-authorization small{display:block;font-size:11px;color:#5d7378;font-weight:normal;max-width:290px;}
.claim-authorization [hidden]{display:none!important;}
@media(max-width:900px){.billing-entry-header .billing-authorization-panel{margin-left:0;min-width:0;width:100%;box-sizing:border-box;}}

#billingForm .billing-entry-header{flex-wrap:wrap;}
#billingForm .billing-entry-header>div:first-child{flex:1 1 420px;min-width:0;}
#billingForm .billing-entry-header>.actions{flex:0 0 auto;display:flex;flex-wrap:wrap;gap:8px;margin-left:auto;max-width:100%;}
#billingForm .billing-entry-header>.actions .button{flex:0 0 auto;white-space:nowrap!important;display:inline-flex;align-items:center;justify-content:center;min-height:36px;height:auto;line-height:1.25;box-sizing:border-box;}
#billingForm .billing-entry-header>.actions .ukd-memo-button{flex-shrink:0;}

.billing-entry-header .billing-authorization-panel{min-width:340px;max-width:450px;box-sizing:border-box;}
.billing-authorization-panel .authorization-source{display:block;margin-top:3px;color:#5d7378;font-size:11px;}
.billing-authorization-panel .claim-authorization{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px;align-items:start;}
.billing-authorization-panel .claim-authorization .authorization-check{align-items:flex-start!important;min-width:0;}
.billing-authorization-panel .authorization-check>span{min-width:0;overflow-wrap:anywhere;}
.billing-authorization-panel .claim-authorization input[type=checkbox]{margin-top:3px!important;}
@media(max-width:900px){.billing-entry-header .billing-authorization-panel{min-width:0;max-width:none;}}

/* Compact two-by-two claim authorization; contextual help stays in Demographics. */
.billing-entry-header .billing-authorization-panel{min-width:360px;max-width:420px;padding:8px 10px;}
.billing-authorization-panel .authorization-source{margin-top:1px;font-size:10px;line-height:1.25;}
.billing-authorization-panel .claim-authorization{margin-top:6px;gap:6px 12px;}
.billing-authorization-panel .claim-authorization .authorization-check{gap:6px!important;line-height:1.25;}
.billing-authorization-panel .claim-authorization small{font-size:10px;line-height:1.2;}
.billing-authorization-panel .claim-authorization input[type=checkbox]{width:14px!important;min-width:14px!important;height:14px!important;flex-basis:14px;margin-top:1px!important;}
@media(max-width:900px){.billing-entry-header .billing-authorization-panel{width:100%;min-width:0;max-width:420px;}}

/* Patient summary at left; authorization and actions share the right edge. */
#billingForm .billing-entry-header{
 display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,420px);
 grid-template-rows:auto 1fr;column-gap:24px;row-gap:12px;align-items:start;
}
#billingForm .billing-entry-header>div:first-child{
 grid-column:1;grid-row:1 / 3;align-self:stretch;overflow-wrap:anywhere;
 display:flex;flex-direction:column;
}
#billingForm .billing-entry-header>div:first-child>p:last-child{margin-top:auto;padding-top:4px;margin-bottom:0;}
#billingForm .billing-entry-header>.billing-authorization-panel{
 grid-column:2;grid-row:1;width:100%;min-width:0;max-width:none;margin:0;
}
#billingForm .billing-entry-header>.actions{
 grid-column:2;grid-row:2;align-self:end;justify-content:flex-end;
 width:100%;min-width:0;margin:0;box-sizing:border-box;
}
@media(max-width:900px){
 #billingForm .billing-entry-header{grid-template-columns:minmax(0,1fr);grid-template-rows:auto;}
 #billingForm .billing-entry-header>div:first-child{grid-column:1;grid-row:auto;}
 #billingForm .billing-entry-header>.billing-authorization-panel{
  grid-column:1;grid-row:auto;width:min(100%,420px);justify-self:end;
 }
 #billingForm .billing-entry-header>.actions{grid-column:1;grid-row:auto;}
}

/* Reserve room for the whole Service Date sort control, even in fixed tables. */
.charts-page .workflow-records .chart-history-table table th:nth-child(2),
.charts-page .workflow-records .chart-history-table table td:nth-child(2),
.billing-page .billing-history .desktop-table table.billing-status-table th:nth-child(2),
.billing-page .billing-history .desktop-table table.billing-status-table td:nth-child(2){
 width:144px!important;min-width:144px!important;max-width:none!important;
 box-sizing:border-box;white-space:nowrap!important;
}
/* Settings headings match the other list tables; body alignment is preserved. */
.settings-shell .settings-pane .table-scroll>table{border-collapse:separate!important;border-spacing:0!important;}
.settings-shell .settings-pane .table-scroll>table>thead>tr>th{
 text-align:center!important;vertical-align:middle!important;background:#edf2f3!important;
 border:0!important;border-bottom:1px solid #c1cdce!important;
}
.settings-shell .settings-pane .table-scroll>table>thead>tr>th:not(:last-child){border-right:1px solid #a4aaa9!important;}
.settings-shell :is(#set-clinics,#set-billing-entities,#set-external-facilities,#set-users,#set-providers,#set-referring,#set-insurance,#set-cpt) .table-scroll>table>thead>tr>th{text-align:center!important;}
.settings-shell .settings-pane .cpt-set-tabs{background:transparent!important;padding:0!important;gap:6px;flex-wrap:wrap;}
.settings-shell .settings-pane .cpt-set-tabs .doc-tab{
 background:#fff!important;border:1px solid #b6cdd0!important;border-bottom:0!important;
 border-top:3px solid transparent!important;padding:9px 16px!important;
 flex:0 1 280px!important;width:auto!important;min-width:0!important;max-width:100%;
}
.settings-shell .settings-pane .cpt-set-tabs .doc-tab.active{
 background:#edf2f3!important;border-top-color:#087f83!important;color:#075d63!important;
}
.settings-shell .settings-pane .cpt-settings-scroll{position:relative;max-height:440px!important;overflow:auto!important;}
.settings-shell .settings-pane .cpt-settings-scroll #cptSetTable>thead>tr>th{
 position:sticky!important;top:0!important;z-index:3!important;background-clip:padding-box;
}

/* Date controls are compact and separated; narrow filters retain their own width. */
.content-area .ukd-date-control{width:min(100%,196px);gap:6px!important;box-sizing:border-box;}
.content-area .ukd-date-control>.ukd-date-entry,.content-area .ukd-date-control>.ukd-date-display{flex:1 1 0!important;width:0!important;min-width:0!important;border-radius:5px!important;}
.content-area .ukd-date-control>.ukd-calendar-button{border:1px solid #9aadaf!important;border-radius:5px!important;}
.content-area .ukd-date-readonly>.ukd-date-entry,.content-area .ukd-date-readonly>.ukd-date-display{width:100%!important;flex:1 1 auto!important;}
.manual-service-date-label{display:block;margin:10px 0 4px;font-size:12px;}
#billingForm .manual-service-date{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:start;}
#billingForm .manual-service-date .ukd-date-control{width:100%!important;}
#billingForm .manual-service-date .ukd-calendar-button{flex-basis:30px!important;width:30px!important;min-width:30px!important;}
#manualServiceDateStatus{display:block;margin-top:5px;color:#526b73;line-height:1.3;}
.subscriber-information{grid-column:1 / -1;min-width:0;}
.subscriber-information>[data-subscriber-details]{padding:12px;margin-top:10px;border:1px solid #c1cdce;border-radius:6px;}
.subscriber-information [hidden]{display:none!important;}
.subscriber-information [data-subscriber-details]>label.check{display:flex;align-items:center;gap:8px;margin:12px 0;}
.subscriber-information [data-subscriber-details]>label.check>input{width:16px;height:16px;flex:0 0 16px;margin:0;}
