/**
 * PSB-PORTAL-CLIENTE-GESTION-UI-001 — lateral premium, rail logo, gestión cuenta.
 * Extiende psb-pres-portal-shell-brand-002 (scope portal cliente).
 */

/* —— Cabecera: toolbar gestión del cliente —— */
body.psb-pres-portal-shell .psb-shell-header__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 10px 12px;
}

/* Acciones directas (sin desplegable) — PSB-PORTAL-NAV-MI-CUENTA-LOGOUT-DIRECTO-001 */
body.psb-pres-portal-shell .psb-portal-cuenta-ver {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 8px;
	background: transparent;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.35;
	color: rgba(250, 250, 249, 0.88);
	text-decoration: none;
	white-space: nowrap;
}

body.psb-pres-portal-shell .psb-portal-cuenta-ver:hover,
body.psb-pres-portal-shell .psb-portal-cuenta-ver:focus {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.28);
	color: #fff;
}

body.psb-pres-portal-shell .psb-portal-sesion-logout {
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	border: 1px solid rgba(255, 255, 255, 0.38);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.14);
	font-size: 13px;
	font-weight: 650;
	line-height: 1.35;
	color: #fafaf9;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.psb-pres-portal-shell .psb-portal-sesion-logout:hover,
body.psb-pres-portal-shell .psb-portal-sesion-logout:focus {
	background: rgba(255, 255, 255, 0.22);
	border-color: rgba(255, 255, 255, 0.55);
	color: #fff;
}

/* Legacy dropdown (por si queda cache) — se mantiene inofensivo */
body.psb-pres-portal-shell .psb-portal-cuenta-menu {
	position: relative;
}

body.psb-pres-portal-shell .psb-portal-cuenta-menu__trigger {
	list-style: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.06);
	font-size: 13px;
	font-weight: 550;
	line-height: 1.35;
	color: #fafaf9;
}

body.psb-pres-portal-shell .psb-portal-cuenta-menu__trigger::-webkit-details-marker {
	display: none;
}

body.psb-pres-portal-shell .psb-portal-cuenta-menu__trigger::after {
	content: "";
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid rgba(250, 250, 249, 0.75);
	margin-top: 1px;
}

body.psb-pres-portal-shell .psb-portal-cuenta-menu[open] .psb-portal-cuenta-menu__trigger {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.35);
}

body.psb-pres-portal-shell .psb-portal-cuenta-menu__trigger:hover,
body.psb-pres-portal-shell .psb-portal-cuenta-menu__trigger:focus {
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.4);
	color: #fff;
}

body.psb-pres-portal-shell .psb-portal-cuenta-menu__list {
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	z-index: 120;
	min-width: 200px;
	margin: 0;
	padding: 6px;
	list-style: none;
	border: 1px solid #e7e5e4;
	border-radius: 12px;
	background: #fafaf9;
	box-shadow: 0 12px 32px rgba(28, 25, 23, 0.14);
}

body.psb-pres-portal-shell .psb-portal-cuenta-menu__list a {
	display: block;
	padding: 9px 12px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.35;
	color: #292524;
	text-decoration: none;
}

body.psb-pres-portal-shell .psb-portal-cuenta-menu__list a:hover,
body.psb-pres-portal-shell .psb-portal-cuenta-menu__list a:focus {
	background: #f5f5f4;
	color: #1c1917;
}

