*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

:root {
	--sw: 17.6963rem;     /* ancho del sidebar expandido */
}

/* ═══════════════════════════════
           MAIN WRAP (contenido de la página)
           Se ajusta según el estado del sidebar.
           Adentro se usa el grid normal de Bootstrap:
           container-fluid > row > col-*
        ═══════════════════════════════ */
#main-wrap {
	margin-left: var(--sw);
	min-height: 100vh;
	transition: margin-left 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

#main-wrap.shifted {
	margin-left: 4.356rem;
}

@media (max-width:768px) {
	#main-wrap {
		margin-left: 0;
		padding-top: 3.8115rem;
	}

	#main-wrap.shifted {
		margin-left: 0;
	}

}

/* ═══════════════════════════════
           SIDEBAR
        ═══════════════════════════════ */
#sidebar {
	width: 17.6963rem;
	background-color: #022238;
	border-right: 0.068rem solid rgba(255, 255, 255, 0.08);
	display: flex;
	flex-direction: column;
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 200;
	overflow: hidden;
	box-shadow: 0.1361rem 0 0.8167rem rgba(0, 0, 0, 0.04);
	transition: width 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar.collapsed {
	width: 4.1rem;
}

#sidebar.collapsed .icon-submenu {
	display: none;
}

/* ── BRAND ROW ── */
.s-brand {
    display: flex;
    align-items: center;
    padding: 0.765rem 0.675rem;
    /* margin: 0.675rem 0; */
    /* height: 3.6rem; */
    border-bottom: 0.0563rem solid rgba(255, 255, 255, 0.08);
    gap: 0.5625rem;
    flex-shrink: 0;
}

#sidebar.collapsed .s-brand {
	justify-content: center;
	padding: 0;
	gap: 0;
}

.brand-icon {
	width: 2.178rem;
	height: 2.178rem;
	flex-shrink: 0;
	border-radius: 0.2722rem;
	background: rgba(255, 255, 255, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 0.9528rem;
}

.brand-text {
	white-space: nowrap;
	transform-origin: left;
	transition: opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1), transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar.collapsed .brand-text {
	opacity: 0;
	transform: scaleX(0.5);
	pointer-events: none;
	width: 0;
	overflow: hidden;
}

.brand-eyebrow {
	font-size: 0.5445rem;
	font-weight: 500;
	letter-spacing: 0.2042rem;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.45);
	display: block;
	margin-bottom: 0.2042rem;
}

.brand-name {

	/* font-family: "Cormorant Garamond", serif; */
	font-size: 1.6335rem;
	font-weight: 600;
	color: #f2f5f7;
	line-height: 1;
	letter-spacing: 0.0203rem;
}

#mob-close {
	display: none;
	width: 1.9058rem;
	height: 1.9058rem;
	border: 0.068rem solid rgba(255, 255, 255, 0.15);
	border-radius: 0.2722rem;
	background: transparent;
	color: #9fb3c4;
	align-items: center;
	justify-content: center;
	font-size: 0.9528rem;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.18s cubic-bezier(0.4, 0, 0.2, 1), color 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar.collapsed #mob-close {
	display: none !important;
}

/* ── NAV SCROLL AREA ── */
.s-nav {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 0.5445rem 0;
	scrollbar-width: thin;
	scrollbar-color: #e8e8e8 transparent;
}

.s-nav::-webkit-scrollbar {
	width: 0.2042rem;
}

.s-nav::-webkit-scrollbar-thumb {
	background: #e8e8e8;
	border-radius: 0.2042rem;
}

.s-section-label {
	display: flex;
	align-items: center;
	gap: 0.5445rem;
	font-size: 0.5785rem;
	font-weight: 500;
	letter-spacing: 0.2042rem;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.4);
	padding: 0.9528rem 1.2252rem 0.4083rem;
	white-space: nowrap;
	overflow: hidden;
	max-height: 2.7225rem;
	transition: opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.18s cubic-bezier(0.4, 0, 0.2, 1), padding 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.s-section-label::after {
	content: "";
	flex: 1;
	height: 0.068rem;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), transparent);
}

#sidebar.collapsed .s-section-label {
	opacity: 0;
	pointer-events: none;
	max-height: 0;
	padding-top: 0;
	padding-bottom: 0;
}

.ni {
	position: relative;
}

