:root{
  --bg:#eef5f2;
  --panel:#f8fbfa;
  --panel2:#eef5ef;
  --card:#ffffff;
  --card2:#fbfcf8;
  --line:#d8e2dc;
  --lineStrong:#b8cbc1;
  --text:#17231f;
  --muted:#687973;
  --blue:#0e7490;
  --blue2:#155e75;
  --green:#0f766e;
  --green2:#164e45;
  --red:#c2414b;
  --red2:#991f2c;
  --amber:#b7791f;
  --purple:#7467d8;
  --gray:#718078;
  --lane:#dceff4;
  --oeste:#dcefe8;
  --virtual:#f3e5c7;
  --hemo:#e8e1f7;
}

*{letter-spacing:0!important}
html,body{
  background:
    linear-gradient(rgba(23,35,31,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(23,35,31,.025) 1px,transparent 1px),
    linear-gradient(180deg,#f7fbf9 0%,#eef6f2 48%,#eaf3f0 100%)!important;
  background-size:48px 48px,48px 48px,auto!important;
  color:var(--text)!important;
}
body{position:relative}
body:before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:linear-gradient(180deg,rgba(255,255,255,.72),rgba(255,255,255,.20) 42%,rgba(232,241,235,.55));
  z-index:-1;
}

h1,h2,.title,.brand,.eyebrow{color:var(--text)!important}
.sub,.hint,.meta,.caseMeta,small{color:var(--muted)!important}
header{
  background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(247,250,246,.86))!important;
  color:var(--text)!important;
  border-bottom:1px solid rgba(184,203,193,.80)!important;
  box-shadow:0 14px 45px rgba(45,61,54,.10);
}

main{
  background:linear-gradient(180deg,rgba(250,252,248,.86),rgba(240,246,241,.92))!important;
}
.wrap{max-width:1240px!important}

.card,.user,.case,.modal,.metric,.stat,.empty{
  background:linear-gradient(180deg,var(--card),var(--card2))!important;
  border:1px solid rgba(184,203,193,.78)!important;
  box-shadow:0 18px 44px rgba(45,61,54,.10), inset 0 1px 0 rgba(255,255,255,.88)!important;
  color:var(--text)!important;
}
.card h2,.caseName,.name{color:var(--text)!important}

