/* Gerado a partir do base.html (estilos de versões anteriores), na mesma ordem. */

#odi-form #odi-mic{flex:0 0 42px;width:42px;min-width:42px;height:42px;border:1px solid #b9e5df;border-radius:13px;background:#e8f8f5;color:#087f80;font-size:17px;font-weight:800;cursor:pointer}#odi-form #odi-mic:hover{background:#d6f2ed}#odi-form #odi-mic.odi-listening{background:#b42318;border-color:#b42318;color:#fff;animation:odi-mic-pulse 1s infinite}#odi-form #odi-send{background:#087f80!important}#odi-head{background:linear-gradient(115deg,#126b70,#087f80 68%,#28a99b)!important}#odi-panel{border-color:#b9e5df!important}#odi-body{background:linear-gradient(160deg,#f0faf8,#fff)!important}.odi-msg:not(.odi-user){background:#eef9f7!important;border-color:#d4eeea!important;color:#173f48!important}.odi-msg.odi-user{background:#087f80!important;border-color:#087f80!important}@keyframes odi-mic-pulse{50%{box-shadow:0 0 0 5px #b4231826}}


/* V123.81: Odi inspirado no conceito do vídeo, mantendo olhos/boca animados e o chat existente. */
#odi-launcher .odi-dentinho-rig{overflow:visible!important}
#odi-launcher .odi-video-stethoscope{position:absolute!important;z-index:2!important;left:31%!important;top:36%!important;width:42%!important;height:42%!important;overflow:visible!important;pointer-events:none!important;filter:drop-shadow(0 1px 1px #587a8428)!important}
#odi-launcher .odi-video-tablet{position:absolute!important;z-index:2!important;left:4%!important;top:48%!important;width:31%!important;height:37%!important;overflow:visible!important;transform:rotate(-12deg)!important;transform-origin:70% 70%!important;filter:drop-shadow(0 2px 2px #17485b40)!important;pointer-events:none!important}
#odi-avatar.odi-modern-header-avatar img{content:url("/static/odi_vivo/odi_avatar.webp?v=1354")!important;object-fit:contain!important}
@media(max-width:600px){ #odi-launcher .odi-video-tablet{left:2%!important;width:32%!important} #odi-launcher .odi-video-stethoscope{left:31%!important;width:43%!important}}
@media(prefers-reduced-motion:reduce){ #odi-launcher .odi-video-tablet{transform:none!important}}


/* V123.84: refinamento do dashboard desktop, preservando estrutura e rotas existentes. */
@media (min-width: 701px) and (pointer:fine), (min-width: 701px) and (min-height:501px){
  .dashboard-main .top{gap:12px!important;align-items:center!important;margin-bottom:12px!important}
  .dashboard-main .top-heading{min-width:0!important;flex:1 1 240px!important;max-width:none!important}
  .dashboard-main .top h2{font-size:22px!important;line-height:1.15!important;letter-spacing:-.35px!important;white-space:normal!important;max-width:100%!important}
  .dashboard-main .top-subtitle{font-size:12px!important;line-height:1.4!important}
  .dashboard-main .top-actions{min-width:0!important;gap:8px!important}
  .dashboard-main .global-search-form{max-width:360px!important}
  .dashboard-main .user{min-width:0!important;max-width:220px!important}
  .sr-dashboard>.sr-hero-wrap{margin-bottom:10px!important}
  .sr-dashboard .sr-hero,.sr-dashboard .sr-hero.sr-hero-unit{height:205px!important;min-height:205px!important;max-height:205px!important;border-radius:15px!important;margin-bottom:10px!important;overflow:hidden!important}
  .sr-dashboard .sr-hero img,.sr-dashboard .sr-hero picture,.sr-dashboard .sr-hero .sr-hero-slide{max-height:205px!important}
  .sr-dashboard .sr-kpi-row{gap:10px!important;margin:10px 0 12px!important}
  .sr-dashboard .sr-kpi{min-height:72px!important;padding:10px 12px!important;border-radius:13px!important}
  .sr-dashboard .sr-kpi strong{font-size:19px!important;line-height:1.15!important}
  .sr-dashboard .sr-kpi small{font-size:10px!important;line-height:1.3!important}
  .sr-dashboard .sr-panel{border-radius:14px!important;padding:14px!important}
  .sr-dashboard .sr-grid-top,.sr-dashboard .sr-grid-middle,.sr-dashboard .sr-grid-lower{gap:12px!important}
  .dashboard-main .dash-kpi{min-height:78px!important;padding:11px 12px!important;border-radius:14px!important}
  .dashboard-main .kpi-copy strong{font-size:23px!important}
}
@media (max-width:700px), (pointer:coarse) and (max-height:500px){
  .sr-dashboard .sr-hero,.sr-dashboard .sr-hero.sr-hero-unit{height:190px!important;min-height:190px!important;max-height:190px!important;border-radius:13px!important}
  .sr-dashboard .sr-hero img,.sr-dashboard .sr-hero picture,.sr-dashboard .sr-hero .sr-hero-slide{max-height:190px!important}
  .dashboard-main .top h2{font-size:22px!important;line-height:1.18!important}
  .sr-dashboard .sr-kpi-row{gap:8px!important}
  .sr-dashboard .sr-kpi{padding:10px!important;min-width:0!important}
}
/* Polimento consistente sem alterar a lógica dos componentes. */
.sr-dashboard .sr-kpi,.sr-dashboard .sr-panel,.sr-dashboard .sr-action{border:1px solid var(--ui-line,#dce8f1)!important;box-shadow:0 4px 14px rgba(18,63,140,.045)!important}
.sr-dashboard .sr-action{transition:transform .16s ease,box-shadow .16s ease!important}
@media(hover:hover){.sr-dashboard .sr-action:hover{transform:translateY(-2px)!important;box-shadow:0 8px 20px rgba(18,63,140,.09)!important}}


@media (min-width:701px) and (pointer:fine), (min-width:701px) and (min-height:501px){
 .dashboard-main .sr-dashboard>.sr-hero-wrap{height:clamp(190px,19vw,225px)!important;min-height:190px!important;max-height:225px!important;aspect-ratio:auto!important;overflow:hidden!important;margin:0 0 12px!important}
 .dashboard-main .sr-dashboard>.sr-hero-wrap>.sr-hero{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:cover!important;object-position:center!important;margin:0!important}
 .dashboard-main .sr-dashboard>.sr-kpi-row{margin-top:0!important}
}
@media (max-width:700px), (pointer:coarse) and (max-height:500px){.dashboard-main .sr-dashboard>.sr-hero-wrap{height:clamp(150px,42vw,190px)!important;min-height:150px!important;max-height:190px!important;aspect-ratio:auto!important}.dashboard-main .sr-dashboard>.sr-hero-wrap>.sr-hero{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important}}


/* Banner padrão OdiHub: arte 3:1 sem distorção ou corte. */
.dashboard-main .sr-dashboard > .sr-hero-wrap,
.dashboard-main .sr-hero-wrap[data-banner-rotation]{
  position:relative!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:3 / 1!important;
  overflow:hidden!important;
  margin:0 0 12px!important;
  border-radius:15px!important;
  background:#eaf8f6!important;
}
.dashboard-main .sr-dashboard > .sr-hero-wrap > .sr-hero,
.dashboard-main .sr-hero-wrap[data-banner-rotation] > .sr-hero{
  display:block!important;
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  object-fit:fill!important;
  object-position:center!important;
  background-size:100% 100%!important;
  margin:0!important;
  border-radius:15px!important;
}
@media (max-width:700px), (pointer:coarse) and (max-height:500px){
  .dashboard-main .sr-dashboard > .sr-hero-wrap,
  .dashboard-main .sr-hero-wrap[data-banner-rotation]{
    aspect-ratio:3 / 1!important;
    height:auto!important;min-height:0!important;max-height:none!important;
  }
}


/* V123.88: cabeçalho livre, sem cartão ou contorno envolvendo saudação e ações. */
.main > .top, .dashboard-main > .top {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  padding: 0 !important;
  margin: 0 0 14px !important;
  min-height: 0 !important;
}
.main > .top::before, .main > .top::after,
.dashboard-main > .top::before, .dashboard-main > .top::after {
  display:none !important; content:none !important;
}
.main > .top .top-heading, .dashboard-main > .top .top-heading {
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  padding: 0 !important; margin: 0 !important; border-radius: 0 !important;
}
.main > .top .top-actions, .dashboard-main > .top .top-actions {
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  padding: 0 !important; margin: 0 !important; border-radius: 0 !important;
}
.main > .top .user, .dashboard-main > .top .user {
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  outline: 0 !important; padding: 0 !important; margin: 0 !important; border-radius: 0 !important;
  display:flex !important; align-items:center !important; gap:10px !important;
}
.main > .top .top-user-identity, .dashboard-main > .top .top-user-identity {
  display:flex !important; align-items:center !important; gap:8px !important;
  background:transparent !important; border:0 !important; box-shadow:none !important;
  padding:0 !important; margin:0 !important; border-radius:0 !important;
}
.main > .top .unit-badge, .dashboard-main > .top .unit-badge {
  border-radius:999px !important;
}
@media (max-width:700px), (pointer:coarse) and (max-height:500px){
  .main > .top, .dashboard-main > .top {align-items:flex-start !important; gap:8px !important;}
  .main > .top .top-actions, .dashboard-main > .top .top-actions {justify-content:flex-start !important;}
  .main > .top .user, .dashboard-main > .top .user {flex-wrap:wrap !important; gap:8px !important;}
}


/* V123.89: nome completo do usuário e ações com cor consistente. */
.main > .top .top-actions, .dashboard-main > .top .top-actions {
  flex:0 1 auto!important; min-width:0!important; gap:8px!important;
}
.main > .top .user, .dashboard-main > .top .user {
  display:flex!important; flex-wrap:nowrap!important; align-items:center!important;
  gap:8px!important; min-width:0!important; max-width:none!important; overflow:visible!important;
}
.main > .top .top-user-identity, .dashboard-main > .top .top-user-identity {
  display:flex!important; flex:0 1 auto!important; min-width:0!important;
  gap:7px!important; overflow:visible!important; white-space:nowrap!important;
}
.main > .top .top-user-name, .dashboard-main > .top .top-user-name {
  display:inline-block!important; flex:0 0 auto!important; width:auto!important;
  max-width:none!important; min-width:max-content!important; overflow:visible!important;
  text-overflow:clip!important; white-space:nowrap!important; font-size:12px!important;
}
.main > .top .unit-badge, .dashboard-main > .top .unit-badge {
  flex:0 1 auto!important; min-width:0!important; max-width:125px!important;
  overflow:hidden!important; text-overflow:ellipsis!important; white-space:nowrap!important;
}
.main > .top .top-home, .main > .top .top-logout,
.dashboard-main > .top .top-home, .dashboard-main > .top .top-logout {
  display:inline-flex!important; align-items:center!important; justify-content:center!important;
  flex:0 0 auto!important; min-height:36px!important; padding:8px 13px!important;
  background:#21d4de!important; color:#fff!important; border:1px solid #21d4de!important;
  border-radius:10px!important; box-shadow:0 4px 10px rgba(23,105,232,.16)!important;
  text-decoration:none!important; font-weight:800!important; white-space:nowrap!important;
}
.main > .top .top-home:hover, .main > .top .top-logout:hover,
.dashboard-main > .top .top-home:hover, .dashboard-main > .top .top-logout:hover {
  background:#18b7c0!important; border-color:#18b7c0!important; color:#fff!important;
}
@media (max-width:700px), (pointer:coarse) and (max-height:500px){
 .main > .top .top-user-name, .dashboard-main > .top .top-user-name {font-size:11px!important;}
 .main > .top .unit-badge, .dashboard-main > .top .unit-badge {max-width:95px!important;}
 .main > .top .top-home, .main > .top .top-logout,
 .dashboard-main > .top .top-home, .dashboard-main > .top .top-logout {min-height:34px!important;padding:7px 10px!important;}
}

.side .nav a,.side .nav button{white-space:normal;overflow-wrap:anywhere;word-break:normal;line-height:1.3;min-width:0}.side .nav a span,.side .nav button span{min-width:0;overflow-wrap:anywhere}.side{overflow-x:hidden}
/* V123.118 - identidade única de navegação: painel lateral acompanha o teal do mobile */
:root{--oc-sidebar:#078f8c;--oc-sidebar-border:rgba(255,255,255,.16)}
.side{
  background:linear-gradient(180deg,#079b96 0%,#087f80 58%,#076b70 100%)!important;
  color:#fff!important;border-right:1px solid rgba(255,255,255,.16)!important;
  box-shadow:4px 0 18px rgba(7,111,111,.10)!important
}
.side .brand{background:rgba(255,255,255,.08)!important;border:1px solid rgba(255,255,255,.16)!important}
.side .nav a,.side .nav button,.side .nav-item,.side .nav-group>summary{
  color:#f3ffff!important
}
.side .nav a:hover,.side .nav button:hover,.side .nav-item:hover,.side .nav-group>summary:hover{
  background:rgba(255,255,255,.14)!important;color:#fff!important
}
.side .nav a.active,.side .nav a[aria-current="page"],.side .nav-item.active{
  background:#fff!important;color:#087f80!important;
  box-shadow:inset 3px 0 0 #d8f2ef,0 3px 10px rgba(0,0,0,.08)!important
}
.side .nav a.active .nav-ico,.side .nav-item.active .nav-ico{color:#087f80!important}
.side .nav-subitem{color:#e0f7f5!important}
.side .nav-subitem:hover,.side .nav-subitem.active{background:rgba(255,255,255,.16)!important;color:#fff!important}
.side .nav-chevron{color:#eaffff}
.side .side-footer{background:rgba(255,255,255,.09)!important;border-color:rgba(255,255,255,.18)!important}
@media (max-width:850px), (pointer:coarse) and (max-height:500px){
 .side{background:linear-gradient(180deg,#079b96 0%,#087f80 58%,#076b70 100%)!important}
}



/* V124.19: correção final de contraste e estados do menu lateral.
   Este bloco fica por último para neutralizar regras antigas acumuladas no template. */
html body aside.side,
html body aside.side * {
  opacity: 1 !important;
  filter: none !important;
  text-shadow: none !important;
}
html body aside.side {
  width: 212px !important;
  background: #F8FCFB !important;
  color: #344F59 !important;
  border-right: 1px solid #E3EEEA !important;
}
html body aside.side .brand {
  background: #EAF5F1 !important;
  border: 1px solid #DCEBE5 !important;
}
html body aside.side .brand-title,
html body aside.side .brand-copy,
html body aside.side .brand-copy * {
  color: #214B50 !important;
  opacity: 1 !important;
}
html body aside.side nav#mainSidebarNav .nav-item,
html body aside.side nav#mainSidebarNav .nav-group > summary,
html body aside.side nav#mainSidebarNav .nav-group > summary span {
  color: #405A60 !important;
  opacity: 1 !important;
  background-color: transparent !important;
  text-decoration: none !important;
}
html body aside.side nav#mainSidebarNav .nav-item:hover,
html body aside.side nav#mainSidebarNav .nav-group > summary:hover {
  color: #087F78 !important;
  background: #EEF7F4 !important;
  border-color: #E4F0EB !important;
}
html body aside.side nav#mainSidebarNav .nav-item.active,
html body aside.side nav#mainSidebarNav .nav-item[aria-current="page"],
html body aside.side nav#mainSidebarNav details.nav-group[open] > summary {
  color: #087F78 !important;
  background: #DDF3EE !important;
  border: 1px solid #CDE9E1 !important;
  box-shadow: inset 3px 0 0 #0E9F95 !important;
}
html body aside.side nav#mainSidebarNav .nav-ico,
html body aside.side nav#mainSidebarNav .nav-chevron {
  color: #718A89 !important;
  opacity: 1 !important;
}
html body aside.side nav#mainSidebarNav .nav-item.active .nav-ico,
html body aside.side nav#mainSidebarNav details.nav-group[open] > summary .nav-ico,
html body aside.side nav#mainSidebarNav details.nav-group[open] > summary .nav-chevron {
  color: #087F78 !important;
}
html body aside.side nav#mainSidebarNav .nav-submenu {
  background: transparent !important;
  border-left: 1px solid #DCEAE5 !important;
}
html body aside.side nav#mainSidebarNav a.nav-subitem,
html body aside.side nav#mainSidebarNav a.nav-subitem:visited {
  display: flex !important;
  align-items: center !important;
  min-height: 34px !important;
  color: #52696D !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  opacity: 1 !important;
  visibility: visible !important;
}
html body aside.side nav#mainSidebarNav a.nav-subitem:hover {
  color: #087F78 !important;
  background: #F0F8F5 !important;
  border-color: #E5F0EB !important;
}
html body aside.side nav#mainSidebarNav a.nav-subitem.active {
  color: #087F78 !important;
  background: #E4F4EF !important;
  border-color: #D7ECE4 !important;
  box-shadow: inset 2px 0 0 #0E9F95 !important;
  font-weight: 700 !important;
}
html body aside.side nav#mainSidebarNav a.nav-subitem .sub-dot {
  color: #64827C !important;
  background: #EDF5F2 !important;
  opacity: 1 !important;
}
html body aside.side nav#mainSidebarNav .nav-exit {
  color: #657B7C !important;
  border-top: 1px solid #E5EEEA !important;
}
html body aside.side nav#mainSidebarNav .nav-exit:hover {
  color: #B94F55 !important;
  background: #FFF1F0 !important;
}
@media (max-width: 850px), (pointer:coarse) and (max-height:500px){
  html body aside.side {
    background: #F8FCFB !important;
    color: #344F59 !important;
  }
}