.nl {
	display: flex;
	align-items: center;
	height: 2.7225rem;
	padding: 0 0.5445rem 0 0.7487rem;
	margin: 0.068rem 0.4083rem;
	border-radius: 0.2722rem;
	border-left: 0.1361rem solid transparent;
	cursor: pointer;
	color: #9fb3c4;
	font-size: 0.8848rem;
	font-weight: 400;
	letter-spacing: -0.0068rem;
	text-decoration: none;
	white-space: nowrap;
	user-select: none;
	transition: background 0.18s cubic-bezier(0.4, 0, 0.2, 1), color 0.18s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar.collapsed .nl {
	padding: 0;
	border-left: none;
	justify-content: center;
}

.nl:hover {
	background: rgba(255, 255, 255, 0.05);
	color: #ffffff;
}

.nl:hover .ni-icon {
	background: rgba(255, 255, 255, 0.1);
}

.nl.active {
	background: rgba(255, 255, 255, 0.08);
	border-left-color: #f2f5f7;
	color: #ffffff;
	font-weight: 500;
}

.nl.active .ni-icon {
	background: rgba(255, 255, 255, 0.16);
	color: #ffffff;
}

.ni-icon {
	font-size: 0.8848rem;
	flex-shrink: 0;
	width: 2.178rem;
	height: 2.178rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 0.2722rem;
	background: rgba(255, 255, 255, 0.06);
	color: #b9c8d6;
	margin-right: 0.6806rem;
	transition: background 0.18s cubic-bezier(0.4, 0, 0.2, 1), color 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar.collapsed .ni-icon {
	margin-right: 0;
}

.ni-label {
	flex: 1;
	overflow: hidden;
	white-space: nowrap;
	max-width: 13.6125rem;
	transition: opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar.collapsed .ni-label {
	opacity: 0;
	max-width: 0;
}

.ni-badge, .sl-badge {
	margin-left: auto;
	background: #e6ebef;
	color: #022238;
	font-size: 0.6806rem;
	font-weight: 600;
	line-height: 1;
	padding: 0.2042rem 0.4083rem;
	border-radius: 0.6806rem;
	flex-shrink: 0;
}

#sidebar.collapsed .ni-badge {
	display: none;
}

.ni-chev {
	font-size: 0.6806rem;
	color: #7d93a6;
	flex-shrink: 0;
	width: 1.089rem;
	height: 1.089rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar.collapsed .ni-chev {
	opacity: 0;
	width: 0;
	overflow: hidden;
}

.nl.open .ni-chev {
	transform: rotate(90deg);
}

.sub {
	overflow: hidden;
	max-height: 0;
	transition: max-height 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub.open {
	max-height: 27.225rem;
}

#sidebar.collapsed .sub {
	max-height: 0 !important;
}

.sl {
	display: flex;
	align-items: center;
	height: 2.3142rem;
	padding: 0 0.5445rem 0 1.7697rem;
	margin: 0.068rem 0.4083rem;
	border-radius: 0.2722rem;
	color: #a9bbca;
	font-size: 0.8508rem;
	text-decoration: none;
	cursor: pointer;
	gap: 0.5445rem;
	white-space: nowrap;
	transition: background 0.18s cubic-bezier(0.4, 0, 0.2, 1), color 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.sl:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #f5f5f5;
}

.sl.active {
	color: #ffffff;
	font-weight: 500;
}

.sl-dot {
	width: 0.2722rem;
	height: 0.2722rem;
	border-radius: 50%;
	background: currentColor;
	flex-shrink: 0;
}

/* ── Tooltips (modo colapsado) ── */
.ni-tip {
	pointer-events: none;
	position: absolute;
	left: 4.9005rem;
	top: 50%;
	transform: translateY(-50%);
	background: #01131f;
	color: #fff;
	font-size: 0.7487rem;
	font-weight: 500;
	padding: 0.3403rem 0.6806rem;
	border-radius: 0.2722rem;
	white-space: nowrap;
	z-index: 300;
	opacity: 0;
	transition: opacity 0.12s;
	box-shadow: 0 0.2722rem 0.8167rem rgba(0, 0, 0, 0.1), 0 0.1361rem 0.4083rem rgba(0, 0, 0, 0.08);
}

.ni-tip::before {
	content: "";
	position: absolute;
	right: 100%;
	top: 50%;
	transform: translateY(-50%);
	border: 0.3403rem solid transparent;
	border-right-color: #01131f;
}

#sidebar.collapsed .ni:hover .ni-tip {
	opacity: 1;
}

.s-footer .ni-tip {
	bottom: 1.089rem;
	top: auto;
	transform: none;
}

/* ═══════════════════════════════
           SIDEBAR FOOTER — USER BLOCK
        ═══════════════════════════════ */
.s-footer {
	margin-top: auto;
	border-top: 0.068rem solid rgba(255, 255, 255, 0.08);
	flex-shrink: 0;
	overflow: hidden;
	position: relative;
}

.s-user-row {
	display: flex;
	align-items: center;
	gap: 0.6806rem;
	padding: 0.8167rem 0.9528rem;
	cursor: pointer;
	color: #f4f4f2;
	user-select: none;
	transition: background 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.s-user-row:hover {
	background: rgba(255, 255, 255, 0.06);
}

.s-avatar {
	width: 2.178rem;
	height: 2.178rem;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	border: 0.068rem solid rgba(255, 255, 255, 0.22);
	color: #fff;
	font-family: "DM Sans", sans-serif;
	font-size: 0.8167rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	letter-spacing: -0.0203rem;
}

.s-user-info {
	flex: 1;
	overflow: hidden;
	white-space: nowrap;
	max-width: 13.6125rem;
	transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar.collapsed .s-user-info {
	opacity: 0;
	max-width: 0;
}

.s-user-name {
	font-family: "DM Sans", sans-serif;
	font-size: 0.8508rem;
	font-weight: 500;
	color: #e2e2e2;
	letter-spacing: -0.0068rem;
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
}

.s-user-id {
	font-family: "DM Mono", monospace;
	font-size: 0.6467rem;
	color: #9db1c1;
	display: block;
	margin-top: 0.068rem;
}

.s-user-caret {
	font-size: 0.6806rem;
	color: #9db1c1;
	flex-shrink: 0;
	transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar.collapsed .s-user-caret {
	opacity: 0;
	width: 0;
	overflow: hidden;
}

.s-user-row.open .s-user-caret {
	transform: rotate(180deg);
}

.s-user-dropdown {
	overflow: hidden;
	max-height: 0;
	background: rgba(255, 255, 255, 0.03);
	border-top: 0.068rem solid rgba(255, 255, 255, 0.08);
	box-shadow: inset 0 0.068rem 0 rgba(255, 255, 255, 0.04);
	transition: max-height 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

.s-user-dropdown.open {
	max-height: 21.78rem;
}

#sidebar.collapsed .s-user-dropdown {
	max-height: 0 !important;
}

.s-user-card {
	padding: 0.9528rem 1.089rem 0.6806rem;
	border-bottom: 0.068rem solid rgba(255, 255, 255, 0.08);
}

.s-user-card-name {
	font-size: 1.157rem;
	font-weight: 600;
	color: #f5f5f7;
	letter-spacing: -0.0136rem;
	display: block;
	margin-bottom: 0.4083rem;
}

.s-user-card-meta {
	font-family: "DM Mono", monospace;
	font-size: 0.6806rem;
	color: #9db1c1;
	display: flex;
	flex-direction: column;
	gap: 0.2042rem;
}

.s-user-card-meta span {
	display: flex;
	align-items: center;
	gap: 0.4083rem;
}

.s-user-card-meta i {
	font-size: 0.6806rem;
	width: 0.8167rem;
	flex-shrink: 0;
	color: #9db1c1;
}

.s-user-actions {
	padding: 0.4083rem 0;
}

.s-ua-item {
	display: flex;
	align-items: center;
	gap: 0.6806rem;
	height: 2.4503rem;
	padding: 0 1.089rem;
	font-family: "DM Sans", sans-serif;
	font-size: 0.8508rem;
	color: #e5e5e7;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	background: transparent;
	border: none;
	width: 100%;
	text-align: left;
	transition: background 0.14s, color 0.14s;
}

.s-ua-item:hover {
	background: #f4f4f2;
	color: #111110;
}

.s-ua-item i {
	font-size: 0.8848rem;
	color: #7d93a6;
	width: 1.089rem;
	flex-shrink: 0;
	transition: color 0.14s;
}

.s-ua-item:hover i {
	color: #445a68;
}

.s-ua-item.logout {
	color: #c8001a;
	border-top: 0.068rem solid rgba(255, 255, 255, 0.08);
	margin-top: 0.1361rem;
}

.s-ua-item.logout i {
	color: rgba(200, 0, 26, 0.5);
}

.s-ua-item.logout:hover {
	background: rgba(200, 0, 26, 0.06);
	color: #c8001a;
}

.s-ua-item.logout:hover i {
	color: #c8001a;
}

/* ── FLOATING COLLAPSE TOGGLE ── */
#s-toggle {
	position: fixed;
	top: 1.4973rem;
	line-height: normal;
	left: 17.6963rem;
	transform: translateX(-50%);
	width: 1.17rem;
	height: 1.17rem;
	border: 0.1022rem solid rgba(2, 34, 56, 0.15);
	border-radius: 50%;
	background: #fff;
	color: #022238;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 0.63rem;
	z-index: 210;
	box-shadow: 0 0.068rem 0.2042rem rgba(2, 34, 56, 0.15), 0 0.068rem 0.1361rem rgba(2, 34, 56, 0.08);
	transition: left 0.18s cubic-bezier(0.4, 0, 0.2, 1), background 0.18s cubic-bezier(0.4, 0, 0.2, 1), color 0.18s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

#s-toggle:hover {
	background: #022238;
	color: #fff;
	border-color: #022238;
}

#s-toggle .ti {
	display: block;
	transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

#s-toggle.is-collapsed .ti {
	transform: rotate(180deg);
}

@media (max-width:768px) {
	#s-toggle {
		display: none;
	}

}

/* ═══════════════════════════════
           MOBILE TOPBAR / OVERLAY
        ═══════════════════════════════ */
#mob-topbar {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 3.8115rem;
	border-bottom: 0.068rem solid rgba(255, 255, 255, 0.08);
	align-items: center;
	padding: 0 1.3613rem;
	gap: 0.9528rem;
	z-index: 198;
	background-color: #022238;
	box-shadow: 0 0.068rem 0.2042rem rgba(0, 0, 0, 0.08), 0 0.068rem 0.1361rem rgba(0, 0, 0, 0.06);
}

#mob-open-btn {
	width: 2.178rem;
	height: 2.178rem;
	background: transparent;
	border: none;
	color: #b9c8d6;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.089rem;
	cursor: pointer;
	flex-shrink: 0;
}

