/**
 * Estilos del área de administración de Automatrícula Musical Pro.
 *
 * -----------------------------------------------------------------------
 * GUÍA INTERNA DE ESTRUCTURA (léase antes de añadir nada nuevo aquí)
 * -----------------------------------------------------------------------
 * 1. Variables ............ valores compartidos (colores, radios, espaciados).
 * 2. Cabeceras de pantalla . título + botón "Añadir nuevo" + separador.
 * 3. Cards ................ paneles del dashboard y bloques de contenido.
 * 4. Accesos rápidos ...... rejilla de enlaces del dashboard.
 * 5. Badges de estado ..... Activo / Inactivo / Archivado.
 * 6. Listados (AMPRO_List_Table): densidad de filas, columna de
 *    selección, cabecera/pie de tabla, acciones por fila.
 * 7. Barra de herramientas del listado (bulk actions, filtro, exportar).
 * 8. Estados vacíos y avisos.
 *
 * Principios seguidos:
 * - Apoyarse en las clases nativas del admin de WordPress siempre que
 *   sea posible (wp-list-table, tablenav, notice, row-actions, button,
 *   wp-heading-inline...) en vez de reinventarlas, para que cualquier
 *   cambio futuro del admin de WP siga siendo compatible.
 * - Todo el CSS propio va con especificidad baja y prefijado con
 *   `.ampro-` para no interferir con otras pantallas de wp-admin.
 * - Nada de posicionamientos "mágicos" ni !important: solo ajustes de
 *   densidad, color y espaciado sobre la estructura estándar de WP.
 *
 * @package Automatricula_Musical_Pro
 */

/* -----------------------------------------------------------------------
 * 1. Variables
 * --------------------------------------------------------------------- */

.ampro-wrap {
	--ampro-border-color: #dcdcde;
	--ampro-muted-color: #646970;
	--ampro-radius: 4px;
	--ampro-gap: 12px;
}

/* -----------------------------------------------------------------------
 * 2. Cabeceras de pantalla
 * --------------------------------------------------------------------- */

/* Separación consistente entre el título/botón "Añadir nuevo" y el resto
 * del contenido. El <hr class="wp-header-end"> (patrón nativo de WP) ya
 * ayuda a WordPress a posicionar bien los admin notices justo debajo. */
.ampro-wrap .wp-header-end {
	margin-bottom: 8px;
}

.ampro-wrap h1.wp-heading-inline {
	margin-bottom: 4px;
}

/* -----------------------------------------------------------------------
 * 3. Cards (dashboard, resúmenes)
 * --------------------------------------------------------------------- */

.ampro-wrap .ampro-card {
	background: #fff;
	border: 1px solid var(--ampro-border-color);
	border-radius: var(--ampro-radius);
	padding: 16px 20px;
	margin: 0 0 16px;
	max-width: 780px;
}

.ampro-wrap .ampro-card + .ampro-card {
	margin-top: 0;
}

.ampro-wrap .ampro-card--wide {
	max-width: none;
}

.ampro-wrap .ampro-card h2 {
	margin-top: 0;
	margin-bottom: 12px;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--ampro-muted-color);
}

.ampro-status-table {
	border: none;
}

.ampro-status-table th {
	width: 220px;
	font-weight: 500;
}

.ampro-status-table th,
.ampro-status-table td {
	padding: 8px 10px;
}

/* -----------------------------------------------------------------------
 * 4. Accesos rápidos (dashboard)
 * --------------------------------------------------------------------- */

.ampro-quick-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 8px;
}

.ampro-quick-links__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px;
	border: 1px solid var(--ampro-border-color);
	border-radius: var(--ampro-radius);
	background: #fff;
	transition: border-color 0.15s ease-in-out;
}

.ampro-quick-links__item:not(.ampro-quick-links__item--disabled):hover {
	border-color: #8c8f94;
}

.ampro-quick-links__item a {
	text-decoration: none;
	font-weight: 500;
}

.ampro-quick-links__item--disabled {
	opacity: 0.65;
}

/* -----------------------------------------------------------------------
 * 5. Badges de estado (Activo / Inactivo / Archivado)
 * --------------------------------------------------------------------- */

.ampro-badge {
	display: inline-block;
	padding: 3px 10px;
	border: 1px solid transparent;
	border-radius: 10px;
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.6;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.ampro-badge--ok {
	background: #edfaef;
	border-color: #b8e6bd;
	color: #1e7e34;
}

.ampro-badge--warning {
	background: #fdf2e0;
	border-color: #f0dba8;
	color: #a35f00;
}

.ampro-badge--soon {
	background: #f0f0f1;
	border-color: #dcdcde;
	color: var(--ampro-muted-color);
}

.ampro-badge--danger {
	background: #fbeaea;
	border-color: #f0c3c2;
	color: #b32d2e;
}

/* -----------------------------------------------------------------------
 * 5.1 Panel principal: indicadores rápidos y tarjetas de módulo (Fase 1M.3)
 * --------------------------------------------------------------------- */

.ampro-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 12px;
}

.ampro-stat-card {
	border: 1px solid var(--ampro-border-color);
	border-radius: var(--ampro-radius);
	padding: 12px 14px;
	background: #f9f9fa;
}

.ampro-stat-card .ampro-stat-number {
	display: block;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	color: #1f2937;
}

.ampro-stat-card .ampro-stat-label {
	font-size: 12px;
	color: var(--ampro-muted-color);
}

.ampro-module-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 12px;
}

.ampro-module-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px 14px;
	border: 1px solid var(--ampro-border-color);
	border-radius: var(--ampro-radius);
	background: #fff;
	transition: border-color 0.15s ease-in-out;
}

.ampro-module-card:hover {
	border-color: #8c8f94;
}

.ampro-module-card--disabled {
	opacity: 0.7;
	background: #f6f7f7;
}

.ampro-module-card__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-weight: 600;
	font-size: 13px;
}

.ampro-module-card__title a {
	text-decoration: none;
	color: #1d4f91;
}

.ampro-module-card__title a:hover {
	text-decoration: underline;
}

.ampro-module-card__desc {
	font-size: 12px;
	color: var(--ampro-muted-color);
	margin: 0;
}

/* Asterisco que AMPRO_Admin/admin.js activa junto a un campo cuando
 * pasa a ser obligatorio dinámicamente (p. ej. "Grupo" en el
 * formulario de Matrículas, cuando el curso elegido lo requiere).
 * Oculto por defecto vía el atributo HTML `hidden`. */
.ampro-required-marker {
	color: #b32d2e;
	font-weight: 700;
	margin-left: 2px;
}

/* Conmutador "Todos | Papelera" (Fase 1F), usa la misma clase nativa
 * .subsubsub de WordPress que el conmutador Listado/Calendario. */
.ampro-trash-switcher {
	margin: 8px 0 4px;
}

.ampro-trash-switcher a.current {
	font-weight: 600;
	color: #1d2327;
}

/* -----------------------------------------------------------------------
 * 6. Listados de catálogo (AMPRO_List_Table)
 * --------------------------------------------------------------------- */