/* V124.24: compactação global dos componentes internos. Mantém menu, banner e lógica intactos. */
@media (min-width: 851px) and (pointer:fine), (min-width: 851px) and (min-height:501px){
  html body { font-size: 12.5px !important; line-height: 1.42 !important; }
  html body .main { padding-top: 16px !important; padding-bottom: 22px !important; }

  /* Hierarquia tipográfica mais discreta, sem reduzir a legibilidade. */
  html body h1, html body .page-title { font-size: 22px !important; line-height: 1.2 !important; }
  html body h2, html body .section-title { font-size: 18px !important; line-height: 1.25 !important; }
  html body h3 { font-size: 15.5px !important; line-height: 1.3 !important; }
  html body h4 { font-size: 13px !important; line-height: 1.3 !important; }
  html body p { line-height: 1.42 !important; }

  /* Cartões e painéis: menos volume vazio, sem impor altura fixa. */
  html body .card,
  html body .panel,
  html body .section-card,
  html body .settings-card,
  html body .config-card,
  html body .report-card,
  html body .modal-card,
  html body .form-card,
  html body .dashboard-panel,
  html body .content-card,
  html body .table-card,
  html body .summary-card,
  html body .metric-card,
  html body .kpi-card,
  html body .stat-card,
  html body .agenda-card,
  html body .dentist-card,
  html body .patient-card,
  html body .procedure-card {
    padding: 11px !important;
    border-radius: 12px !important;
  }
  html body .grid,
  html body .form-grid,
  html body .fields-grid,
  html body .dashboard-main-grid,
  html body .dashboard-kpis,
  html body .row { gap: 9px !important; }
  html body .card h2, html body .panel h2,
  html body .card h3, html body .panel h3 { margin-top: 0 !important; margin-bottom: 7px !important; }

  /* Formulários e ações mais enxutos. */
  html body label, html body .field label, html body .form-label {
    font-size: 11.5px !important; line-height: 1.25 !important; margin-bottom: 4px !important;
  }
  html body input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]),
  html body select, html body textarea {
    min-height: 35px !important; padding: 7px 9px !important;
    font-size: 12px !important; line-height: 1.3 !important; border-radius: 7px !important;
  }
  html body input[type=date], html body input[type=datetime-local], html body input[type=time] {
    min-height: 35px !important; height: 35px !important; padding: 5px 8px !important;
  }
  html body textarea { min-height: 68px !important; }
  html body button:not(.odi-fab):not(#odi-button):not(.nav-toggle),
  html body .btn, html body a.btn,
  html body input[type=submit], html body input[type=button],
  html body [role=button] {
    min-height: 30px !important; padding: 6px 9px !important;
    font-size: 11.5px !important; line-height: 1.2 !important; border-radius: 7px !important;
  }

  /* Tabelas mais densas, preservando conteúdo e quebras de linha. */
  html body table th, html body table td,
  html body .table th, html body .table td {
    padding: 6px 8px !important; font-size: 11px !important; line-height: 1.3 !important;
  }

  /* Painel inicial: cards dos indicadores e de próteses. O banner não é alterado. */
  html body section.sr-dashboard > .sr-kpi-row {
    gap: 9px !important; margin-top: 0 !important; margin-bottom: 9px !important;
  }
  html body section.sr-dashboard > .sr-kpi-row .sr-kpi {
    min-height: 70px !important; padding: 9px 10px !important; gap: 9px !important;
    border-radius: 11px !important; box-sizing: border-box !important;
  }
  html body section.sr-dashboard > .sr-kpi-row .sr-kpi-icon {
    width: 34px !important; height: 34px !important; flex: 0 0 34px !important;
    font-size: 16px !important; border-radius: 10px !important;
  }
  html body section.sr-dashboard > .sr-kpi-row .sr-kpi strong { font-size: 19px !important; line-height: 1.05 !important; }
  html body section.sr-dashboard > .sr-kpi-row .sr-kpi small { font-size: 10px !important; line-height: 1.2 !important; }
  html body section.sr-dashboard > .sr-kpi-row .sr-kpi em { font-size: 9px !important; line-height: 1.15 !important; }
  html body section.sr-dashboard .sr-prosthesis-management {
    padding: 11px !important; margin-top: 9px !important; margin-bottom: 9px !important;
  }
  html body section.sr-dashboard .sr-prosthesis-management .sr-panel-head { margin-bottom: 7px !important; }
  html body section.sr-dashboard .sr-prosthesis-kpis { gap: 9px !important; }
  html body section.sr-dashboard .sr-prosthesis-kpis > a {
    min-height: 76px !important; padding: 10px !important; gap: 9px !important;
    border-radius: 10px !important; box-sizing: border-box !important;
  }
  html body section.sr-dashboard .sr-prosthesis-kpis > a > span:first-child {
    flex-basis: 34px !important; width: 34px !important; height: 34px !important; font-size: 18px !important;
  }
  html body section.sr-dashboard .sr-prosthesis-kpis > a strong { font-size: 22px !important; line-height: 1.05 !important; }
  html body section.sr-dashboard .sr-prosthesis-kpis > a b { font-size: 12px !important; line-height: 1.2 !important; }
  html body section.sr-dashboard .sr-prosthesis-kpis > a small { font-size: 10px !important; line-height: 1.2 !important; }
  html body section.sr-dashboard .sr-grid-middle,
  html body section.sr-dashboard .sr-grid-top,
  html body section.sr-dashboard .sr-grid-bottom,
  html body section.sr-dashboard .sr-grid-lower { gap: 10px !important; margin-top: 9px !important; }
  html body section.sr-dashboard .sr-panel { padding: 11px !important; border-radius: 12px !important; }
  html body #sr-category-fixed .sr-cat-fixed-head { gap: 9px !important; margin-bottom: 10px !important; }
  html body #sr-category-fixed .sr-cat-fixed-layout { grid-template-columns: minmax(160px,220px) minmax(0,1fr) !important; gap: 14px !important; }
  html body #sr-category-fixed .sr-cat-fixed-donut-wrap { width: clamp(155px,18vw,205px) !important; height: clamp(155px,18vw,205px) !important; }
  html body #sr-category-fixed .sr-cat-fixed-legend { gap: 7px !important; max-height: 245px !important; }
  html body #sr-category-fixed .sr-cat-fixed-row { font-size: 12px !important; gap: 7px !important; }
}


