/* =========================================================================
 * Tabla de Documentos de Transparencia — estilo SDD, sin Bootstrap ni jQuery.
 * Todo scoped bajo .rtd-docs.
 * ========================================================================= */
.rtd-docs {
	font-family: 'Inter', 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	color: #1f1f1f;
	margin: 1rem 0 2rem;
}
.rtd-docs-title {
	font-size: 1.25rem;
	margin: 0 0 .75rem;
}
/* La especificidad debe superar al reset del SDD (.sdd div{margin:0}),
 * por eso se ancla en .sdd .rtd-docs … (si no, el margen se ignora). */
.sdd .rtd-docs .rtd-docs-toolbar {
	margin-top: 8px;
	margin-bottom: 44px;
	display: flex;
	justify-content: flex-end;
}
.rtd-docs-search {
	width: 100%;
	max-width: 340px;
	padding: .5rem .95rem .5rem 2.35rem;
	border: 1px solid #e3e8f0;
	border-radius: 999px;
	font-size: .9rem;
	color: #25313f;
	background: #f6f8fb url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4.3-4.3'/></svg>") no-repeat .95rem center;
	background-size: 16px 16px;
	transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.rtd-docs-search::placeholder { color: #9aa4b2; }
.rtd-docs-search:focus {
	outline: none;
	background-color: #fff;
	border-color: #1761c3;
	box-shadow: 0 0 0 3px rgba(23, 97, 195, .1);
}
.rtd-docs-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: #fff;
	font-size: .95rem;
	border: 1px solid #e6e8eb;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0, 32, 80, .06);
}
/* Esquinas redondeadas sin recortar el contenido (los botones ya no se cortan). */
.rtd-docs-table thead th:first-child { border-top-left-radius: 9px; }
.rtd-docs-table thead th:last-child { border-top-right-radius: 9px; }
.rtd-docs-table tbody tr:last-child td:first-child { border-bottom-left-radius: 9px; }
.rtd-docs-table tbody tr:last-child td:last-child { border-bottom-right-radius: 9px; }
.rtd-docs-table thead th {
	text-align: left;
	background: #1761c3;
	color: #fff;
	font-weight: 600;
	padding: .7rem .9rem;
	border: 0;
}
.rtd-docs-table tbody td {
	padding: .7rem .9rem;
	border-bottom: 1px solid #eef1f6;
	vertical-align: middle;
}
.rtd-docs-table tbody tr:last-child td { border-bottom: 0; }
.rtd-docs-table tbody tr:nth-child(even) { background: #f8fafd; }
.rtd-docs-table tbody tr:hover { background: #eef4fc; }

/* Año y Mes centrados y angostos; Descargar a la derecha. */
.rtd-docs-table th:nth-child(2), .rtd-docs-table td:nth-child(2),
.rtd-docs-table th:nth-child(3), .rtd-docs-table td:nth-child(3) {
	text-align: center;
	white-space: nowrap;
	width: 84px;
}
.rtd-docs-table th:last-child, .rtd-docs-table td:last-child {
	text-align: right;
	white-space: nowrap;
	width: 1%;
}
.rtd-docs-name a {
	color: #1761c3;
	font-weight: 600;
	text-decoration: none;
}
.rtd-docs-name a:hover,
.rtd-docs-name a:focus {
	text-decoration: underline;
}
/* Botón compacto: solo el ícono de descarga (la flechita). El texto "Descargar"
 * queda oculto visualmente (font-size:0) pero sigue accesible para lectores. */
.rtd-docs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	font-size: 0 !important;
	line-height: 0;
	overflow: hidden;
	background: linear-gradient(180deg, #1f6fd0 0%, #1761c3 100%);
	color: #fff;
	border-radius: 9px;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(0, 32, 80, .18);
	transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.rtd-docs-btn::before {
	content: "";
	width: 17px;
	height: 17px;
	flex: 0 0 auto;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 16l-6-6h4V4h4v6h4l-6 6zm-7 2h14v2H5z'/></svg>") center / contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 16l-6-6h4V4h4v6h4l-6 6zm-7 2h14v2H5z'/></svg>") center / contain no-repeat;
}
.rtd-docs-btn:hover,
.rtd-docs-btn:focus {
	background: linear-gradient(180deg, #1761c3 0%, #114d9c 100%);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(23, 97, 195, .32);
}
.rtd-docs-btn:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(0, 32, 80, .2);
}
.rtd-docs-muted { color: #6b7280; font-size: .85rem; }
.rtd-docs-empty {
	padding: 1rem;
	background: #f6f8fb;
	border: 1px solid #e6e8eb;
	border-radius: 6px;
	color: #444;
}

/* Responsive: en móvil, las celdas se apilan con etiquetas. */
@media (max-width: 640px) {
	.rtd-docs-table thead { display: none; }
	.rtd-docs-table, .rtd-docs-table tbody, .rtd-docs-table tr, .rtd-docs-table td {
		display: block;
		width: 100%;
	}
	.rtd-docs-table tr {
		margin-bottom: .75rem;
		border: 1px solid #e6e8eb;
		border-radius: 6px;
		overflow: hidden;
	}
	.rtd-docs-table td {
		border-bottom: 1px solid #eef0f2;
	}
	.rtd-docs-table td:last-child { border-bottom: 0; }
}

/* =========================================================================
 * Vista agrupada por Año (acordeón). Todo scoped bajo .sdd .rtd-docs para
 * superar el reset del SDD (.sdd div{margin:0;padding:0}).
 * ========================================================================= */
.sdd .rtd-docs .rtd-year-group {
	border: 1px solid #e3e8f0;
	border-radius: 10px;
	margin-bottom: 12px;
	overflow: hidden;
	background: #fff;
}
.sdd .rtd-docs .rtd-year-toggle {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	background: #f6f8fb;
	border: 0;
	cursor: pointer;
	font: inherit;
	color: #003876;
	font-weight: 600;
	font-size: 1rem;
	text-align: left;
}
.sdd .rtd-docs .rtd-year-toggle:hover { background: #eef4fc; }
.sdd .rtd-docs .rtd-year-label { flex: 0 0 auto; }
.sdd .rtd-docs .rtd-year-count {
	margin-left: auto;
	background: #dbe7f6;
	color: #1761c3;
	font-size: .8rem;
	font-weight: 600;
	border-radius: 999px;
	padding: 2px 11px;
	min-width: 26px;
	text-align: center;
}
.sdd .rtd-docs .rtd-year-chevron {
	width: 9px;
	height: 9px;
	border-right: 2px solid #1761c3;
	border-bottom: 2px solid #1761c3;
	transform: rotate(-45deg);   /* plegado: apunta a la derecha */
	transition: transform .2s ease;
	margin-left: 2px;
}
.sdd .rtd-docs .rtd-year-group.rtd-open .rtd-year-chevron {
	transform: rotate(45deg);    /* desplegado: apunta hacia abajo */
}
.sdd .rtd-docs .rtd-year-body { border-top: 1px solid #e3e8f0; }
.sdd .rtd-docs .rtd-year-group:not(.rtd-open) .rtd-year-body { display: none; }
/* Lista plana (sección sin años): caja sin encabezado de año. */
.sdd .rtd-docs .rtd-year-group.rtd-no-head .rtd-year-body { border-top: 0; }

.sdd .rtd-docs .rtd-doc-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 18px;
	border-bottom: 1px solid #eef1f6;
}
.sdd .rtd-docs .rtd-year-body .rtd-doc-row:last-child { border-bottom: 0; }
.sdd .rtd-docs .rtd-doc-row:hover { background: #f8fafd; }
.sdd .rtd-docs .rtd-doc-name {
	flex: 1 1 auto;
	color: #1761c3;
	font-size: .95rem;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
}
.sdd .rtd-docs .rtd-doc-name:hover { color: #003876; text-decoration: underline; }
.sdd .rtd-docs .rtd-doc-mes {
	flex: 0 0 90px;
	text-align: center;
	color: #5b6b7d;
	font-size: .85rem;
}
.sdd .rtd-docs .rtd-doc-dl { flex: 0 0 auto; margin-left: 4px; }
@media (max-width: 600px) {
	.sdd .rtd-docs .rtd-doc-mes { flex-basis: 58px; font-size: .8rem; }
	.sdd .rtd-docs .rtd-doc-row { padding: 11px 14px; gap: 10px; }
	.sdd .rtd-docs .rtd-year-toggle { padding: 13px 14px; }
}