/* —— Rail: superficie blanca propia + logo integrado —— */
body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-shell-rail {
	background: #ffffff;
	box-shadow: inset -1px 0 0 rgba(28, 25, 23, 0.1);
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium.psb-shell-rail {
	background: #ffffff;
}

body.psb-pres-portal-shell .psb-shell-rail__brand {
	background: transparent;
	border-bottom: 1px solid #f5f5f4;
}

body.psb-pres-portal-shell .psb-shell-rail__brand-mark {
	padding: 0.35rem 0.5rem;
	border-radius: 10px;
	background: rgba(245, 245, 244, 0.9);
}

body.psb-pres-portal-shell .psb-shell-rail .psb-pres-rail-d1d__block--primary {
	background: #fafaf9;
}

body.psb-pres-portal-shell .psb-brand--rail .psb-brand__logo {
	max-height: 64px;
}

/* —— Columna derecha premium —— */
body.psb-pres-portal-shell .psb-portal-side {
	align-self: stretch;
}

body.psb-pres-portal-shell .psb-portal-side__inner {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
	padding: 14px 12px 16px;
	border-radius: 14px;
	border: 1px solid #e7e5e4;
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(28, 25, 23, 0.06);
}

body.psb-pres-portal-shell .psb-portal-side__inner > .psb-pres-live-price,
body.psb-pres-portal-shell .psb-portal-side__inner > .psb-pres-trabajo-col-resumen,
body.psb-pres-portal-shell .psb-portal-side__inner > .psb-config-resumen,
body.psb-pres-portal-shell .psb-portal-side__inner > .psb-pres-plast-v2-preview,
body.psb-pres-portal-shell .psb-portal-side__inner > section {
	margin-bottom: 12px;
}

body.psb-pres-portal-shell .psb-portal-side__inner > *:last-child {
	margin-bottom: 0;
}

body.psb-pres-portal-shell .psb-portal-side .psb-pres-live-price {
	border: 1px solid #e7e5e4;
	border-radius: 12px;
	background: #ffffff;
	padding: 14px 14px 12px;
	box-shadow: none;
}

body.psb-pres-portal-shell .psb-portal-side .psb-pres-live-price__label {
	font-size: 11px;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #78716c;
}

body.psb-pres-portal-shell .psb-portal-side .psb-pres-live-price__amount {
	font-size: 1.65rem;
	font-weight: 700;
	line-height: 1.15;
	color: #1c1917;
}

body.psb-pres-portal-shell .psb-portal-side .psb-pres-trabajo-col-resumen,
body.psb-pres-portal-shell .psb-portal-side .psb-config-resumen,
body.psb-pres-portal-shell .psb-portal-side .psb-pres-plast-v2-preview {
	border: 1px solid #e7e5e4;
	border-radius: 12px;
	background: #ffffff;
	padding: 12px 14px;
	box-shadow: none;
}

body.psb-pres-portal-shell .psb-portal-side .psb-pres-shell-aside-actions {
	border: 1px solid #e7e5e4;
	border-radius: 12px;
	background: #ffffff;
	padding: 14px;
	box-shadow: none;
}

body.psb-pres-portal-shell .psb-portal-side .psb-pres-shell-aside-actions__title {
	font-size: 11px;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #78716c;
	margin: 0 0 8px;
}

body.psb-pres-portal-shell .psb-portal-side .psb-pres-portal__btn--primary {
	background: #1c1917;
	border-color: #1c1917;
	color: #fafaf9;
}

body.psb-pres-portal-shell .psb-portal-side .psb-pres-portal__btn--primary:hover,
body.psb-pres-portal-shell .psb-portal-side .psb-pres-portal__btn--primary:focus {
	background: #292524;
	border-color: #292524;
	color: #fff;
}

/* —— Pantalla Mi cuenta —— */
body.psb-pres-portal-shell .psb-pres-cuenta__head {
	margin-bottom: 1rem;
}

body.psb-pres-portal-shell .psb-pres-cuenta-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 1.25rem;
	padding-bottom: 12px;
	border-bottom: 1px solid #e7e5e4;
}

body.psb-pres-portal-shell .psb-pres-cuenta-nav__link {
	display: inline-flex;
	align-items: center;
	padding: 7px 12px;
	border-radius: 999px;
	border: 1px solid #e7e5e4;
	background: #fafaf9;
	font-size: 13px;
	font-weight: 550;
	line-height: 1.35;
	color: #57534e;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body.psb-pres-portal-shell .psb-pres-cuenta-nav__link:hover,
body.psb-pres-portal-shell .psb-pres-cuenta-nav__link:focus {
	background: #f5f5f4;
	border-color: #d6d3d1;
	color: #292524;
}

body.psb-pres-portal-shell .psb-pres-cuenta-nav__link--active {
	background: #1c1917;
	border-color: #1c1917;
	color: #fafaf9;
}

body.psb-pres-portal-shell .psb-pres-cuenta__panels {
	min-height: 200px;
}

body.psb-pres-portal-shell .psb-pres-cuenta-panel {
	border: 1px solid #e7e5e4;
	border-radius: 14px;
	background: linear-gradient(180deg, #fafaf9 0%, #f5f5f4 100%);
	padding: 18px 20px;
	box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
	scroll-margin-top: 24px;
}

body.psb-pres-portal-shell .psb-pres-cuenta-panel--active {
	border-color: #d6d3d1;
	box-shadow:
		0 0 0 1px rgba(28, 25, 23, 0.06),
		0 8px 24px rgba(28, 25, 23, 0.06);
}

body.psb-pres-portal-shell .psb-pres-cuenta-panel:target {
	border-color: #a8a29e;
	box-shadow:
		0 0 0 2px rgba(28, 25, 23, 0.08),
		0 8px 24px rgba(28, 25, 23, 0.08);
}

body.psb-pres-portal-shell .psb-pres-cuenta-panel__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 12px;
	margin-bottom: 12px;
}

body.psb-pres-portal-shell .psb-pres-cuenta-panel__title {
	margin: 0;
	font-size: 15px;
	font-weight: 650;
	line-height: 1.3;
	color: #1c1917;
}

body.psb-pres-portal-shell .psb-pres-cuenta-panel__badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.35;
	color: #57534e;
	background: #e7e5e4;
}

