
/* HBSMCIR 1.0.20.1 — contraste automático da sidebar por tema */

/* Sempre mantém a sidebar opaca e legível. */
#sidebar.admin-sidebar,
#sidebar.admin-sidebar *{
  opacity:1!important;
}

/* Temas cuja sidebar é escura (mesmo que a área principal seja clara). */
html[data-sidebar-tone="dark"] #sidebar.admin-sidebar{
  background:var(--sidebar-theme,var(--sidebar,#082f49))!important;
  color:#f8fafc!important;
  border-color:rgba(255,255,255,.12)!important;
}
html[data-sidebar-tone="dark"] #sidebar .sb-logo-title,
html[data-sidebar-tone="dark"] #sidebar .nav-item,
html[data-sidebar-tone="dark"] #sidebar .nav-item span,
html[data-sidebar-tone="dark"] #sidebar .sb-group summary,
html[data-sidebar-tone="dark"] #sidebar .sb-group summary span,
html[data-sidebar-tone="dark"] #sidebar .sb-admin-tools-title,
html[data-sidebar-tone="dark"] #sidebar .sb-footer,
html[data-sidebar-tone="dark"] #sidebar .sb-footer *,
html[data-sidebar-tone="dark"] #sidebar .sb-badge,
html[data-sidebar-tone="dark"] #sidebar .sb-badge *{
  color:#f8fafc!important;
}
html[data-sidebar-tone="dark"] #sidebar .sb-logo-sub,
html[data-sidebar-tone="dark"] #sidebar .sb-admin-tools-title small,
html[data-sidebar-tone="dark"] #sidebar .sb-group-chev,
html[data-sidebar-tone="dark"] #sidebar .nav-item small{
  color:#cbd5e1!important;
}
html[data-sidebar-tone="dark"] #sidebar .sb-search-wrap{
  background:rgba(255,255,255,.08)!important;
  border-color:rgba(255,255,255,.14)!important;
}
html[data-sidebar-tone="dark"] #sidebar .sb-menu-search,
html[data-sidebar-tone="dark"] #sidebar .sb-menu-search::placeholder{
  color:#e2e8f0!important;
}
html[data-sidebar-tone="dark"] #sidebar .sb-menu-search::placeholder{
  opacity:.82!important;
}
html[data-sidebar-tone="dark"] #sidebar .sb-group{
  border-color:rgba(255,255,255,.10)!important;
}
html[data-sidebar-tone="dark"] #sidebar .sb-group[open]{
  background:rgba(255,255,255,.045)!important;
}
html[data-sidebar-tone="dark"] #sidebar .nav-item:hover,
html[data-sidebar-tone="dark"] #sidebar .sb-group summary:hover{
  background:rgba(255,255,255,.09)!important;
  color:#fff!important;
}
html[data-sidebar-tone="dark"] #sidebar .nav-item.active{
  background:color-mix(in srgb,var(--primary,#2980b9) 40%,rgba(255,255,255,.08))!important;
  color:#fff!important;
  box-shadow:inset 3px 0 0 var(--accent2,#38bdf8)!important;
}
html[data-sidebar-tone="dark"] #sidebar .menu-symbol,
html[data-sidebar-tone="dark"] #sidebar .sb-group-icon{
  color:#7dd3fc!important;
}

/* Temas cuja sidebar é clara. */
html[data-sidebar-tone="light"] #sidebar.admin-sidebar{
  background:var(--sidebar-theme,var(--sidebar,#fff))!important;
  color:#172b3a!important;
  border-color:rgba(15,23,42,.12)!important;
}
html[data-sidebar-tone="light"] #sidebar .sb-logo-title,
html[data-sidebar-tone="light"] #sidebar .nav-item,
html[data-sidebar-tone="light"] #sidebar .nav-item span,
html[data-sidebar-tone="light"] #sidebar .sb-group summary,
html[data-sidebar-tone="light"] #sidebar .sb-group summary span,
html[data-sidebar-tone="light"] #sidebar .sb-admin-tools-title,
html[data-sidebar-tone="light"] #sidebar .sb-footer,
html[data-sidebar-tone="light"] #sidebar .sb-footer *,
html[data-sidebar-tone="light"] #sidebar .sb-badge,
html[data-sidebar-tone="light"] #sidebar .sb-badge *{
  color:#172b3a!important;
}
html[data-sidebar-tone="light"] #sidebar .sb-logo-sub,
html[data-sidebar-tone="light"] #sidebar .sb-admin-tools-title small,
html[data-sidebar-tone="light"] #sidebar .sb-group-chev,
html[data-sidebar-tone="light"] #sidebar .nav-item small{
  color:#64748b!important;
}
html[data-sidebar-tone="light"] #sidebar .sb-search-wrap{
  background:rgba(15,23,42,.045)!important;
  border-color:rgba(15,23,42,.12)!important;
}
html[data-sidebar-tone="light"] #sidebar .sb-menu-search,
html[data-sidebar-tone="light"] #sidebar .sb-menu-search::placeholder{
  color:#334155!important;
}
html[data-sidebar-tone="light"] #sidebar .nav-item:hover,
html[data-sidebar-tone="light"] #sidebar .sb-group summary:hover{
  background:rgba(2,132,199,.08)!important;
}
html[data-sidebar-tone="light"] #sidebar .nav-item.active{
  background:rgba(2,132,199,.13)!important;
  color:#0f172a!important;
  box-shadow:inset 3px 0 0 var(--primary,#0284c7)!important;
}

/* Logo continua neutro e legível nos dois casos. */
#sidebar .hbsm-logo-box{
  background:#fff!important;
}
