.ag-legacy .ag-mode-body.ag-suggestion-review{display:grid;gap:14px}
.ag-legacy .ag-suggestion-review>.ag-muted{margin:0;color:#5b7182}
.ag-legacy .ag-smart-toolbar{background:#fff;border:1px solid #d9e3ea;border-radius:16px;padding:16px 18px;box-shadow:0 8px 24px rgba(18,53,73,.07);display:grid;gap:14px}
.ag-legacy .ag-smart-toolbar-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.ag-legacy .ag-smart-toolbar-head>div{display:grid;gap:3px}
.ag-legacy .ag-smart-toolbar-head span{font-size:11px;letter-spacing:.13em;font-weight:800;color:#8f1e4a}
.ag-legacy .ag-smart-toolbar-head b{font-size:19px;color:#173a52}
.ag-legacy .ag-smart-toolbar-head small{font-size:12px;color:#688093}
.ag-legacy .ag-smart-toolbar-row{display:flex;align-items:end;justify-content:space-between;gap:14px;flex-wrap:wrap}
.ag-legacy .ag-smart-filters{display:flex;gap:7px;flex-wrap:wrap}
.ag-legacy .ag-smart-filters button{border:1px solid #d4dfe7;background:#f8fafc;color:#35556a;border-radius:999px;padding:8px 12px;font:700 12px system-ui,sans-serif;cursor:pointer}
.ag-legacy .ag-smart-filters button b{display:inline-flex;min-width:20px;height:20px;align-items:center;justify-content:center;margin-left:4px;border-radius:999px;background:#e8eef3;color:#36556a;font-size:11px}
.ag-legacy .ag-smart-filters button.on{background:#6d183a;border-color:#6d183a;color:#fff}
.ag-legacy .ag-smart-filters button.on b{background:rgba(255,255,255,.18);color:#fff}
.ag-legacy .ag-smart-list-search{display:grid;gap:5px;min-width:min(330px,100%);font-size:11px;font-weight:800;color:#4d6778}
.ag-legacy .ag-smart-list-search input{height:38px;border:1px solid #ccd9e2;border-radius:10px;padding:0 11px;background:#fff;color:#173a52;outline:none}
.ag-legacy .ag-smart-list-search input:focus{border-color:#8f1e4a;box-shadow:0 0 0 3px rgba(143,30,74,.09)}

.ag-legacy .ag-suggestion-review .suggestion-group{background:#fff;border:1px solid #d9e3ea;border-radius:16px;overflow:hidden;box-shadow:0 8px 22px rgba(18,53,73,.055);margin:0}
.ag-legacy .ag-suggestion-review .suggestion-group>.ag-room-title{background:#f8fafc;color:#173a52;border:0;border-left:5px solid #6d183a;border-bottom:1px solid #e0e8ed;padding:12px 14px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ag-legacy .ag-suggestion-review .suggestion-group>.ag-room-title>span{font-size:13px;font-weight:800;flex:1;min-width:220px}
.ag-legacy .ag-suggestion-review .suggestion-group>.ag-room-title .ag-mini.light{background:#fff;color:#6d183a;border:1px solid #cba7b7}
.ag-legacy .ag-smart-collapse{border:0;background:transparent;color:#506b7d;font:700 11px system-ui,sans-serif;cursor:pointer;padding:7px 9px;border-radius:8px}
.ag-legacy .ag-smart-collapse:hover{background:#eaf0f4}
.ag-legacy .suggestion-group.is-smart-collapsed>.ag-table-wrap{display:none}
.ag-legacy .ag-suggestion-review .ag-table-wrap{overflow:visible}
.ag-legacy .ag-suggestion-review table{width:100%;border-collapse:separate;border-spacing:0}
.ag-legacy .ag-suggestion-review thead{display:none}
.ag-legacy .ag-suggestion-review tbody{display:grid}
.ag-legacy .ag-suggestion-review tr.ag-smart-row{display:grid;grid-template-columns:95px minmax(185px,.9fr) minmax(180px,.9fr) minmax(330px,1.6fr) auto;gap:12px;align-items:center;padding:12px 14px;border-bottom:1px solid #e6edf1;background:#fff}
.ag-legacy .ag-suggestion-review tr.ag-smart-row:last-child{border-bottom:0}
.ag-legacy .ag-suggestion-review tr.ag-smart-row:hover{background:#fbfcfd}
.ag-legacy .ag-suggestion-review tr.ag-smart-row>td{padding:0!important;border:0!important;min-width:0;color:#173a52;font-size:12px;vertical-align:middle}
.ag-legacy .ag-suggestion-review tr.ag-smart-row>td:first-child{font-size:12px;color:#4d6677}
.ag-legacy .ag-suggestion-review tr.ag-smart-row>td:first-child b{font-size:14px;color:#173a52}
.ag-legacy .ag-suggestion-review tr.ag-smart-row>td:nth-child(2)>b{font-size:13px;color:#173a52}
.ag-legacy .ag-suggestion-review tr.ag-smart-row>td:nth-child(3){color:#466478}
.ag-legacy .ag-suggestion-review tr.ag-smart-row>td.ag-actions{display:flex;gap:7px;justify-content:flex-end;align-items:center}
.ag-legacy .ag-suggestion-review tr.ag-smart-row>td.ag-actions .ag-mini{min-height:38px;padding:8px 13px}
.ag-legacy .ag-suggestion-review [data-suggestion-picker]>.ag-match-ok,
.ag-legacy .ag-suggestion-review [data-suggestion-picker]>div[style],
.ag-legacy .ag-suggestion-review [data-suggestion-picker]>small[data-suggestion-search-message],
.ag-legacy .ag-suggestion-review [data-suggestion-picker]>select[data-suggestion-patient]{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}

.ag-legacy .ag-smart-patient-panel{display:grid;gap:8px;min-width:0}
.ag-legacy .ag-smart-status{display:inline-flex;width:max-content;max-width:100%;align-items:center;border-radius:999px;padding:5px 9px;font-size:10.5px;font-weight:800;line-height:1.2}
.ag-legacy .ag-smart-status.ready{background:#e9f7ef;color:#176a43}
.ag-legacy .ag-smart-status.review{background:#fff4de;color:#8a5b00}
.ag-legacy .ag-smart-status.missing{background:#fcecef;color:#9c2948}
.ag-legacy .ag-smart-ready,.ag-legacy .ag-smart-missing{display:grid;gap:7px}
.ag-legacy .ag-smart-candidates{display:grid;gap:6px}
.ag-legacy .ag-smart-candidate{width:100%;border:1px solid #d4e0e7;background:#fff;border-radius:10px;padding:8px 10px;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:8px;color:#173a52;cursor:pointer}
.ag-legacy .ag-smart-candidate:hover{border-color:#a9bdca;background:#f8fbfc}
.ag-legacy .ag-smart-candidate.is-selected{border-color:#75b995;background:#f0faf5}
.ag-legacy .ag-smart-candidate span{display:flex;gap:6px;align-items:center;min-width:0;flex-wrap:wrap}
.ag-legacy .ag-smart-candidate b{font-size:12px;overflow:hidden;text-overflow:ellipsis}
.ag-legacy .ag-smart-candidate em{font-style:normal;font-size:9px;letter-spacing:.03em;text-transform:uppercase;color:#19704a;background:#e7f6ee;border-radius:999px;padding:3px 6px}
.ag-legacy .ag-smart-candidate small{color:#718697;font-size:10px;white-space:nowrap}
.ag-legacy .ag-smart-hint{color:#718697;font-size:10.5px}
.ag-legacy .ag-smart-link,.ag-legacy .ag-smart-create-link{border:0;background:transparent;color:#6d183a;font:700 11px system-ui,sans-serif;padding:2px 0;cursor:pointer;text-align:left;width:max-content;max-width:100%}
.ag-legacy .ag-smart-create-link.primary{border:1px solid #cda9b8;border-radius:9px;padding:8px 10px;background:#fff;color:#6d183a}
.ag-legacy .ag-smart-search{display:grid;gap:4px}
.ag-legacy .ag-smart-search input{width:100%;height:36px;border:1px solid #ccd9e2;border-radius:9px;padding:0 10px;color:#173a52;background:#fff;outline:none}
.ag-legacy .ag-smart-search input:focus{border-color:#8f1e4a;box-shadow:0 0 0 3px rgba(143,30,74,.08)}
.ag-legacy .ag-smart-search span{font-size:10px;color:#718697}
.ag-legacy .ag-smart-missing>small{font-size:10.5px;color:#566f80}

.ag-legacy .ag-smart-new-patient{border:1px solid #d7e2e9;border-radius:12px;padding:12px;background:#f9fbfc;display:grid;gap:10px}
.ag-legacy .ag-smart-new-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.ag-legacy .ag-smart-new-head>div{display:grid;gap:2px}
.ag-legacy .ag-smart-new-head span{font-size:9.5px;letter-spacing:.1em;color:#8f1e4a;font-weight:800}
.ag-legacy .ag-smart-new-head b{font-size:12px;color:#173a52}
.ag-legacy .ag-smart-source{margin:0;border-left:3px solid #6d183a;padding:6px 8px;background:#fff;color:#4e6879;font-size:10.5px}
.ag-legacy .ag-smart-new-patient label{display:grid;gap:4px;color:#405f72;font-size:10.5px;font-weight:700}
.ag-legacy .ag-smart-new-patient label small{font-weight:500;color:#7b8d99}
.ag-legacy .ag-smart-new-patient input{height:36px;border:1px solid #ccd9e2;border-radius:9px;padding:0 9px;background:#fff;color:#173a52;outline:none}
.ag-legacy .ag-smart-new-patient input:focus{border-color:#8f1e4a;box-shadow:0 0 0 3px rgba(143,30,74,.08)}
.ag-legacy .ag-smart-form-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
.ag-legacy .ag-smart-warning{margin:0;color:#6c7f8d;font-size:10px}
.ag-legacy .ag-smart-form-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px}
.ag-legacy .ag-smart-form-msg{margin:0;color:#9c2948;font-size:10.5px;font-weight:700}

.ag-legacy .ag-suggestion-source{margin-top:5px!important;font-size:9.5px!important;border-radius:7px!important;padding:4px 6px!important}

@media(max-width:1100px){
  .ag-legacy .ag-suggestion-review tr.ag-smart-row{grid-template-columns:85px 1fr 1fr;align-items:start}
  .ag-legacy .ag-suggestion-review tr.ag-smart-row>td:nth-child(4){grid-column:1/-2}
  .ag-legacy .ag-suggestion-review tr.ag-smart-row>td.ag-actions{grid-column:-2/-1;align-self:end}
}
@media(max-width:720px){
  .ag-legacy .ag-smart-toolbar{padding:13px}
  .ag-legacy .ag-smart-toolbar-head,.ag-legacy .ag-smart-toolbar-row{display:grid;grid-template-columns:1fr;width:100%}
  .ag-legacy .ag-smart-list-search{min-width:0;width:100%}
  .ag-legacy .ag-suggestion-review tr.ag-smart-row{grid-template-columns:1fr;padding:13px;gap:9px}
  .ag-legacy .ag-suggestion-review tr.ag-smart-row>td:nth-child(4),.ag-legacy .ag-suggestion-review tr.ag-smart-row>td.ag-actions{grid-column:auto}
  .ag-legacy .ag-suggestion-review tr.ag-smart-row>td::before{display:block;font-size:9px;letter-spacing:.07em;text-transform:uppercase;color:#8395a2;font-weight:800;margin-bottom:3px}
  .ag-legacy .ag-suggestion-review tr.ag-smart-row>td:nth-child(1)::before{content:'Dia / hora'}
  .ag-legacy .ag-suggestion-review tr.ag-smart-row>td:nth-child(2)::before{content:'Paciente informado'}
  .ag-legacy .ag-suggestion-review tr.ag-smart-row>td:nth-child(3)::before{content:'Local'}
  .ag-legacy .ag-suggestion-review tr.ag-smart-row>td:nth-child(4)::before{content:'Paciente do cadastro'}
  .ag-legacy .ag-suggestion-review tr.ag-smart-row>td.ag-actions{justify-content:stretch}
  .ag-legacy .ag-suggestion-review tr.ag-smart-row>td.ag-actions .ag-mini{flex:1}
  .ag-legacy .ag-smart-form-grid{grid-template-columns:1fr}
}
