.df-tools{display:flex;align-items:end;gap:8px;flex-wrap:wrap;margin:12px 0}.df-tools label{display:grid;gap:4px;font-size:12px}.df-tools input,.df-tools select{min-height:34px;border:1px solid #c6d2de;border-radius:5px;padding:6px;background:white;color:#243b53}.df-summary{display:flex;gap:12px;flex-wrap:wrap;padding:12px;background:#eef5fb;border:1px solid #c9dbea;border-radius:6px;margin:10px 0}.df-summary strong{font-size:16px}.df-card{border:1px solid #d5dee8;border-radius:6px;padding:12px;margin:10px 0;background:white}.df-card h3{margin:0 0 9px}.df-card small{display:block;color:#52697e}.df-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}.df-table{width:100%;border-collapse:collapse;font-size:12px}.df-table th,.df-table td{padding:8px;text-align:left;border-bottom:1px solid #dce4ec;vertical-align:top}.df-table th{background:#edf3f9;position:sticky;top:0;z-index:1}.df-table tbody tr:nth-child(even){background:#f7fafc}.df-table td small{display:block}.df-scroll{overflow:auto;max-height:62vh;border:1px solid #d5dee8;border-radius:6px}.df-dialog{width:min(1040px,96vw);max-height:94dvh;padding:0;border:1px solid #aabaca;border-radius:9px;color:#20364b}.df-dialog::backdrop{background:#142a4290}.df-dialog header,.df-dialog footer{padding:13px 18px;background:#f0f5fa;display:flex;gap:10px;align-items:center;justify-content:space-between}.df-dialog header h2{font-size:20px;margin:0}.df-dialog header p{font-size:12px;margin:4px 0 0}.df-dialog footer{position:sticky;bottom:0;border-top:1px solid #ccd8e4;justify-content:flex-end}.df-dialog .df-body{padding:14px 18px;overflow:auto;max-height:calc(94dvh - 155px)}.df-dialog form>label,.df-dialog .df-grid>label{display:grid;gap:5px;font-size:12px}.df-dialog input,.df-dialog select,.df-dialog textarea{padding:8px;border:1px solid #b8c8d8;border-radius:4px;min-width:0;width:100%;box-sizing:border-box;font:inherit}.df-dialog input[type=checkbox]{width:auto}.df-dialog textarea{min-height:100px}.df-dialog .df-error{white-space:pre-wrap;color:#a32222;margin:8px 0}.df-dialog .df-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}.df-badge{display:inline-block;padding:3px 6px;border-radius:4px;background:#e8f0f8;font-size:11px}.df-badge.pending{background:#fff0dc;color:#87500a}.df-badge.done{background:#e1f3e8;color:#1d6540}.df-inline{cursor:text;outline-offset:-2px}.df-inline:focus{outline:2px solid #2877b3}.df-inline select,.df-inline input{width:100%;min-width:85px;box-sizing:border-box}.df-wide{grid-column:1/-1}.df-audit-controls{display:flex;flex-wrap:wrap;gap:7px}.df-audit-image{display:block;max-width:100%;max-height:65vh;object-fit:contain}.df-checkboxes{display:flex;flex-wrap:wrap;gap:10px;font-size:12px}.df-checkboxes label{display:flex;gap:4px;align-items:center}.df-muted{color:#5a7084;font-size:12px}.df-photo{max-height:180px;max-width:100%;object-fit:contain}.df-table .button{padding:5px 8px;font-size:12px}.df-dialog details{margin:8px 0}.df-dialog summary{cursor:pointer;font-weight:600}.record-section-fields .record-field{min-width:0}@media(max-width:1400px){.df-dialog .df-body{max-height:calc(92dvh - 155px)}.df-table td,.df-table th{padding:6px}.df-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:750px){.df-grid{grid-template-columns:1fr}.df-tools>*{max-width:100%}}@media print{.df-tools,.df-dialog footer{display:none}}
.df-inline input:focus,.df-inline select:focus{outline:2px solid #2877b3}.row-actions button[data-df-action]{white-space:normal;max-width:110px}.df-card pre{white-space:pre-wrap;overflow-wrap:anywhere}
/* Insurer entry fits the desktop viewport with short, grouped rows. */
#recordDialog.insurer-entry{width:calc(100vw - 24px);max-width:1600px;max-height:calc(100dvh - 20px);border-radius:4px}
#recordDialog.insurer-entry form{max-height:calc(100dvh - 22px);overflow:hidden}
#recordDialog.insurer-entry header{padding:7px 12px}
#recordDialog.insurer-entry header .eyebrow{display:none}
#recordDialog.insurer-entry header h2{font-size:17px;margin:0;line-height:1.3}
#recordDialog.insurer-entry .record-fields{padding:7px 10px;min-height:0;overflow:auto}
#recordDialog.insurer-entry .record-section{margin:0 0 6px;padding:5px 7px;border-radius:3px}
#recordDialog.insurer-entry .record-section:last-child{margin-bottom:0}
#recordDialog.insurer-entry .record-section h3{margin:0 0 4px;font-size:12px;line-height:1.2}
#recordDialog.insurer-entry .record-section-fields{display:grid;gap:5px 8px;grid-template-columns:repeat(5,minmax(0,1fr))}
#recordDialog.insurer-entry .insurer-identity .record-section-fields{grid-template-columns:repeat(6,minmax(0,1fr))}
#recordDialog.insurer-entry .insurer-address .record-section-fields{grid-template-columns:repeat(8,minmax(0,1fr))}
#recordDialog.insurer-entry .insurer-providers .record-section-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
#recordDialog.insurer-entry [data-insurer-field=name],#recordDialog.insurer-entry [data-insurer-field=legalName],#recordDialog.insurer-entry [data-insurer-field=contact],#recordDialog.insurer-entry [data-insurer-field=email],#recordDialog.insurer-entry [data-insurer-field=complement],#recordDialog.insurer-entry [data-insurer-field=neighborhood],#recordDialog.insurer-entry [data-insurer-field=address]{grid-column:span 2}
#recordDialog.insurer-entry [data-insurer-field=street],#recordDialog.insurer-entry [data-insurer-field=city]{grid-column:span 3}
#recordDialog.insurer-entry .record-field{font:11px Arial,sans-serif;gap:2px;line-height:1.15}
#recordDialog.insurer-entry .record-field input,#recordDialog.insurer-entry .record-field select{height:27px;min-height:27px;padding:3px 5px;font:12px Arial,sans-serif;border-radius:2px;box-sizing:border-box}
#recordDialog.insurer-entry footer{padding:6px 10px;flex-shrink:0}
#recordDialog.insurer-entry footer .button{height:29px;min-height:29px;padding:3px 12px;font-size:12px}
#recordDialog.insurer-entry [data-insurer-feedback]{flex-shrink:0;font-size:12px}
#recordDialog.insurer-entry [data-insurer-feedback]:empty{display:none}
@media(max-width:1000px){#recordDialog.insurer-entry .record-section-fields,#recordDialog.insurer-entry .insurer-identity .record-section-fields,#recordDialog.insurer-entry .insurer-address .record-section-fields{grid-template-columns:repeat(4,minmax(0,1fr))}#recordDialog.insurer-entry [data-insurer-field=street],#recordDialog.insurer-entry [data-insurer-field=city]{grid-column:span 2}}
@media(max-width:600px){#recordDialog.insurer-entry .record-section-fields,#recordDialog.insurer-entry .insurer-identity .record-section-fields,#recordDialog.insurer-entry .insurer-address .record-section-fields,#recordDialog.insurer-entry .insurer-providers .record-section-fields{grid-template-columns:repeat(2,minmax(0,1fr))}#recordDialog.insurer-entry .record-field{grid-column:span 1}#recordDialog.insurer-entry [data-insurer-field=name],#recordDialog.insurer-entry [data-insurer-field=legalName],#recordDialog.insurer-entry [data-insurer-field=street]{grid-column:span 2}}
.auth-response-table{min-width:680px}.auth-response-table td:nth-child(2){min-width:190px;max-width:330px;overflow-wrap:anywhere}.auth-response-table td:nth-child(4){min-width:105px}.auth-response-table td:nth-child(5){min-width:220px}.auth-response-table input:focus{outline:2px solid #2877b3;outline-offset:1px}[data-auth-return-summary]{padding:10px;background:#edf3f9;border-radius:5px;font-weight:600}
@media(min-width:1000px) and (max-height:800px){.agenda-months .month-day,.agenda-months .month-blank{height:20px;min-height:20px;padding:1px}.agenda-month h3{margin-bottom:4px}.agenda-months{gap:5px}.schedule-scroll{max-height:calc(100dvh - 450px);min-height:180px}.agenda-legend{padding:5px 8px}}

/* Compact SADT request grid, fields 24–28. */
#recordFields .auth-procedures{grid-column:1/-1;min-width:0}
#recordFields .auth-procedure-head,#recordFields .auth-procedure-line{display:grid;grid-template-columns:76px 160px minmax(220px,1fr) 100px 100px 28px;gap:5px;align-items:center;padding:4px;margin:0;border-bottom:1px solid #d8e0e8;background:#fff}
#recordFields .auth-procedure-head{font:12px/1.25 Arial,sans-serif;background:#edf2f7;color:#27435d}
#recordFields .auth-procedure-line input:not([type=hidden]){box-sizing:border-box;width:100%;min-width:0;height:29px;padding:3px 5px;font:12px Arial,sans-serif;border:1px solid #b9c7d6;border-radius:0}
#recordFields .auth-procedure-line input[readonly]{background:#f3f6f9}
#recordFields .auth-procedure-line input[type=hidden]{display:none}
.auth-procedure-lookup{position:relative;min-width:0}
.auth-procedure-results{position:absolute;top:100%;left:0;z-index:25;min-width:100%;width:max-content;max-width:min(620px,65vw);background:#fff;border:1px solid #8ba7c1;box-shadow:0 4px 12px #18344b30}
.auth-procedure-results[hidden]{display:none}
.auth-procedure-results button,.auth-procedure-results>span{display:block;width:100%;padding:7px;text-align:left;font:12px Arial;color:#233e58;border:0;border-bottom:1px solid #e4eaf0;background:#fff;white-space:normal}
.auth-procedure-results button:hover,.auth-procedure-results button:focus{background:#dceafb;outline:1px solid #6a95bb}
.auth-other-items{margin-top:8px}.auth-other-items>summary{cursor:pointer;font-size:12px;padding:5px}
@media(max-width:850px){#recordFields .auth-procedure-head,#recordFields .auth-procedure-line{grid-template-columns:55px 100px minmax(140px,1fr) 70px 70px 24px;gap:3px}}

#recordFields .auth-guide-identity{grid-column:1/-1;min-width:0;overflow-x:auto}
#recordFields .auth-guide-identity .record-section-fields{display:grid;grid-template-columns:105px 90px 135px minmax(165px,1fr) minmax(165px,1fr) 160px;gap:8px;min-width:860px;align-items:end}
#recordFields .auth-guide-identity .record-field{grid-column:auto;min-width:0;margin:0}
#recordFields .auth-guide-identity .record-field>span{font-size:12px;white-space:nowrap}
#recordFields .auth-guide-identity input,#recordFields .auth-guide-identity select{box-sizing:border-box;width:100%;min-width:0;height:31px;font-size:12px;padding:4px 6px}

#recordFields .auth-clinical-indication{grid-column:1/-1;min-width:0}
#recordFields .auth-clinical-indication input{box-sizing:border-box;width:100%}

#view-module.authorization-module>.view-heading{display:none}

#recordDialog.authorization-entry #recordEyebrow{display:none}
#recordFields .auth-operator-return .record-section-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#recordFields .auth-operator-return .record-field{grid-column:auto;min-width:0}
#recordFields .auth-operator-return input{box-sizing:border-box;width:100%;min-width:0}

.schedule-targets [hidden]{display:none!important}.schedule-day-options{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.schedule-day-options label{display:flex;align-items:center;gap:5px}.schedule-day-options input{width:auto!important}.schedule-target-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.schedule-target-list label{display:grid;gap:5px}.schedule-target-list select{width:100%;min-width:0}[data-schedule-error]{color:#ac2727}[data-specific-date]{display:grid;gap:6px;max-width:240px}

.auth-response-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:12px}.auth-response-fields label{display:grid;gap:5px;min-width:0}.auth-response-fields input{width:100%;min-width:0;box-sizing:border-box}@media(max-width:700px){.auth-response-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Authorization list fits the module and colors the entire row by decision. */
#view-module.authorization-module .module-table-wrap{width:100%;max-width:100%;box-sizing:border-box;overflow-x:hidden}
#view-module.authorization-module .module-table{width:100%;min-width:0;table-layout:fixed}
#view-module.authorization-module .module-table th,#view-module.authorization-module .module-table td{min-width:0;width:auto;padding:7px 5px;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}
#view-module.authorization-module .row-actions-head{width:auto;text-align:center}
#view-module.authorization-module .row-actions{white-space:normal;text-align:center}
#view-module.authorization-module .row-actions button{display:inline-block;max-width:100%;margin:2px;padding:5px;white-space:normal;overflow-wrap:anywhere;vertical-align:middle}
#view-module.authorization-module .auth-status-row{--auth-row-color:#e5e7eb}
#view-module.authorization-module .auth-status-row[data-authorization-status="Autorizada"]{--auth-row-color:#c7edce}
#view-module.authorization-module .auth-status-row[data-authorization-status="Parcial"]{--auth-row-color:#fff0b3}
#view-module.authorization-module .auth-status-row[data-authorization-status="Negada"]{--auth-row-color:#f5cccc}
#view-module.authorization-module .module-table .auth-status-row,#view-module.authorization-module .module-table .auth-status-row td{background:var(--auth-row-color);color:#263445}
#view-module.authorization-module .auth-status-row .status-tag{max-width:100%;white-space:normal;overflow-wrap:anywhere;background:#ffffff80;color:inherit}

#view-module.authorization-module .auth-status-row[data-authorization-status="Executada"]{--auth-row-color:#c7edce}
#view-module.authorization-module .auth-status-row[data-authorization-status="Vencida (não executada)"]{--auth-row-color:#e5e7eb}
/* Compact procedure-kit workbench, with a fixed toolbar and two editable grids. */
body.kb-mode .app-footer,body.kb-mode #view-module>.view-heading,body.kb-mode #view-module>.module-toolbar,body.kb-mode #globalNewButton{display:none!important}
body.kb-mode .clinic-shell{display:flex;flex-direction:column;height:100dvh;min-height:0}
body.kb-mode .clinic-sidebar{flex:0 0 auto}
body.kb-mode .clinic-main{margin:0;width:100%;min-height:0;flex:1;overflow:hidden;display:flex;flex-direction:column}
body.kb-mode .clinic-topbar{flex-shrink:0}
body.kb-mode #view-module:not(.hidden){display:flex;flex:1;min-height:0;padding:0 12px 10px;overflow:hidden}
body.kb-mode #moduleContent{display:flex;flex:1;min-width:0;min-height:0}
.kb-workspace{width:100%;min-height:0;display:flex;flex-direction:column;border:1px solid #a8b7c7;background:#fff;color:#263746;font:13px/1.25 Arial,sans-serif}
.kb-workspace *,.kb-picker *{box-sizing:border-box}
.kb-workspace button,.kb-workspace input,.kb-workspace select,.kb-picker button,.kb-picker input{font:inherit;color:inherit;border-radius:0}
.kb-workspace button,.kb-picker button{cursor:pointer;border:1px solid #b8c5d3;background:#f1f4f8;padding:4px 8px}
.kb-workspace button:hover,.kb-picker button:hover{background:#dceafd}
.kb-workspace button:disabled{opacity:.45;cursor:default}
.kb-workspace :focus-visible,.kb-picker :focus-visible{outline:2px solid #2877b3;outline-offset:-2px}
.kb-heading{display:flex;align-items:center;gap:12px;padding:8px 14px;border-bottom:1px solid #b9c5d2;flex-shrink:0}
.kb-heading>span{color:#c44242;font-size:28px}.kb-heading b{display:block;font-size:14px}.kb-heading small{display:block;margin-top:3px}
.kb-toolbar{display:flex;gap:5px;flex-shrink:0;padding:5px 12px;background:#edecf3;border-bottom:1px solid #b7beca}
.kb-toolbar button{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:65px;border-color:transparent;background:transparent;padding:3px 12px}
.kb-toolbar button>span{font-size:25px;line-height:28px;color:#3c79ae}.kb-toolbar [data-kb-action=save]{color:#b32424}.kb-toolbar [data-kb-action=exit]{margin-left:auto}
.kb-body{display:grid;grid-template-columns:245px minmax(0,1fr);gap:14px;padding:12px;flex:1;min-height:0}
.kb-tree{min-height:0;display:flex;flex-direction:column;gap:7px;padding-right:14px;border-right:1px solid #d6dce4}
.kb-tree label{display:flex;flex-direction:column;gap:3px}.kb-tree input,.kb-tree select{width:100%;min-height:28px;border:1px solid #afbed0;background:#fff;padding:3px}
.kb-tree-scroll{flex:1;min-height:0;overflow:auto}.kb-tree-scroll b{display:block;margin:8px 0;font-size:13px}.kb-tree-scroll button{display:block;width:100%;text-align:left;padding:5px 8px 5px 25px;background:transparent;border:0;overflow-wrap:anywhere}.kb-tree-scroll button.selected{background:#e5e2fb;color:#233d67}.kb-tree-scroll [hidden]{display:none}.kb-tree small{font-size:11px;color:#657688}
.kb-editor{min-width:0;min-height:0;display:flex;flex-direction:column;gap:10px}
.kb-context{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;flex-shrink:0}.kb-context label{display:grid;grid-template-columns:135px minmax(0,1fr);align-items:center;gap:6px}.kb-context label{max-width:620px}.kb-tree-empty{display:block;padding:6px 10px;color:#65758a;font-size:12px;line-height:1.3}.kb-context select{width:100%;height:27px;border:1px solid #afbed0;background:#f8fafc;padding:2px}.kb-context strong{font-size:12px;color:#2877b3;align-self:center}
.kb-tables{display:grid;grid-template-rows:minmax(0,1.4fr) minmax(0,1fr);gap:12px;min-height:0;flex:1}
.kb-grid{margin:0;padding:4px 8px 5px;border:1px solid #b6c0cc;display:flex;flex-direction:column;min-width:0;min-height:0}.kb-grid legend{font-size:13px;padding:0 5px}.kb-caption{text-align:center;padding:1px 0 4px;flex-shrink:0}.kb-scroll{overflow:auto;min-height:0;flex:1}
.kb-grid table{width:100%;min-width:590px;table-layout:fixed;border-collapse:collapse;font-size:12px}.kb-grid th{background:#dfdfe2;color:#34404e;font-weight:400;text-transform:none;letter-spacing:normal;position:sticky;top:0;z-index:1;padding:3px;border:1px solid #ccd1d9;text-align:left}.kb-grid td{border:1px solid #d1d7df;padding:0;height:26px;vertical-align:middle}.kb-grid tbody tr:nth-child(odd){background:#f0f7ef}.kb-grid tbody tr:nth-child(even){background:#fff}.kb-grid input:not([type=checkbox]),.kb-grid select{background:transparent;border:0;width:100%;min-height:25px;padding:3px}.kb-grid input[type=number]{text-align:right}.kb-grid input[type=checkbox]{margin:5px;width:15px;height:15px}.kb-grid .kb-product{display:block;width:100%;text-align:left;background:transparent;border:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:3px 5px}.kb-grid .kb-empty{padding:10px;color:#687a8b;text-align:center}
.kb-grid-footer{display:flex;align-items:center;gap:7px;padding-top:5px;flex-shrink:0}.kb-grid-footer button{font-size:12px;padding:3px 7px}.kb-grid-footer span{margin-left:auto;font-size:12px;white-space:nowrap}
.kb-message{flex-shrink:0;padding:5px 12px;border-top:1px solid #d4dce5;background:#f0f4f8;color:#48647d;font-size:12px}.kb-message.error{color:#b42323;background:#fff3f1}
.kb-picker{width:min(850px,94vw);max-height:80dvh;padding:0;border:1px solid #9aafc3;color:#263746;background:#fff}.kb-picker::backdrop{background:#24384c55}.kb-picker form{display:flex;flex-direction:column;max-height:78dvh}.kb-picker header,.kb-picker footer{padding:12px;background:#edf2f7;flex-shrink:0}.kb-picker h2{font-size:17px;margin:0 0 10px}.kb-picker input[type=search]{width:100%;padding:8px;border:1px solid #b3c3d4}.kb-picker-list{overflow:auto;min-height:0;padding:6px}.kb-picker-list label{display:grid;grid-template-columns:22px 100px minmax(0,1fr);gap:7px;align-items:center;padding:6px;border-bottom:1px solid #e0e6ed;font-size:13px}.kb-picker-list label[hidden]{display:none}.kb-picker-list b{font-weight:400}.kb-picker footer{display:flex;justify-content:flex-end;gap:8px}
@media(max-width:1050px){.kb-body{grid-template-columns:205px minmax(0,1fr);gap:8px;padding:8px}.kb-tree{padding-right:8px}.kb-context label{grid-template-columns:115px minmax(0,1fr)}}
@media(max-height:740px){.kb-heading{padding:5px 10px}.kb-heading small{display:none}.kb-toolbar{padding:2px 8px}.kb-toolbar button{flex-direction:row;min-width:0;padding:2px 9px}.kb-toolbar button>span{font-size:20px;line-height:24px}.kb-body{padding:7px}.kb-context{gap:5px}.kb-tables{gap:6px}.kb-tree small{display:none}}
@media(max-width:740px){body.kb-mode .clinic-main{overflow:auto}.kb-body{grid-template-columns:1fr;overflow:auto}.kb-tree{max-height:230px;border-right:0;border-bottom:1px solid #d6dce4}.kb-editor{min-height:430px}.kb-tables{min-height:320px}}
.kb-grid .kb-quick-row{background:#f9fbff!important}.kb-grid .kb-quick-row input::placeholder{color:#718399;font-size:12px}.kb-grid .kb-quick-row [data-kb-clear-quick]{padding:2px 5px;border:0;background:transparent}.kb-grid-footer{flex-wrap:wrap}
.kb-suggestions{position:fixed;z-index:1500;overflow:auto;max-height:230px;background:white;border:1px solid #8aa7c4;box-shadow:0 5px 14px #20344a33;font:13px/1.3 Arial,sans-serif;overscroll-behavior:contain}.kb-suggestions[hidden]{display:none}.kb-suggestions button{display:grid;grid-template-columns:105px minmax(0,1fr);gap:8px;width:100%;min-height:34px;text-align:left;padding:7px 9px;border:0;border-bottom:1px solid #e0e7ef;border-radius:0;background:white;color:#263746;font:inherit;cursor:pointer}.kb-suggestions button[aria-selected=true],.kb-suggestions button:hover{background:#dceaff}.kb-suggestions b{font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kb-suggestions span{font-variant-numeric:tabular-nums}.kb-no-result{padding:10px;color:#62778c}
/* Matriz compacta de procedimentos/taxas por convênio. */
.price-matrix-module .pm-scroll{max-height:calc(100dvh - 330px);min-height:180px;overflow:auto;border:1px solid #b9c8d8;background:white}
.pm-table{--pm-code-width:84px;--pm-item-width:clamp(240px,24vw,340px);--pm-insurer-width:76px;table-layout:fixed;border-collapse:separate;border-spacing:0;width:calc(100% - 120px);min-width:calc(var(--pm-code-width) + var(--pm-item-width) + var(--pm-insurer-count,1)*var(--pm-insurer-width));margin-right:120px;font:12px Arial,sans-serif;color:#29435b}
.pm-table .pm-code-col{width:var(--pm-code-width)}.pm-table .pm-insurer-col{width:var(--pm-insurer-width)}
.pm-table th,.pm-table td{border-right:1px solid #d5dfe8;border-bottom:1px solid #d5dfe8;padding:2px 5px;min-width:0;height:auto;line-height:1.2;white-space:normal;overflow-wrap:anywhere;vertical-align:middle}
.pm-table thead{position:sticky;top:0;z-index:3}.pm-table thead th{background:#dfebf5;min-height:0;text-align:center}.pm-table thead .pm-code-row th,.pm-table thead .pm-code-row td{background:#edf3f8;height:auto}
.pm-table tr>:first-child,.pm-table tr>:nth-child(2){position:sticky;left:0;min-width:0;max-width:none;background:#f5f8fc;text-align:left;z-index:2}.pm-table tr>:nth-child(2){left:var(--pm-code-width)}.pm-table thead tr>:first-child,.pm-table thead tr>:nth-child(2){z-index:4}
.pm-table tbody th{font-weight:normal}.pm-item-code{display:inline-block;white-space:nowrap;margin-right:5px;font-weight:bold;color:#53718e}
.pm-table input{box-sizing:border-box;width:100%;min-width:0;height:22px;padding:1px 5px;border:1px solid transparent;border-radius:2px;background:white;text-align:right;font:12px Arial;color:#263c51}
#moduleContent:not(.catalog-keyboard-navigation) .pm-table input:hover{border-color:#adc2d6}.pm-table input:focus{outline:2px solid #3a80b5;outline-offset:-1px}.pm-table input.pm-inherited{background:#eef6ff;color:#576f86}.pm-table input.pm-invalid{border-color:#bd3232;background:#fff1f1}
.pm-table small{display:block;color:#6e8194;font-weight:normal}#moduleContent:not(.catalog-keyboard-navigation) .pm-table tbody tr:hover>th{background:#e9f2fa}
.pm-tabs{display:flex;gap:2px}.pm-tabs button{font:600 12px Arial;padding:7px 13px;border:1px solid #b9c8d8;background:#f3f6fa;color:#3b566f;cursor:pointer}.pm-tabs button[aria-selected=true]{background:#dcebf8;border-bottom:3px solid #3a80b5}
.price-matrix-module #moduleExtraToolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.pm-help{font-size:11px;color:#62768b;margin:7px 0}.price-matrix-module .view-heading{padding-top:10px}.price-matrix-module #pm-feedback{font-size:11px;color:#536f87}
/* Shared typography for the stock register and the price matrix. */
:root{--catalog-font:Arial,Helvetica,sans-serif;--catalog-font-size:12px}
.module-table,.pm-table{font-family:var(--catalog-font)}
.module-table th,.module-table td,.pm-table th,.pm-table td{font-family:var(--catalog-font);font-size:var(--catalog-font-size);letter-spacing:0}
.pm-table thead th{font-weight:700}
.pm-table tbody th,.pm-table td,.pm-item-code{font-weight:400}
.inline-cell-editor,.pm-table input{font-family:var(--catalog-font);font-size:var(--catalog-font-size);font-weight:400}
.price-matrix-module .pm-tabs button{font-family:var(--catalog-font);font-size:var(--catalog-font-size)}
.price-matrix-module .pm-help,.price-matrix-module #pm-feedback{font-family:var(--catalog-font);font-size:10px}
/* Stock is the shared presentation for every table under Cadastros. */
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table{font-family:var(--catalog-font);font-size:var(--catalog-font-size);color:#29313b}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table th,:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table td{font-family:var(--catalog-font);font-size:var(--catalog-font-size);line-height:1.2;letter-spacing:0;text-transform:none;white-space:normal;overflow-wrap:anywhere;height:auto;vertical-align:middle}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table thead th{background:#f3f2dc;color:#384455;font-weight:700;text-align:left;padding:4px 8px;border-right:1px solid #d5d6c9;border-bottom:1px solid #aab2bd}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table tbody td,:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table tbody th{font-weight:400;padding:4px 8px;color:#29313b;border-right:1px solid #fff8;border-bottom:1px solid #fff8}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table tbody tr:nth-child(odd){background:#c7f2c7}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table tbody tr:nth-child(even){background:#fffde1}
#moduleContent:not(.catalog-keyboard-navigation) .catalog-table tbody tr:hover{background:#bdd2fa}
#moduleContent.catalog-keyboard-navigation .catalog-table tbody tr:has(.catalog-grid-cell:focus-within){background:#bdd2fa}
#moduleContent.catalog-keyboard-navigation .catalog-table .catalog-grid-cell:focus-within{background:#aecdeb}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table tbody tr>td,:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table tbody tr>th{background:inherit}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table .inventory-sort-button{display:flex;align-items:center;justify-content:space-between;gap:5px;width:100%;padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:700;text-align:left;white-space:normal;cursor:pointer}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table .inventory-sort-button span{flex-shrink:0;font-size:10px}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table .inventory-sort-button:focus-visible{outline:2px solid #386eaa;outline-offset:3px}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table input,:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table select,:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table .kb-product{font-family:var(--catalog-font);font-size:var(--catalog-font-size);font-weight:400;line-height:1.2}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table .kb-product{white-space:normal;overflow-wrap:anywhere;overflow:visible;text-overflow:clip;height:auto}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table .status-tag,:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table .kind-tag{font-size:inherit}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table .row-actions{background:#f5f8fb;white-space:nowrap}
/* Compact price columns; diagonal names and crosshair follow keyboard focus. */
#moduleContent .pm-table .pm-name-row th{height:144px;vertical-align:bottom}
#moduleContent .pm-table .pm-insurer-heading{position:relative;padding:0;overflow:visible}
#moduleContent .pm-table .pm-insurer-heading .inventory-sort-button{position:absolute;left:12px;bottom:10px;width:170px;min-height:24px;max-height:42px;overflow:hidden;transform:rotate(-45deg);transform-origin:left bottom;justify-content:flex-start;gap:4px;white-space:normal;line-height:1.15}
#moduleContent .pm-table tbody td,#moduleContent .pm-table .pm-code-row td{padding:1px 2px}
#moduleContent .pm-table tbody th{padding:2px 5px}
#moduleContent .pm-table .pm-procedure-code{white-space:nowrap;font-variant-numeric:tabular-nums;padding:2px 5px}
#moduleContent .pm-table input{padding:1px 2px;font-variant-numeric:tabular-nums}
#moduleContent .pm-table .pm-active-row>td,#moduleContent .pm-table .pm-active-row>th,#moduleContent .pm-table .pm-active-column{background:#dceaf9}
#moduleContent .pm-table .pm-active-row>:nth-child(-n+2),#moduleContent .pm-table thead .pm-active-column{background:#bcd7f1;color:#153f68;font-weight:700}
#moduleContent .pm-table .pm-active-cell{background:#aecdeb;outline:2px solid #2877b3;outline-offset:-2px}
#moduleContent .pm-table .pm-active-row input:not(.pm-invalid),#moduleContent .pm-table .pm-active-column input:not(.pm-invalid){background:transparent}
#moduleContent .pm-table tbody td:nth-child(n+3),#moduleContent .pm-table .pm-code-row td{scroll-margin-left:calc(var(--pm-code-width) + var(--pm-item-width) + 8px);scroll-margin-top:176px}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table .catalog-actions-cell{width:52px;min-width:52px;max-width:52px;padding:2px;text-align:center;white-space:nowrap}
#moduleContent .catalog-delete-button,#moduleContent .catalog-edit-button{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;min-height:0;padding:3px;border:0;border-radius:3px;background:transparent;color:#ab3030;cursor:pointer}
#moduleContent .catalog-edit-button{color:#286ba0}
#moduleContent .catalog-edit-button:hover{background:#dceaf9;color:#174b74}
#moduleContent .catalog-delete-button:hover{background:#fbdada;color:#871d1d}
#moduleContent .catalog-delete-button:focus-visible,#moduleContent .catalog-edit-button:focus-visible{outline:2px solid #2877b3;outline-offset:1px}
@media print{.catalog-actions-cell{display:none!important}}
/* Compact kit workspace: vertical commands leave the height for the two grids. */
.kb-workspace{display:grid;grid-template-columns:64px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto}
.kb-heading{grid-column:1/-1;padding:5px 10px;gap:8px}.kb-heading>span{font-size:21px}.kb-heading b{font-size:13px}
.kb-toolbar{grid-column:1;grid-row:2;flex-direction:column;gap:3px;padding:5px 3px;min-height:0;overflow:auto;border-bottom:0;border-right:1px solid #b7beca}
.kb-toolbar button{flex-direction:column;gap:1px;min-width:0;min-height:43px;padding:3px 2px;flex-shrink:0;font-size:11px}
.kb-toolbar button>span{font-size:21px;line-height:23px}.kb-toolbar [data-kb-action=exit]{margin-left:0;margin-top:auto}
.kb-body{grid-column:2;grid-row:2;grid-template-columns:210px minmax(0,1fr);gap:8px;padding:6px;overflow:hidden}
.kb-tree{gap:5px;padding-right:8px}.kb-tree small{font-size:10px;line-height:1.2}
.kb-editor{gap:4px}.kb-context{grid-template-columns:auto minmax(0,620px);justify-content:space-between;gap:8px;align-items:center}
.kb-context label{grid-column:2;grid-row:1;grid-template-columns:auto minmax(0,1fr);width:100%;font-size:12px}
.kb-context strong{grid-column:1;grid-row:1;font-size:11px}.kb-context select{height:24px;padding:1px 3px}
.kb-tables{gap:5px;grid-template-rows:minmax(0,1.5fr) minmax(0,1fr)}
.kb-grid{padding:1px 4px 3px}.kb-grid legend{font-size:12px;font-weight:700;line-height:22px}
.kb-grid legend button{font-size:17px;line-height:18px;padding:0 5px;border:0;background:transparent;vertical-align:middle}.kb-item-count{font-size:11px;font-weight:400;color:#65758a}
#moduleContent .kb-grid .catalog-table th{padding:3px 4px}
#moduleContent .kb-grid .catalog-table td{padding:0 3px}
#moduleContent .kb-grid .catalog-table input:not([type=checkbox]),#moduleContent .kb-grid .catalog-table select{min-height:22px;height:22px;padding:1px 3px}
#moduleContent .kb-grid .catalog-table .kb-product{min-height:22px;padding:2px 3px}
#moduleContent .kb-grid .catalog-table .kb-row-actions{padding:0;white-space:nowrap;text-align:center}
#moduleContent .catalog-grid-cell{position:relative;cursor:text}
#moduleContent .catalog-grid-cell:focus-within,#moduleContent .catalog-grid-cell:focus{outline:2px solid #2877b3;outline-offset:-2px}
#moduleContent .catalog-grid-cell input,#moduleContent .catalog-grid-cell textarea,#moduleContent .catalog-grid-cell select{width:100%;min-width:0;box-sizing:border-box;font:inherit;border:0;border-radius:0;background:transparent;color:inherit;padding:2px 4px;outline:none}
#moduleContent .catalog-grid-cell textarea{height:2.5em;min-height:0;resize:vertical}
#moduleContent .catalog-grid-cell.catalog-grid-dirty{box-shadow:inset 3px 0 #ca8b1a}
#moduleContent .catalog-grid-cell select[size]:not([size="0"]){background:#fff;border:1px solid #2877b3;box-shadow:0 4px 14px #0003;padding:0}
#moduleContent .catalog-grid-cell select option{padding:4px 6px;min-height:26px}
.kb-row-actions button,.kb-grid .kb-row-actions [data-kb-clear-quick]{width:22px;height:22px;min-height:0;padding:0;border:0;background:transparent;font-size:17px;line-height:20px;color:#286ba0}
.kb-row-actions [data-kb-delete-row],.kb-grid .kb-row-actions [data-kb-clear-quick]{color:#b43333}
.kb-message{grid-column:1/-1;font-size:11px;padding:3px 8px;line-height:1.2}
.kb-procedure-search{position:relative;flex-shrink:0}
.kb-procedure-results{position:absolute;top:100%;left:0;width:min(460px,65vw);max-height:240px;overflow:auto;z-index:8;background:#fff;border:1px solid #8aa7c4;box-shadow:0 4px 10px #20344a33}
.kb-procedure-results[hidden]{display:none}
.kb-procedure-results button{display:block;width:100%;padding:5px 7px;text-align:left;border:0;border-bottom:1px solid #dde5ee;background:white;font-size:12px;overflow-wrap:anywhere}
.kb-procedure-results button[aria-selected=true]{background:#dceaff}.kb-procedure-results>span{display:block;padding:6px;font-size:12px}
@media(max-width:1050px){.kb-body{grid-template-columns:175px minmax(0,1fr);gap:5px;padding:5px}.kb-context{grid-template-columns:auto minmax(0,1fr)}.kb-context label{grid-template-columns:auto minmax(0,1fr)}}
@media(max-width:740px){.kb-body{grid-template-columns:1fr;overflow:auto}.kb-tree{max-height:180px;min-height:100px;border-right:0;padding-right:0}.kb-editor{min-height:430px}.kb-procedure-results{width:100%}}

#view-module.authorization-module .auth-status-row[data-authorization-status="Cancelada"]{--auth-row-color:#e5e7eb}

/* Authorization list shares the compact catalog table, retaining status colors. */
#view-module.authorization-module{--auth-inactive-color:#f5cccc}
#view-module.authorization-module .auth-status-row[data-authorization-status="Cancelada"],
#view-module.authorization-module .auth-status-row[data-authorization-status="Vencida (não executada)"]{--auth-row-color:var(--auth-inactive-color)}
#view-module.authorization-module :is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table{width:100%;min-width:0;table-layout:fixed}
#view-module.authorization-module :is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table th,
#view-module.authorization-module :is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table td{padding:4px 8px;font:12px/1.2 Arial,Helvetica,sans-serif;letter-spacing:0;white-space:normal;overflow-wrap:anywhere;height:auto;vertical-align:middle}
#view-module.authorization-module :is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table thead th{font-weight:700;background:#f3f2dc;color:#384455}
#view-module.authorization-module :is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table .auth-status-row td{background:var(--auth-row-color)}
#view-module.authorization-module :is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table .row-actions-head,
#view-module.authorization-module :is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table .row-actions{text-align:center;white-space:normal}
#view-module.authorization-module :is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table .row-actions button{margin:1px;padding:2px 4px;min-height:23px;font:11px/1.2 Arial,Helvetica,sans-serif;white-space:normal}
#view-module.authorization-module :is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table small{font-size:11px;line-height:1.2}

/* Keep one authorization per line; full values remain in cell tooltips. */
#view-module.authorization-module :is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table th,
#view-module.authorization-module :is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table td{padding:4px 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
#view-module.authorization-module :is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table .inventory-sort-button{min-width:0;white-space:nowrap;overflow:hidden;font-size:11px;gap:2px}
#view-module.authorization-module :is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table .row-actions{white-space:nowrap;overflow:visible}
#view-module.authorization-module :is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table .row-actions button{display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:max-content;max-width:none;height:auto;min-height:26px;margin:2px;padding:4px 8px;font:12px/1.2 Arial,Helvetica,sans-serif;white-space:nowrap;vertical-align:middle;box-sizing:border-box}
#view-module.authorization-module :is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table .status-tag{display:inline-block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;font-size:11px;padding:2px 4px}

.auth-list-tabs{display:flex;align-items:center;gap:2px;flex-wrap:wrap}
.auth-list-tabs button{border:1px solid #b9c7d5;border-bottom:2px solid transparent;background:#edf3f8;color:#36566e;padding:5px 10px;font:12px Arial;white-space:nowrap;cursor:pointer}
.auth-list-tabs button[aria-selected="true"]{background:#fff;color:#194c75;border-bottom-color:#2d6f9e;font-weight:700}
.auth-list-tabs button:focus-visible{outline:2px solid #327aad;outline-offset:1px}

.auth-reference-search{position:relative;min-width:0;width:100%}
.auth-reference-search>input{width:100%;box-sizing:border-box}
.auth-reference-results{position:absolute;left:0;right:0;top:100%;z-index:20;max-height:240px;overflow:auto;background:#fff;border:1px solid #9eb3c7;box-shadow:0 4px 10px #23354a22}
.auth-reference-results[hidden]{display:none}
.auth-reference-results button{display:block;width:100%;border:0;border-bottom:1px solid #e4ebf2;background:#fff;text-align:left;padding:6px 8px;color:#263b50;font:12px Arial;cursor:pointer;white-space:normal}
.auth-reference-results button:hover,.auth-reference-results button[aria-selected="true"]{background:#dcebf8}
.auth-reference-results small{display:block;font-size:11px;color:#60748a;margin-top:2px}
.auth-reference-results>span{display:block;padding:8px;font:12px Arial;color:#60748a}

/* Compact insurer columns, identified by their own header keys. */
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table:has([data-catalog-sort="requestingProviderId"]) th:has([data-catalog-sort="directAccreditation"]){width:46px}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table:has([data-catalog-sort="requestingProviderId"]) th:has([data-catalog-sort="requestingProviderId"]),
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table:has([data-catalog-sort="requestingProviderId"]) th:has([data-catalog-sort="executingProviderId"]){width:13%}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table:has([data-catalog-sort="requestingProviderId"]) th:has([data-catalog-sort="cnpj"]){width:145px}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table:has([data-catalog-sort="requestingProviderId"]) td[data-grid-field="cnpj"]{white-space:nowrap;overflow-wrap:normal;word-break:normal}
:is(#moduleContent,#recordDialog .transfer-deduction-editor) .catalog-table td[data-grid-field="directAccreditation"]{text-align:center}


#recordDialog .transfer-conditions-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
#recordDialog .transfer-conditions-grid [data-transfer-condition="professionalId"]{grid-column:1/5}
#recordDialog .transfer-conditions-grid [data-transfer-condition="active"]{grid-column:5/7}
#recordDialog .transfer-conditions-grid [data-transfer-condition="insurerId"]{grid-column:1/3}
#recordDialog .transfer-conditions-grid [data-transfer-condition="procedureId"]{grid-column:3/5}
#recordDialog .transfer-conditions-grid [data-transfer-condition="directAccreditation"]{grid-column:5/7}


#recordDialog .transfer-professionals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 16px;max-height:130px;overflow:auto;border:1px solid #b8c8d8;padding:6px;background:white}#recordDialog .transfer-professionals label{display:flex;align-items:center;gap:6px;padding:2px;font-weight:400}#recordDialog .transfer-professionals input[type=checkbox]{width:16px;height:16px;margin:0}#recordDialog .transfer-conditions-grid select[hidden],#recordDialog .transfer-conditions-grid .record-field[hidden]{display:none}

#recordDialog .agenda-limit-actions{display:flex;flex-direction:column;gap:8px}#recordDialog .agenda-limit-actions label{display:flex;align-items:center;gap:7px;font-weight:400}#recordDialog .agenda-limit-actions input[type=radio]{width:16px;height:16px;margin:0}#recordDialog .record-field:has(.agenda-limit-actions)>select[hidden]{display:none}

#recordDialog .transfer-deduction-editor{grid-column:1/-1;min-width:0}
#recordDialog .transfer-deduction-scroll{overflow-x:auto;margin-bottom:10px}
#recordDialog .transfer-deduction-editor table{width:100%;min-width:760px}
#recordDialog .transfer-deduction-editor td{vertical-align:middle}
#recordDialog .transfer-deduction-editor td:nth-child(1){width:25%}
#recordDialog .transfer-deduction-editor td:nth-child(2){width:32%}
#recordDialog .transfer-deduction-editor td:nth-child(3){width:18%}
#recordDialog .transfer-deduction-editor input,#recordDialog .transfer-deduction-editor select{width:100%;min-width:0}
#recordDialog .transfer-deduction-target{display:flex;align-items:center;gap:6px;margin-top:5px;font:inherit}
#recordDialog .transfer-deduction-target input[type=checkbox]{width:17px;height:17px;margin:0}
#recordDialog .transfer-deduction-editor input:not([type=checkbox]),#recordDialog .transfer-deduction-editor select{font-family:var(--catalog-font);font-size:var(--catalog-font-size);min-height:28px;padding:3px 5px}

#recordDialog .transfer-professionals label{min-width:0;overflow-wrap:anywhere}
#recordDialog .transfer-professionals input[type=checkbox]{flex-shrink:0}
@media(max-width:600px){#recordDialog .transfer-professionals{grid-template-columns:1fr}}

/* Text actions need room without splitting the button labels. */
#view-module.authorization-module #moduleContent .catalog-table .row-actions{white-space:normal;overflow:visible;text-align:center}
#view-module.authorization-module #moduleContent .catalog-table .row-actions button{width:auto;min-width:max-content;max-width:none;height:auto;white-space:nowrap;overflow-wrap:normal;font:12px/1.2 Arial,Helvetica,sans-serif;padding:4px 8px}
#view-module.authorization-module #moduleContent .catalog-table td:nth-child(8){font-weight:400;text-transform:none}
@media(max-width:1100px){#view-module.authorization-module .module-table-wrap{overflow-x:auto}#view-module.authorization-module #moduleContent .catalog-table{min-width:1050px}}

#recordDialog .procedure-included-price{grid-column:1/-1;min-width:0}
#recordDialog .procedure-included-price .module-table-wrap{max-height:300px;margin:8px 0}
#recordDialog .procedure-included-price select{width:100%;min-width:110px;font:inherit}
#recordDialog .procedure-included-price td label{display:flex;align-items:center;gap:6px;white-space:nowrap;font:inherit}
#recordDialog .procedure-included-price input[type=checkbox]{width:17px;height:17px;margin:0;flex-shrink:0}

#moduleContent .pm-fee-matrix{--pm-code-width:150px;--pm-item-width:200px;width:100%;min-width:calc(var(--pm-code-width) + var(--pm-fee-count,1)*var(--pm-item-width));margin-right:0}
#moduleContent .pm-fee-matrix .pm-payer-col{width:var(--pm-code-width)}
#moduleContent .pm-fee-matrix .pm-table-col{width:52px}
#moduleContent .pm-fee-matrix .pm-fee-code-col{width:78px}
#moduleContent .pm-fee-matrix .pm-fee-price-col{width:70px}
#moduleContent .pm-fee-matrix .pm-name-row th{height:54px;vertical-align:middle;white-space:normal;padding:6px 8px;line-height:1.25}
#moduleContent .pm-fee-matrix .pm-fee-heading{position:static;text-align:center;border-left:1px solid #bbc3cb}
#moduleContent .pm-fee-matrix .pm-fee-subhead th{position:static;height:26px;padding:4px 3px;text-align:left;vertical-align:middle;background:#edf0f3}
#moduleContent .pm-fee-matrix .pm-fee-subhead th:nth-child(3n){text-align:right}
#moduleContent .pm-fee-matrix tbody th{padding:4px 8px;white-space:normal}
#moduleContent .pm-fee-matrix tbody td{padding:3px 2px}
#moduleContent .pm-fee-matrix tbody tr>:first-child{position:sticky;background:#f5f5f4}
#moduleContent .pm-fee-matrix .pm-fee-code-cell{border-left:1px solid #bbc3cb}
#moduleContent .pm-fee-matrix .pm-fee-code-cell input{text-align:left;font-variant-numeric:tabular-nums}
#moduleContent .pm-fee-matrix .pm-fee-table-cell input{text-align:center}
#moduleContent .pm-fee-matrix tbody td:nth-child(n+3){scroll-margin-top:90px}
#moduleContent .pm-fee-matrix tbody td:nth-child(2){scroll-margin-top:90px;scroll-margin-left:var(--pm-code-width)}
#moduleContent .pm-fee-matrix .pm-active-row>:first-child{background:#bcd7f1}

#moduleContent .pm-fee-matrix tbody td{position:static;left:auto;scroll-margin-left:var(--pm-code-width)}
#moduleContent .pm-fee-matrix .pm-fee-table-cell{border-left:1px solid #bbc3cb}
#moduleContent .pm-fee-matrix .pm-fee-code-cell{border-left:0}

.price-matrix-module #moduleContent{min-width:0;max-width:100%}
.price-matrix-module .pm-fee-scroll{width:100%;max-width:100%;box-sizing:border-box;overflow-x:auto;overflow-y:auto;scrollbar-gutter:stable;scrollbar-width:auto}
#moduleContent .pm-fee-matrix tbody tr>th:first-child{position:sticky;left:0;z-index:2;background:#f5f5f4}
#moduleContent .pm-fee-matrix .pm-name-row>th:first-child{position:sticky;left:0;z-index:5;background:#dfebf5}
#moduleContent .pm-fee-matrix tbody tr.pm-active-row>th:first-child{background:#bcd7f1}

.pm-insurer-filter button[aria-pressed="true"]{background:#dfebf5;border-bottom:3px solid #3a80b5;color:#29435b;font-weight:700}

.pm-filter-groups{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.price-matrix-module .pm-filter-group button{min-height:26px;height:28px;padding:3px 10px;line-height:18px}.pm-filter-group button[aria-pressed="true"]{background:#dcebf8;border-bottom:3px solid #3a80b5}.pm-filter-group .pm-section-button{font-weight:700}

.price-matrix-module .pm-filter-group{align-items:center}
.price-matrix-module .pm-filter-group .pm-section-button{height:38px;min-height:38px;padding:8px 12px}
.price-matrix-module .pm-filter-group [data-pm-insurers]{height:26px;min-height:26px;padding:2px 9px}

.kb-procedure-navigation{display:flex;align-items:center;justify-content:space-between;gap:3px;flex-shrink:0}.kb-procedure-navigation button,.kb-copy-actions button{min-height:28px;padding:3px 6px;font-size:11px}.kb-procedure-navigation span{white-space:nowrap;font-size:10px}.kb-selected-procedure{font-size:11px;line-height:1.3;font-weight:600;overflow-wrap:anywhere}.kb-copy-actions{display:flex;gap:4px;flex-shrink:0}.kb-copy-actions button{flex:1}.kb-clipboard-source{font-size:10px;line-height:1.2;color:#536f87;overflow-wrap:anywhere;max-height:40px;overflow:auto}

.kb-procedure-menu-label>span{font-size:10px;color:#536f87}.kb-tree select.kb-selected-procedure{width:100%;max-width:100%;min-height:32px;font-weight:600;font-size:11px;text-overflow:ellipsis}

/* Procedures remain on rows; each horizontal insurer heading spans table/code/value. */
.price-matrix-module .pm-procedure-scroll{width:100%;max-width:100%;overflow:auto;box-sizing:border-box;scrollbar-gutter:stable}
#moduleContent .pm-procedure-matrix{--pm-code-width:230px;width:calc(var(--pm-code-width) + var(--pm-procedure-payer-count,1)*88px);min-width:100%;margin-right:0;table-layout:fixed}
#moduleContent .pm-procedure-matrix .pm-procedure-description-col{width:var(--pm-code-width)}
#moduleContent .pm-procedure-matrix .pm-procedure-table-col{width:84px}
#moduleContent .pm-procedure-matrix .pm-procedure-code-col{width:84px}
#moduleContent .pm-procedure-matrix .pm-procedure-value-col{width:88px}
#moduleContent .pm-procedure-matrix tr>:nth-child(2){position:static;left:auto;z-index:auto}
#moduleContent .pm-procedure-matrix .pm-procedure-name-row>th{height:54px;vertical-align:middle;white-space:normal;line-height:1.25;padding:6px 10px;text-align:center}
#moduleContent .pm-procedure-matrix .pm-procedure-payer-heading{position:static;transform:none;writing-mode:horizontal-tb;overflow-wrap:anywhere;border-left:1px solid #c2d2df}
#moduleContent .pm-procedure-matrix .pm-procedure-payer-heading>span{display:block;white-space:normal;transform:none;line-height:1.25}
#moduleContent .pm-procedure-matrix .pm-procedure-subhead>th{position:static;left:auto;height:27px;padding:4px;text-align:center;vertical-align:middle;white-space:nowrap;overflow-wrap:normal}
#moduleContent .pm-procedure-matrix tbody>tr>th:first-child,#moduleContent .pm-procedure-matrix .pm-procedure-name-row>th:first-child{position:sticky;left:0;z-index:2;white-space:normal;text-align:left;padding:5px 8px;background:#f5f8fc}
#moduleContent .pm-procedure-matrix .pm-procedure-name-row>th:first-child{z-index:5;background:#e8eff5}
#moduleContent .pm-procedure-matrix tbody>tr>td{position:static;left:auto;padding:3px 2px;scroll-margin-top:90px;scroll-margin-left:var(--pm-code-width)}
#moduleContent .pm-procedure-matrix .pm-procedure-table-cell{border-left:1px solid #bbcbd8}
#moduleContent .pm-procedure-matrix .pm-procedure-table-cell input{text-align:center}
#moduleContent .pm-procedure-matrix .pm-procedure-code-cell input{text-align:left}
#moduleContent .pm-procedure-matrix .pm-procedure-value-cell input{text-align:right}
#moduleContent .pm-procedure-matrix tbody tr.pm-active-row>th:first-child{background:#bcd7f1}

#moduleContent .pm-procedure-matrix .pm-procedure-code-cell,#moduleContent .pm-procedure-matrix .pm-procedure-code-cell input{white-space:nowrap;overflow-wrap:normal;word-break:normal}

[data-batch-row]{cursor:pointer}[data-batch-row]:hover{background:#eef3f7}.df-batch-toggle{font:inherit;color:inherit;border:0;background:transparent;cursor:pointer;padding:4px 6px}.df-batch-guides{margin:4px 8px 12px 28px;padding:8px 12px;border-left:3px solid #b7c7d5;background:#f4f7fa}.df-batch-guides .df-table{background:white}[data-batch-details][hidden]{display:none!important}

.price-matrix-module .pm-single-insurer{display:flex;align-items:center;gap:8px;font-weight:600}.price-matrix-module .pm-single-insurer select{min-width:230px;max-width:320px;padding:5px;border:1px solid #b8c9d5;background:#fff}.price-matrix-module .pm-single-table{table-layout:auto;min-width:660px;width:100%;border-collapse:collapse}.price-matrix-module .pm-single-table th,.price-matrix-module .pm-single-table td{padding:4px 7px;border:1px solid #dce5ea;text-align:left}.price-matrix-module .pm-single-table thead th{position:sticky;top:0;background:#e8eff5;z-index:1}.price-matrix-module .pm-single-table tbody th{font-weight:500}.price-matrix-module .pm-single-table input{width:100%;min-width:70px}.price-matrix-module .pm-single-table td:nth-child(3){width:90px}.price-matrix-module .pm-single-table td:nth-child(4){width:145px}.price-matrix-module .pm-single-table td:nth-child(5){width:120px}.price-matrix-module .pm-single-scroll{overflow:auto}.price-matrix-module .pm-statusbar{display:flex;gap:8px;align-items:center}

/* Preços segue o mesmo cabeçalho e linhas compactas dos cadastros. */
.price-matrix-module #moduleContent .pm-single-table{font:13px Arial,sans-serif;border-collapse:collapse}
.price-matrix-module #moduleContent .pm-single-table thead th{background:#e8eff5;color:#263f53;font-weight:700;border:1px solid #dce5eb}
.price-matrix-module #moduleContent .pm-single-table tbody tr:nth-child(odd){background:#fff}
.price-matrix-module #moduleContent .pm-single-table tbody tr:nth-child(even){background:#f8f7f6}
.price-matrix-module #moduleContent .pm-single-table tbody th,.price-matrix-module #moduleContent .pm-single-table tbody td{color:#34485b;border:0;border-bottom:1px solid #eef1f3;font-weight:400}
.price-matrix-module #moduleContent .pm-single-table input{background:transparent;border:1px solid transparent;border-radius:0;color:inherit;font:inherit;text-align:left;padding:1px 3px}
.price-matrix-module #moduleContent .pm-single-table input.pm-inherited{background:#eef6ff}
.price-matrix-module #moduleContent .pm-single-table input.pm-invalid{background:#fff1f1;border-color:#bd3232}
.price-matrix-module #moduleContent .pm-single-table input:focus{background:#fff;outline:1px solid #6c9ac0}

.price-matrix-module #moduleContent .pm-single-table tbody tr:nth-child(odd)>td{background:#fff}
.price-matrix-module #moduleContent .pm-single-table tbody tr:nth-child(even)>td{background:#f8f7f6}
.price-matrix-module #moduleContent .pm-single-table input.pm-inherited:not(:focus):not(.pm-invalid){background:transparent}
.pa-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:10px;margin:12px 0}.pa-summary>div{display:flex;flex-direction:column;gap:5px;padding:12px 14px;border:1px solid #d6e2eb;border-radius:6px;background:#f5f9fc}.pa-summary span{color:#526a7e;font-size:12px}.pa-summary strong{color:#1d4b69;font-size:18px}.pa-titles td:nth-child(6),.pa-titles td:nth-child(7),.pa-titles td:nth-child(8){text-align:right;white-space:nowrap}.pa-titles td:last-child{white-space:nowrap}
.pa-patient-search{position:relative;min-width:min(420px,100%);max-width:100%}.pa-patient-search label{display:grid;gap:5px}.pa-patient-search input{width:100%;box-sizing:border-box}.pa-patient-results{position:absolute;top:100%;left:0;right:0;z-index:20;max-height:300px;overflow:auto;background:#fff;border:1px solid #aabed0;box-shadow:0 5px 14px #19374d33}.pa-patient-results[hidden]{display:none}.pa-patient-results button{display:grid;width:100%;gap:3px;text-align:left;padding:8px 10px;border:0;border-bottom:1px solid #e2e9ef;background:#fff;color:#20364b;cursor:pointer}.pa-patient-results button:hover,.pa-patient-results button:focus-visible{background:#e9f3fa}.pa-patient-results small{color:#5a7084}.pa-patient-results p{margin:10px;color:#5a7084}

.contract-macros{grid-column:1/-1;display:block;padding:16px;background:#f5f8fb;border:1px solid #d9e3ed;border-radius:8px}.contract-macros[hidden],.contract-macros [hidden]{display:none}.contract-macro-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;margin:12px 0}.contract-macro-grid label{display:flex;flex-direction:column;gap:4px}.contract-macro-grid input{width:100%;box-sizing:border-box}

.contract-workspace{display:grid;gap:18px}.contract-selectors{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}.contract-selectors label,.contract-macro-grid label{display:flex;flex-direction:column;gap:5px}.contract-selectors input,.contract-selectors select,.contract-macro-grid input{width:100%;box-sizing:border-box}.contract-documents{display:grid;gap:18px}.contract-document,.contract-history{background:#fff;border:1px solid #dce5ee;border-radius:8px;padding:18px}.contract-document[hidden]{display:none}.contract-document h2,.contract-history h2{margin:0 0 12px;font-size:18px}.contract-document [data-missing]{color:#945317}.contract-missing input{border:1px solid #d3903c;background:#fffaf2}.contract-document pre{white-space:pre-wrap;max-height:480px;overflow:auto;font:14px/1.5 Arial}.contract-history-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid #e7edf2}.contract-model-note{color:#705324;margin:0}.contract-workspace .pa-patient-search{position:relative}

.contract-history-actions{display:flex;flex-wrap:wrap;gap:6px}.contract-share{background:#fff;border:1px solid #dce5ee;border-radius:8px;padding:18px}.contract-share[hidden]{display:none}.contract-share label{display:flex;flex-direction:column;gap:5px;margin:12px 0}.contract-share textarea{width:100%;box-sizing:border-box}

.contract-three-columns{display:grid;grid-template-columns:minmax(230px,280px) minmax(360px,1fr) minmax(230px,300px);gap:12px;height:calc(100dvh - 220px);min-height:460px;align-items:stretch}
.contract-three-columns>aside,.contract-preview-column{box-sizing:border-box;min-width:0;min-height:0;border:1px solid #d3dfe7;border-radius:6px;background:#fff;padding:12px}
.contract-fields-column,.contract-history-column{overflow:auto;overscroll-behavior:contain}
.contract-three-columns h2{margin:0 0 10px;font:700 15px/1.3 Arial,sans-serif}.contract-fields-column label{display:grid;gap:4px;margin-bottom:9px;font-size:12px;color:#365063}.contract-fields-column input,.contract-fields-column select{box-sizing:border-box;width:100%;min-width:0;padding:6px;border:1px solid #bacbd7;border-radius:4px;font:13px Arial,sans-serif}.contract-unified-fields .contract-filled input{background:#edf0f2;border-color:#c8d1d8}.contract-unified-fields .contract-missing input{background:#fff0f0;border-color:#dfb0b0}.contract-fields-column .pa-patient-results{z-index:20;max-height:280px;overflow:auto}.contract-fields-column .pa-patient-results button{width:100%;font-size:12px;text-align:left}
.contract-preview-column{display:flex;flex-direction:column;padding:8px}.contract-preview-actions{display:flex;flex-wrap:wrap;gap:5px}.contract-preview-actions button{flex:1;min-width:85px;min-height:32px;font:600 12px Arial,sans-serif;border:1px solid #b9cbd6;border-radius:4px;background:#f7fafb;cursor:pointer}.contract-preview-actions [data-save-combined]{background:#27704f;color:#fff;border-color:#1f5b40}.contract-preview-column>[data-contract-status]{font-size:12px;margin:7px 0;min-height:16px}.contract-preview-pages{min-height:0;flex:1;overflow:auto;background:#e8eef2;padding:7px;overscroll-behavior:contain}.contract-preview-pages>img{display:block;width:100%;height:auto;margin-bottom:8px;background:#fff;box-shadow:0 1px 4px #0002}.contract-preview-pages>p{padding:20px;color:#567080}.contract-preview-column .contract-share{padding:8px;margin-top:6px;flex:none;font-size:12px}.contract-preview-column .contract-share h3{margin:0;font-size:13px}
.contract-history-column .contract-history-row{display:block;padding:9px 0;border-bottom:1px solid #dce5ec}.contract-history-row>[data-open-contract]{display:flex;flex-direction:column;align-items:start;text-align:left;gap:4px;border:0;background:none;padding:0 0 6px;width:100%;cursor:pointer;font:12px Arial,sans-serif;color:#29485b}.contract-history-row.selected{background:#edf5fa}.contract-history-row .contract-history-actions{display:flex;gap:4px}.contract-history-actions button{font:11px Arial,sans-serif;border:1px solid #bdcbd6;border-radius:4px;padding:5px;background:#f6f9fb;cursor:pointer}.contract-history-row>a{display:block;margin-top:7px;font-size:11px;overflow-wrap:anywhere}
@media(max-width:1150px){.contract-three-columns{grid-template-columns:230px minmax(320px,1fr)}.contract-history-column{grid-column:1/-1;max-height:260px}.contract-three-columns{height:auto}.contract-preview-column{height:75vh}}
@media(max-width:700px){.contract-three-columns{grid-template-columns:1fr}.contract-history-column{grid-column:auto}.contract-fields-column{max-height:55vh}.contract-preview-column{height:75vh}}
#view-doctors .contract-three-columns .contract-unified-fields .contract-filled input{background:#edf0f2!important;border-color:#c8d1d8}#view-doctors .contract-three-columns .contract-unified-fields .contract-missing input{background:#fff0f0!important;border-color:#dfb0b0}

.contract-preview-column .contract-share{position:sticky;bottom:0;padding:12px 16px;border:1px solid #d3dfe5;border-radius:10px;background:#f6faf8;box-shadow:0 -3px 12px #203b4610}.contract-share h3{margin:0 0 6px;font-size:14px}.contract-share [data-delivery-status]{font-size:12px;color:#32654b}.contract-delivery{display:block;font-size:11px;color:#47705c;margin-top:5px}.contract-preview-actions select{max-width:130px}

/* Cadastro de convênio: faturamento em painel lateral. */
#recordDialog.insurer-entry .record-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,320px);grid-template-rows:auto auto auto auto;gap:6px 10px;align-content:start;align-items:start}
#recordDialog.insurer-entry .record-section{min-width:0;margin:0}
#recordDialog.insurer-entry .insurer-identity{grid-column:1;grid-row:1}
#recordDialog.insurer-entry .insurer-address{grid-column:1;grid-row:2}
#recordDialog.insurer-entry .insurer-providers{grid-column:1;grid-row:3}
#recordDialog.insurer-entry .record-section:not(.insurer-identity):not(.insurer-address):not(.insurer-providers):not(.insurer-billing){grid-column:1;grid-row:4}
#recordDialog.insurer-entry .insurer-billing{grid-column:2;grid-row:1 / span 4;align-self:stretch;background:#e8f2f8;border-color:#b4cadb;padding:9px}
#recordDialog.insurer-entry .insurer-billing h3{background:#d3e5f0;color:#29465b;padding:5px 7px;margin:-1px -1px 8px}
#recordDialog.insurer-entry .insurer-billing .record-section-fields{grid-template-columns:minmax(0,1fr);gap:7px}
#recordDialog.insurer-entry .insurer-billing .record-field{grid-column:1}
@media(max-width:800px){#recordDialog.insurer-entry .record-fields{display:flex;flex-direction:column;gap:6px}#recordDialog.insurer-entry .record-section{width:100%;box-sizing:border-box}#recordDialog.insurer-entry .insurer-billing .record-section-fields{grid-template-columns:minmax(0,1fr)}}

/* Reduz a largura dos campos do cadastro sem estreitar o painel de tabelas. */
#recordDialog.insurer-entry{max-width:1200px}
#recordDialog.insurer-entry .record-fields{grid-template-columns:minmax(0,1fr) minmax(250px,320px);grid-template-rows:auto auto auto auto 1fr}
@media(max-width:800px){#recordDialog.insurer-entry .record-fields{display:flex}}

#recordDialog.insurer-entry .insurer-billing .record-section-fields{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:7px 8px}
#recordDialog.insurer-entry .insurer-billing .record-field{grid-column:auto}
#recordDialog.insurer-entry .insurer-billing :is([data-insurer-field=tissVersion],[data-insurer-field=billingDays],[data-insurer-field=directAccreditation]){grid-column:1 / -1}

#moduleContent .pm-fee-heading .pm-fee-actions{display:flex;justify-content:center;gap:5px;margin:0 0 4px}
#moduleContent .pm-fee-heading .pm-fee-actions button{border:1px solid #b9c8d8;border-radius:999px;background:#fff;color:#29435b;padding:2px 9px;font:11px Arial,sans-serif;line-height:1.25;cursor:pointer}
#moduleContent .pm-fee-heading .pm-fee-actions button:hover{background:#e9f2fa}
#moduleContent .pm-fee-heading .pm-fee-name{display:block;text-align:center}