input,textarea,select{
  background:rgba(255,255,255,.92)!important;
  color:var(--text)!important;
  border:1px solid var(--line)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.88)!important;
}
input:focus,textarea:focus,select:focus{
  outline:3px solid rgba(15,118,110,.16)!important;
  border-color:rgba(15,118,110,.68)!important;
  background:#fff!important;
}
option{background:#fff;color:var(--text)}
label,.fieldLabel{
  color:#465a53!important;
  text-transform:uppercase;
  font-size:11px!important;
  font-weight:900!important;
}

button,a.btn{
  border-radius:11px!important;
  background:linear-gradient(135deg,var(--green),var(--green2))!important;
  color:white!important;
  border:1px solid rgba(15,118,110,.22)!important;
  box-shadow:0 10px 24px rgba(15,118,110,.18), inset 0 1px 0 rgba(255,255,255,.24)!important;
}
button.green,a.btn.green{background:linear-gradient(135deg,var(--green),var(--green2))!important}
button.red,a.btn.red{background:linear-gradient(135deg,var(--red),var(--red2))!important}
button.gray,a.btn.gray,button.dark,a.dark{background:linear-gradient(135deg,#718078,#45554e)!important}
button.purple,a.btn.purple{background:linear-gradient(135deg,var(--purple),#5148aa)!important}
button.light,a.light{
  background:rgba(255,255,255,.82)!important;
  color:var(--text)!important;
  border:1px solid var(--line)!important;
  box-shadow:0 8px 20px rgba(45,61,54,.07), inset 0 1px 0 rgba(255,255,255,.90)!important;
}
button:disabled{
  opacity:.48;
  filter:saturate(.75);
}

.status{
  background:rgba(224,242,246,.76)!important;
  border:1px solid rgba(14,116,144,.24)!important;
  color:#155e75!important;
}
.status.ok{background:rgba(221,245,234,.86)!important;border-color:rgba(15,118,91,.24)!important;color:#0f5f48!important}
.status.warn{background:rgba(255,246,220,.92)!important;border-color:rgba(183,121,31,.30)!important;color:#8a530f!important}
.status.err{background:rgba(255,232,234,.92)!important;border-color:rgba(194,65,75,.30)!important;color:#8f1f2d!important}

.opsSummary{
  grid-template-columns:repeat(6,minmax(112px,1fr))!important;
  gap:10px!important;
}
.stat{
  text-align:left!important;
  padding:12px!important;
  position:relative;
  overflow:hidden;
}
.stat:before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:var(--green);
}
.stat b{font-size:24px!important;color:var(--text)!important}
.stat span{color:var(--muted)!important;text-transform:uppercase;font-size:10px!important}
.statAssigned:before{background:#0f766e}
.statPending:before{background:#b7791f}
.statConflict:before{background:#c2414b}
.statRooms:before{background:#0e7490}
.statAnes:before{background:#7467d8}
.opsInsights{
  display:grid;
  grid-template-columns:minmax(190px,.8fr) 1.6fr minmax(160px,.7fr);
  gap:10px;
  margin-top:10px;
}
.opsPulse,.opsNext,.opsMode{
  border:1px solid var(--line);
  background:rgba(255,255,255,.62);
  border-radius:14px;
  padding:11px 12px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72);
}
.opsPulse b,.opsMode b{display:block;color:var(--text);font-size:13px}
.opsPulse span,.opsMode span,.opsLabel{display:block;color:var(--muted);font-size:11px;font-weight:900;text-transform:uppercase;margin-bottom:4px}
.opsPulse.ok{border-color:#b7e4d0;background:#e9f8ef}
.opsPulse.warn{border-color:#f1d69d;background:#fff5dd}
.opsPulse.danger{border-color:#f4b5bd;background:#fff0f2}
.opsNext{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.opsLabel{margin:0 4px 0 0}
.nextCase{
  display:inline-flex;
  align-items:center;
  gap:4px;
  max-width:280px;
  border-radius:999px;
  padding:6px 9px;
  background:#eef7f2;
  color:#40544d;
  border:1px solid #d8e2dc;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.nextCase.ok{background:#ddf5ea;color:#0f5f48;border-color:#b7e4d0}
.nextCase.pendente{background:#fff1d1;color:#8a530f;border-color:#f1d69d}
.nextCase.conflito{background:#ffe2e6;color:#8f1f2d;border-color:#f4b5bd}
.nextCase.externo{background:#ece8ff;color:#5148aa;border-color:#d5cdfa}
.nextCase.local{background:#dff7f2;color:#0f766e;border-color:#a7e8dc}
.nextCase.muted{background:#f4f7f4;color:var(--muted)}

.tabs button{
  background:rgba(255,255,255,.72)!important;
  color:#45554e!important;
  border:1px solid rgba(184,203,193,.70)!important;
}
.tabs button.active{
  background:linear-gradient(135deg,var(--green),var(--green2))!important;
  color:#fff!important;
}

.mapControlCard{padding:13px!important}
.mapCommand{
  display:grid;
  grid-template-columns:minmax(240px,1fr) auto;
  gap:12px;
  align-items:start;
}
.mapCommand h2{margin-bottom:4px!important;font-size:18px!important}
.mapActionRow{justify-content:flex-end}
.mapSubbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-top:12px;
  flex-wrap:wrap;
}
.mapLegend{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.legendChip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 9px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--line);
  color:#40544d;
  font-size:11px;
  font-weight:900;
}
.legendChip:before{
  content:"";
  width:9px;
  height:9px;
  border-radius:999px;
  background:#0e7490;
}
.legendAssigned:before{background:#2563eb}
.legendTeam:before{background:#2563eb}
.legendPending:before{background:#0e7490}
.legendConflict:before{background:#c2414b}
.legendExternal:before{background:#7467d8}
.legendLocal:before{background:#0f766e}
.legendVirtual:before{background:#b7791f}

.pill,.badge{
  background:rgba(255,255,255,.74)!important;
  border-color:var(--line)!important;
  color:#40544d!important;
}
.pill.sma,.pill.edit,.badge.ok{background:#ddf5ea!important;color:#0f5f48!important;border-color:#b7e4d0!important}
.pill.ext{background:#ece8ff!important;color:#5148aa!important;border-color:#d5cdfa!important}
.pill.pend,.pill.view{background:#e0f2f6!important;color:#155e75!important;border-color:#badce5!important}
.pill.fin{background:#e8ede9!important;color:#5b6a64!important}
.pill.cancel{background:#e8ede9!important;color:#40544d!important;border-color:#cbd5c9!important}
.pill.warn,.badge.plus{background:#fff1d1!important;color:#8a530f!important;border-color:#f1d69d!important}
.badge.err,.pill.conflict{background:#ffe2e6!important;color:#8f1f2d!important;border-color:#f4b5bd!important}

.mark{
  background:rgba(255,255,255,.88)!important;
  color:#0f766e!important;
  border:1px solid rgba(15,118,110,.22)!important;
  box-shadow:0 10px 28px rgba(45,61,54,.12)!important;
}

.check{
  background:rgba(255,255,255,.78)!important;
  border-color:var(--line)!important;
  color:var(--text)!important;
}
.editor{border-top-color:var(--line)!important}

.shell{gap:26px!important}
.intro p{color:#465a53!important}
.metric b{color:var(--text)!important}
.metric span{color:var(--muted)!important}
.card .sub{color:var(--muted)!important}
.eyebrow{color:#0f766e!important}

.mapToolbarSticky{
  background:rgba(248,246,239,.82)!important;
  border-radius:16px;
}
.mapShell{
  background:#f2f6f2!important;
  border-color:rgba(184,203,193,.85)!important;
  box-shadow:0 18px 48px rgba(45,61,54,.12)!important;
}
.map{background:#f2f6f2!important}
.timeHeader,.fixedTimeBar,.fixedTimeInner,.fixedTimeCell,.fixedTimeCorner{
  background:#e7efe9!important;
  color:#273a34!important;
  border-color:rgba(68,85,78,.16)!important;
}
.roomRow{border-bottom-color:rgba(68,85,78,.14)!important}
.roomRow.hasActivity{background:linear-gradient(90deg,rgba(15,118,110,.035),transparent 42%)}
.roomRow.hasPending{background:linear-gradient(90deg,rgba(183,121,31,.075),transparent 44%)}
.roomRow.hasConflict{background:linear-gradient(90deg,rgba(194,65,75,.105),transparent 46%)}
.roomLabel{
  background:#f7faf6!important;
  color:#243730!important;
  border-right-color:rgba(68,85,78,.16)!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  text-align:left!important;
  gap:3px;
  padding:6px 9px!important;
}
.roomName{font-size:12px;font-weight:950;line-height:1.05}
.roomStats{font-size:10px;font-weight:900;color:#687973;line-height:1.15}
.roomLabel.virtual{background:#f3e5c7!important;color:#70480f!important}
.roomLabel.lane{background:#dceff4!important;color:#155e75!important}
.roomLabel.oeste{background:#dcefe8!important;color:#164e45!important}
.roomLabel.hemo{background:#e8e1f7!important;color:#4f3f9c!important}
.roomGridLine{border-left-color:rgba(68,85,78,.13)!important}
.block{
  height:48px!important;
  border:1px solid rgba(255,255,255,.42)!important;
  box-shadow:0 10px 22px rgba(45,61,54,.18)!important;
}
.blockText{
  padding:5px 20px!important;
  display:block!important;
  width:100%;
  min-width:0;
}
.blockTopLine{
  display:flex;
  justify-content:space-between;
  gap:7px;
  font-size:9px;
  opacity:.92;
  line-height:1;
  margin-bottom:3px;
  white-space:nowrap;
}
.blockName{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
  line-height:1.08;
}
.blockSub{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:9px;
  line-height:1.1;
  opacity:.9;
  margin-top:3px;
}
.block.compact .blockSub,.block.compact .blockTopLine span:last-child{display:none}
.block.compact .blockName{font-size:10px}
.block.roomy .blockName{font-size:12px}
.anestBadge{top:-15px!important}
.resizeHandle{top:8px!important;bottom:8px!important;height:auto!important;min-height:24px!important;width:16px!important}
.resizeHandle.resizeStart{left:2px!important;right:auto!important}
.resizeHandle.resizeEnd{right:2px!important;left:auto!important}
.case.virtualCase{background:linear-gradient(180deg,#fff8e8,#fdf0cf)!important;border-color:#f0d79a!important}
.case.externalCase{background:linear-gradient(180deg,#f8f6ff,#eeeaff)!important;border-color:#d7d0fb!important}
.case.localCase{background:linear-gradient(180deg,#f0fdfa,#dff7f2)!important;border-color:#a7e8dc!important}
.case.conflictCase{background:linear-gradient(180deg,#fff4f5,#ffe4e7)!important;border-color:#f4b5bd!important}
.case.cautionCase{background:linear-gradient(180deg,#fff9ed,#fff1d1)!important;border-color:#f1d69d!important}
.case.finished{background:linear-gradient(180deg,#f4f7f4,#e9eeea)!important}
.case.canceledCase{background:linear-gradient(180deg,#f6f8f6,#e8ede9)!important;border-color:#cbd5c9!important}
.cancelNote,.cancelConfirmText{
  background:#f6f8f6!important;
  border-left-color:#65756e!important;
  color:#40544d!important;
}
.cancelConfirmText{
  background:#fff4f5!important;
  border-left-color:#c2414b!important;
  color:#8f1f2d!important;
}
.conflictNote{
  color:#8f1f2d!important;
  border-left-color:#c2414b!important;
}
.preferenceCautionNote{
  margin-top:7px;
  border-left:3px solid #f59e0b!important;
  padding-left:8px;
  color:#8a530f!important;
  font-size:12px;
  font-weight:850;
  line-height:1.35;
}
.suggestionBtn{
  background:rgba(255,255,255,.84)!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
}
.suggestionBtn.best{background:#e4f7ed!important;border-color:#b7e4d0!important}
.suggestionBtn.warn{background:#fff4dd!important;border-color:#f1d69d!important}
@media(max-width:820px){
  html,body{background-size:38px 38px,38px 38px,auto,auto,auto!important}
  header{box-shadow:0 10px 28px rgba(45,61,54,.10)}
  .opsSummary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .opsInsights{grid-template-columns:1fr}
  .mapCommand{grid-template-columns:1fr}
  .mapActionRow{justify-content:flex-start}
}

/* MapaCC identidade e visao global */
.brandLockup{
  display:flex;
  align-items:center;
  gap:11px;
  min-width:0;
}
.brandIcon{
  width:42px;
  height:42px;
  border-radius:13px;
  display:grid;
  place-items:center;
  color:#fff;
  font-weight:1000;
  font-size:18px;
  background:linear-gradient(135deg,#0f766e,#164e45);
  box-shadow:0 12px 28px rgba(15,118,110,.22), inset 0 1px 0 rgba(255,255,255,.26);
  border:1px solid rgba(255,255,255,.38);
}
.brandLockup .title{
  font-size:21px!important;
  line-height:1;
  letter-spacing:0!important;
}
.photoPreview{
  display:block;
  max-width:320px;
  max-height:180px;
  margin-top:10px;
  border-radius:12px;
  border:1px solid var(--line);
  object-fit:cover;
  box-shadow:0 12px 26px rgba(45,61,54,.12);
}
.mapSectorControls{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid rgba(184,203,193,.62);
}
.sectorLabel{
  color:var(--muted);
  font-size:11px;
  font-weight:1000;
  text-transform:uppercase;
  margin-right:2px;
}
.sectorToggle{
  padding:7px 10px!important;
  border-radius:999px!important;
  font-size:11px!important;
}
.sectorToggle.collapsed{
  background:linear-gradient(135deg,#0f766e,#164e45)!important;
  color:#fff!important;
}
.collapsedGroupRow{
  position:relative;
  background:linear-gradient(90deg,rgba(15,118,110,.08),rgba(255,255,255,.55))!important;
}
.roomLabel.collapsed{
  font-weight:1000;
}
.groupExpandBtn{
  position:absolute!important;
  top:8px;
  z-index:5;
  padding:6px 10px!important;
  border-radius:999px!important;
  font-size:11px!important;
}
.collapsedSummaryText{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  right:14px;
  color:#40544d;
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#tab-mapa.mapExpandedView .mapControlCard{
  padding:10px!important;
}
#tab-mapa.mapExpandedView .mapCommand h2{
  font-size:16px!important;
}
#tab-mapa.mapExpandedView .mapCommand .hint{
  display:none;
}
#tab-mapa.mapExpandedView .mapSectorControls{
  margin-top:8px;
  padding-top:8px;
}
#tab-mapa.mapExpandedView .roomLabel{
  padding:4px 7px!important;
}
#tab-mapa.mapExpandedView .roomName{
  font-size:10.5px!important;
}
#tab-mapa.mapExpandedView .roomStats{
  font-size:8.5px!important;
}
#tab-mapa.mapExpandedView .block{
  height:42px!important;
  min-height:42px!important;
  border-radius:9px!important;
  font-size:10px!important;
}
#tab-mapa.mapExpandedView .blockText{
  padding:4px 14px 4px 7px!important;
}
#tab-mapa.mapExpandedView .blockTopLine{
  font-size:8px!important;
  margin-bottom:2px!important;
}
#tab-mapa.mapExpandedView .blockName{
  font-size:10px!important;
}
#tab-mapa.mapExpandedView .preBadge{
  display:block!important;
  bottom:-11px!important;
  left:5px!important;
  padding:2px 6px!important;
  font-size:8px!important;
}
#tab-mapa.mapExpandedView .blockSub{
  display:block!important;
  font-size:8px!important;
  line-height:1.05!important;
  margin-top:2px!important;
}
#tab-mapa.mapExpandedView .anestBadge{
  display:block!important;
  top:-15px!important;
}
#tab-mapa.mapExpandedView .resizeHandle{
  width:9px!important;
  top:6px!important;
  bottom:6px!important;
}
#tab-mapa.mapExpandedView .collapsedSummaryText{
  font-size:11px;
}
#btnMapOverview.active{
  background:#155e75!important;
  color:#fff!important;
  border-color:#155e75!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .mapControlCard{
  padding:6px 8px!important;
  margin-bottom:5px!important;
  border-radius:12px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .mapCommand{
  gap:6px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .mapCommand h2{
  font-size:13px!important;
  margin-bottom:0!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .mapActionRow{
  gap:6px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView #btnAddSurgery,
#tab-mapa.mapExpandedView.mapOverviewView #btnAnalyzeSchedule,
#tab-mapa.mapExpandedView.mapOverviewView #btnAutoSuggest,
#tab-mapa.mapExpandedView.mapOverviewView #btnCrossHospitalSuggest,
#tab-mapa.mapExpandedView.mapOverviewView #btnUndoSuggest,
#tab-mapa.mapExpandedView.mapOverviewView #btnFindDuplicates,
#tab-mapa.mapExpandedView.mapOverviewView #btnExportTimes,
#tab-mapa.mapExpandedView.mapOverviewView #btnExportTimesPdf{
  display:none!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .mapSubbar{
  margin-top:5px!important;
  grid-template-columns:auto!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .mapLegend,
#tab-mapa.mapExpandedView.mapOverviewView .mapSectorControls{
  display:none!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .quickNav{
  gap:4px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .quickNav button,
#tab-mapa.mapExpandedView.mapOverviewView .mapActionRow button{
  padding:6px 8px!important;
  border-radius:10px!important;
  font-size:10px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .mapShell{
  height:calc(100vh - 114px)!important;
  min-height:260px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .fixedTimeInner,
#tab-mapa.mapExpandedView.mapOverviewView .fixedTimeCell,
#tab-mapa.mapExpandedView.mapOverviewView .fixedTimeCorner{
  height:38px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .fixedTimeCell,
#tab-mapa.mapExpandedView.mapOverviewView .fixedTimeCorner{
  font-size:9px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .hourLabel{
  font-size:8.5px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .hourLoad{
  font-size:6.8px!important;
  padding:1px 3px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .hourLoad + .hourLoad{
  display:none!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .roomLabel{
  padding:2px 4px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .roomName{
  font-size:8.5px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .roomStats{
  font-size:7px!important;
  line-height:1.05!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .block{
  height:32px!important;
  min-height:32px!important;
  border-radius:7px!important;
  font-size:8px!important;
  box-shadow:0 6px 14px rgba(45,61,54,.16)!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .blockText{
  padding:3px 8px 3px 5px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .blockTopLine{
  font-size:6.8px!important;
  margin-bottom:1px!important;
  gap:3px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .blockDuration,
#tab-mapa.mapExpandedView.mapOverviewView .blockDate{
  display:none!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .blockName{
  font-size:8.3px!important;
  line-height:1.05!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .blockSub{
  display:none!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .anestBadge{
  top:-12px!important;
  max-width:105px!important;
  padding:2px 6px!important;
  font-size:7px!important;
  border-radius:7px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .preBadge{
  bottom:-9px!important;
  padding:1px 5px!important;
  font-size:7px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .obsBadge{
  width:17px!important;
  height:17px!important;
  top:-7px!important;
  right:3px!important;
  font-size:10px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .resizeHandle{
  display:none!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .groupExpandBtn{
  top:6px!important;
  padding:5px 8px!important;
  font-size:9px!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .collapsedSummaryText{
  font-size:9px!important;
}

@media(max-width:820px){
  html,body{background-size:38px 38px,38px 38px,auto!important}
  .brandIcon{width:36px;height:36px;border-radius:11px;font-size:16px}
  .brandLockup .title{font-size:19px!important}
  .photoPreview{max-width:100%;max-height:210px}
  .collapsedSummaryText{left:calc(var(--labelW,132px) + 100px);font-size:10.5px}
}
@media(max-width:640px){
  #tab-mapa.mapExpandedView.mapOverviewView .mapCommand{
    grid-template-columns:1fr!important;
  }
  #tab-mapa.mapExpandedView.mapOverviewView .mapActionRow{
    grid-template-columns:1fr 1fr!important;
  }
  #tab-mapa.mapExpandedView.mapOverviewView .mapShell{
    height:calc(100vh - 104px)!important;
    min-height:240px!important;
  }
  #tab-mapa.mapExpandedView.mapOverviewView .quickNav{
    grid-template-columns:repeat(4,1fr)!important;
  }
  #tab-mapa.mapExpandedView.mapOverviewView .fixedTimeCorner{
    font-size:8px!important;
  }
  #tab-mapa.mapExpandedView.mapOverviewView .hourLoad{
    display:none!important;
  }
}

/* ===== PATCH v9: revisao de duplicatas ===== */
.block.duplicate{outline:3px solid #d97706!important;box-shadow:0 0 0 2px rgba(251,191,36,.62),0 10px 22px rgba(45,61,54,.18)!important}
.case.duplicateCase{background:linear-gradient(180deg,#fff9ea,#ffefbf)!important;border-color:#e5a93d!important}
.duplicateNote{color:#7a4a06!important;border-left-color:#d97706!important}
.duplicateReasons{background:#f7e2a8!important;color:#70480f!important;border-color:#deb760!important}
.legendDuplicate{background:#fff3cd!important;color:#7a4a06!important;border-color:#e5c36d!important}

/* ===== sql_2 visual lab: mapa cirurgico claro premium ===== */
:root{
  --premiumBg:#eef6f3;
  --premiumInk:#12231f;
  --premiumPetrol:#0b4f4a;
  --premiumPetrol2:#0f766e;
  --premiumCyan:#0e7490;
  --premiumSoft:#f9fcfa;
  --premiumLine:#c7d8d1;
}
header{
  padding:14px 18px 13px!important;
  background:
    linear-gradient(90deg,rgba(11,79,74,.08),transparent 34%),
    linear-gradient(180deg,rgba(255,255,255,.96),rgba(246,251,248,.90))!important;
}
.headerTop{
  max-width:1760px;
  margin:0 auto;
  grid-template-columns:minmax(260px,1fr) auto!important;
}
.toprow,.tabs{
  max-width:1760px;
  margin-left:auto!important;
  margin-right:auto!important;
}
.brandIcon{
  border-radius:8px!important;
  background:linear-gradient(135deg,#073f3b,#0f766e 58%,#14b8a6)!important;
}
.brandLockup .title{
  font-size:23px!important;
  color:#10231f!important;
}
.accountChip{
  border-radius:8px!important;
  background:rgba(255,255,255,.88)!important;
}
.avatar{
  border-radius:8px!important;
  background:linear-gradient(135deg,#dff7f2,#c7eee6)!important;
  color:#0b4f4a!important;
}
.tabs{
  width:100%;
  max-width:640px;
  justify-content:start;
  margin-top:12px!important;
}
.tabs button{
  border-radius:8px!important;
  min-height:38px;
}
.wrap{
  max-width:1760px!important;
  padding:16px 18px 18px!important;
}
.card,.case,.modal,.stat,.opsPulse,.opsNext,.opsMode{
  border-radius:8px!important;
}
.summaryGrid.opsSummary{
  grid-template-columns:repeat(6,minmax(118px,1fr))!important;
}
.stat{
  min-height:74px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.94),rgba(247,251,248,.92))!important;
}
.stat:before{
  width:5px;
}
.opsPulse,.opsNext,.opsMode{
  background:rgba(255,255,255,.76)!important;
}
.mapControlCard{
  background:
    linear-gradient(180deg,rgba(255,255,255,.96),rgba(248,252,249,.92))!important;
}
.mapCommand h2{
  font-size:20px!important;
}
.mapActionRow button,.quickNav button,.sectorToggle{
  border-radius:8px!important;
}
.mapLegend{
  gap:6px!important;
}
.legendChip{
  border-radius:8px!important;
  background:rgba(255,255,255,.82)!important;
}
.mapToolbarSticky{
  border:1px solid rgba(199,216,209,.74);
  background:rgba(246,251,248,.90)!important;
  border-radius:8px!important;
}
.fixedTimeBar{
  border-radius:8px!important;
  background:#eef7f4!important;
}
.fixedTimeCorner,.fixedTimeCell{
  background:#edf6f2!important;
}
.fixedTimeCell.loadok{
  background:#dff7ea!important;
}
.fixedTimeCell.loadwarn{
  background:#fff2cb!important;
}
.fixedTimeCell.loaddanger{
  background:#ffe0e4!important;
}
.mapShell{
  border-radius:8px!important;
  background:
    linear-gradient(rgba(18,35,31,.028) 1px,transparent 1px),
    linear-gradient(90deg,rgba(18,35,31,.024) 1px,transparent 1px),
    #f7faf7!important;
  background-size:28px 28px,28px 28px,auto!important;
}
.roomLabel{
  border-radius:0!important;
  background:#fbfdfb!important;
}
.roomLabel.oeste{
  background:#e7f4ee!important;
}
.roomLabel.lane{
  background:#e5f3f7!important;
}
.roomLabel.virtual{
  background:#f8edcf!important;
}
.roomName{
  color:#10231f!important;
}
.roomStats{
  color:#64766f!important;
}
.block{
  border-radius:8px!important;
  background:linear-gradient(135deg,#38bdf8,#2563eb)!important;
  border:1px solid rgba(255,255,255,.62)!important;
  box-shadow:0 12px 24px rgba(37,99,235,.18),0 2px 6px rgba(18,35,31,.10)!important;
}
.block.ext,.block.virtual.ext{
  background:linear-gradient(135deg,#8b5cf6,#5b4bd6)!important;
}
.block.local,.block.virtual.local{
  background:linear-gradient(135deg,#14b8a6,#0f766e)!important;
}
.block.virtual:not(.ext):not(.local){
  background:linear-gradient(135deg,#38bdf8,#2563eb)!important;
}
.block.finished{
  background:linear-gradient(135deg,#a7b1ac,#65756e)!important;
}
.block.preferenceOk{
  background:linear-gradient(135deg,#22c55e,#15803d)!important;
  border-color:#bbf7d0!important;
  outline:3px solid #22c55e!important;
  box-shadow:0 0 0 2px rgba(187,247,208,.58),0 14px 28px rgba(21,128,61,.18)!important;
}
.block.preferenceOk .anestBadge{
  background:#16a34a!important;
  color:#fff!important;
  border-color:#bbf7d0!important;
}
.block.conflict{
  background:linear-gradient(135deg,#ef4444,#b91c1c)!important;
  border-color:#fecaca!important;
  outline:3px solid #dc2626!important;
  box-shadow:0 0 0 2px rgba(254,202,202,.78),0 14px 28px rgba(153,27,27,.24)!important;
}
.block.caution{
  background:linear-gradient(135deg,#f59e0b,#d97706)!important;
  border-color:#fed7aa!important;
  outline:3px solid #f59e0b!important;
  box-shadow:0 0 0 2px rgba(254,215,170,.72),0 14px 28px rgba(146,64,14,.18)!important;
}
.block.caution .anestBadge{
  background:#f59e0b!important;
  color:#fff!important;
  border-color:#fed7aa!important;
}
.anestBadge{
  border-radius:8px!important;
  background:#16a34a!important;
  border-color:#bbf7d0!important;
  color:#fff!important;
}
.obsBadge,.preBadge{
  border-radius:999px!important;
}
.resizeHandle{
  border-radius:999px!important;
  background:rgba(255,255,255,.68)!important;
}

@media(min-width:1180px){
  body:has(#tab-mapa:not(.hidden)) .wrap{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(300px,340px);
    gap:14px;
    align-items:start;
  }
  body:has(#tab-mapa:not(.hidden)) .wrap > .card:first-child{
    grid-column:2;
    grid-row:1 / span 2;
    position:sticky;
    top:136px;
    margin-bottom:0!important;
  }
  body:has(#tab-mapa:not(.hidden)) #tab-mapa{
    grid-column:1;
    grid-row:1;
    min-width:0;
  }
  body:has(#tab-mapa:not(.hidden)) .safeBottom{
    grid-column:1 / -1;
  }
  body:has(#tab-mapa:not(.hidden)) .summaryGrid.opsSummary{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body:has(#tab-mapa:not(.hidden)) .opsInsights{
    grid-template-columns:1fr!important;
  }
  body:has(#tab-mapa:not(.hidden)) #status{
    max-height:180px;
    overflow:auto;
  }
  body:has(#tab-mapa:not(.hidden)) .mapShell{
    height:calc(100vh - 292px);
    min-height:520px;
  }
}

@media(max-width:760px){
  header{
    padding:10px 10px 9px!important;
  }
  .wrap{
    padding:10px!important;
  }
  .summaryGrid.opsSummary{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .brandLockup .title{
    font-size:20px!important;
  }
  .mapShell{
    border-radius:8px!important;
  }
}

/* ===== sql_2 visual lab: visao salas + timeline ===== */
.mapViewSwitch{
  display:inline-flex;
  gap:4px;
  margin-top:12px;
  padding:4px;
  border:1px solid rgba(199,216,209,.82);
  border-radius:8px;
  background:rgba(255,255,255,.78);
}
.mapViewSwitch button{
  min-height:32px!important;
  padding:7px 11px!important;
  border-radius:7px!important;
  box-shadow:none!important;
  font-size:12px!important;
}
.mapViewSwitch button.active{
  background:linear-gradient(135deg,#0f766e,#0b4f4a)!important;
  border-color:#0f766e!important;
  color:#fff!important;
}
#tab-mapa:not(.mapRoomsView) #roomsDashboard{
  display:none!important;
}
#tab-mapa.mapRoomsView .mapToolbarSticky,
#tab-mapa.mapRoomsView .mapShell{
  display:none!important;
}
#tab-mapa.mapRoomsView #mapSectorControls{
  display:none!important;
}
.roomsDashboard{
  margin-top:12px;
}
.roomDash{
  padding:14px;
  border:1px solid rgba(15,33,39,.88);
  border-radius:8px;
  background:
    radial-gradient(circle at 72% 0%,rgba(20,184,166,.13),transparent 30%),
    linear-gradient(135deg,#071318,#0b2027 48%,#071820);
  box-shadow:0 22px 58px rgba(16,35,31,.22);
  color:#e8f7f2;
}
.roomDashHeader{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  padding:2px 2px 13px;
  border-bottom:1px solid rgba(148,163,184,.14);
}
.roomDashHeader span{
  color:#38d5a1;
  font-size:11px;
  font-weight:1000;
  text-transform:uppercase;
}
.roomDashHeader h2{
  margin:2px 0 3px;
  color:#f4fbf8!important;
  font-size:22px;
  text-transform:uppercase;
}
.roomDashHeader p{
  margin:0;
  color:#a6bbb5;
  font-size:13px;
  font-weight:850;
}
.roomDashLegend{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}
.roomDashLegend span{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:7px 9px;
  border:1px solid rgba(148,163,184,.16);
  border-radius:999px;
  background:rgba(255,255,255,.055);
  color:#dcefeb;
  font-size:11px;
  font-weight:900;
}
.roomDashLegend span:before{
  content:"";
  width:9px;
  height:9px;
  border-radius:999px;
  background:#64748b;
}
.roomDashLegend .running:before{background:#22c55e}
.roomDashLegend .ending:before{background:#f59e0b}
.roomDashLegend .futureConflict:before{background:#f97316}
.roomDashLegend .danger:before{background:#ef4444}
.roomDashLegend .free:before{background:#64748b}
.roomDashMetrics{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
  margin:13px 0;
}
.roomDashMetrics div{
  display:grid;
  gap:4px;
  min-height:78px;
  padding:12px;
  border:1px solid rgba(148,163,184,.14);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,.035));
}
.roomDashMetrics span{
  color:#91aca7;
  font-size:10px;
  font-weight:1000;
  text-transform:uppercase;
}
.roomDashMetrics b{
  color:#f4fbf8;
  font-size:24px;
  line-height:1;
}
.roomDashMetrics em{
  color:#35d2a1;
  font-style:normal;
  font-size:11px;
  font-weight:900;
}
.roomDashLayout{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(288px,330px);
  gap:12px;
  align-items:start;
}
.roomDashCards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:10px;
  min-width:0;
}
.roomDashCard{
  min-height:218px;
  display:flex;
  flex-direction:column;
  gap:10px;
  position:relative;
  overflow:hidden;
  padding:13px;
  border:1px solid rgba(71,85,105,.55);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(13,35,40,.97),rgba(8,24,31,.98));
  box-shadow:0 18px 38px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.045);
  cursor:pointer;
}
.roomDashCard.free{
  min-height:148px;
}
.roomDashCard:before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  background:#64748b;
}
.roomDashCard.running{
  border-color:rgba(34,197,94,.5);
  background:linear-gradient(180deg,rgba(8,52,42,.98),rgba(8,29,30,.98));
}
.roomDashCard.running:before{background:#22c55e}
.roomDashCard.ending{
  border-color:rgba(245,158,11,.62);
  background:linear-gradient(180deg,rgba(60,47,15,.98),rgba(28,30,23,.98));
}
.roomDashCard.ending:before{background:#f59e0b}
.roomDashCard.futureConflict{
  border-color:rgba(249,115,22,.64);
  background:linear-gradient(180deg,rgba(69,35,14,.98),rgba(34,24,19,.98));
}
.roomDashCard.futureConflict:before{background:#f97316}
.roomDashCard.danger{
  border-color:rgba(239,68,68,.64);
  background:linear-gradient(180deg,rgba(61,18,25,.98),rgba(31,19,24,.98));
}
.roomDashCard.danger:before{background:#ef4444}
.roomDashCard.next{
  border-color:rgba(59,130,246,.52);
  background:linear-gradient(180deg,rgba(13,39,62,.98),rgba(8,25,36,.98));
}
.roomDashCard.next:before{background:#3b82f6}
.roomDashCard.external:after,
.roomDashCard.local:after{
  content:"";
  position:absolute;
  right:12px;
  bottom:12px;
  width:10px;
  height:10px;
  border-radius:999px;
  background:#8b5cf6;
  box-shadow:0 0 0 4px rgba(139,92,246,.14);
}
.roomDashCard.local:after{
  background:#14b8a6;
  box-shadow:0 0 0 4px rgba(20,184,166,.14);
}
.roomDashCardTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.roomDashCardTop h3{
  margin:0;
  color:#f4fbf8;
  font-size:16px;
}
.roomDashCardTop span{
  display:inline-flex;
  margin-top:6px;
  padding:5px 8px;
  border:1px solid rgba(148,163,184,.15);
  border-radius:999px;
  background:rgba(255,255,255,.07);
  color:#9de7c6;
  font-size:10px;
  font-weight:1000;
  text-transform:uppercase;
}
.roomDashCardTop strong{
  color:#9fb7b2;
  font-size:11px;
  white-space:nowrap;
}
.roomDashCard p{
  min-height:26px;
  margin:0;
  color:#a6bbb5;
  font-size:11px;
  font-weight:850;
  line-height:1.35;
}
.roomDashCard.free p{
  min-height:0;
}
.roomDashCase{
  display:grid;
  gap:5px;
  margin-top:auto;
}
.roomDashCase b{
  color:#f4fbf8;
  font-size:13px;
  line-height:1.2;
}
.roomDashCase span{
  color:#a6bbb5;
  font-size:11px;
  font-weight:780;
  line-height:1.25;
}
.roomDashAnest{
  display:grid!important;
  gap:2px;
  margin-top:2px;
  padding:8px 9px;
  border:1px solid rgba(45,212,191,.24);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(20,184,166,.12),rgba(15,118,110,.08));
}
.roomDashAnest small{
  color:#86e7d7;
  font-size:9px;
  font-weight:1000;
  letter-spacing:.04em;
  line-height:1;
  text-transform:uppercase;
}
.roomDashAnest strong{
  color:#f4fbf8;
  font-size:13px;
  font-weight:1000;
  line-height:1.12;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.roomDashAnest.pending{
  border-color:rgba(245,158,11,.30);
  background:linear-gradient(180deg,rgba(245,158,11,.12),rgba(120,80,16,.08));
}
.roomDashAnest.pending small{color:#facc15}
.roomDashAnest.external{
  border-color:rgba(139,92,246,.28);
  background:linear-gradient(180deg,rgba(139,92,246,.13),rgba(88,28,135,.08));
}
.roomDashAnest.external small{color:#c4b5fd}
.roomDashAnest.local{
  border-color:rgba(20,184,166,.28);
  background:linear-gradient(180deg,rgba(20,184,166,.13),rgba(15,118,110,.08));
}
.roomDashAnest.local small{color:#7dd3fc}
.roomDashTimes{
  display:flex;
  justify-content:space-between;
}
.roomDashTimes span{
  color:#e8f7f2;
  font-size:11px;
  font-weight:1000;
}
.roomDashProgress{
  display:block;
  height:7px;
  margin-top:3px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(148,163,184,.18);
}
.roomDashProgress em{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#22c55e,#14b8a6);
}
.roomDashCard.ending .roomDashProgress em{background:linear-gradient(90deg,#f59e0b,#fbbf24)}
.roomDashCard.futureConflict .roomDashProgress em{background:linear-gradient(90deg,#f97316,#fb923c)}
.roomDashCard.danger .roomDashProgress em{background:linear-gradient(90deg,#ef4444,#f97316)}
.roomDashEmpty,
.roomDashEmptyPanel{
  padding:12px;
  border:1px dashed rgba(148,163,184,.18);
  border-radius:8px;
  background:rgba(255,255,255,.045);
  color:#a6bbb5;
  font-size:12px;
  font-weight:850;
}
.roomDashEmpty b{
  display:block;
  color:#e8f7f2;
  margin-bottom:4px;
}
.roomDashSide{
  display:grid;
  gap:10px;
  position:sticky;
  top:calc(var(--mapRulerTop,132px) + 8px);
}
.roomDashPanel{
  padding:13px;
  border:1px solid rgba(148,163,184,.14);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(13,31,37,.94),rgba(8,24,31,.94));
  box-shadow:0 18px 40px rgba(0,0,0,.18);
}
.roomDashPanel.alert{
  border-color:rgba(239,68,68,.24);
  background:linear-gradient(180deg,rgba(47,21,26,.94),rgba(18,25,31,.94));
}
.roomDashPanel h3{
  margin:0 0 10px;
  color:#f4fbf8;
  font-size:13px;
  text-transform:uppercase;
}
.roomDashRow{
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:3px 10px;
  padding:9px 0!important;
  border:0!important;
  border-bottom:1px solid rgba(148,163,184,.12)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#e8f7f2!important;
  text-align:left;
}
.roomDashRow:last-child{
  border-bottom:0!important;
}
.roomDashRow b{
  min-width:0;
  overflow:hidden;
  color:#f4fbf8;
  font-size:12px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.roomDashRow span{
  grid-column:1;
  color:#a6bbb5;
  font-size:11px;
  font-weight:820;
  line-height:1.25;
}
.roomDashRow time{
  grid-column:2;
  grid-row:1 / span 2;
  color:#a6bbb5;
  font-size:11px;
  font-weight:1000;
}
.roomDashRow.danger b{color:#fecaca}
.roomDashRow.warn b{color:#fde68a}
.roomDashRow.futureConflict b{color:#fed7aa}
.roomDashRow.note b{color:#7dd3fc}

@media(max-width:1180px){
  .roomDashLayout{
    grid-template-columns:1fr;
  }
  .roomDashSide{
    position:static;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  }
  .roomDashMetrics{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:640px){
  .mapViewSwitch{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .roomDash{
    padding:10px;
  }
  .roomDashHeader{
    display:block;
  }
  .roomDashLegend{
    justify-content:flex-start;
    margin-top:10px;
  }
  .roomDashCards{
    grid-template-columns:1fr;
  }
  .roomDashMetrics{
    grid-template-columns:1fr;
  }
}

/* ===== sql_2 visual lab: fundo verde-petroleo com superficies claras ===== */
:root{
  --petrolDeep:#061418;
  --petrolMid:#0b3f3b;
  --petrolGlow:#0f766e;
  --petrolSoft:#eaf6f2;
  --surfaceBright:rgba(255,255,255,.96);
  --surfaceSoft:rgba(248,252,249,.94);
}
html,body{
  min-height:100%;
  background-color:#061418!important;
  background:
    radial-gradient(circle at 18% -8%,rgba(20,184,166,.28),transparent 34%),
    radial-gradient(circle at 84% 8%,rgba(14,116,144,.22),transparent 30%),
    linear-gradient(145deg,#061418 0%,#0b2d31 42%,#0a3f3a 100%)!important;
  background-attachment:scroll!important;
  background-repeat:no-repeat!important;
  background-size:100% 100%!important;
}
body:before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);
  background-size:36px 36px;
  mask-image:linear-gradient(180deg,rgba(0,0,0,.7),rgba(0,0,0,.18));
}
header{
  border-bottom:1px solid rgba(214,229,224,.65)!important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.96),rgba(242,249,246,.9))!important;
  box-shadow:0 18px 40px rgba(4,18,22,.20)!important;
}
.wrap{
  position:relative;
}
.card,
.modal,
.case,
.stat,
.opsPulse,
.opsNext,
.opsMode,
.mapControlCard,
.mapToolbarSticky,
.mapShell,
.fixedTimeBar{
  border-color:rgba(202,220,214,.88)!important;
  background:linear-gradient(180deg,var(--surfaceBright),var(--surfaceSoft))!important;
  box-shadow:0 18px 42px rgba(4,18,22,.18)!important;
}
.status{
  box-shadow:0 12px 30px rgba(4,18,22,.10);
}
.tabs button.light,
.tabs button,
.mapActionRow button.light,
.quickNav button,
.sectorToggle,
.legendChip,
.mapViewSwitch{
  box-shadow:0 8px 22px rgba(4,18,22,.10)!important;
}
.brandLockup .title,
.mapCommand h2,
.card h2{
  color:#10231f!important;
}
.brandLockup .sub,
.hint,
.caseMeta{
  color:#53655f!important;
}
.mapViewSwitch{
  border-color:rgba(168,199,190,.88)!important;
  background:rgba(255,255,255,.9)!important;
}
.mapViewSwitch button.active{
  background:linear-gradient(135deg,#0f766e,#073f3b)!important;
  border-color:#0f766e!important;
  color:#fff!important;
}

/* Visao salas clara sobre o fundo verde-petroleo */
.roomDash{
  border:1px solid rgba(196,218,211,.9)!important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.96),rgba(243,250,246,.94)),
    radial-gradient(circle at 76% 0%,rgba(20,184,166,.16),transparent 34%)!important;
  box-shadow:0 24px 60px rgba(4,18,22,.24)!important;
  color:#10231f!important;
}
.roomDashHeader{
  border-bottom:1px solid rgba(199,216,209,.78)!important;
}
.roomDashHeader span{
  color:#0f766e!important;
}

/* ===== sql_2 painel compacto: mapa como comando principal ===== */
body:has(#tab-mapa:not(.hidden)) .wrap{
  display:block!important;
  max-width:1760px!important;
}
body:has(#tab-mapa:not(.hidden)) #tab-mapa{
  width:100%!important;
}
.floatingStatus{
  position:fixed!important;
  right:14px;
  bottom:14px;
  z-index:120;
  width:min(460px,calc(100vw - 28px));
  margin:0!important;
  border-radius:10px!important;
  box-shadow:0 18px 44px rgba(4,18,22,.22)!important;
}
.floatingStatus.statusQuiet{
  display:none!important;
}
.mapControlCard{
  padding:16px!important;
}
.mapCommand{
  grid-template-columns:minmax(280px,.62fr) minmax(520px,1.38fr)!important;
  gap:16px!important;
  align-items:center!important;
}
.mapCommand h2{
  font-size:22px!important;
  line-height:1.08!important;
}
.mapCommand .hint{
  max-width:420px;
}
.mapViewSwitch{
  display:grid!important;
  grid-template-columns:1fr 1fr;
  width:min(480px,100%);
  gap:6px!important;
  margin-top:14px!important;
  padding:5px!important;
  border-radius:10px!important;
}
.mapViewSwitch button{
  min-height:46px!important;
  padding:12px 18px!important;
  border-radius:8px!important;
  font-size:15px!important;
  font-weight:1000!important;
}
.mapActionRow{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(132px,1fr));
  gap:10px!important;
  justify-content:stretch!important;
  width:100%;
}
.mapActionRow button{
  min-height:56px;
  padding:12px 13px!important;
  border-radius:9px!important;
  line-height:1.12;
  white-space:normal;
}
#btnAddSurgery,#btnAddAnesMap{
  font-size:16px!important;
}
.mapSubbar{
  display:flex!important;
  justify-content:flex-start!important;
  margin-top:12px!important;
}
.quickNav{
  gap:8px!important;
}
.quickNav button{
  min-width:58px;
}
.mapLegend{
  display:none!important;
}
@media(max-width:980px){
  .mapCommand{
    grid-template-columns:1fr!important;
  }
  .mapActionRow{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:560px){
  .mapControlCard{
    padding:12px!important;
  }
  .mapViewSwitch{
    width:100%;
  }
  .mapViewSwitch button{
    min-height:42px!important;
    font-size:13px!important;
    padding:10px 8px!important;
  }
  .mapActionRow{
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
  }
  .mapActionRow button{
    min-height:48px;
    font-size:12px!important;
    padding:9px 7px!important;
  }
  #btnAddSurgery,#btnAddAnesMap{
    font-size:13px!important;
  }
}
.roomDashHeader h2{
  color:#10231f!important;
}
.roomDashHeader p{
  color:#53655f!important;
}
.roomDashLegend span{
  border-color:rgba(199,216,209,.86)!important;
  background:#fff!important;
  color:#40544d!important;
  box-shadow:0 8px 20px rgba(4,18,22,.08);
}
.roomDashMetrics div{
  border-color:rgba(199,216,209,.9)!important;
  background:linear-gradient(180deg,#fff,#f5faf7)!important;
  box-shadow:0 10px 26px rgba(4,18,22,.08);
}
.roomDashMetrics span{
  color:#687973!important;
}
.roomDashMetrics b{
  color:#10231f!important;
}
.roomDashMetrics em{
  color:#0f766e!important;
}
.roomDashGroupBar{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:10px;
  margin:0 0 13px;
}
.roomDashGroupBtn{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto;
  gap:3px 8px;
  min-height:68px;
  padding:11px!important;
  border:1px solid rgba(199,216,209,.9)!important;
  border-radius:8px!important;
  background:linear-gradient(180deg,#ffffff,#f5faf7)!important;
  color:#10231f!important;
  box-shadow:0 10px 26px rgba(4,18,22,.08)!important;
  text-align:left;
}
.roomDashGroupBtn span{
  min-width:0;
  overflow:hidden;
  color:#10231f;
  font-size:13px;
  font-weight:1000;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.roomDashGroupBtn b{
  justify-self:end;
  padding:3px 7px;
  border-radius:999px;
  background:#e7f4ee;
  color:#0f766e;
  font-size:10px;
  font-weight:1000;
  text-transform:uppercase;
}
.roomDashGroupBtn em{
  grid-column:1 / -1;
  color:#687973;
  font-style:normal;
  font-size:11px;
  font-weight:850;
}
.roomDashGroupBtn.collapsed{
  border-color:rgba(15,118,110,.34)!important;
  background:linear-gradient(180deg,#effaf6,#e0f4ed)!important;
}
.roomDashGroupBtn.collapsed b{
  background:#0f766e;
  color:#fff;
}
.roomDashCard{
  border-color:rgba(199,216,209,.94)!important;
  background:linear-gradient(180deg,#ffffff,#f5faf7)!important;
  box-shadow:0 15px 34px rgba(4,18,22,.12),inset 0 1px 0 rgba(255,255,255,.9)!important;
}
.roomDashCard.running{
  border-color:rgba(34,197,94,.34)!important;
  background:linear-gradient(180deg,#fbfffc,#eaf8f1)!important;
}
.roomDashCard.ending{
  border-color:rgba(245,158,11,.38)!important;
  background:linear-gradient(180deg,#fffdf7,#fff5dd)!important;
}
.roomDashCard.futureConflict{
  border-color:rgba(249,115,22,.42)!important;
  background:linear-gradient(180deg,#fffaf5,#fff0e3)!important;
}
.roomDashCard.danger{
  border-color:rgba(239,68,68,.42)!important;
  background:linear-gradient(180deg,#fff8f8,#fff0f2)!important;
}
.roomDashCard.next{
  border-color:rgba(59,130,246,.30)!important;
  background:linear-gradient(180deg,#f8fbff,#eef6ff)!important;
}
.roomDashCardTop h3,
.roomDashCase b,
.roomDashTimes span,
.roomDashEmpty b{
  color:#10231f!important;
}
.roomDashCardTop span{
  border-color:rgba(199,216,209,.78)!important;
  background:rgba(255,255,255,.84)!important;
  color:#0f766e!important;
}
.roomDashCardTop strong,
.roomDashCard p,
.roomDashCase span,
.roomDashEmpty,
.roomDashEmptyPanel{
  color:#53655f!important;
}
.roomDashAnest{
  border-color:rgba(15,118,110,.20)!important;
  background:linear-gradient(180deg,#f7fffc,#eaf7f2)!important;
  color:#10231f!important;
}
.roomDashAnest small{
  color:#0f766e!important;
}
.roomDashAnest strong{
  color:#10231f!important;
}
.roomDashAnest.pending{
  border-color:rgba(245,158,11,.32)!important;
  background:linear-gradient(180deg,#fffaf0,#fff1d4)!important;
}
.roomDashAnest.pending small{color:#92400e!important}
.roomDashAnest.external{
  border-color:rgba(139,92,246,.28)!important;
  background:linear-gradient(180deg,#fbf8ff,#f2ebff)!important;
}
.roomDashAnest.external small{color:#6d28d9!important}
.roomDashAnest.local{
  border-color:rgba(14,165,233,.24)!important;
  background:linear-gradient(180deg,#f4fcff,#e8f7fb)!important;
}
.roomDashAnest.local small{color:#0369a1!important}
.roomDashEmpty,
.roomDashEmptyPanel{
  border-color:rgba(199,216,209,.9)!important;
  background:rgba(255,255,255,.62)!important;
}
.roomDashProgress{
  background:rgba(84,104,96,.14)!important;
}
.roomDashPanel{
  border-color:rgba(199,216,209,.9)!important;
  background:linear-gradient(180deg,#ffffff,#f7fbf8)!important;
  box-shadow:0 15px 34px rgba(4,18,22,.12)!important;
}
.roomDashPanel.alert{
  border-color:rgba(239,68,68,.26)!important;
  background:linear-gradient(180deg,#fffafa,#fff6f6)!important;
}
.roomDashPanel h3,
.roomDashRow b{
  color:#10231f!important;
}
.roomDashRow{
  border-bottom-color:rgba(199,216,209,.72)!important;
  color:#10231f!important;
}
.roomDashRow span,
.roomDashRow time{
  color:#687973!important;
}
.roomDashRow.danger b{color:#991b1b!important}
.roomDashRow.warn b{color:#92400e!important}
.roomDashRow.futureConflict b{color:#c2410c!important}
.roomDashRow.note b{color:#0e7490!important}

@media(min-width:1180px){
  body:has(#tab-mapa:not(.hidden)) .wrap > .card:first-child{
    box-shadow:0 22px 54px rgba(4,18,22,.22)!important;
  }
}
@media(max-width:760px){
  html,body{
    background:
      radial-gradient(circle at 0% 0%,rgba(20,184,166,.24),transparent 34%),
      linear-gradient(155deg,#061418 0%,#0b3034 46%,#0b4f4a 100%)!important;
  }
  .roomDashGroupBar{
    grid-template-columns:1fr 1fr;
  }
}
@media(max-width:420px){
  .roomDashGroupBar{
    grid-template-columns:1fr;
  }
}
/* ===== PATCH mobile-map-v1: tela principal otimizada no celular ===== */
@media(max-width:760px){
  html,body{height:100%}
  body:has(#tab-mapa:not(.hidden)){overflow:hidden}
  body:has(#tab-mapa:not(.hidden)) header{padding:6px 8px 7px!important}
  body:has(#tab-mapa:not(.hidden)) .headerTop{grid-template-columns:minmax(0,1fr) auto!important;gap:6px!important}
  body:has(#tab-mapa:not(.hidden)) .brandIcon{width:36px!important;height:36px!important}
  body:has(#tab-mapa:not(.hidden)) .brandLockup{gap:8px!important}
  body:has(#tab-mapa:not(.hidden)) .brandLockup .title{font-size:17px!important;line-height:1!important}
  body:has(#tab-mapa:not(.hidden)) .brandLockup .sub{display:none!important}
  body:has(#tab-mapa:not(.hidden)) .accountChip{padding:4px 6px!important}
  body:has(#tab-mapa:not(.hidden)) .avatar{width:24px!important;height:24px!important;font-size:10px!important}
  body:has(#tab-mapa:not(.hidden)) .accountName{max-width:92px!important;font-size:11px!important}
  body:has(#tab-mapa:not(.hidden)) .accountRole{display:none!important}
  body:has(#tab-mapa:not(.hidden)) #btnLogoutTop{padding:7px 8px!important;font-size:11px!important;border-radius:8px!important}
  body:has(#tab-mapa:not(.hidden)) .toprow{margin-top:6px!important;grid-template-columns:minmax(0,1fr) minmax(0,1.45fr)!important;gap:6px!important}
  body:has(#tab-mapa:not(.hidden)) .toprow input,
  body:has(#tab-mapa:not(.hidden)) .toprow select{height:38px!important;padding:8px 10px!important;border-radius:10px!important;font-size:13px!important}
  body:has(#tab-mapa:not(.hidden)) .toprow button{height:36px!important;padding:8px 9px!important;border-radius:10px!important;font-size:12px!important;line-height:1!important}
  body:has(#tab-mapa:not(.hidden)) #btnSaveScaleHeader{grid-column:1!important}
  body:has(#tab-mapa:not(.hidden)) #btnShiftReport{grid-column:2!important}
  body:has(#tab-mapa:not(.hidden)) #btnSala{grid-column:1!important}
  body:has(#tab-mapa:not(.hidden)) #btnRefresh{grid-column:2!important}
  body:has(#tab-mapa:not(.hidden)) .mapDateStrip{display:none!important}
  body:has(#tab-mapa:not(.hidden)) .tabs{margin-top:6px!important;gap:5px!important}
  body:has(#tab-mapa:not(.hidden)) .tabs button{min-height:34px!important;padding:8px 4px!important;font-size:11px!important;border-radius:9px!important}
  body:has(#tab-mapa:not(.hidden)) .wrap{height:calc(100dvh - var(--appHeaderH,160px))!important;padding:0!important;max-width:none!important;overflow:hidden!important}
  body:has(#tab-mapa:not(.hidden)) #status{display:none!important}
  #tab-mapa{height:100%!important;min-height:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
  #tab-mapa.hidden{display:none!important}
  #tab-mapa .mapControlCard{flex:0 0 auto!important;margin:0!important;padding:5px 8px!important;border-left:0!important;border-right:0!important;border-radius:0!important;box-shadow:none!important}
  #tab-mapa .mapCommand{display:block!important}
  #tab-mapa .mapCommand h2,
  #tab-mapa .mapCommand .hint,
  #tab-mapa .mapViewSwitch{display:none!important}
  #tab-mapa .mapActionRow{display:flex!important;gap:6px!important;overflow-x:auto!important;flex-wrap:nowrap!important;width:100%!important;padding-bottom:2px!important}
  #tab-mapa .mapActionRow button{display:none!important}
  #tab-mapa .mapActionRow #btnAddSurgery,
  #tab-mapa .mapActionRow #btnAddAnesMap,
  #tab-mapa .mapActionRow #btnExpandMap{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;min-width:112px!important;height:32px!important;padding:7px 9px!important;border-radius:9px!important;font-size:11px!important;white-space:nowrap!important}
  #tab-mapa .mapSubbar{margin-top:5px!important;display:block!important}
  #tab-mapa .quickNav{display:flex!important;gap:6px!important;overflow-x:auto!important;width:100%!important;padding-bottom:2px!important}
  #tab-mapa .quickNav button{flex:0 0 auto!important;height:32px!important;padding:7px 10px!important;border-radius:9px!important;font-size:11px!important;white-space:nowrap!important}
  #tab-mapa #mapSectorControls{display:none!important}
  #tab-mapa .mapToolbarSticky{position:relative!important;top:auto!important;z-index:6!important;margin:0!important;padding:0!important;border-radius:0!important;border-left:0!important;border-right:0!important;border-bottom:0!important}
  #tab-mapa .fixedTimeBar{border-radius:0!important;border-left:0!important;border-right:0!important}
  #tab-mapa .fixedTimeCorner,
  #tab-mapa .fixedTimeCell{height:42px!important}
  #tab-mapa .anesTimelinePanel{display:none!important}
  #tab-mapa .mapShell{flex:1 1 auto!important;height:auto!important;min-height:0!important;width:100vw!important;margin:0!important;border-radius:0!important;border-left:0!important;border-right:0!important;overflow:auto!important;overscroll-behavior:contain!important;touch-action:pan-x pan-y pinch-zoom!important;-webkit-overflow-scrolling:touch!important}
  #tab-mapa .map{padding-bottom:0!important}
  #tab-mapa.mapRoomsView .roomsDashboard{flex:1 1 auto!important;min-height:0!important;overflow:auto!important}
}
@media(max-width:430px){
  body:has(#tab-mapa:not(.hidden)) .brandLockup .title{font-size:16px!important}
  body:has(#tab-mapa:not(.hidden)) .accountName{max-width:78px!important}
  #tab-mapa .fixedTimeCorner,
  #tab-mapa .fixedTimeCell{height:38px!important}
  #tab-mapa .quickNav button{height:31px!important;padding-left:9px!important;padding-right:9px!important}
  body:has(#tab-mapa:not(.hidden)) #btnShiftReport{font-size:11px!important}
}

/* ===== PATCH map-panel-v1: regua colada ao grid e painel flutuante ===== */
#tab-mapa .mapToolbarSticky{margin-bottom:0!important;padding-bottom:0!important}
#tab-mapa .fixedTimeBar{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}
#tab-mapa .mapShell{margin-top:0!important}
#tab-mapa .anesTimelinePanel{position:fixed!important;top:calc(var(--mapRulerTop,132px) + 80px)!important;right:16px!important;left:auto!important;bottom:auto!important;z-index:44!important;display:block!important;width:min(320px,calc(100vw - 28px))!important;max-height:min(56vh,520px)!important;margin:0!important;transform:none!important}
#tab-mapa .anesTimelinePanel:empty{display:none!important}
#tab-mapa .anesTimelinePanel.panelHidden{display:none!important}
#tab-mapa .anesTimelinePanel.positioned{right:auto!important;bottom:auto!important}
#tab-mapa .anesTimelinePanel.dragging{transition:none!important}
#tab-mapa .anesTimelineHead{cursor:grab;touch-action:none}
#tab-mapa .anesTimelinePanel.dragging .anesTimelineHead{cursor:grabbing}
#tab-mapa .anesTimelineRow small{display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;white-space:normal!important;line-height:1.18!important}
#tab-mapa .anesTimelineRow.busy small{-webkit-line-clamp:3!important}
#tab-mapa .anesTimelineRow.partial{border-color:#fde68a!important;background:#fffbeb!important}
#tab-mapa .anesTimelineRow.partial em{background:#fef3c7!important;color:#92400e!important}
#tab-mapa .freeAnesRow small{display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;white-space:normal!important;line-height:1.18!important}
#tab-mapa .freeAnesRow.busy small{-webkit-line-clamp:3!important}
#tab-mapa .freeAnesRow.busy{background:#fff7ed!important;border-color:#fed7aa!important}
#tab-mapa .freeAnesRow.busy em{background:#ffedd5!important;color:#9a3412!important}
#tab-mapa .freeAnesRow.partial{background:#fffbeb!important;border-color:#fde68a!important}
#tab-mapa .freeAnesRow.partial em{background:#fef3c7!important;color:#92400e!important}
@media(max-width:760px){
  #tab-mapa .anesTimelinePanel{display:block!important;position:fixed!important;top:calc(var(--mapRulerTop,132px) + 80px)!important;right:12px!important;left:auto!important;bottom:auto!important;width:min(304px,calc(100vw - 24px))!important;max-height:38dvh!important;transform:none!important;transition:none!important;z-index:42!important}
  #tab-mapa .anesTimelinePanel.open{transform:none!important}
  #tab-mapa .anesTimelinePanel.dragging{transform:none!important}
  #tab-mapa .anesTimelinePanel.panelHidden{display:none!important}
  #tab-mapa .anesTimelineList{max-height:calc(38dvh - 58px)!important}
}

/* ===== PATCH anes-floating-v1: painel livre em X/Y e minimizavel ===== */
#tab-mapa .anesTimelinePanel.positioned{
  right:auto!important;
  bottom:auto!important;
  transform:none!important;
}
#tab-mapa .anesTimelineHead .anesPanelMinimize{
  flex:0 0 auto!important;
  width:30px!important;
  height:28px!important;
  padding:0!important;
  border-radius:8px!important;
  font-size:16px!important;
  line-height:1!important;
  box-shadow:none!important;
}
#tab-mapa .anesTimelinePanel.minimized{
  width:auto!important;
  min-width:138px!important;
  max-width:min(220px,calc(100vw - 24px))!important;
  max-height:none!important;
  padding:0!important;
  overflow:hidden!important;
}
#tab-mapa .anesTimelinePanel.minimized .anesTimelineHead{
  margin:0!important;
  padding:8px 9px!important;
  border-bottom:0!important;
  gap:10px!important;
}
#tab-mapa .anesTimelinePanel.minimized .anesTimelineHead span,
#tab-mapa .anesTimelinePanel.minimized .anesTimelineList,
#tab-mapa .anesTimelinePanel.minimized .hint{
  display:none!important;
}
#tab-mapa .anesTimelinePanel.minimized .anesTimelineHead b{
  font-size:12px!important;
}
@media(max-width:760px){
  #tab-mapa .anesTimelinePanel.minimized{
    width:auto!important;
    min-width:138px!important;
  }
}

/* ===== PATCH sales-legend-v1: legenda de tipos de cirurgia ===== */
#tab-mapa .block:not(.ext):not(.local):not(.finished){
  background:linear-gradient(135deg,#38bdf8,#2563eb)!important;
  box-shadow:0 12px 24px rgba(37,99,235,.20),0 2px 6px rgba(18,35,31,.10)!important;
}
#tab-mapa .mapSubbar{
  align-items:center!important;
  gap:10px!important;
}
#tab-mapa .mapLegend{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
  margin-left:auto!important;
  padding:8px 10px!important;
  border:1px solid rgba(184,203,193,.88)!important;
  border-radius:10px!important;
  background:rgba(255,255,255,.86)!important;
  box-shadow:0 10px 26px rgba(4,18,22,.10)!important;
}
#tab-mapa .legendTitle{
  color:#526760!important;
  font-size:10px!important;
  font-weight:1000!important;
  text-transform:uppercase!important;
}
#tab-mapa .legendChip{
  min-height:28px!important;
  padding:7px 10px!important;
  border-radius:9px!important;
  font-size:11px!important;
  font-weight:1000!important;
  box-shadow:none!important;
}
#tab-mapa .legendTeam{
  background:#dbeafe!important;
  border-color:#93c5fd!important;
  color:#1d4ed8!important;
}
#tab-mapa .legendExternal{
  background:#ede9fe!important;
  border-color:#c4b5fd!important;
  color:#5b21b6!important;
}
#tab-mapa .legendLocal{
  background:#ccfbf1!important;
  border-color:#5eead4!important;
  color:#115e59!important;
}
@media(max-width:760px){
  #tab-mapa .mapLegend{
    margin:5px 0 0!important;
    justify-content:flex-start!important;
    overflow-x:auto!important;
    flex-wrap:nowrap!important;
    padding:7px 8px!important;
  }
  #tab-mapa .legendTitle{
    flex:0 0 auto;
  }
  #tab-mapa .legendChip{
    flex:0 0 auto;
    min-height:26px!important;
    padding:6px 8px!important;
    font-size:10px!important;
  }
}

/* ===== contrast guard v1 ===== */
:root{
  --color-primary:#006b3f;
  --color-primary-dark:#004d2d;
  --color-primary-light:#e8f5ef;
  --text-on-primary:#ffffff;
  --text-main:#111827;
  --text-muted:#6b7280;
  --surface:#ffffff;
  --surface-soft:#f8fafc;
}
.adminCard,
.adminCard strong,
.adminCard span,
.selectedCompanyBar,
.selectedCompanyBar strong,
.selectedCompanyBar span,
.biHero,
.biHero h1,
.biHero h2,
.biHero p,
.biHero span,
.biHero b,
.brandIcon,
.brandIcon *,
.block,
.block *,
.localCase,
.localCase *,
.localCard,
.localCard *,
.reportIcon,
.reportIcon *,
.roomDashGroupBtn.collapsed b{
  color:var(--text-on-primary)!important;
}
.adminCard span,
.selectedCompanyBar span,
.biHero .hint,
.biHero p{
  color:#e8fff6!important;
}
.block .preBadge,
.block .preBadge.preOk,
.preBadge.preOk,
.preMeta.preOk{
  background:#bbf7d0!important;
  border-color:#22c55e!important;
  color:#052e16!important;
  -webkit-text-fill-color:#052e16!important;
  text-shadow:none!important;
}
.block .preBadge.preAlert,
.preBadge.preAlert,
.preMeta.preAlert{
  background:#fed7aa!important;
  border-color:#f97316!important;
  color:#7c2d12!important;
  -webkit-text-fill-color:#7c2d12!important;
  text-shadow:none!important;
}
.block .preBadge.preReview,
.preBadge.preReview,
.preMeta.preReview{
  background:#fecdd3!important;
  border-color:#e11d48!important;
  color:#881337!important;
  -webkit-text-fill-color:#881337!important;
  text-shadow:none!important;
}
.block .preBadge span,
.block .preBadge span *,
.preBadge span,
.preMeta span{
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  text-shadow:none!important;
}
button:not(.light):not(.btnLight):not(.tab):not(.biKpi):not(.biBarRow):not(.biDonut):not(.biHeatCell):not(.companyCard):not(.userButton),
a.btn:not(.light):not(.btnLight){
  color:var(--text-on-primary)!important;
}
button.light,
a.light,
.btnLight,
.lightButton,
.userButton,
.toprow button.light,
.anesPanelMinimize,
.biKpi,
.biBarRow,
.biDonut,
.biHeatCell,
.biLegendList button,
.biLineLabels button{
  color:var(--text-main)!important;
  text-shadow:none!important;
}
.tabs button:not(.active),
.tabs .tab:not(.active){
  background:#ffffff!important;
  border:1px solid #cfded8!important;
  color:#111827!important;
  text-shadow:none!important;
}
.tabs button:not(.active):hover,
.tabs .tab:not(.active):hover{
  background:#f2fbf7!important;
  border-color:#0f766e!important;
  color:#111827!important;
}
.tabs button.active,
.tabs .tab.active{
  color:#ffffff!important;
}

/* ===== map-clean-controls-v1 ===== */
#tab-mapa .mapViewSwitch{
  width:min(560px,100%)!important;
  padding:6px!important;
  gap:8px!important;
  border:1px solid rgba(15,118,110,.34)!important;
  border-radius:12px!important;
  background:#ffffff!important;
  box-shadow:0 16px 36px rgba(4,18,22,.14)!important;
}
#tab-mapa .mapViewSwitch button{
  min-height:54px!important;
  border-radius:9px!important;
  font-size:16px!important;
  font-weight:1000!important;
  color:#10231f!important;
  border:1px solid #cfe2da!important;
  background:#f8fafc!important;
}
#tab-mapa .mapViewSwitch button:not(.active),
#tab-mapa .quickNav button,
#tab-mapa .sectorToggle.collapsed,
#tab-mapa .mapActionRow button.light{
  color:#111827!important;
  text-shadow:none!important;
}
#tab-mapa .mapViewSwitch button.active{
  color:#ffffff!important;
  border-color:#0f766e!important;
  background:linear-gradient(135deg,#0f766e,#004d2d)!important;
  box-shadow:0 10px 24px rgba(15,118,110,.22)!important;
}
#tab-mapa .quickNav{
  gap:7px!important;
}
#tab-mapa .quickNav button{
  min-width:120px!important;
  border-radius:10px!important;
  background:#ffffff!important;
  color:#10231f!important;
  border:1px solid rgba(184,203,193,.95)!important;
}
#tab-mapa .mapSectorControls{
  gap:8px!important;
  margin-top:12px!important;
}
#tab-mapa .sectorToggle{
  min-height:34px!important;
  border-radius:9px!important;
  border:1px solid #bed8cf!important;
  box-shadow:0 8px 20px rgba(4,18,22,.08)!important;
}
#tab-mapa .sectorToggle.expanded{
  background:linear-gradient(135deg,#0f766e,#004d2d)!important;
  border-color:#0f766e!important;
  color:#ffffff!important;
}
#tab-mapa .sectorToggle.collapsed{
  background:#ffffff!important;
  border-color:#bfd8cf!important;
  color:#10231f!important;
}
#tab-mapa .fixedTimeInner{
  height:58px!important;
}
#tab-mapa .fixedTimeCorner,
#tab-mapa .fixedTimeCell{
  height:58px!important;
}
#tab-mapa .fixedTimeCell{
  gap:3px!important;
  padding:4px 3px!important;
}
#tab-mapa .hourLabel{
  font-size:11px!important;
  line-height:1!important;
}
#tab-mapa .hourLoad{
  max-width:calc(100% - 4px)!important;
  border-radius:5px!important;
  padding:2px 4px!important;
  font-size:8.5px!important;
  line-height:1.08!important;
}
#tab-mapa .fixedTimeCorner{
  color:#10231f!important;
  background:#e8f5ef!important;
}
@media(max-width:760px){
  #tab-mapa .mapCommand h2,
  #tab-mapa .mapCommand .hint{
    display:none!important;
  }
  #tab-mapa .mapViewSwitch{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    margin:0 0 6px!important;
    width:100%!important;
    padding:4px!important;
    gap:5px!important;
    border-radius:10px!important;
  }
  #tab-mapa .mapViewSwitch button{
    min-height:38px!important;
    padding:8px 6px!important;
    border-radius:8px!important;
    font-size:12px!important;
  }
  #tab-mapa .quickNav{
    display:flex!important;
    gap:6px!important;
    overflow-x:auto!important;
    padding-bottom:2px!important;
  }
  #tab-mapa .quickNav button{
    flex:0 0 auto!important;
    min-width:105px!important;
    height:32px!important;
    padding:7px 10px!important;
    font-size:11px!important;
  }
  #tab-mapa .fixedTimeInner,
  #tab-mapa .fixedTimeCorner,
  #tab-mapa .fixedTimeCell{
    height:46px!important;
  }
  #tab-mapa .hourLoad{
    font-size:7.5px!important;
    padding:1px 3px!important;
  }
}

/* ===== map-buttons-premium-v1: botoes sobrios e barra do mapa limpa ===== */
:root{
  --button-primary:#0f766e;
  --button-primary-dark:#004d2d;
  --button-primary-soft:#f2fbf7;
  --button-border:#cfded8;
  --button-text:#111827;
}

button,
a.btn{
  border-radius:9px!important;
  font-weight:900!important;
  letter-spacing:0!important;
  transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,filter .15s ease,transform .08s ease!important;
}

button:not(.light):not(.gray):not(.red):not(.tab):not(.btnLight):not(.obsBadge):not(.freeAnesSheetHandle):not(.biKpi):not(.biBarRow):not(.biDonut):not(.biHeatCell):not(.heatCell):not(.companyCard):not(.userButton),
button.green,
button.purple,
a.btn:not(.light):not(.gray):not(.red):not(.btnLight),
a.btn.green,
a.btn.purple{
  background:linear-gradient(135deg,var(--button-primary),var(--button-primary-dark))!important;
  border:1px solid rgba(15,118,110,.42)!important;
  color:#ffffff!important;
  box-shadow:0 10px 24px rgba(15,118,110,.18),inset 0 1px 0 rgba(255,255,255,.18)!important;
}

button.light,
button.gray,
a.light,
a.btn.gray,
.btnLight,
.lightButton,
.toprow button.light,
#tab-mapa .mapActionRow button.light,
#tab-mapa .mapActionRow button.gray,
#tab-mapa .mapViewSwitch button:not(.active),
#tab-mapa .sectorToggle.collapsed,
.biLegendList button,
.biLineLabels button{
  background:#ffffff!important;
  border:1px solid var(--button-border)!important;
  color:var(--button-text)!important;
  text-shadow:none!important;
  box-shadow:0 8px 20px rgba(4,18,22,.07),inset 0 1px 0 rgba(255,255,255,.92)!important;
}

button.light:hover:not(:disabled),
button.gray:hover:not(:disabled),
a.light:hover,
a.btn.gray:hover,
.btnLight:hover,
.lightButton:hover,
.tabs button:not(.active):hover,
#tab-mapa .mapViewSwitch button:not(.active):hover,
#tab-mapa .sectorToggle.collapsed:hover,
#tab-mapa .mapActionRow button.light:hover,
#tab-mapa .mapActionRow button.gray:hover,
.biLegendList button:hover,
.biLineLabels button:hover{
  background:var(--button-primary-soft)!important;
  border-color:var(--button-primary)!important;
  color:var(--button-text)!important;
  box-shadow:0 10px 24px rgba(15,118,110,.12),0 0 0 1px rgba(15,118,110,.16)!important;
}

button.green:hover:not(:disabled),
button.purple:hover:not(:disabled),
button:not(.light):not(.gray):not(.red):not(.tab):not(.btnLight):not(.obsBadge):not(.freeAnesSheetHandle):not(.biKpi):not(.biBarRow):not(.biDonut):not(.biHeatCell):not(.heatCell):not(.companyCard):not(.userButton):hover{
  filter:brightness(1.05) saturate(1.04);
}

button.red,
a.btn.red{
  background:linear-gradient(135deg,#dc2626,#991b1b)!important;
  border-color:rgba(220,38,38,.48)!important;
  color:#ffffff!important;
}

button:focus-visible,
a.btn:focus-visible{
  outline:3px solid rgba(15,118,110,.28)!important;
  outline-offset:2px!important;
}

button:disabled{
  background:#f3f6f4!important;
  border-color:#d7e0dc!important;
  color:#7a8a84!important;
  opacity:1!important;
  box-shadow:none!important;
  cursor:not-allowed!important;
  filter:none!important;
}

.freeAnesSheetHandle{
  background:#cbd5e1!important;
  border:0!important;
  box-shadow:none!important;
  color:transparent!important;
}

.tabs button:not(.active),
.tabs .tab:not(.active){
  background:#ffffff!important;
  border:1px solid var(--button-border)!important;
  color:var(--button-text)!important;
}
.tabs button.active,
.tabs .tab.active,
#tab-mapa .mapViewSwitch button.active,
#tab-mapa .sectorToggle.expanded{
  background:linear-gradient(135deg,var(--button-primary),var(--button-primary-dark))!important;
  border-color:var(--button-primary)!important;
  color:#ffffff!important;
  box-shadow:0 10px 24px rgba(15,118,110,.20),inset 0 1px 0 rgba(255,255,255,.18)!important;
}

#tab-mapa .mapSubbar{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  margin-top:10px!important;
}
#tab-mapa .quickNav{
  display:none!important;
}
#tab-mapa .mapLegend{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  margin-left:auto!important;
}
#tab-mapa .legendChip{
  background:#ffffff!important;
  border-radius:8px!important;
  box-shadow:0 8px 20px rgba(4,18,22,.08)!important;
}
#tab-mapa .legendTeam{
  background:#dbeafe!important;
  border-color:#93c5fd!important;
  color:#1d4ed8!important;
}
#tab-mapa .legendExternal{
  background:#ede9fe!important;
  border-color:#c4b5fd!important;
  color:#5b21b6!important;
}
#tab-mapa .legendLocal{
  background:#ccfbf1!important;
  border-color:#5eead4!important;
  color:#115e59!important;
}
#tab-mapa.mapExpandedView.mapOverviewView .mapLegend{
  display:none!important;
}

@media(max-width:760px){
  #tab-mapa .mapSubbar{
    justify-content:flex-start!important;
    margin-top:6px!important;
    overflow-x:auto!important;
    padding-bottom:2px!important;
  }
  #tab-mapa .mapLegend{
    flex-wrap:nowrap!important;
    justify-content:flex-start!important;
    margin-left:0!important;
    min-width:max-content!important;
  }
}

/* ===== button-contrast-audit-v1: nenhum botao branco com texto branco ===== */
button.light,
button.gray,
button.secondary,
button.ghost,
button.btnMuted,
a.light,
a.btn.gray,
a.btnLight,
.btnLight,
.btnMuted,
.lightButton,
.userButton,
.toprow button.light,
.actions button.light,
.modalActions button.btnMuted,
.tabs button:not(.active),
.tabs .tab:not(.active),
#tab-mapa .mapViewSwitch button:not(.active),
#tab-mapa .sectorToggle.collapsed,
#tab-mapa .mapActionRow button.light,
#tab-mapa .mapActionRow button.gray,
.biLegendList button,
.biLineLabels button{
  background:#ffffff!important;
  color:#111827!important;
  border:1px solid var(--button-border,#cfded8)!important;
  text-shadow:none!important;
  box-shadow:0 8px 20px rgba(4,18,22,.07),inset 0 1px 0 rgba(255,255,255,.92)!important;
}

button.light:hover:not(:disabled),
button.gray:hover:not(:disabled),
button.secondary:hover:not(:disabled),
button.ghost:hover:not(:disabled),
button.btnMuted:hover:not(:disabled),
a.light:hover,
a.btn.gray:hover,
a.btnLight:hover,
.btnLight:hover,
.btnMuted:hover,
.lightButton:hover,
.userButton:hover,
.tabs button:not(.active):hover,
.tabs .tab:not(.active):hover,
#tab-mapa .mapViewSwitch button:not(.active):hover,
#tab-mapa .sectorToggle.collapsed:hover{
  background:var(--button-primary-soft,#f2fbf7)!important;
  color:#111827!important;
  border-color:var(--button-primary,#0f766e)!important;
  box-shadow:0 10px 24px rgba(15,118,110,.12),0 0 0 1px rgba(15,118,110,.16)!important;
}

button.green,
button.purple,
button.btnPrimary,
a.btnPrimary,
.btnPrimary,
.tabs button.active,
.tabs .tab.active,
#tab-mapa .mapViewSwitch button.active,
#tab-mapa .sectorToggle.expanded{
  background:linear-gradient(135deg,var(--button-primary,#0f766e),var(--button-primary-dark,#004d2d))!important;
  border-color:var(--button-primary,#0f766e)!important;
  color:#ffffff!important;
}

button.red,
button.dangerText,
a.btn.red{
  background:linear-gradient(135deg,#dc2626,#991b1b)!important;
  border-color:rgba(220,38,38,.48)!important;
  color:#ffffff!important;
}

button[style*="background:#fff"],
button[style*="background: #fff"],
button[style*="background:white"],
button[style*="background: white"],
button[style*="background-color:#fff"],
button[style*="background-color: #fff"],
button[style*="background-color:white"],
button[style*="background-color: white"]{
  color:#111827!important;
}

/* ===== contrast-and-block-controls-v4 ===== */
button.light,
button.gray,
button.secondary,
button.ghost,
button.btnMuted,
a.light,
a.btn.gray,
a.btnLight,
.btnLight,
.btnMuted,
.lightButton,
.userButton,
#modal button.gray,
#modal button.light,
#modal .row button:not(.green):not(.red):not(.purple),
.actions button.light,
.tabs button:not(.active),
.tabs .tab:not(.active),
#tab-mapa .mapViewSwitch button:not(.active),
#tab-mapa .mapActionRow button.light,
#tab-mapa .mapActionRow button.gray,
#tab-mapa .quickNav button{
  background:#ffffff!important;
  color:#111827!important;
  -webkit-text-fill-color:#111827!important;
  border-color:var(--button-border,#cfded8)!important;
  text-shadow:none!important;
}

button.light *,
button.gray *,
button.secondary *,
button.ghost *,
button.btnMuted *,
a.light *,
a.btn.gray *,
a.btnLight *,
.btnLight *,
.btnMuted *,
.lightButton *,
.userButton *,
#modal button.gray *,
#modal button.light *,
#modal .row button:not(.green):not(.red):not(.purple) *{
  color:inherit!important;
  -webkit-text-fill-color:inherit!important;
}

button.green,
button.purple,
button.btnPrimary,
a.btnPrimary,
.btnPrimary,
.tabs button.active,
.tabs .tab.active,
#tab-mapa .mapViewSwitch button.active{
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  text-shadow:none!important;
}

button.green *,
button.purple *,
button.btnPrimary *,
a.btnPrimary *,
.btnPrimary *,
.tabs button.active *,
.tabs .tab.active *,
#tab-mapa .mapViewSwitch button.active *{
  color:inherit!important;
  -webkit-text-fill-color:inherit!important;
}

button:disabled:not(.green):not(.red):not(.purple),
button.disabled:not(.green):not(.red):not(.purple){
  background:#ffffff!important;
  color:#334155!important;
  -webkit-text-fill-color:#334155!important;
  border-color:#d8e2dc!important;
}
button.green:disabled,
button.purple:disabled,
button.btnPrimary:disabled{
  background:linear-gradient(135deg,var(--button-primary,#0f766e),var(--button-primary-dark,#004d2d))!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  opacity:.62!important;
}

#tab-mapa .mapSectorControls{
  display:block!important;
  margin-top:12px!important;
  padding-top:12px!important;
}
#tab-mapa .timelineGroupBar{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important;
  gap:10px!important;
  margin-top:8px!important;
}
#tab-mapa .sectorToggle.roomDashGroupBtn{
  width:100%!important;
  min-height:68px!important;
  border-radius:8px!important;
  padding:11px!important;
}
#tab-mapa .sectorToggle.roomDashGroupBtn.expanded,
.roomDashGroupBtn.expanded{
  background:linear-gradient(135deg,#0f766e 0%,#0b6259 55%,#064a42 100%)!important;
  border-color:rgba(15,118,110,.42)!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}
#tab-mapa .sectorToggle.roomDashGroupBtn.expanded span,
#tab-mapa .sectorToggle.roomDashGroupBtn.expanded em,
.roomDashGroupBtn.expanded span,
.roomDashGroupBtn.expanded em{
  color:#e8fff6!important;
  -webkit-text-fill-color:#e8fff6!important;
}
#tab-mapa .sectorToggle.roomDashGroupBtn.expanded b,
.roomDashGroupBtn.expanded b{
  background:#ffffff!important;
  color:#0f766e!important;
  -webkit-text-fill-color:#0f766e!important;
}
#tab-mapa .sectorToggle.roomDashGroupBtn.collapsed,
.roomDashGroupBtn.collapsed{
  background:linear-gradient(180deg,#ffffff,#f7fbf9)!important;
  border-color:#bfd8cf!important;
  color:#111827!important;
  -webkit-text-fill-color:#111827!important;
}
#tab-mapa .sectorToggle.roomDashGroupBtn.collapsed span,
#tab-mapa .sectorToggle.roomDashGroupBtn.collapsed em,
.roomDashGroupBtn.collapsed span,
.roomDashGroupBtn.collapsed em{
  color:#10231f!important;
  -webkit-text-fill-color:#10231f!important;
}
#tab-mapa .sectorToggle.roomDashGroupBtn.collapsed b,
.roomDashGroupBtn.collapsed b{
  background:#e8f5ef!important;
  color:#0f766e!important;
  -webkit-text-fill-color:#0f766e!important;
}

body.loginPage{
  background:radial-gradient(circle at 20% 12%,#29435d 0,#0d141c 34%,#070b10 100%)!important;
  color:#132033!important;
}
body.loginPage:before{display:none!important}
body.loginPage .shell{
  gap:22px!important;
}
body.loginPage .intro,
body.loginPage .intro h1{
  color:#f8fafc!important;
  -webkit-text-fill-color:#f8fafc!important;
}
body.loginPage .intro p{
  color:#cbd5e1!important;
  -webkit-text-fill-color:#cbd5e1!important;
}
body.loginPage .intro .eyebrow{
  color:#93c5fd!important;
  -webkit-text-fill-color:#93c5fd!important;
}
body.loginPage .metrics{
  max-width:520px!important;
}
body.loginPage .metric{
  background:linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,.07))!important;
  border:1px solid rgba(255,255,255,.26)!important;
  box-shadow:0 18px 38px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.18)!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}
body.loginPage .metric b{
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}
body.loginPage .metric span{
  color:#cbd5e1!important;
  -webkit-text-fill-color:#cbd5e1!important;
}
body.loginPage .card{
  background:linear-gradient(180deg,#ffffff,#f8fafc)!important;
  border:1px solid rgba(226,232,240,.95)!important;
  box-shadow:0 28px 70px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,255,255,.96)!important;
  color:#111827!important;
  -webkit-text-fill-color:#111827!important;
}
body.loginPage .card h2,
body.loginPage .card label{
  color:#111827!important;
  -webkit-text-fill-color:#111827!important;
}
body.loginPage .card .sub,
body.loginPage .card .sub a{
  color:#475569!important;
  -webkit-text-fill-color:#475569!important;
}
body.loginPage input{
  background:#ffffff!important;
  border-color:#cbd5e1!important;
  color:#111827!important;
  -webkit-text-fill-color:#111827!important;
}
body.loginPage input:focus{
  outline:3px solid rgba(20,184,166,.18)!important;
  border-color:#14b8a6!important;
}
body.loginPage button{
  background:linear-gradient(135deg,#0f766e,#075e54)!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  box-shadow:0 12px 28px rgba(15,118,110,.24)!important;
}
body.loginPage button.secondary{
  background:#ffffff!important;
  color:#0f766e!important;
  -webkit-text-fill-color:#0f766e!important;
  border:1px solid #99f6e4!important;
  box-shadow:none!important;
}
body.loginPage button.ghost{
  background:#fff1f2!important;
  color:#be123c!important;
  -webkit-text-fill-color:#be123c!important;
  border:1px solid #fecdd3!important;
  box-shadow:none!important;
}
body.loginPage .helpLink{
  color:#0f766e!important;
  -webkit-text-fill-color:#0f766e!important;
}
body.loginPage .status{
  background:#ecfeff!important;
  color:#155e75!important;
  -webkit-text-fill-color:#155e75!important;
  border:1px solid #a5f3fc!important;
}
body.loginPage .status.err{
  background:#fff1f2!important;
  color:#be123c!important;
  -webkit-text-fill-color:#be123c!important;
  border-color:#fecdd3!important;
}

/* ===== mobile-fullscreen-v1: atalho superior sem barra fixa inferior ===== */
#tab-mapa #btnExpandMap.active{
  background:linear-gradient(135deg,var(--button-primary,#0f766e),var(--button-primary-dark,#004d2d))!important;
  border-color:var(--button-primary,#0f766e)!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}
.roomDashHeaderActions{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
}
.roomDashTimelineBtn{
  min-height:38px!important;
  padding:9px 16px!important;
  border-radius:999px!important;
  font-size:12px!important;
  font-weight:1000!important;
}
@media(max-width:760px){
  #tab-mapa .mapActionRow #btnAddSurgery,
  #tab-mapa .mapActionRow #btnAddAnesMap,
  #tab-mapa .mapActionRow #btnExpandMap{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    min-width:112px!important;
    height:32px!important;
    padding:7px 9px!important;
    border-radius:9px!important;
    font-size:11px!important;
    line-height:1.1!important;
    white-space:nowrap!important;
  }
  #tab-mapa .map{
    padding-bottom:0!important;
  }
  #tab-mapa.mapRoomsView .roomsDashboard{
    padding-bottom:0!important;
  }
  .roomDashHeaderActions{
    align-items:flex-start;
    margin-top:10px;
  }
  .roomDashTimelineBtn{
    width:100%;
  }
}

/* ===== mobile-fullscreen-scroll-v1: rolagem vertical dentro do mapa expandido ===== */
@media(max-width:760px){
  #tab-mapa.mapExpandedView{
    display:flex!important;
    flex-direction:column!important;
    height:100dvh!important;
    max-height:100dvh!important;
    min-height:0!important;
    overflow:hidden!important;
    padding:6px 6px calc(6px + env(safe-area-inset-bottom))!important;
  }
  #tab-mapa.mapExpandedView .mapControlCard,
  #tab-mapa.mapExpandedView .mapToolbarSticky{
    flex:0 0 auto!important;
  }
  #tab-mapa.mapExpandedView .mapShell,
  #tab-mapa.mapExpandedView.mapOverviewView .mapShell{
    flex:1 1 auto!important;
    height:auto!important;
    max-height:none!important;
    min-height:0!important;
    width:100%!important;
    overflow-x:auto!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    touch-action:pan-x pan-y pinch-zoom!important;
    -webkit-overflow-scrolling:touch!important;
  }
}

/* ===== map-back-v1: retorno visivel dentro do mapa ===== */
#tab-mapa .mapActionRow #btnMapBack{
  border-color:rgba(15,118,110,.28)!important;
}
@media(max-width:760px){
  #tab-mapa .mapActionRow #btnMapBack{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    min-width:82px!important;
    height:32px!important;
    padding:7px 9px!important;
    border-radius:9px!important;
    font-size:11px!important;
    line-height:1.1!important;
    white-space:nowrap!important;
  }
}

/* ===== room-group-collapse-minus-v2: recolher bloco pela primeira sala ===== */
#tab-mapa .roomLabel.expandedGroupStart{
  padding:3px 44px 3px 8px!important;
}
#tab-mapa.mapExpandedView .roomLabel.expandedGroupStart,
#tab-mapa.mapExpandedView.mapOverviewView .roomLabel.expandedGroupStart{
  padding-right:44px!important;
}
#tab-mapa .roomLabel.expandedGroupStart .roomGroupToggle.expanded{
  left:auto!important;
  right:7px!important;
  top:50%!important;
  width:30px!important;
  min-width:30px!important;
  height:30px!important;
  min-height:30px!important;
}
@media(max-width:760px){
  #tab-mapa .roomLabel.expandedGroupStart,
  #tab-mapa.mapExpandedView .roomLabel.expandedGroupStart,
  #tab-mapa.mapExpandedView.mapOverviewView .roomLabel.expandedGroupStart{
    padding-right:52px!important;
  }
  #tab-mapa .roomLabel.expandedGroupStart .roomGroupToggle.expanded{
    left:auto!important;
    right:8px!important;
    width:36px!important;
    min-width:36px!important;
    height:36px!important;
    min-height:36px!important;
  }
}

/* ===== ops-central-v1: barra operacional compacta e Multi-Visao ===== */
#tab-mapa .mapControlCard{
  padding:8px 10px!important;
  border-radius:10px!important;
  margin-bottom:6px!important;
}
#tab-mapa .mapCommand{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:8px!important;
  align-items:center!important;
}
#tab-mapa .mapCommand>div:first-child{
  display:none!important;
}
#tab-mapa .mapCommand h2,
#tab-mapa .mapCommand .hint{
  display:none!important;
}
#tab-mapa .mapOpsBar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-width:0;
}
#tab-mapa .mapPrimaryActions,
#tab-mapa .mapActionRow{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  flex-wrap:nowrap!important;
  min-width:0;
}
#tab-mapa .mapPrimaryActions{
  overflow-x:auto;
  scrollbar-width:thin;
}
#tab-mapa .mapActionRow{
  width:auto!important;
  overflow:visible!important;
  padding-bottom:0!important;
  justify-content:flex-end!important;
}
#tab-mapa .mapPrimaryActions>button,
#tab-mapa .mapActionRow>#btnExpandMap,
#tab-mapa .mapToolsMenu>summary{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 auto!important;
  min-width:0!important;
  min-height:34px!important;
  height:34px!important;
  padding:7px 10px!important;
  border-radius:8px!important;
  font-size:12px!important;
  line-height:1!important;
  white-space:nowrap!important;
  box-shadow:none!important;
}
#tab-mapa #btnAddSurgery,
#tab-mapa #btnAddAnesMap{
  font-size:12px!important;
}
#tab-mapa .mapViewSwitch{
  display:grid!important;
  grid-template-columns:1fr 1fr;
  width:auto!important;
  min-width:132px;
  gap:0!important;
  margin:0!important;
  padding:2px!important;
  border:1px solid var(--line)!important;
  border-radius:8px!important;
  background:#f8fafc!important;
}
#tab-mapa .mapViewSwitch button{
  min-height:28px!important;
  height:28px!important;
  padding:5px 9px!important;
  border-radius:6px!important;
  font-size:11px!important;
  line-height:1!important;
}
#tab-mapa .mapToolsMenu{
  position:relative;
  flex:0 0 auto;
}
#tab-mapa .mapToolsMenu>summary{
  list-style:none;
  cursor:pointer;
  border:1px solid var(--line);
  background:#fff;
  color:#111827;
  font-weight:1000;
}
#tab-mapa .mapToolsMenu>summary::-webkit-details-marker{
  display:none;
}
#tab-mapa .mapToolsMenu>summary span{
  margin-left:6px;
  font-size:10px;
}
#tab-mapa .mapToolsMenuBody{
  position:absolute;
  right:0;
  top:calc(100% + 6px);
  z-index:70;
  display:grid;
  gap:6px;
  width:min(320px,calc(100vw - 24px));
  padding:8px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--card,#fff);
  box-shadow:0 18px 42px rgba(15,23,42,.18);
}
#tab-mapa .mapToolsMenu:not([open]) .mapToolsMenuBody{
  display:none;
}
#tab-mapa .mapToolsMenuBody button,
#tab-mapa .mapToolsMenuBody a.light{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  width:100%;
  min-height:34px!important;
  height:auto!important;
  padding:8px 10px!important;
  border-radius:8px!important;
  font-size:12px!important;
  line-height:1.15!important;
  white-space:normal!important;
  text-decoration:none!important;
}
#tab-mapa .mapSubbar{
  margin-top:6px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:5px!important;
}
#tab-mapa .mapLegend{
  display:none!important;
}
#tab-mapa #mapSectorControls{
  display:block!important;
}
#tab-mapa #mapSectorControls:empty{
  display:none!important;
}
#tab-mapa .sectorLabel{
  display:none;
}
#tab-mapa .timelineGroupBar{
  display:flex;
  gap:6px;
  overflow-x:auto;
  padding-bottom:1px;
  scrollbar-width:thin;
}
#tab-mapa .sectorToggle{
  display:inline-grid!important;
  grid-template-columns:auto auto;
  align-items:center!important;
  gap:4px 6px!important;
  flex:0 0 auto!important;
  min-height:32px!important;
  height:32px!important;
  max-height:36px!important;
  padding:5px 9px!important;
  border-radius:8px!important;
  border:1px solid #b7e4d8!important;
  background:#f8fffc!important;
  color:#0f3f39!important;
  box-shadow:none!important;
}
#tab-mapa .sectorToggle span,
#tab-mapa .sectorToggle em,
#tab-mapa .sectorToggle b{
  line-height:1!important;
  white-space:nowrap!important;
}
#tab-mapa .sectorToggle span{
  font-size:12px!important;
  font-weight:1000!important;
}
#tab-mapa .sectorToggle em{
  font-size:11px!important;
  font-style:normal!important;
  font-weight:900!important;
  color:#475569!important;
}
#tab-mapa .sectorToggle b{
  display:none!important;
}
#tab-mapa .sectorToggle.expanded{
  background:#0f766e!important;
  color:#fff!important;
  border-color:#0f766e!important;
}
#tab-mapa .sectorToggle.expanded em{
  color:#d9fffb!important;
}
#tab-mapa .anesTimelinePanel.minimized{
  width:min(360px,calc(100vw - 24px))!important;
  min-width:236px!important;
  max-width:min(360px,calc(100vw - 24px))!important;
  padding:0!important;
  overflow:hidden!important;
}
#tab-mapa .anesTimelinePanel.minimized .anesTimelineHead{
  margin:0!important;
  padding:8px 9px!important;
  border-bottom:0!important;
}
#tab-mapa .anesTimelinePanel.minimized .anesTimelineHead span{
  display:block!important;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#tab-mapa .anesTimelinePanel.minimized .anesTimelineList,
#tab-mapa .anesTimelinePanel.minimized .hint{
  display:none!important;
}
#tab-mapa .anesTimelineHead .anesPanelMinimize{
  min-width:30px!important;
}
body.multiVisionFrame .anesTimelinePanel,
body.multiVisionFrame #tab-mapa .anesTimelinePanel{
  display:block!important;
  position:fixed!important;
  right:10px!important;
  top:50px!important;
  left:auto!important;
  bottom:auto!important;
  z-index:48!important;
  width:min(320px,calc(100vw - 22px))!important;
  max-height:42vh!important;
}
body.multiVisionFrame #tab-mapa .anesTimelinePanel.minimized{
  width:min(300px,calc(100vw - 22px))!important;
  min-width:214px!important;
}
body.multiVisionFrame #tab-mapa .mapControlCard{
  padding:5px 7px!important;
}
body.multiVisionFrame #tab-mapa .mapCommand{
  display:none!important;
}
body.multiVisionFrame #tab-mapa .mapSubbar{
  display:block!important;
  margin:0!important;
}
body.multiVisionFrame #tab-mapa #mapSectorControls{
  display:block!important;
}
body.multiVisionFrame #tab-mapa .mapToolbarSticky{
  display:block!important;
}
body.multiVisionFrame #tab-mapa .mapShell,
body.multiVisionFrame #tab-mapa.mapExpandedView .mapShell,
body.multiVisionFrame #tab-mapa.mapExpandedView.mapOverviewView .mapShell{
  flex:1 1 auto!important;
  min-height:0!important;
}
@media(max-width:760px){
  #tab-mapa .mapCommand{
    display:block!important;
  }
  #tab-mapa .mapOpsBar{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:7px!important;
    overflow:visible!important;
    padding-bottom:0!important;
    width:100%!important;
  }
  #tab-mapa .mapPrimaryActions,
  #tab-mapa .mapActionRow{
    width:100%!important;
    min-width:0!important;
    overflow:visible!important;
    flex-wrap:wrap!important;
    justify-content:flex-start!important;
    gap:5px!important;
    padding-bottom:0!important;
  }
  #tab-mapa .mapPrimaryActions>button,
  #tab-mapa .mapToolsMenu>summary{
    min-height:32px!important;
    height:32px!important;
    font-size:10.5px!important;
    padding:7px 7px!important;
  }
  #tab-mapa .mapPrimaryActions>button,
  #tab-mapa .mapViewSwitch,
  #tab-mapa .mapActionRow>.mapToolsMenu,
  #tab-mapa .mapActionRow>.mapZoomControls{
    flex:0 0 auto!important;
  }
  #tab-mapa .mapPrimaryActions #btnAddSurgery,
  #tab-mapa .mapPrimaryActions #btnAddAnesMap{
    min-width:0!important;
  }
  #tab-mapa .mapPrimaryActions #btnAddSurgery{width:72px!important}
  #tab-mapa .mapPrimaryActions #btnAddAnesMap{width:84px!important}
  #tab-mapa .mapPrimaryActions #btnExpandMap{
    min-width:0!important;
    width:78px!important;
    order:4;
  }
  #tab-mapa .mapViewSwitch{
    display:grid!important;
    min-width:108px!important;
    order:3;
  }
  #tab-mapa .mapViewSwitch button{
    min-height:27px!important;
    height:27px!important;
    padding:5px 5px!important;
    font-size:10.5px!important;
  }
  #tab-mapa .mapActionRow{
    border-top:1px solid #e2e8f0;
    padding-top:7px!important;
  }
  #tab-mapa .mapToolsMenu>summary{
    min-width:132px!important;
  }
  #tab-mapa .mapZoomControls{
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    margin-left:0!important;
  }
  #tab-mapa .mapZoomControls button{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:34px!important;
    height:32px!important;
    min-height:32px!important;
    padding:6px 8px!important;
    border-radius:9px!important;
    font-size:10.5px!important;
  }
  #tab-mapa .mapZoomControls #btnMapZoomFit{
    min-width:74px!important;
  }
  #tab-mapa .mapZoomValue{
    height:32px!important;
    min-width:44px!important;
    font-size:10.5px!important;
  }
  #tab-mapa .mapSubbar{
    display:none!important;
  }
  #tab-mapa .anesTimelinePanel{
    display:block!important;
  }
  #tab-mapa .anesTimelinePanel.minimized{
    min-width:214px!important;
    max-width:min(260px,calc(100vw - 24px))!important;
  }
  #tab-mapa .anesTimelineHead span{
    font-size:10.5px!important;
  }
  #tab-mapa #mapSectorControls:not(.expanded){
    display:flex!important;
    align-items:center!important;
    gap:6px!important;
    min-height:38px!important;
    height:42px!important;
    max-height:46px!important;
    margin:3px -2px 0!important;
    padding:3px 0 0!important;
    overflow:hidden!important;
  }
  #tab-mapa #mapSectorControls:not(.expanded) .sectorHeader{
    flex:0 0 auto!important;
    min-width:auto!important;
  }
  #tab-mapa #mapSectorControls:not(.expanded) .timelineGroupBar{
    display:flex!important;
    flex:1 1 auto!important;
    grid-template-columns:none!important;
    min-width:0!important;
    height:36px!important;
    max-height:36px!important;
    gap:6px!important;
    margin:0!important;
    padding:1px 2px 3px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
  }
  #tab-mapa .sectorToggle{
    height:30px!important;
    min-height:30px!important;
    padding:5px 8px!important;
  }
  #tab-mapa #mapSectorControls:not(.expanded) .sectorToggle.roomDashGroupBtn{
    display:inline-flex!important;
    align-items:center!important;
    gap:5px!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:auto!important;
    max-width:158px!important;
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
    padding:7px 9px!important;
    border-radius:999px!important;
    text-align:left!important;
  }
  #tab-mapa #mapSectorControls:not(.expanded) .sectorToggle.roomDashGroupBtn b{
    display:none!important;
  }
  #tab-mapa #mapSectorControls:not(.expanded) .sectorToggle.roomDashGroupBtn span{
    max-width:58px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  #tab-mapa #mapSectorControls:not(.expanded) .sectorToggle.roomDashGroupBtn em{
    max-width:90px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  #tab-mapa .sectorToggle span,
  #tab-mapa .sectorToggle em{
    font-size:10.5px!important;
  }
}
@media (orientation:landscape) and (min-width:700px) and (max-height:500px),
       (orientation:landscape) and (pointer:coarse) and (max-height:560px){
  #tab-mapa #mapSectorControls.map-sector-tabs--landscape{
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    min-height:44px!important;
    height:auto!important;
    max-height:56px!important;
    margin:4px -2px 0!important;
    padding:6px 8px!important;
    border-top:1px solid #e2e8f0!important;
    overflow:hidden!important;
  }
  #tab-mapa #mapSectorControls.map-sector-tabs--landscape .sectorHeader{
    display:none!important;
  }
  #tab-mapa #mapSectorControls.map-sector-tabs--landscape .timelineGroupBar{
    display:flex!important;
    flex:1 1 auto!important;
    flex-direction:row!important;
    grid-template-columns:none!important;
    width:100%!important;
    min-width:0!important;
    height:44px!important;
    max-height:48px!important;
    gap:8px!important;
    margin:0!important;
    padding:0 2px 2px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
  }
  #tab-mapa #mapSectorControls.map-sector-tabs--landscape .sectorToggle.roomDashGroupBtn{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    align-content:center!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:142px!important;
    max-width:210px!important;
    height:44px!important;
    min-height:44px!important;
    max-height:48px!important;
    gap:3px!important;
    padding:6px 10px!important;
    border-radius:8px!important;
    text-align:left!important;
    scroll-snap-align:start;
  }
  #tab-mapa #mapSectorControls.map-sector-tabs--landscape .sectorToggle span,
  #tab-mapa #mapSectorControls.map-sector-tabs--landscape .sectorToggle em{
    display:block!important;
    max-width:188px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    line-height:1.05!important;
  }
  #tab-mapa #mapSectorControls.map-sector-tabs--landscape .sectorToggle span{
    font-size:12px!important;
    font-weight:1000!important;
  }
  #tab-mapa #mapSectorControls.map-sector-tabs--landscape .sectorToggle em{
    font-size:10.5px!important;
    font-style:normal!important;
    font-weight:900!important;
  }
  #tab-mapa #mapSectorControls.map-sector-tabs--landscape .sectorToggle b{
    display:none!important;
  }
  #tab-mapa #mapSectorControls.map-sector-tabs--landscape .sectorToggle.selected{
    background:#fffbeb!important;
    border-color:#f59e0b!important;
    color:#7c2d12!important;
    -webkit-text-fill-color:#7c2d12!important;
    box-shadow:0 0 0 2px rgba(245,158,11,.22)!important;
  }
  #tab-mapa #mapSectorControls.map-sector-tabs--landscape .sectorToggle.selected em,
  #tab-mapa #mapSectorControls.map-sector-tabs--landscape .sectorToggle.selected span{
    color:#7c2d12!important;
    -webkit-text-fill-color:#7c2d12!important;
  }
}
.mapScaleConfirmIntro{
  margin:0 0 10px;
  color:var(--text,#0f172a);
  font-size:14px;
  font-weight:900;
  line-height:1.35;
}
.mapScaleConfirmDate{
  display:grid;
  place-items:center;
  min-height:78px;
  margin:10px 0;
  border:2px solid #f59e0b;
  border-radius:12px;
  background:#fffbeb;
  color:#7c2d12;
  font-size:32px;
  font-weight:1000;
  line-height:1;
  letter-spacing:0;
}
.mapScaleConfirmFacts{
  display:grid;
  gap:7px;
  margin:10px 0;
  border:1px solid #bae6fd;
  border-radius:10px;
  background:#f0f9ff;
  color:#0f3f68;
  padding:10px;
  font-size:13px;
  font-weight:850;
}
.mapScaleConfirmFacts b{
  color:#0f172a;
}

/* ===== PATCH anes-panel-layer-v1: painel de anestesistas acima dos controles do mapa ===== */
#tab-mapa .anesTimelinePanel,
#tab-mapa .anesTimelinePanel.positioned,
#tab-mapa .anesTimelinePanel.minimized,
#tab-mapa .anesTimelinePanel.dragging,
body.multiVisionFrame .anesTimelinePanel,
body.multiVisionFrame #tab-mapa .anesTimelinePanel{
  z-index:98!important;
}