/* Densidad de fila más compacta, en línea con listados nativos de WP
 * (Entradas, Usuarios...) en lugar del alto por defecto de WP_List_Table.
 *
 * IMPORTANTE (Fase 1A.6): alineación vertical superior, no centrada.
 * Cuando una fila tiene acciones rápidas debajo de la columna primaria
 * (Editar | Desactivar | Borrar), esa celda ocupa más alto que el resto;
 * con `vertical-align: middle` el resto de columnas de esa fila (email,
 * estado...) quedaban centradas respecto a esa altura extra, dando una
 * sensación de fila descuadrada. Con `top`, todos los valores de la fila
 * (nombre, apellidos, email, estado...) arrancan en la misma línea
 * visual superior, y las acciones rápidas simplemente añaden alto por
 * debajo sin arrastrar al resto de columnas hacia el centro. */
.ampro-wrap .wp-list-table th,
.ampro-wrap .wp-list-table td {
	padding: 8px 10px;
	vertical-align: top;
}

.ampro-list-form .wp-list-table thead th,
.ampro-list-form .wp-list-table thead td {
	padding-top: 8px;
	padding-bottom: 8px;
}

/* Columna de selección: ancho ajustado para que el checkbox y el texto
 * "Todos" quepan sin que la columna se vea desproporcionada, y el
 * checkbox alineado con la primera línea de texto del resto de la fila. */
.ampro-list-form .check-column {
	width: 3.2em;
	padding-top: 8px !important;
	white-space: nowrap;
}

.ampro-select-all-label {
	display: inline-block;
	margin-left: 4px;
	font-size: 11px;
	font-weight: 400;
	color: var(--ampro-muted-color);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	vertical-align: middle;
}

/* Pie de tabla: mismo contenido que la cabecera por requisito de
 * WP_List_Table, pero con menos protagonismo visual para que no se
 * sienta como una repetición tosca. */
.ampro-list-form .wp-list-table tfoot th,
.ampro-list-form .wp-list-table tfoot td {
	padding-top: 6px;
	padding-bottom: 6px;
	color: var(--ampro-muted-color);
	font-weight: 400;
}

.ampro-list-form .wp-list-table tfoot th.sortable a,
.ampro-list-form .wp-list-table tfoot th.sorted a {
	color: inherit;
}

/* Acciones rápidas por fila: apoyarse en el propio .row-actions nativo
 * de WordPress (ya estilizado por el core: gris, tamaño reducido,
 * visible solo al pasar el ratón sobre la fila). Se añade una pequeña
 * separación explícita respecto al valor principal de la columna: ni
 * pegada al texto ni demasiado alejada, en línea con el propio estilo
 * de WordPress (Entradas, Usuarios...). También se afina el color de
 * la acción de borrado para que destaque como "acción peligrosa". */
.ampro-list-form .row-actions {
	margin-top: 4px;
}

.ampro-delete-link {
	color: #b32d2e;
}

.ampro-delete-link:hover,
.ampro-delete-link:focus {
	color: #dc3232;
}

/* -----------------------------------------------------------------------
 * 7. Barra de herramientas del listado (acciones masivas, filtro, CSV)
 * --------------------------------------------------------------------- */

.ampro-list-form .tablenav .alignleft.actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.ampro-list-form .tablenav .alignleft.actions select {
	max-width: 200px;
}

/* Separa visualmente el filtro de estado del botón de exportación, para
 * que no queden ambos controles pegados el uno al otro. */
.ampro-list-form .tablenav .alignleft.actions .button {
	margin-left: 4px;
}

