/**
 * PSB-BRAND-SHELL-002 — cabecera separada + rail CRM premium + marca cliente/PSB.
 */

/* —— Cabecera superior portal —— */
body.psb-pres-portal-shell .psb-pres-shell__header-inner.psb-shell-header__inner {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 0 28px;
	min-height: 64px;
	padding: 12px 22px;
}

body.psb-pres-portal-shell .psb-shell-header__mark {
	flex-shrink: 0;
	padding-right: 4px;
	border-right: 1px solid rgba(255, 255, 255, 0.14);
	margin-right: 4px;
}

body.psb-pres-portal-shell .psb-brand--header .psb-brand__link {
	display: block;
	text-decoration: none;
	color: inherit;
	line-height: 0;
}

body.psb-pres-portal-shell .psb-brand--header .psb-brand__logo {
	display: block;
	max-height: 44px;
	max-width: 120px;
	width: auto;
	height: auto;
	object-fit: contain;
}

body.psb-pres-portal-shell .psb-shell-header__zone {
	min-width: 0;
}

body.psb-pres-portal-shell .psb-shell-header__title {
	margin: 0;
	font-size: 17px;
	font-weight: 650;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: #fafaf9;
}

body.psb-pres-portal-shell .psb-shell-header__subtitle {
	margin: 5px 0 0;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.35;
	color: #a8a29e;
}

body.psb-pres-portal-shell .psb-shell-header__actions {
	flex-shrink: 0;
}

/* —— Rail CRM premium (altura completa) —— */
body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 {
	align-items: stretch;
}

body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-shell-rail {
	align-self: stretch;
	position: sticky;
	top: 0;
	min-height: calc(100vh - 64px);
	max-height: calc(100vh - 64px);
	margin-top: 0;
	padding-top: 0;
	padding-right: 0;
	border-right: 1px solid #e7e5e4;
	border-radius: 0;
	background: linear-gradient(180deg, #fafaf9 0%, #f5f5f4 100%);
	box-shadow: none;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

body.psb-pres-portal-shell.admin-bar .psb-pres-panel__grid--shell3 > .psb-shell-rail {
	min-height: calc(100vh - 96px);
	max-height: calc(100vh - 96px);
}

body.psb-pres-portal-shell .psb-pres-rail-d1d--premium.psb-shell-rail {
	border: none;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
}

body.psb-pres-portal-shell .psb-shell-rail__brand {
	padding: 1.15rem 1rem 1rem;
	border-bottom: 1px solid #e7e5e4;
	background: #fff;
	flex-shrink: 0;
}

body.psb-pres-portal-shell .psb-shell-rail__brand-mark .psb-brand__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
	color: #292524;
	text-align: center;
}

body.psb-pres-portal-shell .psb-brand--rail .psb-brand__logo {
	display: block;
	max-height: 56px;
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	margin: 0 auto;
}

body.psb-pres-portal-shell .psb-brand--rail .psb-brand__title {
	display: block;
	font-size: 12px;
	font-weight: 650;
	line-height: 1.35;
	color: #44403c;
}

body.psb-pres-portal-shell .psb-shell-rail__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow: auto;
	padding-bottom: 0.75rem;
}

body.psb-pres-portal-shell .psb-shell-rail .psb-pres-rail-d1d__block--nav {
	flex: 1;
	border-bottom: 0;
}

body.psb-pres-portal-shell .psb-shell-rail .psb-pres-rail-d1d--premium.psb-pres-rail-d1d--v4 .psb-pres-rail-d1d__block--nav {
	padding: 12px 10px 16px;
}

body.psb-pres-portal-shell .psb-shell-rail .psb-pres-rail-d1d__block--primary {
	flex-shrink: 0;
	border-bottom: 1px solid #e7e5e4;
	background: rgba(255, 255, 255, 0.65);
}

/* —— Responsive —— */
@media (max-width: 767px) {
	body.psb-pres-portal-shell .psb-pres-shell__header-inner.psb-shell-header__inner {
		grid-template-columns: auto 1fr;
		grid-template-rows: auto auto;
		gap: 10px 16px;
		min-height: auto;
		padding: 12px 16px;
	}

	body.psb-pres-portal-shell .psb-shell-header__mark {
		grid-row: 1;
		border-right: 0;
		margin-right: 0;
		padding-right: 0;
	}

	body.psb-pres-portal-shell .psb-shell-header__zone {
		grid-row: 1;
	}

	body.psb-pres-portal-shell .psb-shell-header__actions {
		grid-row: 2;
		grid-column: 1 / -1;
		justify-self: end;
	}

	body.psb-pres-portal-shell .psb-brand--header .psb-brand__logo {
		max-height: 36px;
		max-width: 96px;
	}

	body.psb-pres-portal-shell .psb-pres-panel__grid--shell3 > .psb-shell-rail {
		position: static;
		min-height: auto;
		max-height: none;
		border-right: 0;
		border-top: 1px solid #e7e5e4;
	}

	body.psb-pres-portal-shell .psb-brand--rail .psb-brand__logo {
		max-height: 44px;
	}
}

@media (max-width: 600px) {
	body.psb-pres-portal-shell .psb-shell-header__title {
		font-size: 15px;
	}
}