body.psb-pres-portal-shell .psb-pres-cuenta-panel__badge--readonly {
	color: #44403c;
	background: #d6d3d1;
}

body.psb-pres-portal-shell .psb-pres-cuenta-panel__badge--inline {
	vertical-align: middle;
	margin-left: 4px;
}

body.psb-pres-portal-shell .psb-pres-cuenta-btn--prepared {
	opacity: 0.72;
	cursor: not-allowed;
	pointer-events: none;
}

body.psb-pres-portal-shell .psb-pres-cuenta-field {
	margin: 0 0 10px;
}

body.psb-pres-portal-shell .psb-pres-cuenta-field__label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #78716c;
	margin-bottom: 4px;
}

body.psb-pres-portal-shell .psb-pres-cuenta-field__value {
	display: block;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.45;
	color: #292524;
}

body.psb-pres-portal-shell .psb-pres-cuenta-panel__hint {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: #57534e;
}

body.psb-pres-portal-shell .psb-pres-cuenta-logo-preview {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100px;
	margin-bottom: 12px;
	padding: 14px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.55);
	border: 1px dashed #d6d3d1;
}

body.psb-pres-portal-shell .psb-pres-cuenta-logo-preview__img {
	display: block;
	max-width: 100%;
	max-height: 72px;
	width: auto;
	height: auto;
	object-fit: contain;
}

body.psb-pres-portal-shell .psb-pres-cuenta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 14px 0 0;
}

/* —— Responsive —— */
@media (max-width: 767px) {
	body.psb-pres-portal-shell .psb-shell-header__toolbar {
		width: 100%;
		justify-content: flex-end;
		gap: 8px;
	}

	body.psb-pres-portal-shell .psb-portal-cuenta-ver,
	body.psb-pres-portal-shell .psb-portal-sesion-logout {
		font-size: 12px;
		padding: 6px 10px;
	}

	body.psb-pres-portal-shell .psb-portal-cuenta-menu__list {
		right: 0;
		left: auto;
		max-width: calc(100vw - 32px);
	}

	body.psb-pres-portal-shell .psb-pres-cuenta-nav {
		gap: 4px;
	}

	body.psb-pres-portal-shell .psb-pres-cuenta-nav__link {
		font-size: 12px;
		padding: 6px 10px;
	}

	body.psb-pres-portal-shell .psb-portal-side__inner {
		padding: 12px 10px 14px;
		border-radius: 12px;
	}
}

@media (max-width: 480px) {
	body.psb-pres-portal-shell .psb-shell-header__toolbar--cuenta-directa {
		flex-direction: column;
		align-items: stretch;
	}

	body.psb-pres-portal-shell .psb-shell-header__toolbar--cuenta-directa .psb-portal-cuenta-ver,
	body.psb-pres-portal-shell .psb-shell-header__toolbar--cuenta-directa .psb-portal-sesion-logout {
		justify-content: center;
		text-align: center;
	}
}

/* —— Mi cuenta pantalla única (PSB-PORTAL-CUENTA-ICONOS-004) —— */
body.psb-pres-portal-shell .psb-pres-cuenta--unified .psb-pres-cuenta-nav {
	display: none;
}

body.psb-pres-portal-shell .psb-pres-cuenta--unified .psb-pres-cuenta__who {
	margin-top: 0.35rem;
	color: #57534e;
	font-size: 14px;
}

