/* --------------------------------------------------------------------------
   Talerum V26.64 — fixed sidebar + final icon framing + typography lock
   Loaded after every other shared stylesheet.
   -------------------------------------------------------------------------- */

:root{
  --talerum-sidebar-expanded:248px;
  --talerum-sidebar-collapsed:74px;
  --talerum-ui-text:#211D1A;
  --talerum-ui-muted:#746A64;
  --talerum-ui-soft:#8A7D75;
  --talerum-ui-line:#E8E2DD;
  --talerum-ui-orange:#C46A2D;
  --talerum-ui-orange-dark:#A95425;
  --talerum-ui-icon-bg:#F8EFE8;
}

/* FIXED SIDEBAR — independent from the document scroll. */
html body[data-talerum-layout="private"] aside.sidebar.talerum-static-sidebar{
  position:fixed!important;
  inset:0 auto 0 0!important;
  top:0!important;
  left:0!important;
  bottom:0!important;
  z-index:80!important;
  align-self:auto!important;
  width:var(--talerum-sidebar-width)!important;
  height:100vh!important;
  height:100dvh!important;
  min-height:0!important;
  max-height:100vh!important;
  max-height:100dvh!important;
  overflow:hidden!important;
  background:#fff!important;
  background-image:none!important;
  contain:layout paint!important;
}
html body[data-talerum-layout="private"] :where(.shell,.talerum-shell){
  grid-template-columns:var(--talerum-sidebar-width) minmax(0,1fr)!important;
  min-height:100vh!important;
  min-height:100dvh!important;
}
html.talerum-sidebar-collapsed body[data-talerum-layout="private"] :where(.shell,.talerum-shell){
  grid-template-columns:var(--talerum-sidebar-collapsed) minmax(0,1fr)!important;
}
html body[data-talerum-layout="private"] :where(.workspace,main.workspace){
  grid-column:2!important;
  min-width:0!important;
  width:100%!important;
}
html body[data-talerum-layout="private"] aside.sidebar .talerum-sidebar-brand-row,
html body[data-talerum-layout="private"] aside.sidebar :where(.sidebar-footer,.side-bottom){
  flex:0 0 auto!important;
}
html body[data-talerum-layout="private"] aside.sidebar .talerum-flat-nav{
  flex:1 1 0%!important;
  min-height:0!important;
  max-height:none!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
}
html body[data-talerum-layout="private"] aside.sidebar :where(.sidebar-footer,.side-bottom){
  margin-top:auto!important;
  background:#fff!important;
  background-image:none!important;
}

/* Typography lock — detail cards must not inherit metric-sized typography. */
html body[data-talerum-layout="private"] .workspace :where(.summary-item,.summary-box,.fact-box,.detail-row,.mini-stat){
  line-height:1.35!important;
}
html body[data-talerum-layout="private"] .workspace :where(.summary-item label,.summary-box label,.fact-box label,.mini-stat label){
  font-size:11.5px!important;
  line-height:1.3!important;
  font-weight:730!important;
  letter-spacing:.025em!important;
  color:var(--talerum-ui-soft)!important;
}
html body[data-talerum-layout="private"] .workspace :where(.summary-item strong,.fact-box strong,.detail-row strong,.mini-stat strong){
  font-size:14px!important;
  line-height:1.35!important;
  font-weight:750!important;
  letter-spacing:0!important;
  color:var(--talerum-ui-text)!important;
}
html body[data-talerum-layout="private"] .workspace .summary-box strong{
  font-size:14.5px!important;
  line-height:1.35!important;
  font-weight:750!important;
  letter-spacing:0!important;
  color:var(--talerum-ui-text)!important;
}
html body[data-talerum-layout="private"] .workspace :where(.summary-item span,.summary-box span,.fact-box span,.mini-stat span){
  font-size:11.75px!important;
  line-height:1.45!important;
  color:var(--talerum-ui-muted)!important;
}
html body[data-talerum-layout="private"] .workspace :where(.action-button strong,.action-card strong,.quick-action strong,.action-tile strong){
  font-size:13.25px!important;
  line-height:1.32!important;
  font-weight:750!important;
  letter-spacing:0!important;
}
html body[data-talerum-layout="private"] .workspace :where(.action-button>span:last-child>span,.action-card>span:last-child>span,.quick-action small,.action-tile small){
  font-size:11.75px!important;
  line-height:1.42!important;
}

