/**
 * Cabecera y menú principal del admin.
 */

body.page-admin {
	background-color: #fff;
	scrollbar-gutter: stable;
	overflow-x: clip;
}

.app-layout {
	padding-top: 0;
	width: 100%;
}

@media (min-width: 992px) {
	body.page-admin .app-layout.container {
		max-width: 1200px;
		margin-left: auto;
		margin-right: auto;
	}
}

.app-header {
	background: #fff;
	margin-bottom: 0;
}

.app-header__brand {
	padding: 1.25rem 0 0.75rem;
}

/* Miga de pan alineada con menú (mismo contenedor) */
.app-breadcrumb-bar {
	margin-bottom: 1.25rem;
	padding: 0.55rem 0;
	background-color: #16519d;
	border-radius: 4px;
}

.app-breadcrumb-bar .breadcrumb {
	margin-bottom: 0;
	padding: 0;
	background: transparent;
	border-radius: 0;
}

.app-breadcrumb-bar .breadcrumb > li,
.app-breadcrumb-bar .breadcrumb > li a,
.app-breadcrumb-bar .breadcrumb > .active {
	color: #fff;
}

.app-breadcrumb-bar .breadcrumb > li a:hover,
.app-breadcrumb-bar .breadcrumb > li a:focus {
	color: #fff;
	text-decoration: underline;
}

.app-breadcrumb-bar .breadcrumb > li + li:before {
	color: #fff;
}

body.page-admin .app-container-top {
	padding-top: 0;
}

.app-header__nav {
	padding: 0 0 0.85rem;
}

.app-header__brand-link {
	display: inline-block;
	text-decoration: none;
}

.app-header__logo {
	display: block;
	height: 46px;
	width: auto;
	max-width: 180px;
}

.app-header__logo--electry {
	height: 42px;
	max-width: 160px;
}

.app-header__toggle {
	display: none;
	margin-bottom: 0.75rem;
	padding: 0.35rem 0.65rem;
	font-size: 0.85rem;
	color: #555;
	background: #fff;
	border: 1px solid #d8d8d8;
	border-radius: 4px;
}

.app-header__toggle-icon {
	display: inline-block;
	width: 18px;
	height: 2px;
	margin: 3px 0;
	background: #666;
}

.app-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.app-header__menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.15rem 1.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.app-header__menu--right {
	margin-left: auto;
}

.app-header__item {
	position: relative;
}

.app-header__menu--left .dropdown::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	height: 0.5rem;
}

.app-header__link,
.app-header__menu-trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.15rem 0;
	font-size: 0.78rem;
	font-weight: 400;
	letter-spacing: 0.04em;
	color: #555;
	text-decoration: none;
	text-transform: uppercase;
	background: transparent;
	border: 0;
	white-space: nowrap;
}

.app-header__link:hover,
.app-header__link:focus,
.app-header__menu-trigger:hover,
.app-header__menu-trigger:focus,
.app-header__item.dropdown:hover > .app-header__menu-trigger,
.app-header__item.dropdown:focus-within > .app-header__menu-trigger {
	color: #16519d;
	text-decoration: none;
}

.app-header__caret {
	display: inline-block;
	width: 0;
	height: 0;
	margin-top: 1px;
	border-top: 4px solid currentColor;
	border-right: 4px solid transparent;
	border-left: 4px solid transparent;
	opacity: 0.75;
}

.app-header__menu .dropdown-menu {
	display: none;
	margin-top: 0.35rem;
	padding: 0.35rem 0;
	font-size: 0.875rem;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.app-header__menu .dropdown-menu > li > a,
.app-header__menu .dropdown-item {
	padding: 0.45rem 1rem;
	color: #444;
}

.app-header__menu .dropdown-menu > li > a:hover,
.app-header__menu .dropdown-menu > li > a:focus,
.app-header__menu .dropdown-item:hover,
.app-header__menu .dropdown-item:focus {
	color: #16519d;
	background-color: #f5f8fc;
}

.app-header__menu .dropdown-divider,
.app-header__menu .divider {
	margin: 0.35rem 0;
	border-top: 1px solid #ececec;
}

@media (max-width: 991.98px) {
	.app-header__toggle {
		display: inline-flex;
		flex-direction: column;
		align-items: center;
	}

	.app-header__inner {
		flex-direction: column;
		align-items: stretch;
	}

	.app-header__inner.show {
		display: flex;
	}

	.app-header__menu {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.35rem;
	}

	.app-header__menu--right {
		margin-left: 0;
		padding-top: 0.75rem;
		border-top: 1px solid #ececec;
	}

	.app-header__menu .dropdown-menu {
		position: static !important;
		float: none;
		transform: none !important;
		box-shadow: none;
		border: 0;
		padding-left: 0.75rem;
	}

	.app-header__item.dropdown.is-open > .dropdown-menu {
		display: block;
	}
}

@media (min-width: 992px) {
	.app-header__inner.collapse {
		display: flex !important;
	}

	.app-header__menu--left .dropdown .dropdown-menu {
		position: absolute;
		top: calc(100% + 0.35rem);
		left: 0;
		min-width: 12rem;
		z-index: 1050;
		margin-top: 0;
	}

	.app-header__menu--left .dropdown:hover .dropdown-menu,
	.app-header__menu--left .dropdown:focus-within .dropdown-menu {
		display: block;
	}

	.app-header__menu--left .dropdown:not(:has(.dropdown-item)) .dropdown-menu {
		display: none !important;
	}
}