body.psb-pres-portal-shell .psb-pres-cuenta--unified .psb-pres-cuenta__flash {
	margin: 0 0 1rem;
}

body.psb-pres-portal-shell .psb-pres-cuenta--unified .psb-pres-cuenta__panels {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

/* —— Mi cuenta grid compacto (PSB-PORTAL-CUENTA-UI-005) —— */
body.psb-pres-portal-shell .psb-pres-cuenta--compact .psb-pres-cuenta__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.85rem 1rem;
	align-items: stretch;
}

body.psb-pres-portal-shell .psb-pres-cuenta--compact .psb-pres-cuenta-panel--stack {
	padding: 0.95rem 1rem 1.05rem;
}

body.psb-pres-portal-shell .psb-pres-cuenta--compact .psb-pres-cuenta-panel__head {
	margin-bottom: 0.55rem;
}

body.psb-pres-portal-shell .psb-pres-cuenta--compact .psb-pres-cuenta-panel__title {
	font-size: 15px;
}

body.psb-pres-portal-shell .psb-pres-cuenta-logo-layout {
	display: grid;
	grid-template-columns: minmax(100px, 120px) minmax(0, 1fr);
	gap: 0.75rem 1rem;
	align-items: start;
}

body.psb-pres-portal-shell .psb-pres-cuenta--compact .psb-pres-cuenta-logo-preview {
	min-height: 0;
	margin-bottom: 0;
	padding: 10px;
}

body.psb-pres-portal-shell .psb-pres-cuenta--compact .psb-pres-cuenta-logo-preview__img {
	max-height: 64px;
}

body.psb-pres-portal-shell .psb-pres-cuenta-form__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.65rem;
	margin-bottom: 0.65rem;
}

body.psb-pres-portal-shell .psb-pres-cuenta-form__row--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.psb-pres-portal-shell .psb-pres-cuenta-form__row .psb-pres-cuenta-field {
	margin: 0;
}

body.psb-pres-portal-shell .psb-pres-cuenta-form--hidden {
	display: none;
}

body.psb-pres-portal-shell .psb-pres-cuenta-actions--tight {
	margin-top: 0.65rem;
	gap: 8px;
}

body.psb-pres-portal-shell .psb-pres-cuenta--compact .psb-pres-cuenta-field__input {
	max-width: none;
	margin-top: 0.3rem;
	padding: 0.5rem 0.6rem;
}

body.psb-pres-portal-shell .psb-pres-cuenta--compact .psb-pres-cuenta-panel__hint {
	font-size: 12px;
	margin-top: 0.25rem;
}

body.psb-pres-portal-shell .psb-pres-cuenta--compact .psb-pres-cuenta-panel--sesion {
	background: #fafaf9;
}

@media (max-width: 900px) {
	body.psb-pres-portal-shell .psb-pres-cuenta--compact .psb-pres-cuenta__grid {
		grid-template-columns: 1fr;
	}

	body.psb-pres-portal-shell .psb-pres-cuenta-form__row--2 {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 560px) {
	body.psb-pres-portal-shell .psb-pres-cuenta-logo-layout {
		grid-template-columns: 1fr;
	}
}

body.psb-pres-portal-shell .psb-pres-cuenta--unified .psb-pres-cuenta-panel--stack {
	display: block;
	padding: 1.1rem 1.15rem 1.2rem;
	border: 1px solid #e7e5e4;
	border-radius: 12px;
	background: #fafaf9;
}

body.psb-pres-portal-shell .psb-pres-cuenta--unified .psb-pres-cuenta-panel--stack:target {
	box-shadow: 0 0 0 2px rgba(28, 25, 23, 0.06);
}

body.psb-pres-portal-shell .psb-pres-cuenta-field__input {
	display: block;
	width: 100%;
	max-width: 28rem;
	margin-top: 0.35rem;
	padding: 0.55rem 0.65rem;
	border: 1px solid #d6d3d1;
	border-radius: 8px;
	font: inherit;
	line-height: 1.35;
	color: #1c1917;
	background: #fff;
	box-sizing: border-box;
}

body.psb-pres-portal-shell .psb-pres-cuenta-form--inline {
	margin-top: 0.75rem;
}

body.psb-pres-portal-shell .psb-pres-cuenta-panel--sesion {
	background: transparent;
	border-color: #f0f0ee;
}