/* V124.25: refinamento global de densidade. Não altera banner, menu, regras ou dados. */
@media (min-width: 851px) and (pointer:fine), (min-width: 851px) and (min-height:501px){
  html body { font-size: 12px !important; line-height: 1.38 !important; }
  html body .main { padding: 12px 18px 18px !important; }
  html body .top { margin-bottom: 12px !important; gap: 10px !important; }
  html body .top h2 { font-size: 21px !important; line-height: 1.18 !important; }
  html body h1, html body .page-title { font-size: 20px !important; line-height: 1.2 !important; }
  html body h2, html body .section-title { font-size: 17px !important; line-height: 1.22 !important; }
  html body h3 { font-size: 14px !important; line-height: 1.25 !important; }
  html body h4 { font-size: 12.5px !important; line-height: 1.25 !important; }
  html body p { margin-top: 5px; margin-bottom: 7px; line-height: 1.38 !important; }
  html body .card, html body .panel, html body .section-card,
  html body .settings-card, html body .config-card, html body .report-card,
  html body .form-card, html body .dashboard-panel, html body .content-card,
  html body .table-card, html body .summary-card, html body .metric-card,
  html body .kpi-card, html body .stat-card, html body .agenda-card,
  html body .dentist-card, html body .patient-card, html body .procedure-card {
    padding: 9px !important; border-radius: 11px !important;
  }
  html body .grid, html body .form-grid, html body .fields-grid,
  html body .dashboard-main-grid, html body .dashboard-kpis, html body .row { gap: 8px !important; }
  html body .field, html body .form-group { margin-bottom: 9px !important; gap: 4px !important; }
  html body label, html body .field label, html body .form-label { font-size: 11px !important; line-height: 1.22 !important; }
  html body input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]),
  html body select, html body textarea { min-height: 33px !important; padding: 6px 8px !important; font-size: 12px !important; border-radius: 7px !important; }
  html body input[type=date], html body input[type=datetime-local], html body input[type=time] { height: 33px !important; min-height: 33px !important; }
  html body textarea { min-height: 62px !important; }
  html body button:not(.odi-fab):not(#odi-button):not(.nav-toggle),
  html body .btn, html body a.btn, html body input[type=submit],
  html body input[type=button], html body [role=button] {
    min-height: 29px !important; padding: 5px 9px !important; font-size: 11px !important; border-radius: 7px !important;
  }
  html body table th, html body table td, html body .table th, html body .table td {
    padding: 5px 7px !important; font-size: 10.8px !important; line-height: 1.28 !important;
  }
  /* Evita que textos, campos ou cards ultrapassem as próprias colunas. */
  html body .grid > *, html body .row > *, html body [class*="grid"] > *,
  html body .card, html body .panel, html body .sr-panel, html body .sr-kpi { min-width: 0 !important; }
  html body table { max-width: 100%; }
  html body td, html body th { overflow-wrap: anywhere; }
  /* Indicadores da home: altura contida e proporcional. */
  html body section.sr-dashboard > .sr-kpi-row .sr-kpi { min-height: 60px !important; padding: 8px !important; gap: 7px !important; }
  html body section.sr-dashboard > .sr-kpi-row .sr-kpi-icon { width: 30px !important; height: 30px !important; flex-basis: 30px !important; font-size: 14px !important; }
  html body section.sr-dashboard > .sr-kpi-row .sr-kpi strong { font-size: 17px !important; }
  html body section.sr-dashboard > .sr-kpi-row .sr-kpi small { font-size: 9.5px !important; }
  html body section.sr-dashboard .sr-prosthesis-management,
  html body section.sr-dashboard .sr-panel { padding: 9px !important; }
  html body section.sr-dashboard .sr-prosthesis-kpis > a { min-height: 66px !important; padding: 8px !important; gap: 7px !important; }
  html body section.sr-dashboard .sr-prosthesis-kpis > a > span:first-child { width: 30px !important; height: 30px !important; flex-basis: 30px !important; font-size: 15px !important; }
  html body section.sr-dashboard .sr-prosthesis-kpis > a strong { font-size: 19px !important; }
  html body section.sr-dashboard .sr-grid-middle, html body section.sr-dashboard .sr-grid-top,
  html body section.sr-dashboard .sr-grid-bottom, html body section.sr-dashboard .sr-grid-lower { gap: 8px !important; margin-top: 8px !important; }
}
@media (max-width: 850px), (pointer:coarse) and (max-height:500px){
  html body .card, html body .panel, html body .section-card { padding: 12px !important; }
  html body .grid, html body .form-grid, html body .fields-grid, html body .row { gap: 9px !important; }
  html body input:not([type=checkbox]):not([type=radio]), html body select, html body textarea { min-width: 0; max-width: 100%; }
}