/* Fase 2.5.0 — Personalización visual de columnas. */
.ampro-list-form .ampro-column-preferences {
	flex: 1 0 100%;
	box-sizing: border-box;
	max-width: 520px;
	margin-top: 6px;
	padding: 12px;
	background: #fff;
	border: 1px solid var(--ampro-border-color);
	border-radius: var(--ampro-radius);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ampro-list-form .ampro-column-preferences[hidden] {
	display: none;
}

.ampro-column-preferences__header {
	display: flex;
	flex-direction: column;
	gap: 3px;
	margin-bottom: 10px;
}

.ampro-column-preferences__list {
	margin: 0 0 10px;
	padding: 0;
	list-style: none;
	border: 1px solid var(--ampro-border-color);
	border-radius: var(--ampro-radius);
	background: #fff;
}

.ampro-column-preferences__item {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	padding: 7px 9px;
	border-bottom: 1px solid #f0f0f1;
	background: #fff;
	cursor: grab;
}

.ampro-column-preferences__item:last-child {
	border-bottom: 0;
}

.ampro-column-preferences__item.is-dragging {
	opacity: 0.55;
	background: #f6f7f7;
}

.ampro-column-preferences__drag {
	color: var(--ampro-muted-color);
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 16px;
}

.ampro-column-preferences__item label {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1 1 auto;
	margin: 0;
}

.ampro-column-preferences__item small {
	color: var(--ampro-muted-color);
}

.ampro-column-preferences__moves {
	display: inline-flex;
	gap: 7px;
}

.ampro-column-preferences__moves .button-link {
	font-size: 16px;
	line-height: 1;
	text-decoration: none;
}

.ampro-column-preferences__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.ampro-column-preferences__status {
	color: var(--ampro-muted-color);
	font-size: 12px;
}

/* -----------------------------------------------------------------------
 * 8. Estados vacíos y avisos
 * --------------------------------------------------------------------- */

.ampro-list-form .wp-list-table .no-items td {
	padding: 24px 10px;
	text-align: center;
	color: var(--ampro-muted-color);
}

/* Los admin notices de WordPress (.notice, .notice-success, etc.) ya
 * llegan con su propio estilo nativo; solo se añade un pequeño margen
 * inferior para que no queden pegados al contenido siguiente. */
.ampro-wrap .notice {
	margin-bottom: 16px;
}

/* -----------------------------------------------------------------------
 * 9. Selector de imágenes del PDF de matrícula (Fase 1M.1)
 * --------------------------------------------------------------------- */

.ampro-media-picker {
	max-width: 360px;
}

.ampro-media-preview {
	margin-bottom: 8px;
}

.ampro-media-preview img {
	display: block;
	max-width: 240px;
	max-height: 120px;
	width: auto;
	height: auto;
	border: 1px solid var( --ampro-border-color, #dcdcde );
	border-radius: 4px;
	padding: 4px;
	background: #fff;
}


/* -----------------------------------------------------------------------
 * Fase 2.4.0 — Foto/avatar del profesorado.
 * --------------------------------------------------------------------- */

.ampro-teacher-photo-picker .ampro-media-preview img {
	width: 120px;
	height: 120px;
	max-width: 120px;
	max-height: 120px;
	object-fit: cover;
	border-radius: 50%;
	padding: 3px;
}

.ampro-teacher-list-name {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	vertical-align: middle;
}

.ampro-teacher-avatar {
	display: inline-flex;
	flex: 0 0 auto;
	object-fit: cover;
	border-radius: 50%;
	vertical-align: middle;
}

.ampro-teacher-avatar--list {
	width: 36px;
	height: 36px;
}

.ampro-teacher-avatar--initial {
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	background: #f0f0f1;
	border: 1px solid #dcdcde;
	color: #50575e;
	font-weight: 600;
	line-height: 1;
	text-align: center;
}


/* -----------------------------------------------------------------------
 * Cabecera de pantalla reutilizable con botón "Cerrar sesión"
 * (Fase 1T.3). Usada por AMPRO_Admin::render_page_header() en todas
 * las pantallas propias de Automatrícula, y por el panel profesor.
 * --------------------------------------------------------------------- */

.ampro-page-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.ampro-page-header__titles {
	margin: 0;
}

.ampro-page-header__titles h1 {
	margin: 0 0 4px;
}

.ampro-page-header__subtitle {
	margin: 0;
	color: #50575e;
}

.ampro-page-header__logout,
.ampro-inline-logout {
	white-space: nowrap;
}

.ampro-inline-logout {
	float: right;
	margin-left: 8px;
}

/* =========================================================================
 * Fase 1V — Revisión visual final de paneles y experiencia de uso.
 * Solo presentación: ningún selector de aquí cambia comportamiento,
 * nombres de campos, nonces ni lógica de guardado. Todo con prefijo
 * ampro- y acotado a .ampro-wrap/pantallas propias del plugin, para no
 * afectar a Divi, otros plugins ni pantallas nativas de WordPress.
 * ========================================================================= */

/* -----------------------------------------------------------------------
 * 7. Botones propios del plugin
 * Clases nuevas para casos en los que no encaja usar directamente los
 * botones nativos de WordPress (.button/.button-primary, que se siguen
 * usando donde ya funcionaban bien, sin tocarlos). Mismo tamaño/radio
 * que los botones nativos para que convivan sin desentonar.
 * --------------------------------------------------------------------- */

.ampro-button-primary,
.ampro-button-secondary,
.ampro-button-danger,
.ampro-button-success {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 4px;
	border: 1px solid transparent;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
	cursor: pointer;
	transition: filter 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.ampro-button-primary {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.ampro-button-secondary {
	background: #fff;
	border-color: #8c8f94;
	color: #1d2327;
}

.ampro-button-danger {
	background: #fbeaea;
	border-color: #e0a3a2;
	color: #a02222;
}

.ampro-button-success {
	background: #1e7e34;
	border-color: #1e7e34;
	color: #fff;
}

.ampro-button-primary:hover,
.ampro-button-secondary:hover,
.ampro-button-danger:hover,
.ampro-button-success:hover {
	filter: brightness(0.96);
}

/* Foco visible (accesibilidad): mismo contorno azul que WordPress usa
 * en sus propios botones, para que el teclado siga siendo usable. */
.ampro-button-primary:focus,
.ampro-button-secondary:focus,
.ampro-button-danger:focus,
.ampro-button-success:focus {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
	box-shadow: none;
}

/* -----------------------------------------------------------------------
 * 8. Alias de badges con los nombres pedidos en la Fase 1V, reutilizando
 * los colores ya definidos en la sección 5 (mismo resultado visual,
 * sin duplicar reglas ni tocar el HTML que ya usa .ampro-badge--ok/
 * --warning/--danger/--soon en vistas ya entregadas).
 * --------------------------------------------------------------------- */

.ampro-badge-success {
	background: #edfaef;
	border-color: #b8e6bd;
	color: #1e7e34;
}

.ampro-badge-warning {
	background: #fdf2e0;
	border-color: #f0dba8;
	color: #a35f00;
}

.ampro-badge-danger {
	background: #fbeaea;
	border-color: #f0c3c2;
	color: #b32d2e;
}

.ampro-badge-info {
	background: #eef4fb;
	border-color: #c8dbef;
	color: #1d4f91;
}

.ampro-badge-success,
.ampro-badge-warning,
.ampro-badge-danger,
.ampro-badge-info {
	display: inline-block;
	padding: 3px 10px;
	border: 1px solid transparent;
	border-radius: 10px;
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
}

/* -----------------------------------------------------------------------
 * 9. Rejilla de tarjetas genérica reutilizable (Puesta en marcha, y
 * cualquier pantalla futura que agrupe tarjetas del mismo tipo).
 * --------------------------------------------------------------------- */

.ampro-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 14px;
	margin-top: 12px;
}

/* -----------------------------------------------------------------------
 * 10. Avisos (notices) — WordPress ya aporta .notice/.notice-success/
 * .notice-error/.notice-warning; solo se afina el espaciado dentro de
 * .ampro-wrap para que no queden pegados al contenido ni ocupen más de
 * lo necesario. No se toca el marcado ni el texto de ningún aviso.
 * --------------------------------------------------------------------- */

.ampro-wrap .notice {
	margin: 12px 0 16px;
	padding: 10px 14px;
}

.ampro-wrap .notice p {
	margin: 0.4em 0;
}

/* -----------------------------------------------------------------------
 * 11. Formularios de alta/edición — separación entre secciones y
 * agrupación visual de campos relacionados dentro de .form-table,
 * sin tocar nombres de campos, nonces ni la lógica de guardado.
 * --------------------------------------------------------------------- */

.ampro-wrap .form-table {
	margin-top: 6px;
}

.ampro-wrap .form-table th {
	padding-top: 14px;
	padding-bottom: 14px;
}

.ampro-wrap .form-table td {
	padding-top: 10px;
	padding-bottom: 10px;
}

.ampro-wrap h2 + .form-table,
.ampro-wrap h2 + p + .form-table {
	border-top: 1px solid var(--ampro-border-color);
}

.ampro-wrap .submit,
.ampro-wrap p.submit {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
}

/* -----------------------------------------------------------------------
 * 12. Tablas — legibilidad general y evitar desbordes horizontales en
 * pantallas estrechas sin romper WP_List_Table (ordenación, filtros,
 * acciones masivas siguen siendo el marcado nativo de WordPress).
 * --------------------------------------------------------------------- */

.ampro-wrap .wp-list-table {
	overflow-wrap: anywhere;
}

.ampro-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* -----------------------------------------------------------------------
 * 13. Responsive básico (Fase 1V): portátil pequeño y tablet.
 * No es un rediseño móvil completo — solo evita desbordes graves y
 * apila lo que no cabe, tal y como pide esta fase.
 * --------------------------------------------------------------------- */

@media screen and (max-width: 782px) {
	.ampro-module-grid,
	.ampro-grid,
	.ampro-stats-grid {
		grid-template-columns: 1fr;
	}

	.ampro-page-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.ampro-page-header__logout {
		align-self: flex-start;
	}

	.ampro-inline-logout {
		float: none;
		display: inline-block;
		margin: 8px 0 0;
	}

	.ampro-wrap .submit,
	.ampro-wrap p.submit {
		flex-direction: column;
		align-items: stretch;
	}

	.ampro-wrap table.wp-list-table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}

/* -----------------------------------------------------------------------
 * 14. Barra de progreso de "Puesta en marcha" (Fase 1V). Solo CSS, sin
 * JS ni librerías: el porcentaje se calcula en PHP y se aplica como
 * ancho inline en .ampro-progress-bar__fill.
 * --------------------------------------------------------------------- */

.ampro-progress-bar {
	height: 10px;
	border-radius: 6px;
	background: #f0f0f1;
	overflow: hidden;
	margin: 6px 0 10px;
}

.ampro-progress-bar__fill {
	height: 100%;
	background: #2271b1;
	border-radius: 6px;
	transition: width 0.2s ease-in-out;
}

/* -----------------------------------------------------------------------
 * 15. Tarjeta destacada del Panel principal (Fase 1V): usada para
 * "Puesta en marcha", para que resalte sobre el resto de tarjetas del
 * Panel principal sin depender de ninguna librería.
 * --------------------------------------------------------------------- */

.ampro-wrap .ampro-card--featured {
	border-left: 4px solid #2271b1;
	background: #f5f9fd;
}

.ampro-wrap .ampro-card--featured h2 {
	color: #164471;
}

/* -----------------------------------------------------------------------
 * 16. Campos "Mínimo/máximo de franjas de práctica" en Cursos/modalidades
 * (Fase 1X.6). Antes iban en la misma línea con poco espacio y mala
 * lectura; ahora cada uno en su propia columna, con etiqueta encima.
 * Acotado a .ampro-wrap, sin afectar a WordPress globalmente.
 * --------------------------------------------------------------------- */

.ampro-wrap .ampro-practice-range-fields {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	flex-wrap: wrap;
	margin: 12px 0 6px;
}

.ampro-wrap .ampro-practice-range-field {
	min-width: 220px;
	max-width: 280px;
}

.ampro-wrap .ampro-practice-range-field label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

.ampro-wrap .ampro-practice-range-field input[type="number"] {
	width: 96px;
}

.ampro-wrap .ampro-practice-range-description {
	max-width: 640px;
	margin-top: 6px;
}

@media screen and (max-width: 782px) {
	.ampro-wrap .ampro-practice-range-fields {
		flex-direction: column;
		gap: 14px;
	}

	.ampro-wrap .ampro-practice-range-field {
		min-width: 0;
		max-width: 100%;
	}
}

/* -----------------------------------------------------------------------
 * Fase 2.3.0 — Panel Estilos del formulario público
 * --------------------------------------------------------------------- */

.ampro-styles-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.85fr);
	gap: 24px;
	align-items: start;
	margin-top: 18px;
}

.ampro-styles-controls .ampro-card + .ampro-card,
.ampro-styles-reset-card {
	margin-top: 20px;
}

.ampro-styles-controls .form-table th {
	width: 220px;
}

.ampro-styles-controls input[type="color"] {
	width: 52px;
	height: 34px;
	padding: 2px;
	cursor: pointer;
}

.ampro-styles-preview-column {
	min-width: 0;
}

.ampro-styles-preview-card {
	position: sticky;
	top: 48px;
}

.ampro-styles-preview-card > .description {
	margin-bottom: 18px;
}

.ampro-style-preview.ampro-public-form-wrapper {
	padding: 18px;
	border: 1px solid var(--ampro-border-color, #dcdcde);
	background: #f6f7f7;
	max-width: 100%;
}

.ampro-style-preview .ampro-public-section {
	padding: 18px 18px 12px;
	margin-bottom: 16px;
}

.ampro-style-preview .ampro-public-grid {
	margin-bottom: 0;
}

.ampro-style-preview .ampro-form-field input,
.ampro-style-preview .ampro-form-field select {
	min-height: 38px;
}

.ampro-style-preview__slots {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin: 0 0 18px;
}

.ampro-style-preview__slots .ampro-slot-button {
	margin: 0;
	padding: 9px 8px;
}

.ampro-style-preview .ampro-form-submit {
	margin-top: 8px;
}

@media screen and (max-width: 1100px) {
	.ampro-styles-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.ampro-styles-preview-card {
		position: static;
	}
}

@media screen and (max-width: 782px) {
	.ampro-styles-controls .form-table th {
		width: auto;
	}

	.ampro-style-preview.ampro-public-form-wrapper {
		padding: 12px;
	}
}

/* -----------------------------------------------------------------------
 * 9. Importaciones: parrilla comercial y homogénea
 * --------------------------------------------------------------------- */

.ampro-imports-card {
	padding-bottom: 22px;
}

.ampro-import-section + .ampro-import-section {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--ampro-border-color);
}

.ampro-import-section__header {
	margin-bottom: 14px;
}

.ampro-import-section__header h3 {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 600;
	color: #1d2327;
}

.ampro-import-section__header p {
	margin: 0;
	color: var(--ampro-muted-color);
}

.ampro-import-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.ampro-import-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 250px;
	padding: 17px;
	box-sizing: border-box;
	border: 1px solid var(--ampro-border-color);
	border-radius: 6px;
	background: #fff;
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.ampro-import-card:hover {
	border-color: #a7aaad;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ampro-import-card__content h4 {
	margin: 0 0 7px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: #1d2327;
}

.ampro-import-card__desc {
	min-height: 38px;
	margin: 0 0 9px;
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--ampro-muted-color);
}

