/* ==========================================================================
   Casos emblemáticos — front
   Hereda la tipografía del tema; solo define estructura, escala y color.
   ========================================================================== */

.ce-listado {
	--ce-linea: #e3e6e2;
	--ce-texto: #1f2421;
	--ce-tenue: #5d6660;
	--ce-estado: #2f4d72;
	--ce-acento: #6b312f;
	--ce-acento-oscuro: #552724 ;
	--ce-fila-alt: #f7f8f6;
	color: var(--ce-texto);
	font-size: 15px;
	line-height: 1.55;
}

.ce-visualmente-oculto {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Buscador ---------------------------------------------------------------- */
.ce-buscador { margin-bottom: 16px; }
.ce-input-buscar {
	width: 100%;
	max-width: 420px;
	padding: 10px 14px;
	border: 1px solid var(--ce-linea);
	border-radius: 3px;
	font: inherit;
	color: inherit;
	background: #fff;
}
.ce-input-buscar:focus {
	outline: 2px solid var(--ce-acento);
	outline-offset: 1px;
	border-color: var(--ce-acento);
}

/* Tabla del listado ------------------------------------------------------- */
.ce-tabla {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
}
.ce-tabla thead th {
	text-align: left;
	font-weight: 600;
	font-size: 15px;
	color: var(--ce-texto);
	padding: 14px 16px;
	border-bottom: 2px solid var(--ce-linea);
	background: transparent;
}
.ce-tabla tbody td {
	padding: 16px;
	vertical-align: middle;
	border-bottom: 1px solid var(--ce-linea);
}
.ce-tabla tbody tr:nth-child(odd) td { background: var(--ce-fila-alt); }

.ce-caso-titulo { display: block; font-weight: 600; }
.ce-caso-subtitulo { display: block; color: var(--ce-tenue); font-size: 14px; margin-top: 3px; }
.ce-caso-expediente { display: block; color: var(--ce-tenue); font-size: 13px; margin-top: 6px; }

.ce-celda-estado {
	color: var(--ce-estado);
	text-align: justify;
	max-width: 640px;
}

.ce-col-accion { width: 64px; text-align: center; }

.ce-boton-ver {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px; height: 32px;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: var(--ce-acento);
	color: #fff;
	cursor: pointer;
	transition: background .15s ease;
}
.ce-boton-ver:hover,
.ce-boton-ver:focus-visible { background-color: #b0221f; }
.ce-boton-ver:focus-visible { outline: 2px solid #b0221f; outline-offset: 2px; }
.ce-boton-ver svg { width: 18px; height: 18px; fill: currentColor; }

.ce-sin-resultados { padding: 20px 0; color: var(--ce-tenue); }

/* Paginación -------------------------------------------------------------- */
.ce-paginacion { margin-top: 20px; display: flex; gap: 6px; flex-wrap: wrap; }
.ce-paginacion .page-numbers {
	padding: 6px 12px;
	border: 1px solid var(--ce-linea);
	border-radius: 3px;
	text-decoration: none;
	color: var(--ce-texto);
}
.ce-paginacion .page-numbers.current,
.ce-paginacion .page-numbers:hover { background: var(--ce-acento); border-color: var(--ce-acento); color: #fff; }

/* Modal ------------------------------------------------------------------- */
.ce-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 4vh 16px;
	overflow-y: auto;
}
.ce-modal[hidden] { display: none; }
.ce-modal-fondo { position: fixed; inset: 0; background: rgba(15, 20, 18, .72); }

.ce-modal-caja {
	position: relative;
	width: 100%;
	max-width: 960px;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
	color: #1f2421;
	font-size: 15px;
	line-height: 1.6;
}

.ce-modal-cerrar {
	position: absolute;
	top: 10px; right: 12px;
	width: 34px; height: 34px;
	border: 0;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	color: #5d6660;
	cursor: pointer;
}
.ce-modal-cerrar:hover { color: #1f2421; }

.ce-modal-encabezado {
	padding: 24px 56px 18px 28px;
	border-bottom: 3px solid #6b452f;
}
.ce-modal-encabezado h2 {
	margin: 0;
	font-size: 21px;
	line-height: 1.3;
	color: #b0221f;
}
.ce-modal-subtitulo { margin: 6px 0 0; color: #5d6660; font-size: 15px; }

.ce-modal-cuerpo { padding: 22px 28px 28px; }

.ce-datos { margin: 0 0 22px; }
.ce-datos > div {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 16px;
	padding: 12px 0;
	border-bottom: 1px solid #e3e6e2;
}
.ce-datos dt { font-weight: 600; margin: 0; }
.ce-datos dd { margin: 0; text-align: justify; }
.ce-datos dd p { margin: 0 0 10px; }
.ce-datos dd p:last-child { margin-bottom: 0; }

.ce-modal-imagen { margin: 0 0 22px; }
.ce-modal-imagen img { max-width: 420px; width: 100%; height: auto; display: block; border-radius: 3px; }

.ce-seccion { margin-top: 26px; }
.ce-seccion h3 {
	margin: 0 0 12px;
	font-size: 17px;
	font-weight: 600;
	padding-bottom: 8px;
	border-bottom: 1px solid #e3e6e2;
}

/* Documentos */
.ce-archivos { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ce-archivos a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 14px;
	border: 1px solid #e3e6e2; 
	border-radius: 3px;
	text-decoration: none;
	color: #1f2421;
	background: #fbfcfb;
}
.ce-archivos a:hover { background: #f2f5f2; }
.ce-archivos svg { width: 20px; height: 20px; fill: #b0221f; flex: none; }
.ce-archivos em { margin-left: auto; font-style: normal; font-size: 13px; color: #5d6660; }

/* Seguimiento */
.ce-tabla-seguimiento { width: 100%; border-collapse: collapse; font-size: 14px; }
.ce-tabla-seguimiento th {
	text-align: left;
	font-weight: 600;
	padding: 10px 12px;
	border-bottom: 2px solid #e3e6e2;
}
.ce-tabla-seguimiento td {
	padding: 12px;
	border-bottom: 1px solid #e3e6e2;
	vertical-align: top;
	text-align: justify;
}
.ce-tabla-seguimiento tr:nth-child(even) td { background: #f7f8f6; }
.ce-enlace-pdf { color: #2f6b3f; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ce-enlace-pdf:hover { text-decoration: underline; }

body.ce-modal-abierto { overflow: hidden; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 782px) {
	.ce-tabla thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.ce-tabla tbody tr {
		display: block;
		position: relative;
		margin-bottom: 14px;
		border: 1px solid var(--ce-linea);
		border-left: 3px solid var(--ce-acento);
	}
	.ce-tabla tbody td { display: block; border: 0; padding: 12px 14px; }
	.ce-tabla tbody tr:nth-child(odd) td { background: transparent; }
	.ce-tabla tbody td[data-label]::before {
		content: attr(data-label);
		display: block;
		font-size: 12px;
		letter-spacing: .02em;
		color: var(--ce-tenue);
		margin-bottom: 4px;
	}
	.ce-celda-estado { text-align: left; }
	.ce-col-accion { width: auto; text-align: left; padding-top: 0; }

	.ce-modal { padding: 0; }
	.ce-modal-caja { border-radius: 0; min-height: 100%; }
	.ce-modal-encabezado { padding: 20px 50px 16px 18px; }
	.ce-modal-cuerpo { padding: 18px; }
	.ce-datos > div { grid-template-columns: 1fr; gap: 4px; }

	.ce-tabla-seguimiento thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.ce-tabla-seguimiento tr { display: block; border: 1px solid #e3e6e2; margin-bottom: 12px; }
	.ce-tabla-seguimiento td { display: block; border: 0; text-align: left; }
	.ce-tabla-seguimiento tr:nth-child(even) td { background: transparent; }
	.ce-tabla-seguimiento td::before {
		content: attr(data-label);
		display: block;
		font-size: 12px;
		color: #5d6660;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ce-boton-ver { transition: none; }
}
