/* ==========================================================================
   MUN Delegate Hub - portal (dashboard, admin y chair)
   Reproduce DashboardLayout.tsx y los componentes de los dashboards del
   proyecto original (Card, Badge, Button, LanguageSwitcher "sidebar").
   Breakpoints de Tailwind: sm 640px, md 768px. Se carga junto con
   mun_auth.css (inputs, alertas y boton de ancho completo).
   ========================================================================== */

/* ---- Estructura: cabecera movil + barra lateral + contenido ---- */

.portal {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background-color: hsl(var(--background));
}

.portal-toggle {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.portal-topbar {
	position: sticky;
	top: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem;
}

.portal-topbar__brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.portal-topbar__label {
	font-size: 0.75rem;
	line-height: 1rem;
	color: hsl(var(--sidebar-foreground) / 0.7);
}

.portal-topbar__tools {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.portal-burger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 9999px;
	color: hsl(var(--sidebar-foreground));
	cursor: pointer;
}

.portal-burger .icon {
	width: 1.5rem;
	height: 1.5rem;
}

.portal-burger:hover {
	background-color: hsl(var(--accent));
	color: hsl(var(--accent-foreground));
}

.portal-logo {
	display: inline-flex;
	padding: 0.5rem 0.75rem;
	border-radius: 0.5rem;
	background-color: hsl(var(--background));
}

.portal-logo img {
	height: 2rem;
	object-fit: contain;
	object-position: left;
}

.portal-logo--sm {
	padding: 0.375rem 0.5rem;
}

.portal-logo--sm img {
	height: 1.5rem;
}

/* barra lateral: en movil es un panel que se abre con el boton; desde md queda fija */
.portal-side {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 50;
	display: flex;
	flex-direction: column;
	width: 18rem;
	color: hsl(var(--sidebar-foreground));
	transform: translateX(-100%);
	transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-toggle:checked ~ .portal-side {
	transform: translateX(0);
}

.portal-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 45;
	background-color: hsl(0 0% 0% / 0.5);
}

.portal-toggle:checked ~ .portal-backdrop {
	display: block;
}

.portal-main {
	flex: 1 1 0%;
	min-width: 0;
	overflow: auto;
}

@media (min-width: 768px) {
	.portal { flex-direction: row; }
	.portal-topbar,
	.portal-backdrop,
	.portal-toggle:checked ~ .portal-backdrop { display: none; }
	.portal-side {
		position: sticky;
		z-index: auto;
		flex-shrink: 0;
		width: 16rem;
		height: 100vh;
		transform: none;
	}
}

.portal-side__head {
	padding: 1rem;
	border-bottom: 1px solid hsl(var(--sidebar-border));
}

.portal-side__brand {
	display: block;
}

.portal-side__portal {
	display: block;
	margin-top: 0.5rem;
	font-size: 0.75rem;
	line-height: 1rem;
	color: hsl(var(--sidebar-foreground) / 0.7);
}

@media (min-width: 768px) {
	.portal-side__head { padding: 1.5rem; }
}

.portal-nav {
	flex: 1 1 0%;
	padding: 0.75rem;
	overflow-y: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.portal-nav::-webkit-scrollbar {
	display: none;
}

@media (min-width: 768px) {
	.portal-nav { padding: 1rem; }
}

.portal-nav__section + .portal-nav__section {
	margin-top: 1rem;
}

.portal-nav__title {
	padding: 0 1rem 0.25rem;
	font-size: 11px;
	line-height: 1rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: hsl(var(--sidebar-foreground) / 0.5);
}

.portal-nav__item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-top: 0.25rem;
	padding: 0.625rem 1rem;
	border-radius: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: hsl(var(--sidebar-foreground) / 0.75);
	transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-nav__item .icon {
	width: 1.25rem;
	height: 1.25rem;
}

.portal-nav__item:hover {
	background-color: hsl(var(--sidebar-accent));
	color: hsl(var(--sidebar-foreground));
}

.portal-nav__item.is-active,
.portal-nav__item.is-active:hover {
	background-color: hsl(var(--sidebar-primary));
	color: hsl(var(--sidebar-primary-foreground));
	font-weight: 600;
	box-shadow: var(--shadow-gold);
}

.portal-nav__chev {
	width: 1rem !important;
	height: 1rem !important;
	margin-left: auto;
}

/* opciones de modulos que aun no estan construidos */
.portal-nav__item.is-disabled,
.portal-nav__item.is-disabled:hover {
	background-color: transparent;
	color: hsl(var(--sidebar-foreground) / 0.75);
	cursor: default;
}

.portal-side__foot {
	padding: 0.75rem;
	border-top: 1px solid hsl(var(--sidebar-border));
}

@media (min-width: 768px) {
	.portal-side__foot { padding: 1rem; }
}

.portal-side__lang {
	padding: 0 1rem 0.75rem;
}

.portal-side__lang .portal-nav__title {
	padding: 0;
	margin-bottom: 0.375rem;
}

.portal-user {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.5rem;
	padding: 0.75rem 1rem;
}

.portal-user__avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 2rem;
	height: 2rem;
	border-radius: 9999px;
	background-color: hsl(var(--sidebar-primary) / 0.3);
	font-size: 0.875rem;
	font-weight: 500;
	color: hsl(var(--sidebar-primary));
}

.portal-user__data {
	flex: 1 1 0%;
	min-width: 0;
}

.portal-user__email {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.875rem;
	font-weight: 500;
	color: hsl(var(--sidebar-foreground));
}

.portal-user__role {
	font-size: 0.75rem;
	text-transform: capitalize;
	color: hsl(var(--sidebar-foreground) / 0.6);
}

.portal-signout {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	height: 2.5rem;
	padding: 0.5rem 1rem;
	border-radius: 9999px;
	font-size: 0.875rem;
	font-weight: 500;
	color: hsl(var(--sidebar-foreground) / 0.7);
	transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-signout .icon {
	width: 1rem;
	height: 1rem;
}

.portal-signout:hover {
	background-color: hsl(var(--sidebar-accent) / 0.5);
	color: hsl(var(--sidebar-foreground));
}

/* selector de idioma sobre la barra lateral oscura (LanguageSwitcher variant="sidebar") */
.mun-lang--sidebar {
	background-color: hsl(var(--sidebar-accent) / 0.6);
}

.mun-lang--sidebar .mun-lang__btn {
	color: hsl(var(--sidebar-foreground) / 0.7);
}

.mun-lang--sidebar .mun-lang__btn:hover {
	background-color: transparent;
	color: hsl(var(--sidebar-foreground));
}

.mun-lang--sidebar .mun-lang__btn[aria-current="true"],
.mun-lang--sidebar .mun-lang__btn[aria-current="true"]:hover {
	background-color: hsl(var(--sidebar-primary));
	color: hsl(var(--sidebar-primary-foreground));
	box-shadow: var(--shadow-sm);
}

/* ---- Contenido de las paginas ---- */

.portal-page {
	padding: 1rem;
}

.portal-page--narrow {
	max-width: 42rem;
	margin: 0 auto;
}

@media (min-width: 768px) {
	.portal-page { padding: 2rem; }
}

.portal-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 2rem;
}

.portal-title {
	font-family: var(--font-display);
	font-size: 1.5rem;
	line-height: 2rem;
	font-weight: 700;
	letter-spacing: normal;
	color: hsl(var(--foreground));
}

.portal-title--lg {
	margin-bottom: 0.5rem;
	font-size: 1.875rem;
	line-height: 2.25rem;
}

@media (min-width: 768px) {
	.portal-title { font-size: 1.875rem; line-height: 2.25rem; }
}

.portal-title-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.25rem;
}

