/* Una sola geometría para todas las secciones, independiente de sus estilos internos. */
body.has-app-shell { --shell-width:240px; padding-left:var(--shell-width); }
body.has-app-shell > .app-shell { position:fixed; inset:0 auto 0 0; z-index:35; width:var(--shell-width); height:100dvh; padding:28px 18px 18px; display:flex; flex-direction:column; gap:26px; background:#17201b; color:#efece2; border-right:1px solid #34453b; font:14px/1.45 'DM Sans',sans-serif; letter-spacing:normal; -webkit-font-smoothing:antialiased; }
.app-shell .brand { display:flex; align-items:center; gap:12px; color:#f4f1e8; text-decoration:none; width:auto; height:46px; margin:0; padding:0; flex:none; }
.app-shell .brand-symbol { display:inline-grid; place-items:center; flex:none; width:39px; height:39px; border:0; border-radius:0; background:transparent; box-shadow:none; margin:0; padding:0; font:600 50px/.85 'DM Sans',sans-serif; letter-spacing:normal; color:#b9dec9; position:relative; }
.app-shell .brand-symbol > span { position:absolute; top:-12px; left:15px; margin:0; padding:0; font:600 20px/1 'DM Sans',sans-serif; letter-spacing:normal; }
.app-shell .brand-wordmark { display:flex; flex-direction:column; gap:3px; font:14px/1.05 'DM Sans',sans-serif; }
.app-shell .brand-wordmark strong { margin:0; padding:0; color:#f5f4ea; font:700 27px/1.1 'DM Sans',sans-serif; letter-spacing:-.06em; }
.app-shell .brand-wordmark small { margin:4px 0 0; padding:0; font:600 9px/1.05 'DM Sans',sans-serif; letter-spacing:.13em; color:#b8c9bd; }
.app-shell-panel { display:flex; flex-direction:column; gap:22px; min-height:0; flex:1; overflow-y:auto; scrollbar-width:thin; scrollbar-color:#536b5d transparent; }
.app-shell-nav { margin:0; padding:0; width:100%; display:flex; flex-direction:column; gap:5px; flex:none; }
.app-shell-nav > a { display:flex; align-items:center; min-height:44px; padding:10px 14px; border-radius:12px; font-size:14px; color:#e5e8dd; text-decoration:none; line-height:1.4; }
.app-shell-nav > a:hover { background:#ffffff10; }
.app-shell-nav > a[aria-current=page] { background:#b9dec9; color:#18241c; font-weight:650; }
.app-shell :is(a,button,summary,select):focus-visible { outline:2px solid #b9dec9; outline-offset:3px; }
.app-shell-account { display:block; position:relative; border-top:1px solid #455147; padding:14px 6px 0; white-space:normal; }
.app-shell-account > summary { display:grid; grid-template-columns:minmax(0,1fr) 16px; gap:3px; cursor:pointer; padding:3px 6px; min-height:68px; list-style:none; }
.app-shell-account > summary::-webkit-details-marker { display:none; }
.app-shell-account > summary::after { content:'⌄'; grid-column:2; grid-row:1/4; align-self:center; color:#b9dec9; }
.app-shell-account > summary > * { grid-column:1; overflow-wrap:anywhere; }
.app-shell-account strong { font-size:13px; font-weight:600; }
#shell-username { color:#b9dec9; font-size:12px; }
#shell-role { font-size:11px; color:#c1cec3; }
.app-shell-account-menu { display:grid; gap:3px; padding:10px 6px 0; }
.app-shell-account:not([open]) .app-shell-account-menu { display:none; }
.app-shell-account-menu p { font-size:11px; color:#c1cec3; margin:0 0 7px; line-height:1.55; }
.app-shell-account-menu :is(a,button) { display:flex; align-items:center; min-height:44px; padding:8px 5px; background:transparent; border:0; color:#efece2; text-align:left; text-decoration:none; font:inherit; font-size:13px; cursor:pointer; }
.app-shell-account-menu :is(a,button):hover { text-decoration:underline; text-underline-offset:4px; }
.app-shell-workspace { margin-top:auto; padding:8px 6px 0; flex:none; }
.app-shell .workspace-switch { display:block; width:100%; max-width:none; margin:0; padding:0; }
.app-shell .workspace-switch label { display:grid; gap:7px; color:#c1cec3; font-size:11px; }
.app-shell .workspace-switch select { width:100%; min-width:0; max-width:100%; min-height:44px; padding:9px; font-size:12px; border-radius:12px; background:#202d25; color:#f4f1e8; border:1px solid #607767; }
.app-shell-toggle { display:none; }
body.has-app-shell .dashboard { margin-left:0; }
@media(max-width:760px) {
    body.has-app-shell { padding-left:0; padding-top:76px; }
    body.has-app-shell > .app-shell { inset:0 0 auto; width:100%; height:76px; flex-direction:row; align-items:center; justify-content:space-between; gap:16px; padding:14px 18px; border-right:0; border-bottom:1px solid #34453b; }
    .app-shell .brand-wordmark strong { font-size:23px; }.app-shell .brand-symbol { font-size:42px; }
    .app-shell-toggle { display:block; min-width:76px; min-height:44px; padding:10px 14px; border-radius:12px; background:#26392c; border:1px solid #607767; color:#f4f1e8; font:inherit; }
    .app-shell-panel { display:none; position:absolute; top:76px; inset-inline:0; max-height:calc(100dvh - 76px); padding:16px 18px 22px; background:#17201b; border-bottom:1px solid #607767; overflow-y:auto; box-shadow:0 16px 25px #0003; }
    .app-shell-toggle[aria-expanded=true] + .app-shell-panel { display:flex; }
    .app-shell-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
    .app-shell-nav > a { font-size:13px; min-height:48px; }
    .app-shell-account { padding-top:10px; }.app-shell-account-menu { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .app-shell-account-menu p { grid-column:1/-1; }.app-shell-workspace { margin:0; }
}

/* El menú conserva su nodo DOM; las vistas se alternan dentro del mismo documento. */
[data-app-view] { display:contents; }
#app-navigation-status { position:fixed; bottom:24px; left:calc(240px + 24px); right:24px; z-index:90; padding:16px 20px; border-radius:14px; background:#17201b; color:#f4f1e8; font:14px/1.5 'DM Sans',sans-serif; box-shadow:0 8px 30px #0003; }
#app-navigation-status[data-error=true] { border:1px solid #dba69a; }
html.shell-navigating::after { content:''; position:fixed; top:0; left:240px; right:0; height:3px; z-index:100; pointer-events:none; background:linear-gradient(90deg,transparent,#8abf9e,transparent); background-size:40% 100%; background-repeat:no-repeat; animation:shell-progress 1s ease-in-out infinite; }
@keyframes shell-progress { from { background-position:-65% 0; } to { background-position:165% 0; } }
@media(max-width:760px) { html.shell-navigating::after { top:76px; left:0; } #app-navigation-status { left:16px; right:16px; bottom:16px; } }
@media(prefers-reduced-motion:reduce) { html.shell-navigating::after { animation:none; background:#8abf9e; } }
/* Las superficies de pantalla completa reservan el lateral de la aplicación. */
body.has-app-shell > .app-shell { z-index:120; }
body.has-app-shell[data-delivery="editor"] > .app-shell .brand-symbol { font-size:50px; }
body.has-app-shell[data-delivery="editor"] > .app-shell .brand-wordmark strong { font-size:27px; }
body.has-app-shell[data-delivery="editor"] > .app-shell .brand-wordmark small { display:block; }
body.has-app-shell[data-delivery="editor"] > .app-shell .brand { gap:12px; }
body.has-app-shell[data-delivery="editor"] .session-cost-details { display:none; }
body.has-app-shell[data-delivery="editor"] .shoot-steps { left:calc(var(--shell-width) + 18px); top:18px; }
body.has-app-shell[data-delivery="editor"] #delivery-editor:not([hidden]) { inset:74px 18px 18px calc(var(--shell-width) + 18px); }
body.has-app-shell.editor-expanded[data-delivery="editor"] #delivery-editor:not([hidden]) { inset:18px 18px 18px calc(var(--shell-width) + 18px); }
body.has-app-shell.editor-expanded[data-delivery="editor"] .shoot-steps { visibility:hidden; }
body.has-app-shell.flow-expanded #shoot-workflow { left:var(--shell-width); }
@media(max-width:760px) {
    body.has-app-shell[data-delivery="editor"] > .app-shell .brand-symbol { font-size:42px; }
    body.has-app-shell[data-delivery="editor"] > .app-shell .brand-wordmark strong { font-size:23px; }
    body.has-app-shell[data-delivery="editor"] .shoot-steps { left:10px; top:88px; }
    body.has-app-shell[data-delivery="editor"] #delivery-editor:not([hidden]) { inset:136px 8px 8px; }
    body.has-app-shell.editor-expanded[data-delivery="editor"] #delivery-editor:not([hidden]) { inset:84px 8px 8px; }
    body.has-app-shell.flow-expanded #shoot-workflow { left:0; top:76px; }
    body.has-app-shell[data-delivery="editor"] > .app-shell .workspace-switch { width:100%; max-width:none; margin:0; }
    body.has-app-shell[data-delivery="editor"] > .app-shell .workspace-switch label { font-size:11px; gap:7px; }
    body.has-app-shell[data-delivery="editor"] > .app-shell .workspace-switch select { width:100%; min-height:44px; font-size:12px; }
}
/* Equipo, acceso y contraseña deben quedar por encima del menú móvil abierto. */
body.has-app-shell :is(.overlay,.lightbox) { z-index:160; }
