/**
 * PSB-PORTAL-SHELL-COMPOSICION-004 — workspace acotado, gutters y rail premium.
 * Carga tras rail-continuity-001; no altera lógica de formularios ni columnas funcionales.
 */

body.psb-pres-portal-shell {
	--psb-comp-rail-w: 280px;
	--psb-comp-aside-w: 272px;
	--psb-comp-col-gap: 0;
	--psb-comp-main-max: clamp(480px, 42vw, 720px);
	--psb-comp-work-inner: clamp(880px, 72vw, 1120px);
	--psb-workspace-bg: #fafaf9;
	--psb-workspace-main-bg: #ffffff;
	--psb-comp-shell3-max: calc(
		var(--psb-comp-rail-w) + var(--psb-comp-main-max) + var(--psb-comp-aside-w)
	);
	--psb-comp-shell2-max: calc(
		var(--psb-comp-rail-w) + var(--psb-comp-work-inner)
	);
}

/* —— Stage: lienzo stone + gutters exteriores —— */
body.psb-pres-portal-shell .psb-pres-shell__main {
	background: #eeedec;
}

body.psb-pres-portal-shell .psb-pres-shell__stage {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0 clamp(12px, 2.5vw, 28px);
	box-sizing: border-box;
}

body.psb-pres-portal-shell .psb-pres-panel {
	max-width: 100%;
	background: transparent;
}

/* —— Workspace blanco continuo (rail + cuerpo + aside), sin tarjeta flotante —— */
body.psb-pres-portal-shell .psb-pres-panel__grid.psb-pres-panel__grid--shell3 {
	align-items: stretch;
	background: var(--psb-workspace-bg);
	/* !important: rail-continuity-001 y composición previa */
	column-gap: 0 !important;
	gap: 0 !important;
	row-gap: 0 !important;
	border: none;
	border-radius: 0;
	box-shadow: none;
}

body.psb-pres-portal-shell .psb-pres-panel > .psb-pres-portal-msg {
	background: var(--psb-workspace-bg);
}

@media (min-width: 768px) {
	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-panel__main {
		background: var(--psb-workspace-main-bg);
	}

	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3:not(.psb-pres-panel__grid--visual-inner):not(.psb-pres-panel__grid--no-aside) > .psb-pres-panel__aside {
		background: var(--psb-workspace-bg);
		border-left: 1px solid #f0f0ee;
	}

	/* Rail integrado: sin línea de corte ni capa ::before */
	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3::before {
		content: none;
		display: none;
	}

	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-panel__nav,
	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-rail-d1d,
	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-shell-rail {
		background: var(--psb-workspace-bg) !important;
		box-shadow: none !important;
		border: none !important;
		border-right: none !important;
		align-self: stretch !important;
		min-height: auto !important;
		max-height: none !important;
		height: auto !important;
	}

	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-rail-d1d--premium,
	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-rail-d1d--premium.psb-shell-rail,
	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-rail-d1d--premium.psb-pres-panel__nav {
		border: none;
		border-radius: 0;
		box-shadow: none;
	}

	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-shell-rail .psb-pres-rail-d1d__block--primary {
		background: transparent;
		border-bottom-color: #f0f0ee;
	}
}