.portal-muted {
	color: hsl(var(--muted-foreground));
}

.portal-block {
	margin-bottom: 2rem;
}

.portal-grid {
	display: grid;
	gap: 1.5rem;
	margin-bottom: 2rem;
}

@media (min-width: 768px) {
	.portal-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.portal-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
	.portal-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* frase de ayuda con enlace a los organizadores (HelpLine.tsx) */
.portal-help {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.375rem;
	margin-top: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: hsl(var(--muted-foreground));
}

.portal-help__link {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-weight: 500;
	color: hsl(var(--primary));
	text-decoration: underline;
	text-underline-offset: 2px;
}

.portal-help__link .icon {
	width: 0.875rem;
	height: 0.875rem;
}

.portal-help__link.is-disabled {
	cursor: default;
}

/* ---- Tarjetas (card.tsx) ---- */

.portal-card--primary {
	border-color: hsl(var(--primary) / 0.4);
	background-color: hsl(var(--primary) / 0.05);
}

.portal-card__head {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	padding: 1.5rem;
}

.portal-card__head--sm {
	padding-bottom: 0.75rem;
}

.portal-card__title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1.5rem;
	line-height: 1;
	font-weight: 600;
	letter-spacing: -0.025em;
}

.portal-card__title--md {
	font-size: 1.125rem;
	line-height: 1.75rem;
}

.portal-card__title--base {
	font-size: 1rem;
	line-height: 1.5rem;
}

.portal-card__title .icon {
	width: 1.25rem;
	height: 1.25rem;
}

.portal-card__desc {
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: hsl(var(--muted-foreground));
}

.portal-card__body {
	padding: 0 1.5rem 1.5rem;
}

.portal-card__body--pt {
	padding-top: 1.5rem;
}

.portal-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.portal-card__actions--sm {
	gap: 0.5rem;
}

/* tarjeta de cifra (stats) */
.portal-stat {
	display: block;
	transition: box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-stat:hover {
	box-shadow: var(--shadow-xl);
}

.portal-stat__body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.5rem;
}

.portal-stat__label {
	margin-bottom: 0.25rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: hsl(var(--muted-foreground));
}

.portal-stat__value {
	font-size: 1.875rem;
	line-height: 2.25rem;
	font-weight: 700;
}

.portal-stat__sub {
	margin-top: 0.25rem;
	font-size: 0.75rem;
	line-height: 1rem;
	color: hsl(var(--muted-foreground));
}

.portal-stat__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 3rem;
	height: 3rem;
	border-radius: 0.75rem;
}

.portal-stat__icon .icon {
	width: 1.5rem;
	height: 1.5rem;
}

.portal-stat__icon--primary { background-color: hsl(var(--primary) / 0.1); color: hsl(var(--primary)); }
.portal-stat__icon--secondary { background-color: hsl(var(--secondary) / 0.2); color: hsl(var(--secondary)); }

/* ---- Botones extra (button.tsx: outline, secondary, icon) ---- */

.mun-btn--outline {
	border: 1px solid hsl(var(--input));
	background-color: hsl(var(--background));
}

.mun-btn--outline:hover {
	background-color: hsl(var(--accent));
	color: hsl(var(--accent-foreground));
}