.ampro-import-format {
	margin: 0;
	font-size: 12px;
}

.ampro-import-format summary {
	display: inline-block;
	cursor: pointer;
	color: #2271b1;
	font-weight: 500;
}

.ampro-import-format summary:hover,
.ampro-import-format summary:focus {
	color: #135e96;
	text-decoration: underline;
}

.ampro-import-format code {
	display: block;
	margin-top: 8px;
	padding: 9px 10px;
	max-height: 110px;
	overflow: auto;
	white-space: normal;
	overflow-wrap: anywhere;
	font-size: 11px;
	line-height: 1.45;
	color: #50575e;
	background: #f6f7f7;
	border-radius: 4px;
}

.ampro-import-card__actions {
	margin-top: auto;
	padding-top: 16px;
}

.ampro-import-card__button {
	width: 100%;
	box-sizing: border-box;
	text-align: center;
}

.ampro-import-card__form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 12px;
}

.ampro-import-card__form input[type="file"] {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	font-size: 12px;
}

@media (max-width: 1500px) {
	.ampro-import-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 1100px) {
	.ampro-import-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 782px) {
	.ampro-import-grid {
		grid-template-columns: 1fr;
	}

	.ampro-import-card {
		min-height: 0;
	}

	.ampro-import-card__desc {
		min-height: 0;
	}
}

/* =========================================================================
 * 3.0.6 — Sistema visual unificado del área de administración
 * -------------------------------------------------------------------------
 * Cohesiona Panel principal, Puesta en marcha, Importaciones y Exportaciones
 * con una misma rejilla, tarjetas, radios, espaciado, tipografía y acciones.
 * Solo presentación: no altera handlers, formularios, nonces ni datos.
 * ========================================================================= */