/* Icon framing — keep the visual weight identical across modules. */
html body[data-talerum-layout="private"] .workspace :where(
  .metric-icon,.banner-icon,.callout-icon,.action-icon,.quick-action-icon,
  .list-icon,.status-icon,.feature-icon,.card-icon,.section-icon,.toast-icon
){
  display:grid!important;
  place-items:center!important;
  flex:0 0 auto!important;
  box-sizing:border-box!important;
  line-height:1!important;
  text-align:center!important;
}
html body[data-talerum-layout="private"] .workspace :where(.action-icon,.quick-action-icon,.list-icon,.status-icon,.feature-icon,.card-icon,.section-icon){
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;
  border-radius:10px!important;
  border:1px solid rgba(196,106,45,.08)!important;
}
html body[data-talerum-layout="private"] .workspace :where(.metric-icon){
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
  border-radius:13px!important;
}
html body[data-talerum-layout="private"] .workspace :where(.banner-icon){
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  min-height:40px!important;
  border-radius:12px!important;
}
html body[data-talerum-layout="private"] .workspace :where(.callout-icon){
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  min-height:36px!important;
  border-radius:11px!important;
}
html body[data-talerum-layout="private"] .workspace :where(
  .metric-icon,.banner-icon,.callout-icon,.action-icon,.quick-action-icon,
  .list-icon,.status-icon,.feature-icon,.card-icon,.section-icon,.toast-icon
) svg{
  display:block!important;
  width:17px!important;
  height:17px!important;
  max-width:17px!important;
  max-height:17px!important;
  margin:auto!important;
  overflow:visible!important;
  stroke-width:1.75!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
html body[data-talerum-layout="private"] .workspace .metric-icon svg{width:18px!important;height:18px!important;max-width:18px!important;max-height:18px!important}

/* Attendance: explicitly keep action cards and assistential summary on product scale. */
html body[data-talerum-page="atendimentos"] .workspace .action-button{
  min-height:58px!important;
  padding:11px 12px!important;
  gap:10px!important;
  align-items:center!important;
}
html body[data-talerum-page="atendimentos"] .workspace .action-button .action-icon{
  width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;
  background:#F8EFE8!important;color:var(--talerum-ui-orange)!important;border:1px solid #F0E2D8!important;
}
html body[data-talerum-page="atendimentos"] .workspace .patient-summary-grid{gap:10px!important}
html body[data-talerum-page="atendimentos"] .workspace .summary-item{padding:12px 13px!important;border-radius:12px!important}
html body[data-talerum-page="atendimentos"] .workspace .summary-item label{font-size:11.5px!important}
html body[data-talerum-page="atendimentos"] .workspace .summary-item strong{font-size:14px!important;margin-top:4px!important}
html body[data-talerum-page="atendimentos"] .workspace .summary-item span{font-size:11.75px!important;margin-top:3px!important}

/* Timestamp timelines need a wider frame than numeric step markers. */
html body[data-talerum-page="anexos"] .workspace .timeline-item,
html body[data-talerum-page="solicitacoes"] .workspace .timeline-item{
  grid-template-columns:54px minmax(0,1fr)!important;
  gap:11px!important;
  align-items:start!important;
}
html body[data-talerum-page="anexos"] .workspace .timeline-dot,
html body[data-talerum-page="solicitacoes"] .workspace .timeline-dot{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:48px!important;
  height:28px!important;
  padding:0 7px!important;
  border-radius:9px!important;
  font-size:11.5px!important;
  line-height:1!important;
  white-space:nowrap!important;
}

/* Slightly stronger framing for icon-led operational actions. */
html body[data-talerum-layout="private"] .workspace :where(.action-button,.action-card,.quick-action,.action-tile){
  align-items:center!important;
}

@media(max-width:1100px){
  html body[data-talerum-layout="private"] aside.sidebar.talerum-static-sidebar{
    height:100dvh!important;min-height:0!important;max-height:100dvh!important;
  }
}
@media(prefers-reduced-motion:reduce){
  html body[data-talerum-layout="private"] aside.sidebar.talerum-static-sidebar{transition:none!important}
}

/* Modal typography and icon framing follow the same product scale. */
html body[data-talerum-layout="private"] :where(.modal,.pm-shell,.pm-dialog) :where(.summary-box,.pm-summary-box) label{
  font-size:11.5px!important;line-height:1.3!important;font-weight:730!important;color:var(--talerum-ui-soft)!important;
}
html body[data-talerum-layout="private"] :where(.modal,.pm-shell,.pm-dialog) :where(.summary-box,.pm-summary-box) strong{
  font-size:14.5px!important;line-height:1.35!important;font-weight:750!important;color:var(--talerum-ui-text)!important;
}
html body[data-talerum-layout="private"] :where(.modal,.pm-shell,.pm-dialog) :where(.summary-box,.pm-summary-box) span{
  font-size:11.75px!important;line-height:1.45!important;color:var(--talerum-ui-muted)!important;
}
html body[data-talerum-layout="private"] :where(.modal,.pm-shell,.pm-dialog) :where(.modal-title,.pm-section-head h3){
  font-size:15px!important;line-height:1.3!important;
}
html body[data-talerum-layout="private"] :where(.modal,.pm-shell,.pm-dialog) :where(.modal-sub,.pm-section-head p){
  font-size:12.25px!important;line-height:1.48!important;
}
html body[data-talerum-layout="private"] :where(.pm-action-icon,.pm-alert-icon,.pm-timeline-icon,.pm-status-icon){
  display:grid!important;place-items:center!important;flex:0 0 auto!important;box-sizing:border-box!important;line-height:1!important;
}
html body[data-talerum-layout="private"] :where(.pm-action-icon,.pm-alert-icon,.pm-timeline-icon){
  width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;border-radius:10px!important;
}
html body[data-talerum-layout="private"] :where(.pm-action-icon,.pm-alert-icon,.pm-timeline-icon) svg{
  display:block!important;width:17px!important;height:17px!important;max-width:17px!important;max-height:17px!important;margin:auto!important;overflow:visible!important;
}

/* Global icon centering -------------------------------------------------
   Keep decorative/status/action icon containers perfectly centered across modules.
   This avoids icons appearing visually "high", "low" or off-axis inside soft badges. */
html body[data-talerum-layout="private"] .workspace :where(
  .metric-icon,.list-icon,.fact-icon,.stat-icon,.kpi-icon,
  .banner-icon,.callout-icon,.action-icon,.quick-action-icon,
  .feature-icon,.status-icon,.card-icon,.section-icon,.toast-icon,
  .nav-icon,.help-icon,.help-bubble,.timeline-dot,.toast-badge,
  .pm-action-icon,.pm-alert-icon,.pm-timeline-icon,.pm-status-icon,
  .icon-btn,.modal-close,.eye
){
  display:grid!important;
  place-items:center!important;
  align-content:center!important;
  justify-content:center!important;
  justify-items:center!important;
  box-sizing:border-box!important;
  line-height:1!important;
  text-align:center!important;
  padding:0!important;
}
html body[data-talerum-layout="private"] .workspace :where(
  .metric-icon,.list-icon,.fact-icon,.stat-icon,.kpi-icon,
  .banner-icon,.callout-icon,.action-icon,.quick-action-icon,
  .feature-icon,.status-icon,.card-icon,.section-icon,.toast-icon,
  .nav-icon,.help-icon,.help-bubble,.timeline-dot,.toast-badge,
  .pm-action-icon,.pm-alert-icon,.pm-timeline-icon,.pm-status-icon,
  .icon-btn,.modal-close,.eye
) > :where(svg,i,span,b,em){
  display:block!important;
  margin:0!important;
  transform:none!important;
  align-self:center!important;
  justify-self:center!important;
  line-height:1!important;
}
html body[data-talerum-layout="private"] .workspace :where(
  .metric-icon,.list-icon,.fact-icon,.stat-icon,.kpi-icon,
  .banner-icon,.callout-icon,.action-icon,.quick-action-icon,
  .feature-icon,.status-icon,.card-icon,.section-icon,.toast-icon,
  .nav-icon,.help-icon,.help-bubble,.timeline-dot,.toast-badge,
  .pm-action-icon,.pm-alert-icon,.pm-timeline-icon,.pm-status-icon,
  .icon-btn,.modal-close,.eye
) > svg{
  overflow:visible!important;
  transform-origin:center center!important;
}
