/* TRV V48 · BASE V46 CONSERVADA. NO SIDEBAR DE MÓDULOS. */
.trv43-workspace{grid-template-columns:minmax(0,1fr)!important}
.trv43-topbar,.trv43-primary-row,.trv43-nav-row,.trv43-main{width:100%!important;max-width:none!important;min-width:0!important}

/* Sólo el nombre de la pantalla actual va a la izquierda. */
.trv43-primary-row{display:grid!important;grid-template-columns:minmax(230px,1fr) auto!important;grid-template-areas:"heading actions"!important;align-items:center!important;gap:18px!important;padding:14px 24px 8px!important;min-height:74px!important;height:auto!important}
.trv43-brand{display:none!important}
.trv43-heading{grid-area:heading!important;justify-self:start!important;min-width:0!important}
.trv43-heading .page-title{display:flex!important;align-items:center!important;gap:14px!important;min-width:0!important}
.trv43-heading .page-title::before{content:"";width:3px;height:38px;background:var(--module-accent,#2d6cdf);flex:0 0 3px}
.trv43-heading small{display:none!important}
.trv43-heading h1{font-size:28px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;margin:0!important}
.trv43-quick-actions{grid-area:actions!important;justify-self:end!important;display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important}

/* MÓDULOS/ÁREAS ARRIBA COMO V46. */
.trv43-nav-row{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(220px,270px)!important;align-items:center!important;padding:0 24px 10px!important;height:68px!important;overflow:visible!important}
.trv43-nav-scroll{display:block!important;overflow-x:auto!important;overflow-y:visible!important;min-width:0!important;-webkit-overflow-scrolling:touch!important}
.trv43-nav{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:4px!important;min-width:max-content!important;width:max-content!important}
.module-cluster{position:relative!important;flex:0 0 auto!important;display:block!important}
.module-cluster-trigger{display:grid!important}
.module-cluster-popover{pointer-events:auto!important;z-index:7600!important}
.module-cluster.is-open .module-cluster-popover{display:block!important;visibility:visible!important;opacity:1!important}
.module-cluster:nth-last-child(-n+2) .module-cluster-popover{left:auto!important;right:0!important}

/* Perfil y accesos. */
.access-chip-avatar,.access-user-avatar,.access-photo-avatar{overflow:hidden!important;display:grid!important;place-items:center!important}
.access-chip-avatar img,.access-user-avatar img,.access-photo-avatar img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important}
.access-chip-avatar.has-photo,.access-user-avatar.has-photo{padding:0!important}
.access-photo-preview{width:92px;height:92px;display:grid;place-items:center}
.access-photo-avatar{width:82px;height:82px;border-radius:22px;background:var(--v44-panel-2);border:1px solid var(--v44-line-strong);font-size:24px;font-weight:900}
.access-profile-row{display:grid!important;grid-template-columns:100px minmax(0,1fr)!important;gap:16px!important;align-items:center!important;padding:16px 0!important;border-bottom:1px solid var(--v44-line)!important}
.access-photo-control{display:grid!important;gap:7px!important}.access-photo-control>span{font-size:10px!important;font-weight:900!important}.access-photo-control small{font-size:9px!important;color:var(--v44-muted)!important}.access-photo-control input[type=file]{min-height:42px!important;color:var(--v44-text)!important}
.access-master-note{display:flex!important;gap:10px!important;align-items:center!important;padding:12px 14px!important;margin:0 0 12px!important;border-left:3px solid var(--module-accent,#2d6cdf)!important;background:color-mix(in srgb,var(--v44-panel-2) 84%,transparent)!important}.access-master-note b{font-size:10px!important}.access-master-note span{font-size:9px!important;color:var(--v44-muted)!important}
.access-editor-form select:not(:disabled),.access-editor-form input:not(:disabled){cursor:pointer!important;pointer-events:auto!important;opacity:1!important}
.access-editor-form select:disabled,.access-editor-form input:disabled{opacity:.55!important;cursor:not-allowed!important}

/* Guardar registro al FINAL, no flotando a mitad del formulario. */
.record44-savebar{position:static!important;inset:auto!important;z-index:auto!important;margin-top:22px!important;border-top:1px solid var(--v44-line)!important;background:var(--v44-panel)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.record44-flow{padding-bottom:24px!important}.record44-form{padding-bottom:max(18px,env(safe-area-inset-bottom))!important}

/* Ayuda + Asistente abajo a la derecha. */
.floating-assist-stack{position:fixed!important;right:max(22px,env(safe-area-inset-right))!important;bottom:max(22px,env(safe-area-inset-bottom))!important;top:auto!important;left:auto!important;z-index:6800!important;display:grid!important;gap:10px!important;opacity:1!important;pointer-events:auto!important;transform:none!important}
body.record-entry-open .floating-assist-stack{opacity:1!important;pointer-events:auto!important}body.guide-open .floating-assist-stack{opacity:0!important;pointer-events:none!important}

/* Guía: sin blur de pantalla completa; queda visible exactamente el bloque explicado. */
body.guide-open .guide-shade{display:block!important;position:fixed!important;inset:auto!important;background:rgba(2,8,14,.66)!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;z-index:7000!important;pointer-events:auto!important}
body.guide-open .guide-focus{display:block!important;position:fixed!important;z-index:7001!important;pointer-events:none!important;border:2px solid var(--module-accent,#2d6cdf)!important;box-shadow:0 0 0 4px color-mix(in srgb,var(--module-accent,#2d6cdf) 18%,transparent),0 18px 70px rgba(0,0,0,.24)!important;background:transparent!important}
body.guide-open .guide-target-live,body.guide-select-mode .guide-option-live{position:relative!important;z-index:7002!important;filter:none!important;opacity:1!important}
.guide-card{z-index:7100!important;width:min(440px,calc(100vw - 28px))!important;max-width:min(440px,calc(100vw - 28px))!important;max-height:calc(100svh - 28px)!important;overflow:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important}
.guide-card .guide-actions{position:sticky!important;bottom:0!important;z-index:8!important;background:linear-gradient(180deg,rgba(7,17,27,.72),rgba(7,17,27,.98) 34%)!important;padding-bottom:max(14px,env(safe-area-inset-bottom))!important}
html[data-theme="light"] .guide-card .guide-actions{background:linear-gradient(180deg,rgba(250,252,254,.72),rgba(250,252,254,.99) 34%)!important}

/* Tema del sistema solamente. */
.theme-toggle,#themeToggle{display:none!important}

@media (min-width:821px) and (max-width:1180px){
 .trv43-primary-row{grid-template-columns:minmax(190px,1fr) auto!important;padding-left:16px!important;padding-right:16px!important;gap:10px!important}.trv43-heading h1{font-size:24px!important}.trv43-quick-actions{gap:6px!important}.trv43-quick-actions .scenario{min-width:190px!important;max-width:230px!important}
 .trv43-nav-row{grid-template-columns:minmax(0,1fr) 190px!important;padding-left:16px!important;padding-right:16px!important}
 .module-cluster-popover{position:fixed!important;left:14px!important;right:14px!important;top:142px!important;width:auto!important;max-height:calc(100svh - 160px)!important;overflow:auto!important}
}
@media (max-width:820px){
 .trv43-primary-row{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"heading" "actions"!important;padding:10px 12px 8px!important;gap:8px!important}.trv43-heading h1{font-size:22px!important}.trv43-heading .page-title::before{height:30px!important}
 .trv43-quick-actions{width:100%!important;justify-self:stretch!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important}.access-user-chip{grid-column:1/-1!important;justify-self:end!important}
 .trv43-nav-row{display:block!important;height:70px!important;padding:0 12px 8px!important}.trv43-nav{min-width:max-content!important;width:max-content!important}
 .module-cluster-popover{position:fixed!important;left:12px!important;right:12px!important;top:158px!important;width:auto!important;max-height:calc(100svh - 178px)!important;overflow:auto!important}
 .floating-assist-stack{right:12px!important;bottom:12px!important}.guide-card{left:12px!important;right:12px!important;bottom:12px!important;top:auto!important;width:auto!important;max-width:none!important;max-height:min(64svh,640px)!important}
 .access-profile-row{grid-template-columns:1fr!important}.access-photo-preview{justify-self:start!important}
}