.ampro-wrap {
	--ampro-primary: #2271b1;
	--ampro-primary-hover: #135e96;
	--ampro-surface: #ffffff;
	--ampro-surface-soft: #f6f7f7;
	--ampro-border-color: #dcdcde;
	--ampro-muted-color: #646970;
	--ampro-radius: 8px;
	--ampro-radius-small: 6px;
	--ampro-gap: 16px;
	--ampro-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.035);
}

/* Contenedores principales: mismo acabado en todas las pantallas resumen. */
.ampro-wrap .ampro-card {
	padding: 20px;
	margin-bottom: 18px;
	border-radius: var(--ampro-radius);
	background: var(--ampro-surface);
	box-shadow: var(--ampro-card-shadow);
}

.ampro-wrap .ampro-card h2 {
	margin-bottom: 12px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.025em;
}

.ampro-wrap .ampro-card > p:last-child {
	margin-bottom: 0;
}

/* Rejillas principales: cuatro columnas en escritorio y el mismo ritmo. */
.ampro-module-grid,
.ampro-grid,
.ampro-data-grid,
.ampro-import-grid,
.ampro-export-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.ampro-grid {
	margin-top: 12px;
}

/* Tarjeta base compartida por módulos, onboarding e import/export. */
.ampro-module-card,
.ampro-data-card,
.ampro-import-card,
.ampro-export-card {
	min-width: 0;
	box-sizing: border-box;
	border: 1px solid var(--ampro-border-color);
	border-radius: var(--ampro-radius);
	background: var(--ampro-surface);
	box-shadow: none;
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.ampro-module-card:hover,
.ampro-data-card:hover,
.ampro-import-card:hover,
.ampro-export-card:hover {
	border-color: #a7aaad;
	box-shadow: var(--ampro-card-shadow);
}

.ampro-module-card {
	padding: 16px;
	gap: 7px;
}

.ampro-module-card__title {
	font-size: 14px;
	line-height: 1.35;
}

.ampro-module-card__desc,
.ampro-data-card__desc,
.ampro-import-card__desc {
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--ampro-muted-color);
}

.ampro-module-card__actions,
.ampro-data-card__actions {
	margin-top: auto;
	padding-top: 14px;
}

/* Panel principal: módulos e indicadores con la misma geometría que el resto. */
.ampro-stats-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.ampro-stat-card {
	padding: 15px 16px;
	border-radius: var(--ampro-radius);
	background: var(--ampro-surface-soft);
}

.ampro-module-grid .ampro-module-card {
	min-height: 100px;
}

/* Puesta en marcha: tarjetas homogéneas y acciones alineadas abajo. */
.ampro-onboarding-grid .ampro-onboarding-card {
	display: flex;
	flex-direction: column;
	min-height: 205px;
	padding: 17px;
}

.ampro-onboarding-grid .ampro-module-card__desc {
	margin: 0;
}

.ampro-onboarding-grid .ampro-module-card__actions {
	margin-top: auto;
}

.ampro-onboarding-grid .ampro-module-card__actions > .button,
.ampro-onboarding-grid .ampro-module-card__actions > form .button {
	width: 100%;
	box-sizing: border-box;
	text-align: center;
}

.ampro-onboarding-grid .ampro-module-card__actions > form {
	margin: 0;
}

.ampro-onboarding-pages {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ampro-onboarding-pages li + li {
	margin-top: 6px;
}

.ampro-diagnostic-card {
	margin-top: 24px;
}

/* Secciones de datos compartidas por Importaciones y Exportaciones. */
.ampro-data-section + .ampro-data-section {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--ampro-border-color);
}

.ampro-data-section__header {
	margin-bottom: 14px;
}

.ampro-data-section__header h3 {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	color: #1d2327;
}

.ampro-data-section__header p {
	margin: 0;
	color: var(--ampro-muted-color);
}

.ampro-data-card,
.ampro-import-card,
.ampro-export-card {
	display: flex;
	flex-direction: column;
	min-height: 220px;
	padding: 17px;
}

.ampro-data-card__content h4,
.ampro-import-card__content h4,
.ampro-export-card h4 {
	margin: 0 0 7px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: #1d2327;
}

.ampro-data-card__desc {
	margin: 0;
}

.ampro-data-card__actions {
	margin-top: auto;
	padding-top: 16px;
}

.ampro-data-card__button,
.ampro-import-card__button {
	width: 100%;
	box-sizing: border-box;
	text-align: center;
}

/* Importaciones necesita algo más de altura por selector + dos acciones. */
.ampro-import-card {
	min-height: 250px;
}

/* Exportaciones: una única acción, sin metadatos técnicos visibles. */
.ampro-export-card {
	min-height: 165px;
}

.ampro-exports-card,
.ampro-imports-card {
	padding-bottom: 22px;
}

/* Mantener los botones de tarjetas en el estilo secundario/nativo de WP.
 * Los primarios se reservan para acciones realmente decisivas del flujo. */
.ampro-export-card .button,
.ampro-import-card .button,
.ampro-onboarding-card .button:not(.button-primary) {
	background: #fff;
}

@media (max-width: 1500px) {
	.ampro-module-grid,
	.ampro-grid,
	.ampro-data-grid,
	.ampro-import-grid,
	.ampro-export-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 1100px) {
	.ampro-module-grid,
	.ampro-grid,
	.ampro-data-grid,
	.ampro-import-grid,
	.ampro-export-grid,
	.ampro-stats-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 782px) {
	.ampro-module-grid,
	.ampro-grid,
	.ampro-data-grid,
	.ampro-import-grid,
	.ampro-export-grid,
	.ampro-stats-grid {
		grid-template-columns: 1fr;
	}

	.ampro-onboarding-grid .ampro-onboarding-card,
	.ampro-data-card,
	.ampro-import-card,
	.ampro-export-card {
		min-height: 0;
	}
}

/* Selector CSV: conserva el input nativo (accesible y sin JS), pero con un
 * contenedor visual coherente con el resto de controles del panel. */
.ampro-import-card__form input[type="file"] {
	padding: 6px;
	border: 1px solid #c3c4c7;
	border-radius: var(--ampro-radius-small);
	background: var(--ampro-surface-soft);
	color: var(--ampro-muted-color);
	line-height: 1.8;
}

.ampro-import-card__form input[type="file"]::file-selector-button {
	margin-right: 8px;
	padding: 4px 9px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	background: #fff;
	color: #1d2327;
	cursor: pointer;
}

.ampro-import-card__form input[type="file"]::file-selector-button:hover {
	border-color: var(--ampro-primary-hover);
	color: var(--ampro-primary-hover);
}

/* =========================================================================
 * 3.0.7 — Lenguaje visual del Panel principal en pantallas de puesta en marcha
 * -------------------------------------------------------------------------
 * Puesta en marcha, Importaciones y Exportaciones usan el mismo patrón que
 * "Módulos activos": tarjeta exterior blanca + rejilla de tarjetas de módulo.
 * ========================================================================= */

/* Texto de apoyo dentro de una sección principal, antes de la rejilla. */
.ampro-section-description {
	margin: -3px 0 14px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--ampro-muted-color);
}

