/* Identidad compartida: originales sin filtros y una sola medida en los tres módulos. */
html[data-spheria-module] { --sph-logo-width: 176px; --sph-logo-height: 106px; --sph-brand-header: 132px; }
html[data-spheria-module] .spheria-logo.brand-unified,
html.valida-ui[data-spheria-module] body.review-focus .brand .spheria-logo.brand-unified {
  display: block; position: relative; flex: 0 0 auto; width: var(--sph-logo-width); height: var(--sph-logo-height);
  min-width: var(--sph-logo-width); max-width: none; aspect-ratio: auto; margin: 0; padding: 0; overflow: hidden;
  border: 0; border-radius: 0; background: #fff; box-shadow: none; filter: none; mix-blend-mode: normal;
}
html[data-spheria-module] .spheria-logo.brand-unified img,
html.valida-ui[data-spheria-module] body.review-focus .brand .spheria-logo.brand-unified img {
  display: block; position: absolute; width: 116%; max-width: none; height: auto;
  left: 50%; top: 50%; transform: translate(-50%, -50%); object-fit: contain;
  filter: none; mix-blend-mode: normal; opacity: 1; visibility: visible;
}
html[data-spheria-module] [data-brand-frame],
html.valida-ui[data-spheria-module] body.review-focus .topbar [data-brand-frame] {
  display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; justify-content: center;
  width: calc(100% + 32px); height: var(--sph-brand-header); min-height: var(--sph-brand-header);
  margin: 0 -16px 16px; padding: 12px 16px; gap: 0; background: #fff;
  border: 0; border-bottom: 2px solid #00c4e5; box-sizing: border-box;
}
html[data-spheria-module] [data-brand-frame] :is(.spheria-brand-caption,.brand-caption) { display: none; }
html[data-spheria-module] :is(.login-card,.login-panel) > .spheria-logo.brand-unified { margin: 0 auto 20px; }
html[data-spheria-module="spheria"] .spheria-sidebar { padding-inline: 16px; }
html[data-spheria-module="spheria"] .spheria-mobile-brand { display: none; }
html[data-spheria-module="operatia"] .sidebar { padding: 0 16px 18px; overflow-y: auto; }
html.valida-ui[data-spheria-module] .topbar { padding-inline: 16px; }
/* La revisión conserva la marca completa y la navegación del resto de VALIDA. */
@media (min-width: 1200px) {
 html.valida-ui[data-spheria-module] body.review-focus .topbar { width: var(--v-sidebar-width); padding: 0 16px 20px; }
 html.valida-ui[data-spheria-module] body.review-focus .valida-primary-nav { display: flex; }
 html.valida-ui[data-spheria-module] body.review-focus .top-actions { display: grid; }
 html.valida-ui[data-spheria-module] body.review-focus main,
 html.valida-ui[data-spheria-module] body.review-focus .valida-workspace-bar { margin-left: var(--v-sidebar-width); }
 html.valida-ui[data-spheria-module] body.review-focus .save-strip { left: calc(50% + var(--v-sidebar-width) / 2); width: min(1660px, calc(100vw - var(--v-sidebar-width) - 28px)); }
}
@media (max-width: 1199px) {
 html.valida-ui[data-spheria-module] { --v-header-height: var(--sph-brand-header); }
 html.valida-ui[data-spheria-module] .topbar { padding: 12px 16px; background: #fff; color: #0b1f3b; border-bottom: 2px solid #00c4e5; }
 html.valida-ui[data-spheria-module] .topbar [data-brand-frame],
 html.valida-ui[data-spheria-module] body.review-focus .topbar [data-brand-frame] { width: auto; height: auto; min-height: 0; margin: 0; padding: 0; border: 0; align-items: flex-start; }
 html.valida-ui[data-spheria-module] .nav-toggle { color: #0b1f3b; background: #fff; border-color: #d6e1ed; }
 html.valida-ui[data-spheria-module] .nav-toggle:hover { color: #0b1f3b; background: #edf5ff; }
}
@media (max-width: 899px) {
 html[data-spheria-module="spheria"] .spheria-mobile-brand { display: block; }
 html[data-spheria-module="spheria"] .spheria-topbar { min-height: var(--sph-brand-header); height: var(--sph-brand-header); padding: 12px 16px; gap: 8px; border-bottom: 2px solid #00c4e5; }
 html[data-spheria-module="spheria"] .spheria-breadcrumb { display: none; }
 html[data-spheria-module="spheria"] .spheria-topbar .topbar-status { min-width: 0; gap: 8px; flex-wrap: nowrap; }
 html[data-spheria-module="spheria"] .spheria-topbar .signal { max-width: 76px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
 html[data-spheria-module="operatia"] .sidebar { min-height: var(--sph-brand-header); padding: 12px 16px; gap: 0; background: #fff; border-bottom: 2px solid #00c4e5; overflow: visible; }
 html[data-spheria-module="operatia"] .sidebar [data-brand-frame] { width: auto; height: auto; min-height: 0; margin: 0; padding: 0; border: 0; align-items: flex-start; }
 html[data-spheria-module="operatia"] .menu-toggle { min-width: 48px; min-height: 44px; color: #0b1f3b; background: #fff; border-color: #d6e1ed; }
 html[data-spheria-module="operatia"] .sidebar nav,
 html[data-spheria-module="operatia"] .sidebar-foot { margin: 12px -16px -12px; padding: 16px; background: #0b213c; }
}
@media (forced-colors: active) {
 html[data-spheria-module] [data-brand-frame] { border-bottom-color: CanvasText; }
}
