/* =====================================================================
   Base compartida del layout global (handoff de Guille del 29/09/2026).
   Tokens, cascara (menu lateral del equipo y banda del cliente) y
   componentes que se construyen una sola vez. Medidas copiadas del
   prototipo: ver resources/documentation/relevamiento-prototipo-layout.md.

   Los componentes llevan prefijo ui- porque styles.css ya usa .btn, .tab,
   .pill, etc. con otras medidas: sin prefijo se pisarian en todas las
   pantallas viejas. Se cargan despues de styles.css.
   Sin modo oscuro: la app no lo tiene (decisiones-layout-global.md).
   ===================================================================== */

/* Desde el 01/10 el cuerpo es Google Sans Flex y los titulos Funnel Display,
   que carga layouts.head desde Google Fonts (como el prototipo y la home).
   Estas familias locales quedan de respaldo si Google Fonts no responde.

   Una sola familia por fuente, con el peso real de cada archivo (los
   'Poppins Regular' / 'Poppins Bold' de styles.css son una familia por peso
   y no sirven para 500/600). Medium y SemiBold son el subset latino de
   Google Fonts. Funnel Display solo esta en 700: los 600 del prototipo
   caen en 700. */
@font-face { font-family: 'CSC Body'; src: url('../fonts/Poppins-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'CSC Body'; src: url('../fonts/Poppins-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'CSC Body'; src: url('../fonts/Poppins-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'CSC Body'; src: url('../fonts/Poppins-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'CSC Display'; src: url('../fonts/Funnel-Display-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
	--deep: #005584; --ocean: #0086BF; --cyan: #1FC0ED;
	--bg: #FFFFFF; --surface: #FFFFFF; --soft: #F0F6FA; --sel: #E8F5FB;
	--t1: #005584; --t2: rgba(0,85,132,.8); --t3: rgba(0,85,132,.6); --t4: rgba(0,85,132,.4);
	--line: rgba(0,85,132,.12); --line2: rgba(0,85,132,.24);
	--icon: #787878;
	--dis-bg: #D5E6EF; --dis-tx: #94A3B8;
	--danger: #EF4444; --danger-tx: #991B1B;
	--slate-bg: #F1F5F9; --slate-dot: #94A3B8; --slate-tx: #475569;
	--amber-bg: #FEF9C3; --amber-dot: #F59E0B; --amber-tx: #92400E;
	--blue-bg: #E8F5FB; --blue-dot: #0086BF; --blue-tx: #005584;
	--cyan-bg: #E0F7FD; --cyan-dot: #1FC0ED; --cyan-tx: #0086BF;
	--red-bg: #FEE2E2; --red-dot: #EF4444; --red-tx: #991B1B;
	--purple-bg: #F3E8FF; --purple-dot: #A855F7; --purple-tx: #6B21A8;
	--green-bg: #DCFCE7; --green-dot: #22C55E; --green-tx: #15803D;
	--scrim: rgba(0,85,132,.32);
	--shadow: 0 16px 40px -12px rgba(0,85,132,.28), 0 2px 6px rgba(0,85,132,.08);
	--display: 'Funnel Display', 'CSC Display', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--body: 'Google Sans Flex', 'CSC Body', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--side-w: 256px;
	--top-h: 64px;
	--gutter: 32px;
}

/* ---------- Iconos (sprite en layouts/sprite.blade.php) ---------- */
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; --ia: var(--cyan); }
svg.i .a, svg.i.mono .a { stroke: var(--ia, currentColor); }
svg.i .f { fill: currentColor; stroke: none; }
svg.i.s16 { width: 16px; height: 16px; }
svg.i.s18 { width: 18px; height: 18px; }
.ui-logo { --lg-word: #0086BF; --lg-arc: #1FC0ED; --lg-desc: #000000; }
.ui-logo.neg { --lg-word: #FFFFFF; --lg-arc: #1FC0ED; --lg-desc: #FFFFFF; }
.ui-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =====================================================================
   Cascara del equipo: menu lateral fijo + barra superior de 64 px.
   La pagina sigue scrolleando en el body (las 40 pantallas viejas no se
   tocan): el menu es fixed y el body se corre a la derecha.
   ===================================================================== */
body.shell-rn { padding-left: var(--side-w); background: var(--bg); transition: padding-left .26s cubic-bezier(.2,.8,.2,1); }
html.shell-mini body.shell-rn { --side-w: 76px; }

.shell-side { position: fixed; z-index: 900; left: 0; top: 0; bottom: 0; width: var(--side-w); display: flex; flex-direction: column; padding: 28px 16px 20px; background: var(--deep); color: #FFFFFF; overflow-y: auto; scrollbar-width: none; box-sizing: border-box; transition: width .26s cubic-bezier(.2,.8,.2,1), transform .28s cubic-bezier(.2,.8,.2,1); font-family: var(--body); }
.shell-side * { box-sizing: border-box; }
.shell-side .shead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 34px 12px; }
.shell-side .brand { display: block; width: 142px; }
.shell-side .brand svg { display: block; width: 100%; height: auto; }
.shell-side .brand .mk { display: none; }
.shell-side .stog { color: rgba(255,255,255,.6); }
.shell-side .stog:hover { background: rgba(255,255,255,.1); color: #FFFFFF; }
.shell-side .stog svg.i { --ia: var(--cyan); transition: transform .2s; }
/* Estado del boton (etapa 10, Guille): fijo desplegado = resaltado; asomado = resaltado suave
   (un clic lo fija). Al presionarlo se achica un instante. */
.shell-side .stog { transition: background-color .15s, color .15s, transform .12s; }
html:not(.shell-mini) .shell-side .stog { background: rgba(255,255,255,.16); color: #FFFFFF; }
html:not(.shell-mini) .shell-side .stog:hover { background: rgba(255,255,255,.24); }
html.shell-mini.shell-peek .shell-side .stog { background: rgba(255,255,255,.08); color: #FFFFFF; }
.shell-side .stog:active { transform: scale(.88); }
.shell-side .stog:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.shell-nav { display: grid; gap: 2px; }
.shell-nav .ni { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: rgba(255,255,255,.72); font: 500 14px/1 var(--body); text-decoration: none; cursor: pointer; text-align: left; white-space: nowrap; }
.shell-nav .ni svg.i { --ia: currentColor; }
.shell-nav .ni:hover { color: #FFFFFF; background: rgba(255,255,255,.06); }
.shell-nav .ni.on { color: #FFFFFF; background: rgba(255,255,255,.1); }
.shell-nav .ni.on svg.i { --ia: var(--cyan); }
.shell-nav .ni.on::before { content: ""; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cyan); }
.shell-nav .ni .chev { margin-left: auto; transition: transform .2s; }
.shell-nav .ni[aria-expanded="true"] .chev { transform: rotate(180deg); }
/* Contador de un item (Soporte: pedidos nuevos sin abrir, 25/11) */
.shell-nav .ni .ni-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 9999px; background: var(--cyan); color: #FFFFFF; font: 600 11px/20px var(--body); text-align: center; box-sizing: border-box; }
.shell-nav .navsep { height: 1px; background: rgba(255,255,255,.12); margin: 20px 12px; }
.shell-nav .subnav { display: grid; gap: 2px; padding: 2px 0 0 32px; }
.shell-nav .subnav[hidden] { display: none; }
.shell-nav .subnav .ni { height: 34px; font-size: 13px; color: rgba(255,255,255,.64); }
.shell-nav .subnav .ni.on { color: #FFFFFF; }
.shell-nav .subnav .ni.on::before { left: -48px; }

.shell-side .foot { margin-top: auto; padding-top: 24px; }
.shell-me { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.06); }
.shell-me .ui-av { background: #FFFFFF; color: var(--deep); }
.shell-me div { min-width: 0; }
.shell-me b { display: block; font: 500 14px/1.2 var(--body); color: #FFFFFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shell-me small { display: block; font: 400 12px/1.4 var(--body); color: rgba(255,255,255,.6); }
.shell-me .ui-ibtn { margin-left: auto; color: rgba(255,255,255,.72); }
.shell-me .ui-ibtn:hover { background: rgba(255,255,255,.1); color: #FFFFFF; }
/* baseline deja el borde inferior del logo sobre la linea del texto, pero ese borde es el
   nodo que cuelga debajo de "rednodo": las letras terminan en y=156 de las 248 del viewBox,
   asi que se baja la diferencia ((248 - 156) / 240 * 20px = 7.6px, redondeado a 8 a ojo de
   Milton) para que apoyen en la misma linea que "Un producto de"; y 2px a la izquierda, porque
   el viewBox deja aire antes de la "r" */
.shell-endorse { display: flex; align-items: baseline; gap: 8px; margin: 18px 12px 0; color: rgba(255,255,255,.6); font: 400 12px var(--body); white-space: nowrap; }
.shell-endorse svg { width: 66px; height: 20px; color: #FFFFFF; transform: translate(-2px, 8px); }

/* Menu colapsado (solo iconos). Al pasar por el boton de desplegar se asoma
   desplegado (html.shell-peek, ui.js) por encima del contenido, sin moverlo,
   y sigue asi mientras el mouse este adentro: como el menu de Claude. El clic
   en el boton lo fija desplegado; para colapsarlo, otro clic. */
/* Solo en escritorio: en el celular el menu se abre siempre desplegado. Antes las reglas
   del celular deshacian estas, pero con :not(.shell-peek) estas ganaban y quien lo habia
   colapsado en la compu veia en el celular un menu ancho con iconos sueltos */
@media (min-width: 861px) {
	html.shell-mini:not(.shell-peek) .shell-side { padding: 22px 12px 16px; align-items: center; }
	html.shell-mini:not(.shell-peek) .shell-side .shead { flex-direction: column; gap: 14px; margin: 0 0 26px; }
	html.shell-mini:not(.shell-peek) .shell-side .brand { width: 28px; }
	html.shell-mini:not(.shell-peek) .shell-side .brand .full { display: none; }
	html.shell-mini:not(.shell-peek) .shell-side .brand .mk { display: block; }
	html.shell-mini:not(.shell-peek) .shell-nav .ni { justify-content: center; padding: 0; width: 44px; }
	html.shell-mini:not(.shell-peek) .shell-nav .ni span, html.shell-mini:not(.shell-peek) .shell-nav .ni .chev, html.shell-mini:not(.shell-peek) .shell-nav .subnav,
	html.shell-mini:not(.shell-peek) .shell-endorse, html.shell-mini:not(.shell-peek) .shell-me div, html.shell-mini:not(.shell-peek) .shell-me .ui-ibtn { display: none; }
	html.shell-mini:not(.shell-peek) .shell-nav .navsep { margin: 16px 8px; }
	html.shell-mini:not(.shell-peek) .shell-nav .ni.on::before { left: -12px; }
	html.shell-mini:not(.shell-peek) .shell-me { padding: 6px; background: none; }
	html.shell-mini:not(.shell-peek) .shell-side .stog svg.i { transform: scaleX(-1); }

	html.shell-mini.shell-peek .shell-side { width: 256px; box-shadow: 0 0 0 1px rgba(0,0,0,.04), 24px 0 48px -24px rgba(0,0,0,.35); }
}

/* Barra superior */
.shell-top { position: sticky; top: 0; z-index: 800; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 var(--gutter); border-bottom: 1px solid var(--line); background: var(--bg); box-sizing: border-box; font-family: var(--body); }
.shell-top .menu, .shell-top .tmark { display: none; }
.shell-top .ttl { margin: 0 4px 0 0; padding-right: 16px; border-right: 1px solid var(--line); font: 600 22px/1 var(--display); color: var(--t1); letter-spacing: -.01em; white-space: nowrap; }
.shell-top .sp { flex: 1; }
.shell-top .tacts { display: flex; align-items: center; gap: 8px; }
.shell-top .tacts:empty { display: none; }
.shell-top .tacts .ui-btn { height: 38px; }
.shell-scope { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px 0 10px; border: 0; background: none; cursor: pointer; border-radius: 8px; color: var(--t1); font: 500 14px var(--body); text-decoration: none; min-width: 0; }
.shell-scope:hover { background: var(--soft); }
.shell-scope .lbl { color: var(--t3); font-weight: 400; }
.shell-scope .val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.shell-scope svg.i { color: var(--ocean); }
/* Selector de clientes de la barra (06/10): combobox multiselect para todo el panel. En Contenidos y
   Analiticas, al lado del cliente que se ve, de que seleccion sale ("· de 3 clientes"). */
.shell-scope .cs-of { color: var(--t3); font-weight: 400; white-space: nowrap; }
/* Visor de imagenes (UI.lightbox, 21/10): arriba de todo, tambien de la ficha de contenido (2000) */
html.ui-lb-on, html.ui-lb-on body { overflow: hidden; }
html.ui-lb-on .ai-chat-widget, html.ui-lb-on .vc-pill { display: none; }
.ui-lb { position: fixed; inset: 0; z-index: 2400; display: grid; grid-template-rows: auto minmax(0, 1fr); background: rgba(6,18,28,.92); color: #FFFFFF; font-family: var(--body); }
.ui-lb .lb-h { display: flex; align-items: center; gap: 6px; padding: 12px 16px 12px 24px; }
.ui-lb .lb-t { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.ui-lb .lb-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 14px var(--body); }
.ui-lb .lb-c { color: rgba(255,255,255,.65); font-size: 12px; }
.ui-lb .ui-ibtn { color: rgba(255,255,255,.8); }
.ui-lb .ui-ibtn:hover, .ui-lb .ui-ibtn:focus-visible { background: rgba(255,255,255,.12); color: #FFFFFF; }
/* La imagen va absoluta y centrada en el area: con max-height: 100% dentro de la grilla, una foto
   grande se pasaba del alto disponible (reporte de Milton, 21/10) */
.ui-lb .lb-s { position: relative; min-height: 0; }
.ui-lb .lb-img { position: absolute; inset: 0; margin: auto; display: block; max-width: calc(100% - 144px); max-height: calc(100% - 40px); object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px -20px rgba(0,0,0,.7); background: rgba(255,255,255,.04); }
.ui-lb .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #FFFFFF; cursor: pointer; }
.ui-lb .lb-nav:hover, .ui-lb .lb-nav:focus-visible { background: rgba(255,255,255,.22); outline: none; }
.ui-lb .lb-nav.prev { left: 16px; }
.ui-lb .lb-nav.next { right: 16px; }
@media (max-width: 860px) {
	.ui-lb .lb-h { padding: 8px 8px 8px 16px; }
	.ui-lb .lb-img { inset: 0 0 72px; max-width: calc(100% - 24px); max-height: calc(100% - 84px); }
	/* En el celular las flechas van abajo, para no tapar la imagen */
	.ui-lb .lb-nav { top: auto; bottom: 16px; transform: none; }
	.ui-lb .lb-nav.prev { left: calc(50% - 60px); }
	.ui-lb .lb-nav.next { right: calc(50% - 60px); }
}

/* "Ver como cliente" (decision 61): pill flotante abajo a la izquierda, del lado contrario al
   asistente. En el equipo arranca donde termina el menu lateral. */
.vc-pill { box-sizing: border-box; position: fixed; z-index: 950; left: calc(var(--side-w, 0px) + 24px); bottom: 24px; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 14px; border: 0; border-radius: 9999px; background: var(--surface); color: var(--t2); font: 500 13px var(--body); box-shadow: 0 6px 20px -6px rgba(0,40,70,.35), 0 0 0 1px var(--line); cursor: pointer; transition: left .26s cubic-bezier(.2,.8,.2,1), color .12s; }
.vc-pill:hover { color: var(--ocean); }
.vc-pill svg.i { color: var(--ocean); }
.vc-pill.is-on { left: 24px; height: auto; min-height: 52px; padding: 8px 8px 8px 18px; gap: 14px; background: var(--deep); color: #FFFFFF; cursor: default; box-shadow: 0 10px 30px -8px rgba(0,30,50,.55); }
.vc-pill.is-on svg.i { color: var(--cyan); }
.vc-pill.is-on .t { display: grid; line-height: 1.25; }
.vc-pill.is-on .t > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-pill.is-on .t small { color: rgba(255,255,255,.65); font-size: 11px; }
/* Lugar al final de la pagina para que la pill no tape lo ultimo ("Tus pedidos" en SEO) */
body:has(.vc-pill.is-on) { padding-bottom: 88px; }
/* Boton redondeado como la pill, con el mismo aire arriba, abajo y a la derecha */
.vc-pill.is-on .ui-btn { white-space: nowrap; height: 36px; padding: 0 16px; border-radius: 9999px; }
.vc-pill.is-on .ui-btn .sm { display: none; }
.vc-pill.is-on .t { min-width: 0; flex: 1; }
@media (max-width: 860px) {
	.vc-pill { left: 16px; bottom: 24px; }
	.vc-pill:not(.is-on) span { display: none; }
	.vc-pill:not(.is-on) { width: 44px; height: 44px; padding: 0; justify-content: center; }
	/* En la vista del cliente no hay asistente (solo carga para superadmin): todo el ancho */
	.vc-pill.is-on { left: 12px; right: 12px; }
	.vc-pill.is-on .ui-btn .lg { display: none; }
	.vc-pill.is-on .ui-btn .sm { display: inline; }
	/* Las barras de seleccion del celular van en el mismo lugar */
	body:has(.cc-bulk-bar.is-visible, .inf-bulk:not([hidden])) .vc-pill:not(.is-on) { display: none; }
}

.ui-pop.cs-pop { width: 320px; max-width: calc(100vw - 16px); max-height: min(460px, calc(100vh - 90px)); }
/* Celular (19/10): con el teclado abierto el boton del asistente tapaba "Aplicar" */
@media (max-width: 860px) { body:has(.cs-pop) .ai-chat-widget { display: none; } }
.cs-pop-all { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; color: var(--t1); font: 500 14px var(--body); cursor: pointer; }
.cs-pop-all .aside { margin-left: auto; color: var(--t4); font-size: 12px; }
.cs-row { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 6px 0 10px; border-radius: 8px; }
.cs-row:hover { background: var(--soft); }
.cs-row label { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 6px 0; color: var(--t1); font: 400 14px/1.3 var(--body); cursor: pointer; }
.cs-row label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-viendo, .cs-ver, .cs-sin { flex: none; font: 500 12px var(--body); }
.cs-viendo { padding: 0 10px; border-radius: 9999px; background: var(--cyan-bg); color: var(--cyan-tx); }
/* "Ver" con forma de pill, como "Viendo": con borde Ocean y, al pasar el mouse o con foco, lleno.
   Antes el hover era el mismo celeste que el de la fila y no se notaba. */
.cs-ver { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 9999px; box-shadow: inset 0 0 0 1px var(--ocean); color: var(--ocean); text-decoration: none; transition: background .12s, color .12s; }
.cs-ver:hover, .cs-ver:focus-visible { background: var(--ocean); color: #FFFFFF; outline: none; }
.cs-ver:focus-visible { box-shadow: 0 0 0 3px rgba(31,192,237,.35); }
.cs-viendo { display: inline-flex; align-items: center; height: 22px; }
.cs-sin { color: var(--t4); font-weight: 400; }
.cs-pop .pfoot { align-items: center; }
.cs-pop-sum { color: var(--t3); font-size: 12px; }
.cs-pop-sum.is-warning { color: var(--danger-tx); }

/* Campana: se reusan los ids y el dropdown de notifications.js */
.shell-top .notification-bell, .shell-cnav .notification-bell { position: relative; }
.shell-bell { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: none; color: var(--icon); cursor: pointer; padding: 0; }
.shell-bell:hover { background: var(--soft); color: var(--t1); }
.shell-bell .notification-badge { top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9999px; background: var(--cyan); font: 600 10px/16px var(--body); box-shadow: 0 0 0 2px var(--bg); }
.shell-top .notification-dropdown { top: calc(100% + 6px); }

/* Contenido: todo el ancho, alineado con el titulo (32 px) */
body.shell-rn .main-content { padding-top: 8px; }
body.shell-rn .main-content .container, body.shell-rn .an-root .container { padding-left: var(--gutter); padding-right: var(--gutter); }

.shell-scrim { position: fixed; inset: 0; z-index: 890; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .22s; }
.shell-scrim.on { opacity: 1; pointer-events: auto; }

@media (max-width: 860px) {
	body.shell-rn, html.shell-mini body.shell-rn { padding-left: 0; --gutter: 16px; }
	.shell-side, html.shell-mini .shell-side { width: 272px; align-items: stretch; padding: 24px 16px 20px; transform: translateX(-100%); }
	.shell-side.on, html.shell-mini .shell-side.on { transform: none; box-shadow: var(--shadow); }
	.shell-side .stog { display: none; }
	.shell-top { padding: 0 16px; }
	.shell-top .menu { display: inline-grid; }
	.shell-top .tmark { display: block; flex: none; width: 22px; height: 34px; }
	.shell-top .ttl { display: none; }
	.shell-scope .lbl { display: none; }
	.shell-scope .val { max-width: 130px; }
	.shell-top .tacts .ui-btn .bl { display: none; }
	.shell-top .tacts .ui-btn { width: 36px; height: 36px; padding: 0; }
	.shell-top .tacts .ui-btn-soft { display: none; }
	.shell-top .notification-dropdown { position: fixed; top: calc(var(--top-h) + 6px); left: 16px; right: 16px; width: auto; }
}

/* =====================================================================
   Cascara del cliente: banda Deep con navegacion. El hero de cada
   seccion va adentro de la banda (.shell-band .ui-hero).
   ===================================================================== */
body.shell-cl { background: var(--bg); }
.shell-band { position: relative; overflow: hidden; isolation: isolate; background: var(--deep); color: #FFFFFF; font-family: var(--body); }
.shell-band .arcs { position: absolute; z-index: -1; right: -260px; top: -200px; width: 900px; height: 900px; pointer-events: none; }
.shell-band .arcs circle { fill: none; transform-origin: 450px 450px; }
.shell-cnav { height: 80px; display: flex; align-items: center; gap: 48px; padding: 0 var(--gutter); box-sizing: border-box; }
.shell-cnav .brand { width: 136px; flex: none; }
.shell-cnav .brand svg { display: block; width: 100%; height: auto; }
.shell-cnav nav { display: flex; gap: 4px; margin-right: auto; }
.shell-cnav nav a { position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 8px; color: rgba(255,255,255,.72); font: 500 14px/1 var(--body); text-decoration: none; white-space: nowrap; }
.shell-cnav nav a:hover { color: #FFFFFF; background: rgba(255,255,255,.06); }
.shell-cnav nav a.on { color: #FFFFFF; }
/* Contador de lo que espera al cliente (Emails para aprobar) */
.shell-cnav nav a .cnav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 8px; padding: 0 6px; border-radius: 9999px; background: var(--cyan); color: var(--deep); font: 700 12px/1 var(--body); font-variant-numeric: tabular-nums; box-sizing: border-box; }
.shell-cnav nav a.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -4px; height: 3px; border-radius: 3px; background: var(--cyan); }
.shell-cnav .shell-bell { color: rgba(255,255,255,.8); margin-right: 4px; }
.shell-cnav .shell-bell:hover { background: rgba(255,255,255,.1); color: #FFFFFF; }
.shell-cnav .shell-bell svg.i { --ia: var(--cyan); }
.shell-cnav .shell-bell .notification-badge { box-shadow: 0 0 0 2px var(--deep); }
.shell-cnav .who { display: flex; align-items: center; gap: 12px; }
.shell-cnav .who b { display: block; font: 500 14px/1.2 var(--body); color: #FFFFFF; text-align: right; }
.shell-cnav .who small { display: block; font: 400 12px/1.4 var(--body); color: rgba(255,255,255,.64); text-align: right; }
.shell-cnav .who .ui-av { background: #FFFFFF; color: var(--deep); }
.shell-cnav .who .ui-ibtn { color: rgba(255,255,255,.72); }
.shell-cnav .who .ui-ibtn:hover { background: rgba(255,255,255,.1); color: #FFFFFF; }
/* Cliente con varias cuentas (CuentasCliente, 02/11): el nombre del cliente abre el selector */
.shell-cnav .who .who-cuenta { display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; width: 100%; margin: 0; padding: 0 0 0 6px; border: 0; border-radius: 6px; background: none; color: rgba(255,255,255,.64); cursor: pointer; }
.shell-cnav .who .who-cuenta:hover, .shell-cnav .who .who-cuenta[aria-expanded="true"] { color: #FFFFFF; }
.shell-cnav .who .who-cuenta:hover small, .shell-cnav .who .who-cuenta[aria-expanded="true"] small { color: #FFFFFF; }
.shell-cnav .who .who-cuenta:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.shell-cnav .who .who-cuenta-sm { display: none; }
body.shell-cl .main-content .container { padding-left: var(--gutter); padding-right: var(--gutter); }

/* Hero compacto de la vista cliente (Informes, Contenidos y Metricas) */
.ui-hero { padding: 36px var(--gutter) 48px; }
.ui-hero h1 { margin: 0; font: 600 36px/1.15 var(--display); letter-spacing: -.015em; color: #FFFFFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-hero h1 em { font-style: normal; color: var(--cyan); }
.ui-hero .lead { margin: 10px 0 0; max-width: 80ch; font: 400 15px/1.5 var(--body); color: rgba(255,255,255,.8); }
.ui-hero .cards { margin-top: 28px; }
.ui-cmain { padding: 32px var(--gutter) 140px; }

@media (max-width: 860px) {
	body.shell-cl { --gutter: 16px; }
	.shell-cnav { height: auto; flex-wrap: wrap; gap: 12px 24px; padding: 18px 16px 0; }
	.shell-cnav .brand { width: 118px; }
	/* El subrayado de la seccion activa sobresale 4 px: sin el padding aparece una barra de scroll vertical */
	.shell-cnav nav { order: 3; width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; margin: 0 -6px; padding-bottom: 8px; }
	.shell-cnav .notification-bell { margin-left: auto; }
	.shell-cnav .who div { display: none; }
	.shell-cnav .who .who-cuenta-sm { display: inline-grid; }
	.shell-cnav .notification-dropdown { position: fixed; top: 70px; left: 16px; right: 16px; width: auto; }
	.ui-hero { padding: 24px 16px 32px; }
	.ui-hero h1 { font-size: 28px; white-space: normal; }
	.ui-hero .cards { margin-top: 20px; }
	.ui-cmain { padding-top: 24px; }
}

/* =====================================================================
   Componentes
   ===================================================================== */
.ui-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: 8px; border: 1px solid transparent; background: none; font: 500 14px/1 var(--body); white-space: nowrap; text-decoration: none; cursor: pointer; box-sizing: border-box; transition: background-color .15s, border-color .15s, color .15s; }
.ui-btn svg.i { width: 18px; height: 18px; }
.ui-btn-primary { background: var(--ocean); color: #FFFFFF; }
.ui-btn-primary:hover { background: var(--deep); }
.ui-btn-primary svg.i, .ui-btn-danger svg.i, .ui-btn-dark svg.i { --ia: #FFFFFF; }
.ui-btn-dark { background: var(--deep); color: #FFFFFF; }
.ui-btn-outline { border-color: var(--ocean); color: var(--ocean); }
.ui-btn-outline:hover { background: var(--sel); }
.ui-btn-soft { background: var(--soft); color: var(--t1); }
.ui-btn-soft:hover { background: var(--sel); }
.ui-btn-ghost { color: var(--t2); padding: 0 12px; }
.ui-btn-ghost:hover { background: var(--soft); color: var(--t1); }
.ui-btn-danger { background: var(--danger); color: #FFFFFF; }
.ui-btn[disabled], .ui-btn.is-dis { background: var(--dis-bg); color: var(--dis-tx); border-color: transparent; cursor: not-allowed; }
.ui-btn-sm { height: 32px; padding: 0 14px; border-radius: 6px; font-size: 13px; }

.ui-ibtn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--icon); cursor: pointer; flex: none; text-decoration: none; }
.ui-ibtn:hover { background: var(--soft); color: var(--t1); }
.ui-ibtn.lg { width: 40px; height: 40px; }

/* Pill de estado: el color sale de la clase k-* o, para los estados con
   color propio de la base, de --pd/--pb/--pt en linea. */
.ui-pill { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px 0 10px; border: 0; border-radius: 9999px; background: var(--pb, var(--slate-bg)); color: var(--pt, var(--slate-tx)); font: 500 12px/1 var(--body); white-space: nowrap; max-width: 100%; box-sizing: border-box; }
.ui-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pd, var(--slate-dot)); flex: none; }
.ui-pill.k-slate { --pb: var(--slate-bg); --pd: var(--slate-dot); --pt: var(--slate-tx); }
.ui-pill.k-amber { --pb: var(--amber-bg); --pd: var(--amber-dot); --pt: var(--amber-tx); }
.ui-pill.k-blue { --pb: var(--blue-bg); --pd: var(--blue-dot); --pt: var(--blue-tx); }
.ui-pill.k-cyan { --pb: var(--cyan-bg); --pd: var(--cyan-dot); --pt: var(--cyan-tx); }
.ui-pill.k-red { --pb: var(--red-bg); --pd: var(--red-dot); --pt: var(--red-tx); }
.ui-pill.k-purple { --pb: var(--purple-bg); --pd: var(--purple-dot); --pt: var(--purple-tx); }
.ui-pill.k-green { --pb: var(--green-bg); --pd: var(--green-dot); --pt: var(--green-tx); }
.ui-pill.k-outline { --pb: #FFFFFF; --pd: var(--ocean); --pt: var(--deep); box-shadow: inset 0 0 0 1px var(--ocean); }
button.ui-pill { cursor: pointer; padding-right: 6px; }
button.ui-pill svg.i { width: 14px; height: 14px; opacity: .7; stroke-width: 2; --ia: currentColor; }
button.ui-pill:hover { box-shadow: inset 0 0 0 1px var(--pd); }

.ui-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 9999px; background: var(--soft); color: var(--t2); font: 500 12px/1 var(--body); font-variant-numeric: tabular-nums; box-sizing: border-box; }

.ui-inp { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 8px; background: var(--surface); color: var(--t1); font: 400 14px/1.4 var(--body); box-sizing: border-box; outline: none; transition: border-color .15s, box-shadow .15s; }
.ui-inp::placeholder { color: var(--t4); }
.ui-inp:hover { border-color: var(--t4); }
.ui-inp:focus { border-color: var(--ocean); box-shadow: 0 0 0 3px rgba(31,192,237,.28); }
textarea.ui-inp { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }

.ui-cbx { appearance: none; width: 18px; height: 18px; margin: 0; border: 1.5px solid var(--line2); border-radius: 5px; background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; flex: none; vertical-align: middle; transition: background-color .12s, border-color .12s; }
.ui-cbx:hover { border-color: var(--ocean); }
.ui-cbx:checked, .ui-cbx:indeterminate { background: var(--ocean); border-color: var(--ocean); }
.ui-cbx:checked::after { content: ""; width: 10px; height: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat; }
.ui-cbx:indeterminate::after { content: ""; width: 8px; height: 2px; border-radius: 2px; background: #FFFFFF; }

.ui-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: 500 13px var(--body); color: var(--t2); user-select: none; }
.ui-switch input { appearance: none; width: 32px; height: 18px; border-radius: 9999px; background: var(--dis-bg); position: relative; margin: 0; cursor: pointer; transition: background-color .15s; }
.ui-switch input::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #FFFFFF; transition: transform .15s; }
.ui-switch input:checked { background: var(--ocean); }
.ui-switch input:checked::after { transform: translateX(14px); }

/* Pestanas de 44 px, con buscador opcional en la misma fila (.ui-tabrow) */
.ui-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ui-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0; border: 0; background: none; color: var(--t3); font: 500 14px/1 var(--body); white-space: nowrap; flex: none; cursor: pointer; text-decoration: none; }
.ui-tab:hover { color: var(--t1); }
.ui-tab[aria-selected="true"], .ui-tab.on { color: var(--t1); font-weight: 600; }
.ui-tab[aria-selected="true"]::after, .ui-tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--cyan); }
.ui-tab.warn .ui-count { background: var(--amber-bg); color: var(--amber-tx); }
.ui-tabrow { display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); }
.ui-tabrow .ui-tabs { flex: 0 1 auto; min-width: 0; border-bottom: 0; }
.ui-tabrow .ui-search { flex: 1 1 200px; min-width: 200px; max-width: 320px; margin-left: auto; }

.ui-search { position: relative; flex: 0 1 340px; min-width: 220px; }
.ui-search svg.i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--icon); pointer-events: none; }
.ui-search .ui-inp { padding-left: 40px; padding-right: 36px; }
.ui-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 500 11px/1 var(--body); color: var(--t4); border: 1px solid var(--line2); border-radius: 5px; padding: 3px 6px; }

.ui-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 10px; background: var(--soft); }
.ui-seg button, .ui-seg a { height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: var(--t2); font: 500 13px/1 var(--body); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ui-seg a { text-decoration: none; box-sizing: border-box; }
.ui-seg button:hover, .ui-seg a:hover { color: var(--t1); }
.ui-seg button[aria-pressed="true"], .ui-seg a[aria-pressed="true"] { background: var(--surface); color: var(--t1); box-shadow: 0 1px 3px rgba(0,85,132,.18); }

.ui-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ui-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9999px; border: 1px solid var(--line2); background: none; color: var(--t2); font: 500 13px/1 var(--body); cursor: pointer; }
.ui-chip:hover { border-color: var(--ocean); color: var(--t1); }
.ui-chip[aria-pressed="true"] { border-color: var(--ocean); background: var(--sel); color: var(--t1); }

.ui-av { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--deep); color: #FFFFFF; font: 600 12px/1 var(--body); flex: none; letter-spacing: .02em; }
.ui-av.cli { background: var(--cyan-bg); color: var(--cyan-tx); }
.ui-av.sm { width: 24px; height: 24px; font-size: 10px; }

.ui-empty { padding: 72px 24px; text-align: center; font-family: var(--body); }
.ui-empty svg.i { width: 40px; height: 40px; color: var(--t4); }
.ui-empty h3 { margin: 16px 0 6px; font: 600 20px var(--display); color: var(--t1); }
.ui-empty p { margin: 0 0 20px; color: var(--t3); font-size: 14px; }

/* Popover de menu (UI.popover en ui.js) */
.ui-pop { position: fixed; z-index: 1100; min-width: 232px; max-width: 340px; max-height: 380px; overflow: auto; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); animation: ui-popin .14s ease-out; box-sizing: border-box; font-family: var(--body); }
@keyframes ui-popin { from { opacity: 0; transform: translateY(-4px); } }
.ui-pop .it { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--t1); font: 400 14px/1.3 var(--body); text-align: left; cursor: pointer; box-sizing: border-box; }
.ui-pop .it:hover, .ui-pop .it:focus-visible, .ui-pop .it.act { background: var(--soft); outline: none; }
.ui-pop .it[disabled] { opacity: .5; cursor: default; }
.ui-pop .it svg.i { width: 18px; height: 18px; color: var(--icon); }
.ui-pop .it .cnt, .ui-pop .it .aside { margin-left: auto; padding-left: 12px; color: var(--t4); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ui-pop .it .ck { margin-left: auto; color: var(--ocean); }
.ui-pop .it.on { font-weight: 500; }
.ui-pop .it.danger { color: var(--danger-tx); }
.ui-pop .grp { padding: 10px 10px 4px; font: 500 12px var(--body); color: var(--t4); }
.ui-pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.ui-pop .phd { padding: 10px 10px 6px; font: 600 15px var(--display); color: var(--t1); }
.ui-pop .psearch { position: sticky; top: -6px; margin: -6px -6px 6px; padding: 8px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ui-pop .psearch .ui-inp { height: 36px; }
.ui-pop .pfoot { position: sticky; bottom: -6px; display: flex; justify-content: space-between; gap: 8px; margin: 6px -6px -6px; padding: 8px; background: var(--surface); border-top: 1px solid var(--line); }
.ui-pop .pempty { padding: 12px 10px; color: var(--t4); font-size: 13px; }

/* Drawer lateral y modal */
.ui-scrim { position: fixed; inset: 0; z-index: 1000; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .22s; }
.ui-scrim.on { opacity: 1; pointer-events: auto; }
.ui-drawer { position: fixed; z-index: 1010; top: 0; right: 0; bottom: 0; width: min(580px, 100%); display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow); transform: translateX(104%); transition: transform .3s cubic-bezier(.2,.8,.2,1); font-family: var(--body); box-sizing: border-box; }
.ui-drawer.on { transform: none; }
.ui-drawer .dh { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.ui-drawer .dh h2 { flex: 1; margin: 0; font: 600 20px/1.25 var(--display); color: var(--t1); }
.ui-drawer .db { flex: 1; min-height: 0; overflow: auto; padding: 24px; }
.ui-drawer .df { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--line); }
.ui-modal { position: fixed; z-index: 1030; left: 50%; top: 50%; width: min(440px, calc(100% - 32px)); transform: translate(-50%, -46%); opacity: 0; pointer-events: none; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 28px; transition: .2s; font-family: var(--body); box-sizing: border-box; }
.ui-modal.on { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
.ui-modal h3 { margin: 0 0 8px; font: 600 20px/1.25 var(--display); color: var(--t1); }
.ui-modal p { margin: 0; color: var(--t2); font-size: 14px; }
.ui-modal .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.ui-scrim.modal { z-index: 1020; }

/* Toast con deshacer (UI.toast en ui.js) */
.ui-toast { position: fixed; z-index: 1200; left: 50%; bottom: 32px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 12px 18px 12px 14px; border-radius: 12px; background: var(--deep); color: #FFFFFF; font: 500 14px/1.35 var(--body); box-shadow: 0 16px 40px -12px rgba(0,0,0,.4); transition: .22s; box-sizing: border-box; }
.ui-toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.ui-toast svg.i { color: var(--cyan); }
.ui-toast .undo { margin-left: 8px; padding: 6px 10px; border: 0; border-radius: 6px; background: rgba(255,255,255,.12); color: #FFFFFF; font: 600 13px/1 var(--body); cursor: pointer; }
.ui-toast .undo:hover { background: rgba(255,255,255,.2); }

@media (max-width: 860px) {
	.ui-tabs { gap: 24px; margin: 0 -16px; padding: 0 16px; }
	.ui-tabrow { flex-wrap: wrap; gap: 0; border-bottom: 0; }
	.ui-tabrow .ui-tabs { flex: 1 1 100%; border-bottom: 1px solid var(--line); }
	.ui-tabrow .ui-search { flex: 1 1 100%; max-width: none; margin: 16px 0 0; }
	.ui-search { flex: 1 1 100%; }
	.ui-search kbd { display: none; }
	.ui-toast { bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.shell-side, body.shell-rn, .ui-drawer, .ui-modal, .ui-toast, .ui-pop, .ui-scrim, .shell-scrim { transition: none; animation: none; }
}

/* Dialogo con un campo (UI.ask en ui.js) */
.ui-ask form { margin-top: 16px; }
.ui-ask-l { display: block; margin-bottom: 6px; color: var(--t2); font: 500 13px var(--body); }
.ui-ask .ui-inp { width: 100%; box-sizing: border-box; }
.ui-ask .ui-inp.err { border-color: var(--red-dot, #DC2626); }

/* =====================================================================
   Avisos y confirmaciones (showPopup / confirmPopup de scripts.js) con el
   estilo del modal nuevo (etapa 10, Guille: "todo lo que sea pop up tiene
   que ser mejor"). Mismo markup de siempre (#global-popup); el login, que
   no lleva cascara, queda como estaba.
   ===================================================================== */
body:is(.shell-rn, .shell-cl) #global-popup { background: var(--scrim); z-index: 10050; }
body:is(.shell-rn, .shell-cl) #global-popup .popup-content { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 16px; width: min(440px, calc(100% - 32px)); max-width: none; padding: 28px; border-radius: 16px; box-shadow: var(--shadow); font-family: var(--body); transform: translateY(8px); transition: transform .2s; }
body:is(.shell-rn, .shell-cl) #global-popup.active .popup-content { transform: none; }
body:is(.shell-rn, .shell-cl) #global-popup .popup-icon { grid-row: span 2; width: 40px; height: 40px; margin: 0; border: 0; border-radius: 50%; font: 700 20px/40px var(--body); }
body:is(.shell-rn, .shell-cl) #global-popup .popup-icon.warning-icon { background: var(--amber-bg); color: var(--amber-tx); }
body:is(.shell-rn, .shell-cl) #global-popup .popup-icon.success-icon { background: var(--green-bg); color: var(--green-tx); }
body:is(.shell-rn, .shell-cl) #global-popup .popup-title { margin: 0; align-self: center; font: 600 20px/1.25 var(--display); color: var(--t1); text-align: left !important; }
body:is(.shell-rn, .shell-cl) #global-popup .popup-text { margin: 6px 0 0; color: var(--t2); font-size: 14px; line-height: 1.5; text-align: left !important; overflow-wrap: anywhere; }
body:is(.shell-rn, .shell-cl) #global-popup .popup-buttons-group { grid-column: 1 / -1; justify-content: flex-end !important; gap: 8px; margin-top: 24px; }
/* scripts.js le pone display: block a Cancelar: el alto de linea lo centra igual */
body:is(.shell-rn, .shell-cl) #global-popup .popup-buttons-group span { display: inline-flex; align-items: center; justify-content: center; height: 40px; min-width: 96px; padding: 0 20px; border-radius: 8px; font: 500 14px/40px var(--body); text-align: center; box-sizing: border-box; }
body:is(.shell-rn, .shell-cl) #global-popup .popup-confirmation-button { background: var(--ocean); color: #FFFFFF; }
body:is(.shell-rn, .shell-cl) #global-popup .popup-confirmation-button:hover { background: var(--deep); }
body:is(.shell-rn, .shell-cl) #global-popup .popup-cancel-button { background: none; color: var(--t2); box-shadow: inset 0 0 0 1px var(--line2); }
body:is(.shell-rn, .shell-cl) #global-popup .popup-cancel-button:hover { background: var(--soft); color: var(--t1); }

/* Portal del cliente con margenes (etapa 10, Guille): como el prototipo, todo
   centrado en 1240px en lugar de ocupar el 100% */
body.shell-cl .shell-cnav, body.shell-cl .ui-hero, body.shell-cl .ui-cmain, body.shell-cl .an-root .container { max-width: 1240px; margin-left: auto; margin-right: auto; box-sizing: border-box; }

/* Con una ficha, un panel o un popup abierto, el boton flotante del asistente IA se esconde
   (tapaba "Enviar" en la ficha de Informes) */
body:has(.popup-section.active, .ui-drawer.on, .ui-modal.on) .ai-chat-widget:not(.open) { display: none; }

/* Pantalla de inicio propia (start-page.js): la tarjeta del usuario suma un boton antes de salir */
.shell-me #shellStart + .ui-ibtn { margin-left: 0; }
.start-modal select.ui-inp { appearance: none; padding-right: 36px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%230086BF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center; cursor: pointer; }
.start-modal .start-cli { margin-top: 16px; }
.start-modal .start-cli[hidden] { display: none; }
.start-modal .start-hint { display: block; margin-top: 6px; color: var(--t3); font-size: 12px; }

/* Colores de avatar (17/11, Mi perfil): la paleta de ProfilePrefs::COLORS como clases, sin estilos en linea */
.uc-E53935 { --uc: #E53935; }
.uc-D81B60 { --uc: #D81B60; }
.uc-8E24AA { --uc: #8E24AA; }
.uc-5E35B1 { --uc: #5E35B1; }
.uc-3949AB { --uc: #3949AB; }
.uc-1E88E5 { --uc: #1E88E5; }
.uc-039BE5 { --uc: #039BE5; }
.uc-00ACC1 { --uc: #00ACC1; }
.uc-00897B { --uc: #00897B; }
.uc-43A047 { --uc: #43A047; }
.uc-7CB342 { --uc: #7CB342; }
.uc-C0CA33 { --uc: #C0CA33; }
.uc-F4511E { --uc: #F4511E; }
.uc-6D4C41 { --uc: #6D4C41; }
.uc-546E7A { --uc: #546E7A; }
.uc-FF7043 { --uc: #FF7043; }
.ui-av[class*="uc-"], .shell-me .ui-av[class*="uc-"] { background: var(--uc); color: #FFFFFF; }
.avatar-color-swatch[class*="uc-"] { background: var(--uc); }

/* Tarjeta del menu: lleva a Mi perfil */
.shell-me .me-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; margin: -4px; padding: 4px; border-radius: 8px; color: inherit; text-decoration: none; }
.shell-me .me-link:hover { background: rgba(255,255,255,.08); }
.shell-me .me-link:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 1px; }

/* Mi perfil */
.profile-hd { display: flex; align-items: center; gap: 14px; }
.profile-hd h2 { margin: 0; }
.profile-hd small { color: var(--t3); }
.ui-av.profile-av { width: 56px; height: 56px; font-size: 20px; }
.profile-section h3 { margin: 0 0 14px; font: 600 19px/1.3 var(--display); color: var(--t1); }
.profile-section form h3 ~ h3 { margin-top: 32px; }
.profile-section h3 + .profile-help { margin-top: -6px; }
.profile-section .profile-help { margin: 0 0 12px; color: var(--t3); font: 400 14px/1.5 var(--body); }
.profile-checks { display: flex; flex-direction: column; gap: 10px; }
.profile-section + .profile-section { padding-top: 0; }