/* Las tarjetas con acción conservan exactamente la base de .ampro-module-card.
 * Solo añaden el espacio imprescindible para sus controles. */
.ampro-module-card--action {
	display: flex;
	flex-direction: column;
}

.ampro-module-card--action .ampro-module-card__label {
	color: #1d4f91;
	font-weight: 600;
}

.ampro-module-card--action .ampro-module-card__actions {
	display: flex;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: auto;
	padding-top: 12px;
}

.ampro-module-card--action .ampro-module-card__actions .button {
	width: auto;
	min-height: 30px;
	box-sizing: border-box;
	background: #fff;
}

/* Puesta en marcha ahora vive dentro del mismo contenedor blanco que
 * "Módulos activos" en el Panel principal. */
.ampro-onboarding-checklist-card .ampro-onboarding-grid {
	margin-top: 0;
}

.ampro-onboarding-grid .ampro-onboarding-card {
	min-height: 170px;
	padding: 16px;
	gap: 7px;
}

.ampro-onboarding-grid .ampro-onboarding-card .ampro-module-card__title > span:first-child {
	color: #1d4f91;
	font-weight: 600;
}

/* En Puesta en marcha los botones vuelven al tamaño nativo de WordPress,
 * igual que el resto del panel: no se convierten en grandes barras. */
.ampro-onboarding-grid .ampro-module-card__actions > .button,
.ampro-onboarding-grid .ampro-module-card__actions > form .button {
	width: auto;
	text-align: left;
}

/* Importaciones y Exportaciones: cada grupo es una tarjeta principal propia,
 * igual que Estado técnico / Indicadores / Módulos activos del dashboard. */
.ampro-import-section-card,
.ampro-export-section-card {
	padding-bottom: 20px;
}

.ampro-import-section-card .ampro-module-grid,
.ampro-export-section-card .ampro-module-grid {
	margin-top: 0;
}

.ampro-import-card,
.ampro-export-card {
	padding: 16px;
	gap: 7px;
}

.ampro-export-card {
	min-height: 135px;
}

.ampro-import-card {
	min-height: 225px;
}

/* "Ver formato CSV" funciona como detalle secundario y no compite con el
 * título ni con la acción principal. */
.ampro-import-format {
	margin: 3px 0 0;
}

.ampro-import-format summary {
	font-size: 12px;
	font-weight: 500;
}

/* Formulario CSV compacto y ordenado en la zona inferior de la tarjeta. */
.ampro-import-card__actions {
	width: 100%;
}

.ampro-import-card__form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
	width: 100%;
	margin: 0;
}

.ampro-import-card__form input[type="file"] {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.ampro-import-card__form .button {
	align-self: stretch;
}

@media (max-width: 1100px) {
	.ampro-import-card__form {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 782px) {
	.ampro-onboarding-grid .ampro-onboarding-card,
	.ampro-import-card,
	.ampro-export-card {
		min-height: 0;
	}
}

/* Matrículas 3.1.3: edición académica completa desde Secretaría. */
.ampro-multiselect {
	width: min(100%, 620px);
}

.ampro-multiselect[multiple] {
	min-height: 132px;
}

.ampro-enrollment-reorganization {
	border-left: 4px solid #2271b1;
}

.ampro-change-summary {
	margin: 12px 0;
	padding: 10px 12px;
	border: 1px solid #dba617;
	border-radius: 6px;
	background: #fcf9e8;
	color: #3c434a;
	font-weight: 600;
}

/* 3.1.4 · Reorganización de matrícula: acciones visibles y selección de varias prácticas. */
.ampro-enrollment-form-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 16px;
}

.ampro-enrollment-form-actions--top {
	padding: 12px 14px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	box-shadow: 0 1px 1px rgba(0,0,0,.02);
}

.ampro-enrollment-form-actions .description {
	margin-left: 4px;
}

.ampro-slot-select-source {
	display: none !important;
}

.ampro-practice-choice-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	max-width: 820px;
	max-height: 310px;
	overflow: auto;
	padding: 4px;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	background: #f9f9f9;
}

.ampro-practice-choice {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	padding: 10px 12px;
	margin: 0;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	cursor: pointer;
	box-sizing: border-box;
}

.ampro-practice-choice:hover {
	border-color: #8c8f94;
}

.ampro-practice-choice.is-selected {
	border-color: #2271b1;
	box-shadow: inset 0 0 0 1px #2271b1;
	background: #f0f6fc;
}

.ampro-practice-choice.is-disabled:not(.is-selected) {
	opacity: .48;
	cursor: not-allowed;
}

.ampro-practice-choice[hidden] {
	display: none !important;
}

.ampro-practice-choice input {
	margin-top: 3px;
	flex: 0 0 auto;
}

.ampro-practice-choice span {
	display: block;
	min-width: 0;
}

.ampro-practice-choice strong {
	display: block;
	font-weight: 600;
	line-height: 1.35;
}

.ampro-practice-choice small {
	display: block;
	margin-top: 3px;
	color: #646970;
	line-height: 1.35;
}

.ampro-practice-selection-count {
	font-weight: 600;
	color: #1d2327;
}

.ampro-practice-selection-count.is-warning {
	color: #996800;
}