/* V124.26: identidade global dos controles superiores, sem azul legado. */
html body .main > .top .top-home,
html body .main > .top .top-logout,
html body .mobile-appbar-actions .top-home,
html body .mobile-appbar-actions .top-logout {
  background:linear-gradient(135deg,#087f80,#0bb6a8)!important;
  color:#fff!important;border:1px solid #087f80!important;
  box-shadow:0 3px 9px rgba(8,127,128,.14)!important;
}
html body .main > .top .top-home:hover,
html body .main > .top .top-logout:hover,
html body .mobile-appbar-actions .top-home:hover,
html body .mobile-appbar-actions .top-logout:hover {
  background:#066b70!important;border-color:#066b70!important;color:#fff!important;
}
html body form.sr-entry-form, html body form.sr-exit-form {
  width:100%!important;max-width:1080px!important;margin-left:0!important;
  padding:18px!important;border-radius:14px!important;
}
html body form.sr-entry-form .field, html body form.sr-exit-form .field {min-width:0!important;}
html body form.sr-entry-form input, html body form.sr-entry-form select,
html body form.sr-exit-form input, html body form.sr-exit-form select {
  height:42px!important;min-height:42px!important;font-size:13px!important;
}


/* V124.27: densidade visual global compacta e consistente. */
html body button:not(.icon-action):not(.tooth),
html body .btn, html body .vb, html body .suite-btn,
html body a.edit, html body .edit {
  height:32px!important; min-height:32px!important; padding:6px 10px!important;
  font-size:12px!important; line-height:1.2!important;
  border-radius:8px!important; box-sizing:border-box;
}
html body input:not([type=checkbox]):not([type=radio]):not([type=file]),
html body select, html body textarea {
  height:36px!important; min-height:36px!important; padding:7px 10px!important;
  font-size:13px!important; border-radius:8px!important;
  box-sizing:border-box; max-width:100%;
}
html body textarea {height:auto!important; min-height:64px!important;}
html body label {font-size:12px!important; line-height:1.35!important;}
html body .vc {padding:12px!important;}
html body .vg {gap:10px!important; margin:10px 0!important;}
html body .vf {gap:9px!important;}
html body .card, html body .panel, html body .section-card {padding:13px!important;}
html body .form, html body .form-grid, html body .fields-grid {gap:10px!important;}
html body .table th, html body .table td {padding:8px 9px!important;}
html body .va, html body .actions, html body .action-group {gap:6px!important;}
@media (max-width:900px), (pointer:coarse) and (max-height:500px){
 html body .card, html body .panel, html body .section-card {padding:11px!important;}
 html body input:not([type=checkbox]):not([type=radio]), html body select, html body textarea {min-height:36px!important;}
}


/* Odi integrado ao fluxo da barra lateral: sem cartão e sem sobrepor a navegação. */
html body aside.side{
  display:flex!important;flex-direction:column!important;
  height:100vh!important;height:100dvh!important;
  box-sizing:border-box!important;overflow:hidden!important;
}
html body aside.side .nav{
  flex:1 1 auto!important;min-height:0!important;
  overflow-y:auto!important;overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  scrollbar-width:thin!important;
}
html body #odi-sidebar-card{
  position:relative!important;inset:auto!important;
  display:flex!important;flex:0 0 auto!important;
  flex-direction:column!important;align-items:center!important;
  gap:3px!important;width:100%!important;box-sizing:border-box!important;
  margin:8px 0 2px!important;padding:2px 0 0!important;
  border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;
  overflow:visible!important;cursor:default!important;
}
html body #odi-sidebar-card .odi-sidebar-card-head{
  width:100%!important;padding:0 4px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  gap:8px!important;background:transparent!important;
}
html body #odi-sidebar-launcher-slot{
  width:100%!important;min-height:0!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  border:0!important;border-radius:0!important;background:transparent!important;
  overflow:visible!important;
}
html body #odi-launcher{
  position:relative!important;inset:auto!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  flex:0 0 auto!important;width:100%!important;height:112px!important;
  min-height:112px!important;max-height:112px!important;
  margin:0!important;padding:0!important;
  border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;
  overflow:visible!important;transform:none!important;cursor:pointer!important;
}
html body #odi-launcher:after{display:none!important;content:none!important}
html body #odi-launcher .odi-sidebar-mascot-image{
  display:block!important;width:132px!important;height:108px!important;
  max-width:100%!important;max-height:108px!important;
  object-fit:contain!important;object-position:center!important;
  background:transparent!important;border:0!important;border-radius:0!important;
  filter:drop-shadow(0 5px 7px rgba(15,85,80,.13))!important;
}
html body #odi-launcher .odi-sidebar-speech{
  right:calc(50% - 60px)!important;top:0!important;
}
html body #odi-sidebar-card .odi-sidebar-card-copy{
  display:flex!important;flex-direction:column!important;align-items:center!important;
  gap:2px!important;padding:0 3px!important;text-align:center!important;
}
html body #odi-sidebar-card .odi-sidebar-card-copy strong{
  font-size:10px!important;font-weight:800!important;color:#087f80!important;
}
html body #odi-sidebar-card .odi-sidebar-card-copy small{
  max-width:155px!important;font-size:9px!important;line-height:1.25!important;
  color:#66817f!important;
}
@media(max-height:650px){
  html body #odi-launcher{height:84px!important;min-height:84px!important;max-height:84px!important}
  html body #odi-launcher .odi-sidebar-mascot-image{height:82px!important;max-height:82px!important;width:110px!important}
  html body #odi-sidebar-card .odi-sidebar-card-copy small{display:none!important}
}
@media (max-width:850px), (pointer:coarse) and (max-height:500px){
  html body aside.side{overflow-y:auto!important}
  html body aside.side .nav{flex:0 0 auto!important;overflow:visible!important}
  html body #odi-sidebar-card{margin:10px 0 12px!important}
}