@media (min-width: 1024px) {
	body.psb-pres-portal-shell .psb-pres-panel__grid.psb-pres-panel__grid--shell3:not(.psb-pres-panel__grid--visual-inner):not(.psb-pres-panel__grid--no-aside) {
		width: 100%;
		max-width: var(--psb-comp-shell3-max);
		margin-inline: auto;
		grid-template-columns:
			minmax(260px, var(--psb-comp-rail-w))
			minmax(0, min(var(--psb-comp-main-max), 1fr))
			minmax(248px, var(--psb-comp-aside-w));
	}

	body.psb-pres-portal-shell .psb-pres-panel__grid.psb-pres-panel__grid--shell3.psb-pres-panel__grid--visual-inner,
	body.psb-pres-portal-shell .psb-pres-panel__grid.psb-pres-panel__grid--shell3.psb-pres-panel__grid--no-aside {
		width: 100%;
		max-width: var(--psb-comp-shell2-max);
		margin-inline: auto;
		grid-template-columns:
			minmax(260px, var(--psb-comp-rail-w))
			minmax(0, min(var(--psb-comp-work-inner), 1fr));
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	body.psb-pres-portal-shell .psb-pres-panel__grid.psb-pres-panel__grid--shell3 {
		column-gap: 0 !important;
		gap: 0 !important;
	}
}

/* —— Cuerpo central: padding coherente, sin estiramiento infinito —— */
@media (min-width: 768px) {
	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-panel__main {
		/* !important: rail-continuity-001 anula padding-left */
		padding: 1.35rem 0 2rem 1.5rem !important;
		margin-left: 0;
		border-left: none;
	}

	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-panel__main > .psb-pres-portal-card,
	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-panel__main > .psb-pres-panel__form-card,
	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-panel__main > .psb-pres-panel__unified-card,
	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-panel__main > .psb-pres-panel-home-card,
	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-panel__main > .psb-pres-form2026,
	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-panel__main > form {
		padding-left: 0;
		padding-right: 1.25rem;
		max-width: 100%;
		box-sizing: border-box;
	}

	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3:not(.psb-pres-panel__grid--visual-inner):not(.psb-pres-panel__grid--no-aside) > .psb-pres-panel__aside {
		padding: 1.35rem 1rem 2rem 0.85rem;
		border-left: 1px solid #f0f0ee;
	}
}

/* Columna derecha premium: tarjeta interior diferenciada, no blanco plano */
body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-panel__aside .psb-portal-side__inner {
	border-color: #e7e5e4;
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(28, 25, 23, 0.06);
}

/* —— Rail premium: aire izquierdo, tipografía e iconos —— */
@media (min-width: 768px) {
	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-shell-rail .psb-shell-rail__brand {
		padding: 1rem 14px 0.85rem 18px;
	}

	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-shell-rail .psb-shell-rail__body {
		padding: 0 14px 1.25rem 18px;
	}

	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-rail-d1d:not(.psb-shell-rail) {
		padding-left: 18px;
		padding-right: 14px;
		box-sizing: border-box;
	}
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__nav-group-label,
body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__block--nav .psb-pres-rail-d1d__block-title {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: #57534e;
	margin-bottom: 0.55rem;
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium.psb-pres-rail-d1d--v4 .psb-pres-rail-d1d__block--nav {
	padding-top: 12px;
	padding-bottom: 14px;
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__list--nav {
	gap: 3px;
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__list--nav .psb-pres-rail-d1d__link {
	display: flex;
	align-items: center;
	padding: 9px 12px;
	border-radius: 10px;
	font-size: 13.5px;
	font-weight: 560;
	line-height: 1.35;
	color: #44403c;
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__list--nav .psb-pres-rail-d1d__link:hover {
	background: #f5f5f4;
	border-color: #ebeae8;
	color: #1c1917;
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__list--nav .psb-pres-rail-d1d__link--current,
body.psb-pres-portal-shell .psb-pres-rail-d1d__link--current {
	background: #f5f5f4 !important;
	border-color: #d6d3d1 !important;
	color: #1c1917 !important;
	font-weight: 650;
	/* !important: homologacion-003 fija activo con sombra fuerte */
	box-shadow: 0 1px 2px rgba(28, 25, 23, 0.05) !important;
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__link--portal {
	font-weight: 600;
	color: #44403c;
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__link--portal::before {
	font-size: 14px;
	margin-right: 8px;
	opacity: 0.85;
}

/* Iconos rail — SVG inline vía máscara, 16px */
body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__link--fp::before {
	content: "";
	display: inline-block;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin-right: 9px;
	opacity: 0.78;
	vertical-align: middle;
	background-color: currentColor;
	-webkit-mask: var(--psb-comp-rail-icon) center / contain no-repeat;
	mask: var(--psb-comp-rail-icon) center / contain no-repeat;
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__link--fp-plastico {
	--psb-comp-rail-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='3' width='11' height='10' rx='1.5'/%3E%3Cpath d='M5 6h6M5 9h4'/%3E%3C/svg%3E");
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__link--fp-plegado {
	--psb-comp-rail-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h10v8H3z'/%3E%3Cpath d='M8 4v8M3 8h10'/%3E%3C/svg%3E");
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__link--fp-troquelados {
	--psb-comp-rail-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2.5l1.8 3.6 4 .6-2.9 2.8.7 4-3.6-1.9-3.6 1.9.7-4-2.9-2.8 4-.6z'/%3E%3C/svg%3E");
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__link--fp-stamping {
	--psb-comp-rail-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v2M5.5 3.5l1.4 1.4M10.5 3.5l-1.4 1.4M4 8H2M14 8h-2M5.5 12.5l1.4-1.4M10.5 12.5l-1.4-1.4M8 12v2'/%3E%3Ccircle cx='8' cy='8' r='2.5'/%3E%3C/svg%3E");
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__link--fp-uvi_selectivo {
	--psb-comp-rail-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='5'/%3E%3Ccircle cx='8' cy='8' r='2'/%3E%3C/svg%3E");
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__link--fp-uvi_total {
	--psb-comp-rail-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='5'/%3E%3Cpath d='M8 3v10M3 8h10'/%3E%3C/svg%3E");
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__link--fp-rega_indices {
	--psb-comp-rail-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 3v10M4 3h6M4 8h5M4 13h7'/%3E%3C/svg%3E");
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__link--fp-sol_manual {
	--psb-comp-rail-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l8-8M9.5 3.5h3v3M6.5 9.5L4 12'/%3E%3C/svg%3E");
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium .psb-pres-rail-d1d__link--current::before {
	opacity: 0.92;
}

/* Columna derecha: acompaña al workspace */
@media (min-width: 1024px) {
	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-panel__aside .psb-portal-side__inner {
		max-width: var(--psb-comp-aside-w);
		margin-inline: auto 0;
	}
}

@media (max-width: 767px) {
	body.psb-pres-portal-shell .psb-pres-shell__stage {
		padding-inline: 12px;
	}

	body.psb-pres-portal-shell .psb-pres-panel__grid.psb-pres-panel__grid--shell3 {
		column-gap: 0 !important;
		gap: 20px !important;
	}

	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-panel__main {
		padding: 1.15rem 0 1.5rem !important;
	}

	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-panel__main > .psb-pres-panel__unified-card,
	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-pres-panel__main > form {
		padding-inline: 1rem;
	}
}