.mob-brand-name {

	/* font-family: "Cormorant Garamond", serif; */
	font-size: 1.4973rem;
	font-weight: 600;
	color: #f2f5f7;
	letter-spacing: 0.0203rem;
}

#overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.3);
	z-index: 199;
	backdrop-filter: blur(0.068rem);
}

#overlay.on {
	display: block;
}

/* ═══════════════════════════════
           RESPONSIVE
        ═══════════════════════════════ */
@media (max-width:768px) {
	#sidebar {
		background-color: #022238;
		width: 17.6963rem !important;
		transform: translateX(-100%);
		transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
	}

	#sidebar.mob-open {
		transform: translateX(0);
	}

	#sidebar .brand-text, #sidebar .s-section-label, #sidebar .ni-label, #sidebar .ni-chev {
		opacity: 1 !important;
	}

	#sidebar .brand-text {
		transform: none !important;
		width: auto !important;
		overflow: visible !important;
	}

	#sidebar .s-brand {
		justify-content: flex-start !important;
		padding: 0.8167rem !important;
		gap: 0.6806rem !important;
	}

	#sidebar .s-section-label {
		pointer-events: all !important;
		max-height: 2.7225rem !important;
		padding: 0.9528rem 1.2252rem 0.4083rem !important;
	}

	#sidebar .ni-label {
		max-width: 13.6125rem !important;
	}

	#sidebar .ni-chev {
		width: 1.089rem !important;
		overflow: visible !important;
	}

	#sidebar .ni-icon {
		margin-right: 0.6806rem !important;
	}

	#sidebar .nl {
		padding: 0 0.5445rem !important;
		justify-content: flex-start !important;
	}

	#mob-close {
		display: flex !important;
		background: transparent;
		color: #b9c8d6;
		border: none;
	}

	#mob-topbar {
		display: flex;
		background-color: #022238;
	}

}

::-webkit-scrollbar {
	width: 0.3403rem;
}

::-webkit-scrollbar-track {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	background: #e8e8e8;
	border-radius: 0.2042rem;
}