@media (max-width: 782px) {
	.ampro-practice-choice-list {
		grid-template-columns: 1fr;
		max-height: 360px;
	}
	.ampro-enrollment-form-actions .description {
		flex-basis: 100%;
		margin-left: 0;
	}
}
/* 3.3.20 · Estadísticas del profesorado */
.ampro-teacher-statistics__filter{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:0 0 14px}.ampro-teacher-statistics__grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.ampro-teacher-statistics__kpi{background:#fff;border:1px solid #dcdcde;border-radius:10px;padding:14px 16px;display:flex;flex-direction:column;gap:4px}.ampro-teacher-statistics__kpi strong{font-size:22px}.ampro-teacher-statistics__kpi span{color:#646970}.ampro-teacher-statistics__columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.ampro-teacher-statistics__status{display:flex;gap:8px;flex-wrap:wrap}.ampro-teacher-statistics__status span{padding:6px 10px;border:1px solid #dcdcde;border-radius:999px;background:#f6f7f7}@media(max-width:1000px){.ampro-teacher-statistics__grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ampro-teacher-statistics__columns{grid-template-columns:1fr}}

/* 3.3.22 · Estadísticas globales de Secretaría */
.ampro-center-statistics__head{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;flex-wrap:wrap;margin-bottom:14px}.ampro-center-statistics__head h2{margin:0 0 4px}.ampro-center-statistics__head p{margin:0}.ampro-center-statistics__filter{margin:0}.ampro-center-statistics__three-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0}.ampro-center-statistics__panel{background:#fff;border:1px solid #dcdcde;border-radius:10px;padding:14px}.ampro-center-statistics__panel h3{margin:0 0 10px}.ampro-center-statistics__groups{margin-top:12px}.ampro-center-statistics__status-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}.ampro-center-statistics table{margin:0}.ampro-center-statistics__kpi strong{white-space:nowrap}@media(max-width:1200px){.ampro-center-statistics__three-columns{grid-template-columns:1fr 1fr}.ampro-center-statistics__three-columns>div:last-child{grid-column:1/-1}}@media(max-width:760px){.ampro-center-statistics__three-columns,.ampro-center-statistics__status-columns{grid-template-columns:1fr}.ampro-center-statistics__three-columns>div:last-child{grid-column:auto}}

/* 3.3.24 · Pulido de informes imprimibles. */
/* 3.3.23 · Informes imprimibles. */
.ampro-report-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.ampro-report-form{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:end;margin-top:14px}.ampro-report-form label{display:flex;flex-direction:column;gap:5px;font-weight:600}.ampro-report-form label span{font-size:12px;color:#5c677a}.ampro-report-form select{width:100%;min-height:40px}.ampro-report-form .button{min-height:40px;justify-self:start}@media(max-width:900px){.ampro-report-grid,.ampro-report-form{grid-template-columns:1fr}}

/* 3.3.25 · Informes: diseño limpio + selección múltiple. */
.ampro-reports-page .ampro-reports-intro{margin-bottom:18px}.ampro-report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px!important;align-items:start}.ampro-report-card{background:#fff;border:1px solid #dcdcde;border-radius:12px;padding:18px;min-width:0}.ampro-report-card header h2{margin:0 0 6px;font-size:16px}.ampro-report-card header p{margin:0;color:#646970;min-height:40px}.ampro-report-form{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(150px,.9fr) auto;gap:10px;align-items:end;margin-top:16px}.ampro-report-form--single{grid-template-columns:minmax(180px,320px) auto}.ampro-report-form label,.ampro-report-batch-head label{display:flex;flex-direction:column;gap:5px;font-weight:600}.ampro-report-form label span,.ampro-report-batch-head label span{font-size:12px;color:#5c677a}.ampro-report-form select,.ampro-report-batch-head select,.ampro-report-batch-head input[type=search]{width:100%;min-height:40px}.ampro-report-form .button,.ampro-report-batch-actions .button{min-height:40px}.ampro-report-batch{margin-top:16px;border-top:1px solid #e5e8ec;padding-top:12px}.ampro-report-batch>summary{cursor:pointer;font-weight:700;color:#1d4f91}.ampro-report-batch-form{margin-top:12px}.ampro-report-batch-head{display:grid;grid-template-columns:minmax(160px,220px) minmax(180px,1fr);gap:10px}.ampro-report-batch-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:10px 0}.ampro-report-selected-count{color:#646970;font-size:12px;margin-left:auto}.ampro-report-checklist{border:1px solid #dcdcde;border-radius:8px;max-height:220px;overflow:auto;background:#fbfcfd}.ampro-report-check-item{display:flex;align-items:center;gap:9px;padding:8px 10px;border-bottom:1px solid #eef0f2;cursor:pointer}.ampro-report-check-item:last-child{border-bottom:0}.ampro-report-check-item:hover{background:#f3f6f9}.ampro-report-check-item input{margin:0}.ampro-report-batch-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.ampro-report-batch .description{margin:8px 0 0}.ampro-secretary-app-shell .ampro-report-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important}.ampro-secretary-app-shell .ampro-report-card{padding:18px!important;border:1px solid var(--ampro-secretary-border)!important;border-radius:12px!important;background:#fff!important;box-shadow:0 2px 10px rgba(21,35,54,.025)!important}.ampro-secretary-app-shell .ampro-report-card header p{min-height:0!important}.ampro-secretary-app-shell .ampro-report-form{grid-template-columns:minmax(0,1.3fr) minmax(150px,.9fr) auto!important}.ampro-secretary-app-shell .ampro-report-form--single{grid-template-columns:minmax(180px,320px) auto!important}.ampro-secretary-app-shell .ampro-report-batch-head{grid-template-columns:minmax(160px,220px) minmax(180px,1fr)!important}@media(max-width:1050px){.ampro-report-grid,.ampro-secretary-app-shell .ampro-report-grid{grid-template-columns:1fr!important}.ampro-report-form,.ampro-secretary-app-shell .ampro-report-form{grid-template-columns:1fr 1fr!important}.ampro-report-form .button{grid-column:1/-1;justify-self:start}}@media(max-width:700px){.ampro-report-form,.ampro-report-form--single,.ampro-report-batch-head,.ampro-secretary-app-shell .ampro-report-form,.ampro-secretary-app-shell .ampro-report-form--single,.ampro-secretary-app-shell .ampro-report-batch-head{grid-template-columns:1fr!important}.ampro-report-selected-count{width:100%;margin-left:0}}

/* 3.3.38 · Estadísticas visuales (Secretaría + Profesorado). */
.ampro-visual-stats{margin:18px 0 20px;padding:16px;border:1px solid #dfe5ec;border-radius:12px;background:#f8fafc}.ampro-visual-stats__title{margin-bottom:14px}.ampro-visual-stats__title h3{margin:0 0 4px;font-size:17px}.ampro-visual-stats__title p{margin:0}.ampro-visual-stats__status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:12px}.ampro-visual-stats__bars-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:12px}.ampro-visual-stats__bars-grid--two{grid-template-columns:repeat(2,minmax(0,1fr))}.ampro-visual-stats__panel{background:#fff;border:1px solid #dfe5ec;border-radius:10px;padding:14px;min-width:0}.ampro-visual-stats__panel h4{margin:0 0 11px;font-size:14px}.ampro-visual-stats__occupancy{margin-top:0}.ampro-stacked-chart{display:flex;width:100%;height:18px;border-radius:999px;overflow:hidden;background:#e9edf2;box-shadow:inset 0 0 0 1px rgba(15,23,42,.04)}.ampro-stacked-chart__segment{height:100%;min-width:3px}.ampro-chart-legend{display:flex;gap:8px 14px;flex-wrap:wrap;margin-top:11px;font-size:12px;color:#526071}.ampro-chart-legend span{display:inline-flex;align-items:center;gap:6px}.ampro-chart-dot{display:inline-block;width:9px;height:9px;border-radius:50%;flex:0 0 9px}.ampro-chart-color--draft{background:#8793a1}.ampro-chart-color--pending{background:#d69e2e}.ampro-chart-color--review{background:#dd6b20}.ampro-chart-color--confirmed{background:#38a169}.ampro-chart-color--waitlist{background:#718096}.ampro-chart-color--cancelled{background:#c53030}.ampro-chart-color--archived{background:#a0aec0}.ampro-chart-color--payment-unpaid{background:#8793a1}.ampro-chart-color--payment-pending{background:#d69e2e}.ampro-chart-color--payment-paid{background:#38a169}.ampro-chart-color--payment-exempt{background:#3182ce}.ampro-chart-color--payment-refunded{background:#805ad5}.ampro-bar-chart{display:flex;flex-direction:column;gap:10px}.ampro-bar-chart__row{min-width:0}.ampro-bar-chart__meta{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-bottom:5px;font-size:12px}.ampro-bar-chart__meta span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#334155}.ampro-bar-chart__meta strong{font-size:12px;color:#172033;flex:0 0 auto}.ampro-bar-chart__track{height:9px;background:#e8edf3;border-radius:999px;overflow:hidden}.ampro-bar-chart__track>span{display:block;height:100%;border-radius:999px;background:#365b7d;min-width:0}.ampro-bar-chart__row small{display:block;margin-top:4px;color:#7a8696;font-size:11px}.ampro-bar-chart__track>span.ampro-occupancy--low{background:#4d9a65}.ampro-bar-chart__track>span.ampro-occupancy--medium{background:#d69e2e}.ampro-bar-chart__track>span.ampro-occupancy--high{background:#c05621}.ampro-visual-stats--teacher{margin-top:2px}
@media(max-width:1100px){.ampro-visual-stats__bars-grid{grid-template-columns:1fr 1fr}.ampro-visual-stats__bars-grid>div:last-child{grid-column:1/-1}.ampro-visual-stats__bars-grid--two>div:last-child{grid-column:auto}}
@media(max-width:760px){.ampro-visual-stats__status-grid,.ampro-visual-stats__bars-grid,.ampro-visual-stats__bars-grid--two{grid-template-columns:1fr}.ampro-visual-stats__bars-grid>div:last-child,.ampro-visual-stats__bars-grid--two>div:last-child{grid-column:auto}}

/* 3.3.39 · Primera fase de Boletines de Evaluación. */
.ampro-bulletins-wrap .ampro-bulletins-intro {
	max-width: 1120px;
	margin: 16px 0;
}
.ampro-bulletins-wrap .ampro-bulletins-intro h2 {
	margin-top: 0;
}
.ampro-bulletin-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-end;
	max-width: 1120px;
	margin: 16px 0;
}
.ampro-bulletin-filters label {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 180px;
}
.ampro-bulletin-filters label > span {
	font-weight: 600;
}
.ampro-bulletin-search {
	flex: 1 1 220px;
}
.ampro-bulletin-search input {
	width: 100%;
}
.ampro-bulletin-toolbar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 14px 0;
	flex-wrap: wrap;
}
.ampro-bulletin-toolbar p {
	margin: 0;
}
.ampro-bulletins-table-card {
	max-width: 100%;
	overflow-x: auto;
}
.ampro-bulletins-table td,
.ampro-bulletins-table th {
	vertical-align: middle;
}
.ampro-bulletin-actions {
	min-width: 285px;
}
.ampro-inline-form {
	display: inline-block;
	margin: 2px 2px 2px 0;
}
.ampro-bulletin-has-drafts {
	font-weight: 600;
}
.ampro-bulletin-preview {
	max-width: 1120px;
	margin-top: 18px;
}
.ampro-bulletin-preview__head {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	align-items: flex-start;
	border-bottom: 1px solid #dcdcde;
	padding-bottom: 12px;
	margin-bottom: 14px;
}
.ampro-bulletin-preview__head h2,
.ampro-bulletin-preview__head p {
	margin-top: 0;
}
.ampro-bulletin-preview__summary {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 16px;
}
.ampro-bulletin-preview__summary > span {
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 8px 11px;
	background: #fff;
}
.ampro-bulletin-evaluation {
	border-top: 1px solid #e5e7eb;
	padding: 14px 0;
}
.ampro-bulletin-evaluation:first-of-type {
	border-top: 0;
}
.ampro-bulletin-evaluation__title {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	align-items: baseline;
}
.ampro-bulletin-evaluation__title > span {
	font-size: 1.12em;
	font-weight: 700;
}
@media (max-width: 782px) {
	.ampro-bulletin-filters {
		display: grid;
		grid-template-columns: 1fr;
	}
	.ampro-bulletin-filters label {
		min-width: 0;
	}
	.ampro-bulletin-preview__head,
	.ampro-bulletin-evaluation__title {
		flex-direction: column;
	}
	.ampro-bulletin-actions {
		min-width: 240px;
	}
}

/* 3.3.57 · Fichaje de profesorado */
.ampro-timeclock-admin-kpis{margin-top:16px}
.ampro-timeclock-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr)) auto;gap:10px;align-items:end}
.ampro-timeclock-filter-grid label,.ampro-timeclock-edit-grid label,.ampro-timeclock-reason-label{display:flex;flex-direction:column;gap:5px;font-weight:600;color:#334155}
.ampro-timeclock-filter-grid input,.ampro-timeclock-filter-grid select,.ampro-timeclock-edit-grid input,.ampro-timeclock-reason-label textarea{width:100%;min-width:0}
.ampro-timeclock-edit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:12px}.ampro-timeclock-reason-label{margin-top:8px}
.ampro-timeclock-admin-table td,.ampro-timeclock-admin-table th{vertical-align:middle}
@media(max-width:1000px){.ampro-timeclock-filter-grid{grid-template-columns:repeat(2,minmax(150px,1fr))}.ampro-timeclock-filter-grid .button{width:max-content}}
@media(max-width:620px){.ampro-timeclock-filter-grid,.ampro-timeclock-edit-grid{grid-template-columns:1fr}}