.mun-btn--secondary {
	background-color: hsl(var(--secondary));
	color: hsl(var(--secondary-foreground));
}

.mun-btn--secondary:hover {
	background-color: hsl(var(--secondary) / 0.8);
}

.mun-btn--icon {
	width: 2.5rem;
	padding: 0;
}

/* opciones de modulos aun no construidos: se ven igual que en el original pero no responden */
.mun-btn.is-disabled {
	pointer-events: none;
}

/* ---- Etiqueta de estado (badge.tsx) ---- */

.portal-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.125rem 0.625rem;
	border: 1px solid transparent;
	border-radius: 9999px;
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 600;
}

.portal-badge .icon {
	width: 0.75rem;
	height: 0.75rem;
}

.portal-badge--default { background-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.portal-badge--secondary { background-color: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.portal-badge--destructive { background-color: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); }
.portal-badge--outline { border-color: hsl(var(--border)); color: hsl(var(--foreground)); }

/* ---- Pasos de bienvenida y avance de la solicitud ---- */

.portal-onboard {
	display: grid;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.portal-onboard li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.portal-onboard__n {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 9999px;
	background-color: hsl(var(--muted));
	font-size: 0.875rem;
	font-weight: 700;
	color: hsl(var(--muted-foreground));
}

.portal-onboard__n .icon {
	width: 1rem;
	height: 1rem;
}

.portal-onboard__n.is-done { background-color: hsl(var(--success)); color: hsl(var(--primary-foreground)); }
.portal-onboard__n.is-current { background-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }

.portal-onboard__t {
	padding-top: 0.25rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: hsl(var(--muted-foreground));
}

.portal-onboard__t.is-current {
	font-weight: 500;
	color: hsl(var(--foreground));
}

.portal-steps {
	display: grid;
	gap: 0.5rem;
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
}

.portal-steps li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.portal-step__mark {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.125rem;
	border-radius: 9999px;
}

.portal-step__mark--done {
	background-color: hsl(var(--success));
	color: hsl(var(--primary-foreground));
}

.portal-step__mark--done .icon {
	width: 0.75rem;
	height: 0.75rem;
	stroke-width: 3;
}

.portal-step__mark--open {
	color: hsl(var(--muted-foreground) / 0.4);
}

.portal-step__mark--open.is-active {
	color: hsl(var(--primary));
}

.portal-step__mark--open .icon {
	width: 1.25rem;
	height: 1.25rem;
}

.portal-step__label {
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 500;
}

.portal-step__label.is-active {
	font-weight: 600;
}

.portal-step__desc {
	font-size: 0.75rem;
	line-height: 1rem;
	color: hsl(var(--muted-foreground));
}

.portal-error {
	margin: 0 0 1.25rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: hsl(var(--destructive));
}

/* ---- Fechas limite ---- */

.portal-deadline {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid hsl(var(--border));
}

.portal-deadline + .portal-deadline {
	margin-top: 0.75rem;
}

.portal-deadline:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.portal-deadline__title {
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 500;
}

.portal-deadline__desc {
	font-size: 0.75rem;
	line-height: 1rem;
	color: hsl(var(--muted-foreground));
}

.portal-deadline__when {
	flex-shrink: 0;
	text-align: right;
}

.portal-deadline__rel {
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 500;
	color: hsl(var(--secondary));
}

.portal-deadline__date {
	font-size: 10px;
	line-height: 1rem;
	color: hsl(var(--muted-foreground));
}

/* ---- Formulario de configuracion del colegio ---- */

.portal-setup__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 4rem;
	height: 4rem;
	margin: 0 auto 1rem;
	border-radius: 1rem;
	color: hsl(var(--primary-foreground));
}

.portal-setup__icon .icon {
	width: 2rem;
	height: 2rem;
}

.portal-setup__head {
	margin-bottom: 2rem;
	text-align: center;
}

.portal-form {
	display: grid;
	gap: 1.5rem;
}

.portal-field {
	display: grid;
	gap: 0.5rem;
}

.portal-field__hint {
	font-size: 0.75rem;
	line-height: 1rem;
	color: hsl(var(--muted-foreground));
}

.portal-required {
	color: hsl(var(--destructive));
}

/* ---- Preferencias de comites ---- */

.portal-prefs {
	display: grid;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

@media (min-width: 640px) {
	.portal-prefs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.portal-pref {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.5rem;
	cursor: pointer;
}

.portal-pref:hover {
	background-color: hsl(var(--muted) / 0.5);
}

.portal-pref input {
	flex-shrink: 0;
	width: 1rem;
	height: 1rem;
	margin: 0;
	accent-color: hsl(var(--primary));
}

.portal-pref__name {
	flex: 1 1 0%;
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.portal-pref__rank {
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 600;
	color: hsl(var(--primary));
}

/* ---- Tarjetas de comites del chair ---- */

.portal-committees {
	display: grid;
	gap: 1rem;
}

@media (min-width: 768px) {
	.portal-committees { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.portal-empty {
	padding: 1.5rem;
	text-align: center;
	color: hsl(var(--muted-foreground));
}

/* ---- Cola de revision del administrador ---- */

.portal-queue__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid hsl(var(--border));
}

.portal-queue__row + .portal-queue__row {
	margin-top: 0.5rem;
}

.portal-queue__row:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.portal-queue__name {
	font-weight: 500;
}

.portal-queue__when {
	font-size: 0.75rem;
	line-height: 1rem;
	color: hsl(var(--muted-foreground));
}

/* ---- Mis estudiantes: tabla, ventanas (dialog) y formulario del delegado ---- */

.portal-head__tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.portal-head--wrap {
	flex-wrap: wrap;
	align-items: center;
}

.portal-table-wrap {
	width: 100%;
	overflow-x: auto;
}

.portal-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.portal-table th {
	height: 3rem;
	padding: 0 1rem;
	text-align: left;
	font-weight: 500;
	white-space: nowrap;
	color: hsl(var(--muted-foreground));
	border-bottom: 1px solid hsl(var(--border));
}

.portal-table td {
	padding: 1rem;
	vertical-align: middle;
	border-bottom: 1px solid hsl(var(--border));
}

.portal-table tbody tr:last-child td {
	border-bottom: 0;
}

.portal-table tbody tr:hover {
	background-color: hsl(var(--muted) / 0.5);
}

.portal-table .is-right {
	text-align: right;
}

.portal-cell-name {
	font-weight: 500;
}

.portal-cell-sub {
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 400;
	color: hsl(var(--muted-foreground));
}

.portal-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.5rem;
}

.mun-btn--icon.mun-btn--ghost {
	color: inherit;
}

.mun-btn--danger-ghost {
	color: hsl(var(--destructive));
}

.mun-btn--danger-ghost:hover {
	background-color: hsl(var(--accent));
	color: hsl(var(--destructive));
}

.mun-btn--destructive {
	background-color: hsl(var(--destructive));
	color: hsl(var(--destructive-foreground));
}

.mun-btn--destructive:hover {
	background-color: hsl(var(--destructive) / 0.9);
}

.portal-badge--success {
	border-color: hsl(var(--success) / 0.2);
	background-color: hsl(var(--success) / 0.1);
	color: hsl(var(--success));
}

.portal-badge--cap {
	text-transform: capitalize;
}

.portal-empty-state {
	padding: 3rem 0;
	text-align: center;
}

.portal-empty-state > .icon {
	width: 3rem;
	height: 3rem;
	margin: 0 auto 1rem;
	color: hsl(var(--muted-foreground) / 0.5);
}

.portal-empty-state p {
	margin-bottom: 1rem;
	color: hsl(var(--muted-foreground));
}

/* ventana (Dialog): Bootstrap Modal; el contenido se carga desde un include (delegates_form, _borrar, _masivo) */
.mun-dialog {
	--bs-modal-width: 32rem;
	--bs-modal-margin: 1rem;
}

.mun-dialog--lg {
	--bs-modal-width: 42rem;
}

.modal-backdrop {
	--bs-backdrop-opacity: 0.8;
}

.portal-modal__panel {
	display: flex;
	flex-direction: column;
	max-height: 90vh;
	max-height: 90dvh;
	padding: 1.5rem;
	overflow: hidden;
	border: 1px solid hsl(var(--border));
	border-radius: 0.5rem;
	background-color: hsl(var(--background));
	box-shadow: var(--shadow-lg);
}

.portal-modal__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	display: inline-flex;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	opacity: 0.7;
	border-radius: 0.125rem;
	cursor: pointer;
}

.portal-modal__close:hover {
	opacity: 1;
}

.portal-modal__close .icon {
	width: 1rem;
	height: 1rem;
}

.portal-modal__head {
	flex-shrink: 0;
	padding-bottom: 1rem;
}

.portal-modal__title {
	font-size: 1.125rem;
	line-height: 1;
	font-weight: 600;
	letter-spacing: -0.025em;
}

.portal-modal__desc {
	margin-top: 0.375rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: hsl(var(--muted-foreground));
}

.portal-modal__form {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

.portal-modal__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	display: grid;
	gap: 1rem;
	align-content: start;
	padding-right: 0.25rem;
}

.portal-modal__foot {
	flex-shrink: 0;
	display: flex;
	flex-direction: column-reverse;
	gap: 0.75rem;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid hsl(var(--border));
	background-color: hsl(var(--background));
}

.portal-modal__foot .mun-btn {
	width: 100%;
}

@media (min-width: 640px) {
	.portal-modal__foot { flex-direction: row; justify-content: flex-end; }
	.portal-modal__foot .mun-btn { width: auto; }
}

.portal-grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.portal-section {
	display: grid;
	gap: 1rem;
	padding-top: 1rem;
	border-top: 1px solid hsl(var(--border));
}

.portal-section__title {
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 600;
	color: hsl(var(--muted-foreground));
}

.portal-section__title--fg {
	color: hsl(var(--foreground));
}

.portal-note {
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: hsl(var(--muted-foreground));
}

.portal-waiver {
	padding: 0.75rem;
	border-radius: 0.375rem;
	background-color: hsl(var(--muted) / 0.4);
	line-height: 1.625;
}

.portal-check {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
	cursor: pointer;
}

.portal-check input {
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
	margin: 0.25rem 0 0;
	accent-color: hsl(var(--primary));
}

textarea.mun-input {
	height: auto;
	resize: vertical;
}

select.mun-input {
	appearance: auto;
}

/* subida de lista (BulkStudentUpload) */
.portal-bulk-cols {
	display: grid;
	gap: 0.25rem;
	margin: 0;
	padding: 0.75rem;
	list-style: none;
	border: 1px solid hsl(var(--border));
	border-radius: 0.5rem;
	background-color: hsl(var(--muted) / 0.3);
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.portal-bulk-cols li {
	display: flex;
	flex-wrap: wrap;
	column-gap: 0.5rem;
}

.portal-bulk-cols .is-req { color: hsl(var(--destructive)); }

.portal-bulk-file {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

/* el boton "Choose CSV file" es una etiqueta con el campo de archivo oculto dentro (como en el original) */
.portal-bulk-file label.mun-btn {
	cursor: pointer;
}

.portal-bulk-file input[type="file"] {
	display: none;
}

.portal-callout {
	display: flex;
	gap: 0.5rem;
	padding: 0.75rem;
	border: 1px solid hsl(var(--destructive) / 0.4);
	border-radius: 0.5rem;
	background-color: hsl(var(--destructive) / 0.05);
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.portal-callout .icon {
	width: 1rem;
	height: 1rem;
	margin-top: 0.125rem;
	color: hsl(var(--destructive));
}

.portal-bulk-preview {
	max-height: 16rem;
	overflow: auto;
	border: 1px solid hsl(var(--border));
	border-radius: 0.5rem;
}

.portal-bulk-preview .portal-table th {
	position: sticky;
	top: 0;
	height: auto;
	padding: 0.5rem;
	background-color: hsl(var(--muted) / 0.5);
}

.portal-bulk-preview .portal-table td {
	padding: 0.5rem;
}

.portal-bulk-preview tr.is-bad td {
	background-color: hsl(var(--destructive) / 0.05);
}

.portal-text-danger {
	font-size: 0.75rem;
	line-height: 1rem;
	color: hsl(var(--destructive));
}

.portal-text-danger--md {
	font-size: 0.875rem;
	line-height: 1.25rem;
}
/* ---- Aviso emergente (toast de Sonner): abajo a la derecha, desaparece solo a los 4 segundos ---- */

.mun-toast {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 100;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: calc(100% - 2rem);
	max-width: 356px;
	padding: 1rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.5rem;
	background-color: hsl(var(--popover));
	color: hsl(var(--popover-foreground));
	box-shadow: 0 4px 12px hsl(0 0% 0% / 0.1);
	font-size: 13px;
	line-height: 1.5;
}

/* Bootstrap Toast: oculto hasta que portal_toast.js lo muestra (.show) */
.toast.mun-toast.show {
	display: flex;
}

@media (min-width: 600px) {
	.mun-toast { right: 1.5rem; bottom: 1.5rem; }
}

.mun-toast__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 1rem;
	height: 1rem;
	border-radius: 9999px;
}

.mun-toast__icon .icon {
	width: 0.625rem;
	height: 0.625rem;
	stroke-width: 3;
}

.mun-toast__icon--ok {
	background-color: hsl(var(--foreground));
	color: hsl(var(--background));
}

.mun-toast__icon--error {
	color: hsl(var(--destructive));
}

.mun-toast__icon--error .icon {
	width: 1rem;
	height: 1rem;
	stroke-width: 2;
}

.mun-toast__text {
	font-weight: 500;
}

.mun-btn:disabled {
	pointer-events: none;
	opacity: 0.5;
}

/* ---- Ajustes de fidelidad (icono con mr-2 / mr-1 dentro de un boton con gap-2 en el original) ---- */

.mun-btn .icon.icon--mr2 { margin-right: 0.5rem; }
.mun-btn .icon.icon--mr1 { margin-right: 0.25rem; }

/* papelera roja (text-destructive hover:text-destructive) */
.mun-btn--icon.mun-btn--danger-ghost,
.mun-btn--icon.mun-btn--danger-ghost:hover {
	color: hsl(var(--destructive));
}

/* Sign Out: icono con mr-3 y gap-2 */
.portal-signout {
	gap: 1.25rem;
}
/* ---- Pantallas del administrador (Schools, All Delegates) ---- */

.portal-page--admin {
	padding: 2rem;
}

.portal-filters {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
	.portal-filters { flex-direction: row; }
}

.portal-search {
	position: relative;
	flex: 1 1 0%;
}

.portal-search .icon {
	position: absolute;
	top: 50%;
	left: 0.75rem;
	width: 1rem;
	height: 1rem;
	transform: translateY(-50%);
	color: hsl(var(--muted-foreground));
}

.portal-search .mun-input {
	padding-left: 2.5rem;
}

.portal-select-180 { width: 180px; }
.portal-select-130 { width: 130px; margin-left: auto; }

.portal-empty-cell {
	padding: 2rem 1rem;
	text-align: center;
	color: hsl(var(--muted-foreground));
}

.portal-link-name {
	font-weight: 500;
	color: hsl(var(--primary));
}

.portal-inline {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.portal-inline .icon {
	width: 1rem;
	height: 1rem;
	color: hsl(var(--muted-foreground));
}

.portal-dl {
	display: grid;
	gap: 0.75rem;
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.portal-dl dt {
	font-weight: 400;
	color: hsl(var(--muted-foreground));
}

.portal-dl dd {
	margin: 0;
	font-weight: 500;
	white-space: pre-wrap;
}

.portal-plan {
	max-height: 18rem;
	margin: 0;
	padding: 0 0.75rem 0 0;
	overflow-y: auto;
	list-style: none;
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.portal-plan li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.25rem 0;
	border-bottom: 1px solid hsl(var(--border) / 0.5);
}

.portal-link-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	color: hsl(var(--primary));
}

.portal-link-btn:hover {
	text-decoration: underline;
}

.portal-link-btn .icon {
	width: 1rem;
	height: 1rem;
}

.mun-btn--sm-text {
	height: 2.25rem;
	padding: 0 0.75rem;
	border-radius: calc(var(--radius) - 2px);
	gap: 0.25rem;
}
/* barra de progreso (Progress) */
.portal-bar {
	height: 1rem;
	overflow: hidden;
	border-radius: 9999px;
	background-color: hsl(var(--muted));
}

.portal-bar__fill {
	height: 100%;
	border-radius: 9999px;
	transition: width 500ms;
}

.portal-bar__fill--success { background-color: hsl(var(--success)); }
.portal-bar__fill--primary { background-color: hsl(var(--primary)); }
.portal-head--end {
	align-items: flex-end;
}

/* ---- Committees y asignacion del administrador ---- */

.portal-row-click {
	cursor: pointer;
}

.portal-row-roster td {
	padding: 1rem;
	background-color: hsl(var(--muted) / 0.3);
}

.portal-mini-bar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.portal-mini-bar__track {
	width: 5rem;
	height: 0.5rem;
	overflow: hidden;
	border-radius: 9999px;
	background-color: hsl(var(--muted));
}

.portal-mini-bar__fill {
	height: 100%;
	border-radius: 9999px;
	background-color: hsl(var(--primary));
}

.portal-grid--lg2 {
	display: grid;
	gap: 1.5rem;
	margin-bottom: 2rem;
}

@media (min-width: 1024px) {
	.portal-grid--lg2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.portal-scroll {
	max-height: 300px;
	overflow-y: auto;
	display: grid;
	gap: 0.5rem;
	align-content: start;
}

.portal-scroll--360 { max-height: 360px; }
.portal-scroll--420 { max-height: 420px; }

.portal-pick {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.5rem;
	cursor: pointer;
	transition: background-color 150ms, border-color 150ms;
}

.portal-pick:hover {
	background-color: hsl(var(--muted) / 0.5);
}

.portal-pick:has(input:checked) {
	border-color: hsl(var(--primary));
	background-color: hsl(var(--primary) / 0.05);
}

.portal-pick input {
	flex-shrink: 0;
	width: 1rem;
	height: 1rem;
	margin: 0;
	accent-color: hsl(var(--primary));
}

.portal-pick--plain input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.portal-pick__body {
	flex: 1 1 0%;
	min-width: 0;
}

.portal-pick__title {
	font-weight: 500;
}

.portal-pick__sub {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: hsl(var(--muted-foreground));
}

.portal-pick__sub .portal-badge {
	font-size: 0.75rem;
	font-weight: 600;
	color: hsl(var(--foreground));
}

.portal-row-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.5rem;
}

.portal-row-item__body {
	flex: 1 1 0%;
}

.portal-badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-top: 1rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.portal-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.5rem;
	margin-bottom: 2rem;
}

.portal-empty-note {
	padding: 2rem 0;
	text-align: center;
	color: hsl(var(--muted-foreground));
}

.portal-empty-card {
	padding: 3rem 1rem;
	text-align: center;
	color: hsl(var(--muted-foreground));
}

.portal-empty-card .icon {
	width: 2.5rem;
	height: 2.5rem;
	margin: 0 auto 0.75rem;
	opacity: 0.5;
}

.portal-label-sm {
	font-size: 0.875rem;
	line-height: 1;
	font-weight: 500;
}

.portal-mb-4 { margin-bottom: 1rem; }
[hidden] {
	display: none !important;
}

.portal-filters--col {
	flex-direction: column !important;
	gap: 0;
}

.portal-pick--plain {
	position: relative;
}

/* ---- Ajustes de fidelidad con los controles de shadcn ---- */

/* selector (Select): flecha fina a la derecha en lugar de la del navegador */
select.mun-input {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 2.25rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b5b4a' stroke-opacity='0.5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 1rem;
}

/* casilla (Checkbox): cuadro con borde dorado que se rellena al marcar */
.portal-pick input[type="checkbox"],
.portal-pref input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 1rem;
	height: 1rem;
	border: 1px solid hsl(var(--primary));
	border-radius: 2px;
	background-color: transparent;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 0.75rem;
}

.portal-pick input[type="checkbox"]:checked,
.portal-pref input[type="checkbox"]:checked {
	background-color: hsl(var(--primary));
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.portal-pick input[type="checkbox"]:focus-visible,
.portal-pref input[type="checkbox"]:focus-visible {
	outline: 2px solid transparent;
	box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}

/* etiqueta sencilla (label text-sm font-medium) y listas con alto fijo (ScrollArea h-[...]) */
.portal-label-sm { line-height: 1.25rem; }
.portal-scroll { height: 300px; max-height: none; }
.portal-scroll--360 { height: 360px; }
.portal-scroll--420 { height: 420px; }
/* ---- Claim Countries y Assign Students ---- */

.portal-page--w4 {
	max-width: 56rem;
	margin: 0 auto;
}

.portal-stack {
	display: grid;
	gap: 1.5rem;
}

.portal-title--icon {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1.5rem;
	line-height: 2rem;
}

.portal-title--icon .icon {
	width: 1.5rem;
	height: 1.5rem;
}

@media (min-width: 640px) {
	.portal-title--icon { font-size: 1.875rem; line-height: 2.25rem; }
}

.portal-note-card {
	padding: 1rem 1.5rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.portal-requested {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1rem 1.5rem;
}

.portal-requested__text {
	flex: 1 1 0%;
	display: grid;
	gap: 0.25rem;
}

.portal-requested__form {
	display: flex;
	gap: 0.5rem;
}

@media (min-width: 640px) {
	.portal-requested { flex-direction: row; align-items: flex-end; }
}

.portal-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.5rem;
}

.portal-pill {
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
	background-color: hsl(var(--primary) / 0.15);
	font-weight: 500;
}

/* barra de busqueda y filtros de la matriz */
.portal-controls {
	display: grid;
	gap: 0.75rem;
	padding: 0.75rem;
	margin-bottom: 1rem;
}

@media (min-width: 640px) {
	.portal-controls { padding: 1rem; }
}

.portal-controls__row {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

@media (min-width: 640px) {
	.portal-controls__row { flex-direction: row; align-items: center; }
}

.portal-search--72 {
	width: 100%;
	flex: none;
}

@media (min-width: 640px) {
	.portal-search--72 { width: 18rem; }
}

.portal-controls__buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.portal-controls__totals {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid hsl(var(--border));
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: hsl(var(--muted-foreground));
}

.portal-warning {
	color: hsl(var(--warning));
}

/* acordeon de comites (Accordion) */
.portal-accordion {
	border-top: 1px solid hsl(var(--border));
	border-bottom: 1px solid hsl(var(--border));
}

.portal-acc__item + .portal-acc__item {
	border-top: 1px solid hsl(var(--border));
}

.portal-acc__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: 100%;
	padding: 1rem 0.75rem;
	border: 0;
	background: transparent;
	text-align: left;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 150ms;
}

.portal-acc__trigger:hover {
	background-color: hsl(var(--muted) / 0.4);
}

.portal-acc__trigger:focus-visible {
	outline: 2px solid transparent;
	box-shadow: inset 0 0 0 2px hsl(var(--ring));
}

.portal-acc__head {
	display: flex;
	flex: 1 1 0%;
	min-width: 0;
	flex-direction: column;
	gap: 0.375rem;
}

@media (min-width: 640px) {
	.portal-acc__head { flex-direction: row; align-items: center; gap: 0.75rem; }
}

.portal-acc__label {
	font-size: 1rem;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.portal-acc__tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.75rem;
	font-weight: 400;
}

.portal-tag {
	padding: 0.25rem 0.625rem;
	border-radius: 9999px;
	background-color: hsl(var(--muted));
	white-space: nowrap;
	color: hsl(var(--muted-foreground));
}

.portal-tag--primary {
	background-color: hsl(var(--primary) / 0.15);
	font-weight: 500;
	color: hsl(var(--primary));
}

.portal-tag-text {
	color: hsl(var(--muted-foreground));
}

.portal-acc__chev {
	width: 1rem;
	height: 1rem;
	transition: transform 200ms;
}

.portal-acc__item.is-open .portal-acc__chev {
	transform: rotate(180deg);
}

.portal-acc__panel {
	padding: 0 0.75rem 1rem;
}

.portal-seats {
	display: grid;
	gap: 0.5rem;
}

@media (min-width: 640px) {
	.portal-seats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
	.portal-seats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.portal-seat {
	display: flex;
	min-width: 0;
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.75rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.5rem;
}

.portal-seat.is-mine {
	border-color: hsl(var(--primary) / 0.6);
	background-color: hsl(var(--primary) / 0.05);
}

.portal-seat__name {
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 500;
	overflow-wrap: anywhere;
}

.portal-seat__mine {
	font-size: 0.75rem;
	line-height: 1rem;
	color: hsl(var(--primary));
}

.portal-seat__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.portal-badge--mine { border-color: transparent; background-color: hsl(var(--primary) / 0.15); color: hsl(var(--primary)); }
.portal-badge--matrix-available { border-color: hsl(var(--border)); background-color: hsl(var(--matrix-available-bg)); color: hsl(var(--matrix-available-text)); }
.portal-badge--matrix-pending { border-color: hsl(var(--border)); background-color: hsl(var(--matrix-pending-bg)); color: hsl(var(--matrix-pending-text)); }
.portal-badge--taken { border-color: hsl(var(--border)); background-color: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }

.portal-link-text {
	font-size: 0.75rem;
	color: hsl(var(--primary));
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* aviso de reservas (SeatHoldBanner) */
.portal-hold {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1rem 1.5rem;
	border-color: hsl(var(--primary) / 0.5);
	background-color: hsl(var(--primary) / 0.1);
}

.portal-hold--urgent {
	border-color: hsl(var(--destructive));
	background-color: hsl(var(--destructive) / 0.1);
}

.portal-hold__icon {
	width: 1.5rem;
	height: 1.5rem;
	color: hsl(var(--primary));
}

.portal-hold--urgent .portal-hold__icon {
	color: hsl(var(--destructive));
}

.portal-hold__text {
	flex: 1 1 0%;
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.portal-hold__title {
	font-weight: 600;
}

@media (min-width: 640px) {
	.portal-hold { flex-direction: row; align-items: center; }
}

/* cupos del colegio (Assign Students) */
.portal-seatbox {
	display: grid;
	gap: 0.75rem;
	padding: 0.75rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.5rem;
}

.portal-seatbox__head {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

@media (min-width: 640px) {
	.portal-seatbox__head { flex-direction: row; align-items: center; }
}

.portal-seatbox__select {
	width: 100%;
}

@media (min-width: 640px) {
	.portal-seatbox__select { width: 16rem; }
	.portal-seatbox__select--sm { width: 14rem; }
}

.portal-seatbox__student {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

@media (min-width: 640px) {
	.portal-seatbox__student { flex-direction: row; align-items: center; padding-left: 1rem; }
}

.portal-seatbox__tools {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
/* ---- Avance de la solicitud: lista de comprobacion y tarjeta final ---- */

.portal-checklist {
	display: grid;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
	padding: 0.75rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.5rem;
}

.portal-checklist__title {
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 500;
}

.portal-checklist__list {
	display: grid;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.portal-checklist__item {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.75rem;
	line-height: 1rem;
}

.portal-checklist__item .icon {
	width: 0.875rem;
	height: 0.875rem;
	margin-top: 0.125rem;
	color: hsl(var(--muted-foreground));
}

.portal-checklist__item.is-ok .icon {
	color: hsl(var(--primary));
}

.portal-checklist__item.is-ok span {
	color: hsl(var(--muted-foreground));
}

.portal-done {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.5rem;
	border-color: hsl(var(--success) / 0.4);
	background-color: hsl(var(--success) / 0.05);
}

@media (min-width: 640px) {
	.portal-done { flex-direction: row; align-items: center; }
}

.portal-done__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 3rem;
	height: 3rem;
	border-radius: 9999px;
	background-color: hsl(var(--success) / 0.15);
	color: hsl(var(--success));
}

.portal-done__icon .icon {
	width: 1.5rem;
	height: 1.5rem;
}

.portal-done__title {
	font-size: 1.125rem;
	line-height: 1.75rem;
	font-weight: 600;
}

.portal-stat__icon--success { background-color: hsl(var(--success) / 0.1); color: hsl(var(--success)); }

.portal-page > .portal-hold {
	margin-bottom: 2rem;
}
/* ---- Detalle del colegio y Master Sheet ---- */

.portal-link-name:hover { 
	text-decoration: underline; 
	text-underline-offset: 4px; 
}

.portal-select-192 { width: 100%; }

@media (min-width: 640px) {
	.portal-select-192 { width: 12rem; }
}

.portal-master-filters {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding-top: 0.75rem;
}

@media (min-width: 640px) {
	.portal-master-filters { flex-direction: row; }
}

.portal-detail-grid {
	display: grid;
	gap: 1rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
}

@media (min-width: 768px) {
	.portal-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.portal-offer-grid {
	display: grid;
	gap: 0.5rem;
}

@media (min-width: 640px) {
	.portal-offer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.portal-offer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.5rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.5rem;
}

.portal-offer__rank {
	margin-right: 0.25rem;
	font-weight: 600;
	color: hsl(var(--primary));
}

.portal-card--amber {
	border-color: hsl(43 96% 56% / 0.6);
}

.portal-claim {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.375rem 0.625rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.5rem;
	font-size: 0.875rem;
}

.portal-stages {
	display: grid;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.portal-stages li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.portal-stage__n {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 9999px;
	background-color: hsl(var(--muted));
	font-size: 0.75rem;
	color: hsl(var(--muted-foreground));
}

.portal-stage__n.is-done {
	background-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}

.portal-details__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.5rem;
	cursor: pointer;
	list-style: none;
}

.portal-details__summary::-webkit-details-marker { display: none; }

.portal-details__hide { display: none; }
.portal-details[open] .portal-details__show { display: none; }
.portal-details[open] .portal-details__hide { display: inline; }

.portal-log {
	display: grid;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.portal-log li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid hsl(var(--border));
}

.portal-log li:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.portal-log__when { margin-left: auto; }

.portal-text-danger-inline { color: hsl(var(--destructive)); }
.portal-alloc { display: block; }
.portal-alloc__where { margin-top: 0.25rem; }
.portal-alloc:hover .portal-alloc__where { color: hsl(var(--primary)); text-decoration: underline; text-underline-offset: 2px; }

/* bloque con separacion de 1rem entre sus tarjetas (space-y-4 del original) */
.portal-stack-4 {
	display: grid;
	gap: 1rem;
}

/* ---- Documento de posicion (PositionPaperUpload.tsx) ---- */

.portal-dropzone {
	display: block;
	padding: 2rem;
	border: 2px dashed hsl(var(--border));
	border-radius: 0.5rem;
	text-align: center;
	cursor: pointer;
	transition: border-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-dropzone:hover {
	border-color: hsl(var(--primary) / 0.5);
}

.portal-dropzone input[type="file"] {
	display: none;
}

.portal-dropzone .icon {
	width: 2.5rem;
	height: 2.5rem;
	margin: 0 auto 0.75rem;
	color: hsl(var(--muted-foreground));
}

.portal-dropzone__title {
	margin-bottom: 0.25rem;
	font-weight: 500;
	color: hsl(var(--foreground));
}

.portal-dropzone__hint {
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: hsl(var(--muted-foreground));
}

.portal-paper {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.5rem;
	background-color: hsl(var(--muted) / 0.3);
}

.portal-paper__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 0.5rem;
	background-color: hsl(var(--success) / 0.1);
	color: hsl(var(--success));
}

.portal-paper__icon .icon {
	width: 1.25rem;
	height: 1.25rem;
}

.portal-paper__text {
	flex: 1 1 0%;
	min-width: 0;
}

.portal-paper__title {
	font-weight: 500;
	color: hsl(var(--foreground));
}

.portal-paper__sub {
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: hsl(var(--muted-foreground));
}

.portal-paper__actions {
	display: flex;
	gap: 0.5rem;
}

/* boton "Uploaded" de la tabla de estudiantes (variant ghost, text-success) */
.mun-btn--paper-ok {
	color: hsl(var(--success));
}

.mun-btn--paper-ok:hover {
	background-color: hsl(var(--accent));
	color: hsl(var(--success));
}