html body #odi-sidebar-card{display:flex!important;flex-direction:column!important;align-items:center!important;gap:2px!important;margin:8px 0 4px!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important;}
html body #odi-sidebar-launcher-slot{width:100%!important;min-height:0!important;padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important;}
html body #odi-launcher{width:100%!important;height:116px!important;min-height:116px!important;max-height:116px!important;padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important;}
html body #odi-launcher .odi-sidebar-mascot-image{width:142px!important;height:116px!important;max-width:100%!important;max-height:116px!important;object-fit:contain!important;background:transparent!important;border:0!important;border-radius:0!important;filter:drop-shadow(0 5px 8px rgba(15,85,80,.12))!important;}
html body #odi-sidebar-card .odi-sidebar-card-head,html body #odi-sidebar-card .odi-sidebar-card-copy{background:transparent!important;border:0!important;box-shadow:none!important;}
#odi-panel .odi-msg p{margin:0 0 8px!important;line-height:1.48!important;}#odi-panel .odi-msg p:last-child{margin-bottom:0!important;}
#odi-panel .odi-answer-list{margin:3px 0 10px!important;padding-left:22px!important;display:block!important;}
#odi-panel .odi-answer-list li{padding:0 0 6px 2px!important;line-height:1.48!important;}
#odi-panel .odi-answer-list li::marker{color:#078f87!important;font-weight:800!important;}
#odi-panel .odi-msg strong{font-weight:800!important;color:#075f61!important;}
html[data-theme="dark"] #odi-panel .odi-msg strong{color:#75ded2!important;}
@media(max-height:650px){html body #odi-launcher{height:84px!important;min-height:84px!important;max-height:84px!important;}html body #odi-launcher .odi-sidebar-mascot-image{height:84px!important;max-height:84px!important;width:110px!important;}}


/* Odi flutuante: sem cartão, borda ou fundo quadrado ao redor do mascote. */
html body #odi-sidebar-card{
  display:flex!important;flex-direction:column!important;align-items:center!important;
  gap:4px!important;margin:8px 0 4px!important;padding:0!important;
  border:0!important;border-radius:0!important;background:transparent!important;
  box-shadow:none!important;overflow:visible!important;cursor:default!important;
}
html body #odi-sidebar-card .odi-sidebar-card-head{
  width:100%!important;display:flex!important;justify-content:center!important;
  gap:7px!important;background:transparent!important;border:0!important;
}
html body #odi-sidebar-launcher-slot{
  width:100%!important;min-height:0!important;display:flex!important;
  align-items:center!important;justify-content:center!important;
  padding:0!important;margin:0!important;border:0!important;border-radius:0!important;
  background:transparent!important;overflow:visible!important;
}
html body #odi-launcher{
  width:100%!important;height:116px!important;min-height:116px!important;max-height:116px!important;
  padding:0!important;margin:0!important;border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;overflow:visible!important;
}
html body #odi-launcher .odi-sidebar-mascot-image{
  width:100%!important;height:100%!important;object-fit:contain!important;
  background:transparent!important;border:0!important;border-radius:0!important;
  filter:drop-shadow(0 5px 7px rgba(15,85,80,.13))!important;
}
html body #odi-sidebar-card .odi-sidebar-card-copy{
  background:transparent!important;border:0!important;box-shadow:none!important;
  padding:0!important;text-align:center!important;
}
html body #odi-sidebar-card .odi-sidebar-card-copy strong{font-size:10px!important;}
html body #odi-sidebar-card .odi-sidebar-card-copy small{font-size:9px!important;}
@media (max-width:850px), (pointer:coarse) and (max-height:500px){
  html body #odi-sidebar-card{display:none!important;}
}