/* 3.3.58 · Detalle visible de correcciones de fichaje */
.ampro-timeclock-correction-detail {
	margin: 12px 0 16px;
	padding: 12px 14px;
	border: 1px solid #d8dee8;
	border-left: 4px solid #6b7280;
	border-radius: 8px;
	background: #f8fafc;
}
.ampro-timeclock-correction-detail p { margin: 6px 0 0; }
.ampro-timeclock-correction-inline { margin-top: 6px; font-size: 12px; }
.ampro-timeclock-correction-inline summary { cursor: pointer; text-decoration: underline; }
.ampro-timeclock-correction-inline div { margin-top: 4px; max-width: 320px; line-height: 1.35; }

/* 3.3.59 · Historial de emails del profesor consultable */
.ampro-teacher-email-detail { margin-top: 6px; font-size: 12px; }
.ampro-teacher-email-detail summary { cursor: pointer; text-decoration: underline; color: #334155; }
.ampro-teacher-email-detail__panel {
	margin-top: 8px;
	padding: 12px 14px;
	border: 1px solid #d8dee8;
	border-radius: 8px;
	background: #f8fafc;
	min-width: 360px;
	max-width: 760px;
	line-height: 1.45;
}
.ampro-teacher-email-detail__meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 18px; margin-bottom: 10px; }
.ampro-teacher-email-detail__meta p { margin: 0; }
.ampro-teacher-email-detail__body { border-top: 1px solid #d8dee8; padding-top: 10px; }
.ampro-teacher-email-detail__message { margin-top: 7px; white-space: normal; overflow-wrap: anywhere; }
.ampro-teacher-email-detail__error { margin: 10px 0 0; color: #b42318; }
@media (max-width: 782px) {
	.ampro-teacher-email-detail__panel { min-width: 0; max-width: 100%; }
	.ampro-teacher-email-detail__meta { grid-template-columns: 1fr; }
}
