/* ==========================================================
   Módulo "Presupuesto" (Grupo: Análisis)
   Estilos scopeados bajo .presupuesto-modulo
   ========================================================== */

.presupuesto-modulo h1 { margin: 0; }
.presupuesto-modulo h2 { margin: 0 0 4px; font-size: 22px; }
.presupuesto-modulo h3 { margin: 24px 0 8px; font-size: 16px; }
.presupuesto-modulo .presupuesto-sub { margin: 0; color: #6b7280; font-size: 13px; }

/* Paso 1 — Layout dos columnas */
.presupuesto-modulo .presupuesto-paso1-layout {
	display: flex;
	gap: 28px;
	align-items: flex-start;
	padding: 18px 0 4px;
}
.presupuesto-modulo .presupuesto-paso1-form {
	flex: 1;
	min-width: 0;
}
.presupuesto-modulo .presupuesto-paso1-form h2 {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 300;
}
.presupuesto-modulo .presupuesto-paso1-form form {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.presupuesto-modulo .presupuesto-monto-row {
	display: flex;
	gap: 10px;
	align-items: stretch;
}
.presupuesto-modulo .presupuesto-monto-row .text {
	flex: 1;
	min-width: 0;
}
.presupuesto-modulo .presupuesto-btn-pct {
	white-space: nowrap;
	flex-shrink: 0;
}
.presupuesto-modulo .presupuesto-info-text {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 10px 13px;
	background: #eff6ff;
	border-radius: 6px;
	font-size: 13px;
	color: #1d4ed8;
	line-height: 1.4;
}
.presupuesto-modulo .presupuesto-info-text .bi {
	flex-shrink: 0;
	margin-top: 1px;
}
.presupuesto-modulo .presupuesto-valor-estatico {
	font-size: 15px;
	font-weight: 600;
	color: #111827;
	padding: 8px 12px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	display: inline-block;
	min-width: 180px;
}
.presupuesto-modulo .presupuesto-botonera-paso1 {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	margin-top: 6px;
}

/* Panel resumen paso 1 */
.presupuesto-modulo .presupuesto-paso1-resumen {
	flex:1;
	/* background: #f9fafb; */
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 18px 20px;
}
.presupuesto-modulo .presupuesto-resumen-titulo {
	display: block;
	font-size: 14px;
	font-weight: 300;
	/* color: 333; */
	margin-bottom: 14px;
}
.presupuesto-modulo .presupuesto-resumen-lineas {
	display: flex;
	flex-direction: column;
}
.presupuesto-modulo .presupuesto-resumen-fila {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid #e5e7eb;
}
.presupuesto-modulo .presupuesto-resumen-fila:last-child { border-bottom: 0; }
.presupuesto-modulo .presupuesto-resumen-key {
	font-size: 13px;
	color: #6b7280;
	flex: 1;
}
.presupuesto-modulo .presupuesto-resumen-val {
	font-size: 13px;
	font-weight: 300;
	color: #333;
	text-align: right;
	white-space: nowrap;
}

.presupuesto-modulo .presupuesto-tabs {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	list-style: none;
	background: #fff;
	font-weight: 400;
	margin: 0 !important;
	padding: 0 !important;
	min-height: auto !important;
    height: auto !important;
	border: none;
}
.presupuesto-modulo .presupuesto-tabs li {
	flex-shrink: 0;
	cursor: pointer;
	list-style: none;
	position: relative;
	top: 0;
	float: none;
}
.presupuesto-modulo .presupuesto-tabs li a {
	display: block;
	color: #6b7280;
	text-decoration: none;
	padding: 10px 12px;
	border: none;
	transition: all ease 200ms;
	cursor: pointer;
	font-size: 15px;
	font-weight: 300;
}
.presupuesto-modulo .presupuesto-tabs li a:hover {
	color: var(--primario);
}
.presupuesto-modulo .presupuesto-tabs li a.activo {
	background: #fff;
	color: var(--primario);
	border-bottom-color: #fff;
	font-weight: 300;
}
.presupuesto-modulo .presupuesto-tabs li a.activo:after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: #fff;
    z-index: 5;
}
.presupuesto-modulo .presupuesto-tabs.presupuesto-tabs-interior li a.activo {
	background: var(--primario);
	border-bottom-color: var(--primario);
	color: #fff;
}
.presupuesto-modulo .presupuesto-tabs.presupuesto-tabs-interior li a.activo:after {
	background: #e5e7eb;
}
.presupuesto-modulo .presupuesto-tabs.presupuesto-tabs-interior li {
	font-weight: 400;
	margin: 0 0 20px;
}
.presupuesto-modulo .presupuesto-tabs .paso-num {
	display: inline-block;
	width: 22px; height: 22px;
	line-height: 22px; text-align: center;
	border-radius: 50%;
	background: #e5e7eb;
	color: #6b7280;
	font-size: 12px; font-weight: 700;
	margin-right: 6px;
}
.presupuesto-modulo .presupuesto-tabs li a.activo .paso-num {
	background: var(--primario); color: #fff;
}
.presupuesto-modulo .presupuesto-tabs li a.disabled {
	opacity: 0.45;
	cursor: not-allowed;
	color: #9ca3af;
	pointer-events: none;
}
.presupuesto-modulo .presupuesto-tabs li a.disabled:hover {
	color: #9ca3af;
	pointer-events: none;
}
.presupuesto-modulo .presupuesto-tabs li a.disabled .paso-num {
	background: #d1d5db;
	color: #9ca3af;
}

/* Cards */
/* .presupuesto-modulo .presupuesto-paso { padding:0; } */
.presupuesto-modulo .presupuesto-paso[data-paso] { display: none; }
.presupuesto-modulo .presupuesto-paso.activo { display: block; padding:0; border:none; }

.presupuesto-modulo .presupuesto-card {
	background: #fff;
	/* border-radius: 8px; */
}
.presupuesto-modulo .presupuesto-card:last-child {
	margin-bottom: 0;
}
.presupuesto-modulo .presupuesto-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 0;
	flex-wrap: wrap;
}

/* Resúmenes mini */
.presupuesto-modulo .presupuesto-totales-mini,
.presupuesto-modulo .presupuesto-resumen-mini {
	display: flex;
	gap: 36px;
	align-items: flex-end;
	flex-wrap: wrap;
	margin-bottom: 16px;
}
.presupuesto-modulo .presupuesto-totalcito,
.presupuesto-modulo .presupuesto-resumen-bloque {
	display: flex;
	flex-direction: column;
	min-width: 160px;
}
.presupuesto-modulo .presupuesto-resumen-bloque.presupuesto-resumen-derecha { margin-left: auto; }
.presupuesto-modulo .presupuesto-totalcito .lbl,
.presupuesto-modulo .presupuesto-resumen-bloque .lbl {
	font-size: 12px;
	color: #6b7280;
	margin-bottom: 4px;
}
.presupuesto-resumen-derecha .lbl ,
.presupuesto-resumen-derecha .val {
	text-align: right;
}
.presupuesto-modulo .presupuesto-totalcito .val,
.presupuesto-modulo .presupuesto-resumen-bloque .val {
	font-size: 26px;
	font-weight: 300;
	color: #333;
	line-height: 1.1;
}
.presupuesto-modulo .val-gris { color: #9ca3af !important; font-weight: 400 !important; }
.presupuesto-modulo .val-error { color: #b91c1c !important; }

/* Barra de progreso */
.presupuesto-modulo .presupuesto-progreso {
	width: 100%;
	height: 8px;
	background: #e5e7eb;
	border-radius: 4px;
	overflow: hidden;
	flex-basis: 100%;
}
.presupuesto-modulo .presupuesto-progreso.mini { width: 80px; height: 6px; }
.presupuesto-modulo .presupuesto-progreso-bar {
	height: 100%;
	background: #6b7280;
	transition: width .2s ease, background .2s ease;
}
.presupuesto-modulo .presupuesto-progreso-bar.ok    { background: #16a34a; }
.presupuesto-modulo .presupuesto-progreso-bar.warn  { background: #f59e0b; }
.presupuesto-modulo .presupuesto-progreso-bar.error { background: #dc2626; }

/* Form paso 1 */
.presupuesto-modulo .presupuesto-form-paso1 {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 700px;
}
.presupuesto-modulo .presupuesto-form-fila {
	display: flex;
	gap: 16px;
	align-items: flex-end;
	flex-wrap: wrap;
}
.presupuesto-modulo .presupuesto-form-fila .bloque { flex: 1; min-width: 240px; }
.presupuesto-modulo .presupuesto-input-monto { text-align: left; }
.presupuesto-modulo .presupuesto-validador { display: block; min-height: 16px; color: #b91c1c; font-size: 12px; }

.presupuesto-modulo .presupuesto-radio-group {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
	margin-top: 4px;
}
.presupuesto-modulo .presupuesto-radio {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-size: 13px;
	color: #333;
}
.presupuesto-modulo .presupuesto-radio input[type="radio"] { margin: 0; }
.presupuesto-modulo .presupuesto-radio small { margin-left: 4px; font-size: 11px; }
.presupuesto-modulo .presupuesto-input-porcentaje { max-width: 100px;margin-bottom: 10px; }
.presupuesto-modulo .presupuesto-input-pct-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
}
.presupuesto-modulo .presupuesto-input-porcentaje-colegio {
	width: 62px;
	text-align: right;
	padding-right: 18px !important;
	margin: 0 !important;
	font-weight: 500;
}
.presupuesto-modulo .presupuesto-input-porcentaje-colegio:focus {
	border-color: var(--primario);
	box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.15);
}

/* Tablas */
.presupuesto-modulo .presupuesto-tabla-wrap {
	overflow-x: auto;
	overflow-y: visible;
	/* border: 1px solid #e5e7eb; */
	border-radius: 6px;
}
.presupuesto-modulo .presupuesto-tabla {
	width: 100%;
	border-collapse: collapse;
	font-size: 10px;
}
.presupuesto-modulo .presupuesto-tabla th,
.presupuesto-modulo .presupuesto-tabla td {
	padding: 10px 12px;
	border-bottom: 1px solid #f3f4f6;
	text-align: left;
	vertical-align: middle;
}
.presupuesto-modulo .presupuesto-tabla thead th {
	background: #eee;
	color: #6b7280;
	font-weight: 500;
	font-size: 12px;
	text-transform: none;
}
.presupuesto-modulo .presupuesto-tabla tfoot th {
	background: #eee;
	font-weight: 700;
}
.presupuesto-modulo .presupuesto-tabla .num   { text-align: right; }
.presupuesto-modulo .presupuesto-tabla .empty { text-align: center; padding: 24px; color: #9ca3af; }

.presupuesto-modulo .presupuesto-tabla .text {
    height: 32px;
    padding: 4px 8px;
    text-align: right;
    font-size: 13px;
    max-width: 90px !important;
    min-width: auto;
}

.presupuesto-modulo .presupuesto-pct {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	font-size: 12px;
}

/* Subtabla de proyectos */
.presupuesto-modulo .fila-proyectos {
	display: none;
}
.presupuesto-modulo .fila-proyectos > td {
	background: #fafafa;
	padding: 0 !important;
}
.presupuesto-modulo .presupuesto-subtabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    background:#f7fbff;
    margin: 0;
}
.presupuesto-modulo .presupuesto-subtabla th,
.presupuesto-modulo .presupuesto-subtabla td {
	padding: 6px 8px;
	border-bottom: 1px solid #f3f4f6;
	font-size: 11px;
	vertical-align: middle;
}
.presupuesto-modulo .presupuesto-subtabla thead th {
	background: #e6ecf2;
	color: #6b7280;
	font-weight: 500;
	font-size: 11px;
	text-transform: none;
}
.presupuesto-modulo .presupuesto-subtabla .num { text-align: right; }
.presupuesto-modulo .presupuesto-subtabla .boton.mini {
	padding: 4px 6px;
	font-size: 11px;
	line-height: 1.2;
	white-space: nowrap;
}
.presupuesto-modulo .presupuesto-subtabla .presupuesto-select-aprobacion {
	height: 28px;
	padding: 2px 4px;
	font-size: 11px;
	min-width: 80px;
	max-width: 90px;
	width: auto;
}
.presupuesto-modulo .presupuesto-subtabla .presupuesto-input-proyecto {
	height: 28px;
	padding: 2px 6px;
	font-size: 12px;
	max-width: 85px !important;
	min-width: 75px !important;
}

.presupuesto-modulo .presupuesto-toggle-proyectos {
	border: 0; background: transparent; cursor: pointer;
	font-size: 18px; color: #6b7280;
	transition: transform 0.2s ease;
}
.presupuesto-modulo .presupuesto-toggle-proyectos[aria-expanded="true"] { transform: rotate(180deg); }

/* Botón icono historial (ojo) en tabla de proyectos paso 3 */
.presupuesto-modulo .presupuesto-btn-historial {
	border: 0;
	background: transparent;
	cursor: pointer;
	font-size: 17px;
	color: #6b7280;
	padding: 2px 4px;
	line-height: 1;
	transition: color 0.15s;
}
.presupuesto-modulo .presupuesto-btn-historial:hover { color: var(--primario); }

/* Toggle Todos / Favoritos en tab 4 consolidado */
.presupuesto-fav-toggle {
	display: inline-flex;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	overflow: hidden;
	flex-shrink: 0;
}
.presupuesto-fav-toggle-btn {
	padding: 5px 13px;
	background: #fff;
	border: none;
	border-right: 1px solid #d1d5db;
	cursor: pointer;
	font-size: 13px;
	color: #6b7280;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s;
	line-height: 1.4;
}
.presupuesto-fav-toggle-btn:last-of-type { border-right: none; }
.presupuesto-fav-toggle-btn.activo {
	background: var(--primario);
	color: #fff;
}
.presupuesto-fav-toggle-btn:not(.activo):hover {
	background: #f3f4f6;
}
.presupuesto-fav-toggle-btn .bi-star-fill {
	font-size: 10px;
	vertical-align: middle;
}

/* Botoneras */
.presupuesto-modulo .boton.mini {
    padding: 6px 10px;
    font-size: 12px !important;
    height: auto;
    margin: 0;
    min-width: 80px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}
.boton.mini .bi {
	margin-left: 0;
}
button.boton.mini.ok {
    justify-content: center;
}
.presupuesto-modulo .boton.link {
    background: transparent;
    color: var(--secundario);
    padding: 4px 8px;
    border: 1px solid var(--secundario);
}
.presupuesto-modulo .presupuesto-botonera-paso {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: -40px;
    margin-bottom: 0;
    transform: translateY(90px);
    margin-left: -30px;
    margin-right: -30px;
}
.presupuesto-modulo .presupuesto-spacer { flex: 1; }
button.boton.presupuesto-btn-historial {
    min-width: auto !important;
}
/* Alertas */
/* .presupuesto-modulo .presupuesto-alerta {
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 13px;
	margin-bottom: 12px;
} */
/* .presupuesto-modulo .presupuesto-alerta.ok    { background: #d1fae5; color: #065f46; }
.presupuesto-modulo .presupuesto-alerta.warn  { background: #fef3c7; color: #92400e; }
.presupuesto-modulo .presupuesto-alerta.error { background: #fee2e2; color: #991b1b; }
.presupuesto-modulo .presupuesto-alerta.info  { background: #dbeafe; color: #1e40af; } */

/* Badges */
.presupuesto-modulo .presupuesto-badge {
	display: inline-block;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	background: #e5e7eb; color: #333;
}
.presupuesto-modulo .presupuesto-badge.ok    { background: #d1fae5; color: #065f46; }
.presupuesto-modulo .presupuesto-badge.warn  { background: #fef3c7; color: #92400e; }
.presupuesto-modulo .presupuesto-badge.error { background: #fee2e2; color: #991b1b; }
.presupuesto-modulo .presupuesto-badge.info  { background: #dbeafe; color: #1e40af; }

/* Modal */
.presupuesto-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
}
.presupuesto-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.5);
}
.presupuesto-modal-box {
	position: relative;
	background: #fff;
	border-radius: 10px;
	width: 92%;
	max-width: 560px;
	margin: 5vh auto;
	box-shadow: 0 12px 40px rgba(0,0,0,.25);
	max-height: 90vh;
	overflow: auto;
}
.presupuesto-modal-box.small { max-width: 460px; }
.presupuesto-modal-box--xl  { max-width: 680px; width: 100%; margin: auto; }

/* ── Header XL: info + docs + cerrar ────────────────────────── */
.presupuesto-modal-box--xl .presupuesto-modal-header {
	flex-wrap: wrap;
	gap: 8px;
}
.presupuesto-modal-box.presupuesto-modal-box--xl {
    padding: 35px 35px 30px;
    max-width: 680px;
    width: 100%;
    margin: 6vh auto 0;
    scrollbar-width: thin;
}
.presupuesto-modal-header-info { flex: 1; min-width: 0; }
.presupuesto-modal-header-info h3 { margin: 0; font-size: 15px; }
.presupuesto-modal-item-lbl { font-size: 12px; color: #6b7280; display: block; margin-top: 2px; }
.presupuesto-modal-docs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.presupuesto-modal-docs a { font-size: 12px; }

/* ── Tabla de edición de meses dentro del modal ──────────────── */
.presupuesto-meses-tabla-wrap { overflow-x: auto; margin-bottom: 10px; }
.presupuesto-tabla-edicion-meses { font-size: 12px; min-width: 900px; white-space: nowrap; }
.presupuesto-td-mes-input { padding: 4px 3px !important; }
.presupuesto-td-mes-input .text { width: 68px; padding: 4px 6px; font-size: 12px; }
.presupuesto-total-meses-cell  { font-weight: 700; color: #1d4ed8; white-space: nowrap; }
.presupuesto-total-asignado-cell { font-weight: 700; white-space: nowrap; }

/* ── Bloque comentario ───────────────────────────────────────── */
.presupuesto-modal-comentario-wrap { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; padding: 10px 14px; margin: 12px 0; }
.presupuesto-modal-comentario-label { font-size: 11px; color: #6b7280; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.presupuesto-modal-comentario-text { margin: 4px 0 0; font-size: 13px; color: #333; }
.presupuesto-modal-header {
	display: flex; justify-content: space-between; align-items: center;
	padding: 0;
}
.presupuesto-modal-header h3 {
	margin: 0;
	font-size:18px;
	font-weight: 600;
	text-align: center;
}
.presupuesto-modal-cerrar {
	background: transparent; border: 0; font-size: 24px; line-height: 1; cursor: pointer;
	color: #6b7280;
	position: absolute;
	right: 16px;
	top: 16px;
}
/* .presupuesto-modal-body { padding: 18px; } */
.presupuesto-modal-body h4 { margin: 0 0 14px; font-size: 18px; text-align: center; }
.presupuesto-modal-totales {
	display: flex; justify-content: space-between; margin-bottom: 8px;
}
.presupuesto-modal-totales div { display: flex; flex-direction: column; }
.presupuesto-modal-totales .lbl { font-size: 11px; color: #6b7280; }
.presupuesto-modal-totales .val { font-size: 18px; font-weight: 700; }

.presupuesto-modal-meses {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 18px;
	margin: 16px 0;
}
.presupuesto-modal-meses .bloque { margin: 0; }
.presupuesto-modal-meses label { font-size: 12px; color: #333; }
.presupuesto-modal-meses .text { width: 100%; }
.presupuesto-modal-footer { display: flex; justify-content: center !important; margin:20px 0 0;}

.presupuesto-tabla-resumen td:first-child { color: #333; }
.presupuesto-subtitulo { margin-top: 24px !important; color: #333; }

.presupuesto-modal-header-info h2 {
	font-size: 18px;
	font-weight: 300;
	text-align: center;
	margin: 0;
}
/* Responsive */
@media (max-width: 900px){
	.presupuesto-modulo .presupuesto-resumen-mini { gap: 18px; }
	.presupuesto-modulo .presupuesto-resumen-bloque { min-width: 130px; }
	.presupuesto-modulo .presupuesto-totalcito .val,
	.presupuesto-modulo .presupuesto-resumen-bloque .val { font-size: 20px; }
	.presupuesto-modulo .presupuesto-tabla { font-size: 12px; }
	.presupuesto-modulo .presupuesto-modal-meses { grid-template-columns: 1fr; }
}
@media (max-width: 768px){
	.presupuesto-modulo .presupuesto-paso1-layout { flex-direction: column; }
	.presupuesto-modulo .presupuesto-paso1-resumen { width: 100%; }
	.presupuesto-modulo .presupuesto-monto-row { flex-direction: column; align-items: stretch; }
}
@media (max-width: 600px){
	.presupuesto-modulo .presupuesto-tabs li a { font-size: 12px; padding: 8px 6px; }
	.presupuesto-modulo .presupuesto-tabs .paso-num { width: 18px; height: 18px; line-height: 18px; font-size: 10px; }
	.presupuesto-modulo .presupuesto-card-header { flex-direction: column; align-items: stretch; }
	.presupuesto-modulo .presupuesto-botonera-paso { flex-wrap: wrap; }
	.presupuesto-modulo .presupuesto-tabla th,
	.presupuesto-modulo .presupuesto-tabla td { padding: 6px 8px; }
}

/* ── Ícono ficha colegio (columna Ficha paso 2) ─────────────────── */
.presupuesto-modulo .presupuesto-ficha-link {
	font-size: 15px;
	color: var(--primario);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 4px;
	background: #f3f4f6;
	opacity: 0.85;
	text-decoration: none;
	transition: all 0.2s ease;
}
.presupuesto-modulo .presupuesto-ficha-link:hover {
	opacity: 1;
	background: #e5e7eb;
	color: #111827;
}

/* ── Columna Aprobar / Rechazar en subtabla paso 3 ────────────────── */
.presupuesto-modulo .presupuesto-td-aprobacion { vertical-align: top; min-width: 140px; }
.presupuesto-modulo .presupuesto-aprobacion-btns {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	margin-top: 4px;
	align-items: flex-start;
	justify-content: center;
}
.presupuesto-modulo .presupuesto-aprobacion-btns .boton.ok   { background: #16a34a; border-color: #16a34a; color: #fff; }
.presupuesto-modulo .presupuesto-aprobacion-btns .boton.error{ background: #dc2626; border-color: #dc2626; color: #fff; }
.presupuesto-modulo .presupuesto-aprobacion-btns .boton:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ── Select de aprobación/rechazo ────────────────────────────────── */
.presupuesto-modulo .presupuesto-select-aprobacion {
	width: 100%;
	padding: 6px 8px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	background: #fff;
	font-size: 13px;
	color: #333;
	cursor: pointer;
	transition: border-color 0.15s;
}
.presupuesto-modulo .presupuesto-select-aprobacion:focus {
	border-color: var(--primario);
	outline: none;
	box-shadow: 0 0 0 2px rgba(var(--primario-rgb), 0.1);
}
.presupuesto-modulo .presupuesto-select-aprobacion:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	background: #f3f4f6;
}

/* ── Botón Distribuir meses deshabilitado ─────────────────────────── */
.presupuesto-modulo [data-rol-distribuir-meses]:disabled,
.presupuesto-modulo [data-rol-distribuir-meses].disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ── Badge recurrencia en subtabla ───────────────────────────────── */
.presupuesto-badge-recurrencia {
	display: inline-block;
	background: #dbeafe; color: #1d4ed8;
	border-radius: 20px; padding: 2px 9px;
	font-size: 11px; font-weight: 700;
	cursor: default; white-space: nowrap;
}
.presupuesto-badge-nuevo {
	display: inline-block;
	background: #dcfce7; color: #15803d;
	border-radius: 20px; padding: 2px 9px;
	font-size: 11px; font-weight: 600;
	cursor: default; white-space: nowrap;
}

/* ── Drawer historial ─────────────────────────────────────────────── */
#drawer-historial {
	position: fixed;
	top: 0; right: 0;
	width: 440px;
	max-width: 92vw;
	height: 100vh;
	background: #fff;
	box-shadow: -6px 0 32px rgba(0,0,0,.14);
	z-index: 9000;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform .28s cubic-bezier(.4,0,.2,1);
}
#drawer-historial.abierto { 
	transform: translateX(0);
	width: fit-content;
	max-width: 80vw;
}
.abierto .presupuesto-tabla tr td.drawer-col-actividad {
    width: 45%;
}
span.presupuesto-badge {
    font-size: 12px;
    padding: 5px;
    border-radius: 5px;
}
span.presupuesto-badge.ok { background: #d1fae5; color: #065f46; }
span.presupuesto-badge.warn { background: #fef3c7; color: #92400e; }
span.presupuesto-badge.error { background: #fee2e2; color: #991b1b; }
.drawer-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding: 16px 18px;
	border-bottom: 1px solid #e5e7eb;
	flex-shrink: 0;
	background: #f9fafb;
}
.drawer-header-info { flex: 1; min-width: 0; }
.drawer-label { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; display: block; }
.drawer-colegio-nombre { margin: 4px 0 0; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-cerrar { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: #6b7280; padding: 0 0 0 12px; flex-shrink: 0; }
.drawer-cerrar:hover { color: #111; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px; }
.drawer-cargando { color: #6b7280; font-size: 13px; padding: 12px 0; }
.drawer-sin-datos { color: #9ca3af; font-size: 13px; font-style: italic; margin: 8px 0; }

/* ── Botón favorito (★) en subtabla ─────────────────────────────── */
.presupuesto-btn-favorito {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 17px;
	color: #d1d5db;
	line-height: 1;
	padding: 3px 5px;
	border-radius: 4px;
	transition: color .15s, transform .12s;
}
.presupuesto-btn-favorito:hover { color: #f59e0b; transform: scale(1.2); }
.presupuesto-btn-favorito.activo { color: #f59e0b; }
.presupuesto-btn-favorito:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Proyecto especial (excluido de la base del crecimiento ordinario) ── */
.presupuesto-btn-especial {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 16px;
	color: #d1d5db;
	line-height: 1;
	padding: 3px 5px;
	border-radius: 4px;
	transition: color .15s, transform .15s;
}
.presupuesto-btn-especial:hover { color: #8b5cf6; transform: scale(1.2); }
.presupuesto-btn-especial.activo { color: #7c3aed; }
.presupuesto-btn-especial:disabled { opacity: 0.4; cursor: not-allowed; }
.presupuesto-badge-especial {
	display: inline-block;
	margin-left: 4px;
	background: #ede9fe; color: #6d28d9;
	border-radius: 4px; padding: 2px 6px;
	font-size: 11px; font-weight: 600;
	white-space: nowrap;
}
.drawer-nota-especiales {
	font-size: 12px;
	color: #4b5563;
	background: #f5f3ff;
	border: 1px solid #ddd6fe;
	border-radius: 6px;
	padding: 8px 10px;
	margin: 0 0 12px;
}
.drawer-nota-especiales .bi { color: #7c3aed; margin-right: 4px; }

/* Colegio cuya asignación a actividades supera su Presupuesto del Paso 1 (no permitido: hay que corregirla) */
#tabla-proyectos tr.fila-colegio.presupuesto-supera-paso1 [data-rol-asignado-real-colegio] { color: #dc2626; }

/* Paso 3: las cabeceras «Monto aprobado [año]» no se parten en 2 líneas; la columna Colegio se acota para dejarles espacio */
#tabla-proyectos > thead > tr > th[data-col="aprobado-ante-anterior"],
#tabla-proyectos > thead > tr > th[data-col="aprobado-anterior"] { white-space: nowrap; }
#tabla-proyectos > thead > tr > th[data-col="colegio"],
#tabla-proyectos > tbody > tr.fila-colegio > td.presupuesto-col-nombre { max-width: 220px; }

/* ── Filtro por colegio (Pasos 1, 3 y 4) ─────────────────────────── */
.presupuesto-modulo .presupuesto-filtro-colegio-bar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	padding: 10px 14px;
	margin: 12px 0;
}
.presupuesto-modulo .presupuesto-filtro-colegio-bar label {
	font-weight: 600;
	color: #374151;
	margin: 0;
}
.presupuesto-modulo .presupuesto-filtro-colegio-bar select { min-width: 280px; max-width: 100%; }
.presupuesto-modulo .presupuesto-filtro-colegio-bar label[for="presupuesto-filtro-colegio"] { margin-left: 8px; }
.presupuesto-modulo .presupuesto-filtro-colegio-nota { font-size: 12px; color: #6b7280; }

/* ── Colegios protegidos en el Paso 1 («Mantener datos» al volver del Paso 3) ── */
.presupuesto-modulo .presupuesto-aviso-protegidos { margin: 0 0 12px; }
.presupuesto-badge-protegido {
	display: inline-block;
	background: #ede9fe; color: #5b21b6;
	border-radius: 20px; padding: 2px 9px; margin-left: 4px;
	font-size: 11px; font-weight: 600;
	cursor: default; white-space: nowrap;
}
.presupuesto-fila-desbloqueada .presupuesto-badge-protegido { background: #fef3c7; color: #92400e; }
#tabla-colegios tr.presupuesto-fila-protegida td { background-color: #faf9ff; }
#tabla-colegios tr.presupuesto-fila-protegida .presupuesto-input-colegio,
#tabla-colegios tr.presupuesto-fila-protegida .presupuesto-input-porcentaje-colegio {
	background-color: #f3f4f6;
	color: #6b7280;
	cursor: not-allowed;
}
#tabla-colegios [data-rol-desbloquear-colegio] .bi { margin-right: 3px; }

/* ── Modal «Volver al Paso N»: Mantener datos / Restablecer / Cancelar ── */
.presupuesto-modal .presupuesto-volver-opcion {
	border: 1px solid #e5e7eb;
	border-left: 4px solid #16a34a;
	border-radius: 6px;
	padding: 10px 14px;
	margin-bottom: 10px;
	background: #f9fafb;
}
.presupuesto-modal .presupuesto-volver-opcion strong { color: #111827; font-size: 13px; }
.presupuesto-modal .presupuesto-volver-opcion strong .bi { color: #16a34a; margin-right: 4px; }
.presupuesto-modal .presupuesto-volver-opcion p { margin: 4px 0 0; font-size: 13px; color: #4b5563; line-height: 1.45; }
.presupuesto-modal .presupuesto-volver-opcion--destruct { border-left-color: #dc2626; }
.presupuesto-modal .presupuesto-volver-opcion--destruct strong .bi { color: #dc2626; }
.presupuesto-modal .presupuesto-volver-aviso { font-size: 12px; color: #92400e; background: #fffbeb; border-radius: 6px; padding: 8px 12px; margin: 6px 0 0; }

/* ── Botón destructivo en modal Restablecer ──────────────────────── */
/* .presupuesto-modal .boton.presupuesto-btn-destruct {
	background: #dc2626;
	border-color: #dc2626;
	color: #fff;
}
.presupuesto-modal .boton.presupuesto-btn-destruct:hover {
	background: #b91c1c;
	border-color: #b91c1c;
} */
.drawer-ano-bloque { margin-bottom: 28px; }
.drawer-ano-titulo {
	font-size: 12px; font-weight: 700; color: #6b7280;
	text-transform: uppercase; letter-spacing: .06em;
	border-bottom: 2px solid #e5e7eb;
	padding-bottom: 6px; margin: 0 0 10px;
}
.drawer-tabla { font-size: 12px; width: 100%; }
.drawer-tabla th { font-size: 11px; }
.drawer-tabla td, .drawer-tabla th { padding: 5px 7px; }
.drawer-pct { font-size: 11px; color: #9ca3af; }
.presupuesto-modulo .drawer-tabla th.drawer-col-prioridad,
.presupuesto-modulo .drawer-tabla td.drawer-col-prioridad { width: 1%; white-space: nowrap; text-align: center; }

/* ========================================================
   PASO 2 — Filtro, diferenciación visual y ordenamiento
   ======================================================== */

/* Filtro de búsqueda */
.presupuesto-modulo .presupuesto-filtro-busqueda {
	margin-bottom: 16px;
	display: flex;
	gap: 8px;
}
.presupuesto-modulo .presupuesto-input-filtro {
	flex: 1;
	max-width: 300px;
	padding: 8px 12px;
	font-size: 13px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
}
.presupuesto-modulo .presupuesto-input-filtro:focus {
	border-color: var(--primario);
	box-shadow: 0 0 0 2px rgba(var(--primario-rgb), 0.1);
	outline: none;
}

/* Encabezados sortables */
.presupuesto-modulo .presupuesto-tabla thead th.sortable {
	cursor: pointer;
	user-select: none;
	position: relative;
	/* padding-right: 24px; */
	transition: background .1s ease;
}
.presupuesto-modulo .presupuesto-tabla thead th.sortable:hover {
	background: #f3f4f6 !important;
}

/* Diferenciación visual por estado de asignación */
.presupuesto-modulo .presupuesto-fila-colegio {
	transition: background .15s ease;
}
.presupuesto-modulo .presupuesto-fila-colegio.presupuesto-fila-completo {
	background: #f0fdf4;
	border-left: 3px solid #16a34a;
}
.presupuesto-modulo .presupuesto-fila-colegio.presupuesto-fila-parcial {
	background: #fffbeb;
	border-left: 3px solid #f59e0b;
}
.presupuesto-modulo .presupuesto-fila-colegio.presupuesto-fila-sin-asignar {
	background: #fef2f2;
	border-left: 3px solid #ef4444;
}
.presupuesto-modulo .presupuesto-fila-colegio:hover {
	background-color: rgba(0, 0, 0, 0.02);
}

/* Botón de detalle */
.presupuesto-modulo .presupuesto-btn-detalle {
	min-width: 32px;
	height: 32px;
	padding: 6px 8px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	background: #fff;
	color: var(--primario);
	font-size: 14px;
	transition: all .1s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.presupuesto-modulo .presupuesto-btn-detalle:hover {
	background: var(--primario);
	color: #fff;
	border-color: var(--primario);
}

/* Indicadores financieros mejorados */
.presupuesto-modulo .presupuesto-resumen-mini {
	border-radius: 6px;
	margin-bottom: 0;
	align-items: flex-start;
}
.presupuesto-modulo .presupuesto-resumen-bloque {
	flex-shrink: 0;
	position: relative;
}
.presupuesto-modulo .presupuesto-resumen-bloque .val {
	font-size: 20px;
}
.presupuesto-modulo .presupuesto-resumen-bloque.presupuesto-resumen-derecha {
	margin-left: auto;
}

/* Alertas mejoradas */
.presupuesto-alerta {
	padding: 12px 14px;
	border-radius: 0;
	font-size: 13px;
	display: none;
	margin-bottom: 0;
	animation: slideIn .2s ease;
	text-align: center;
}
.presupuesto-alerta.ok {
	background: #f0fdf4;
	color: #166534;
}
.presupuesto-alerta.warn {
	background: #fffbeb;
	color: #92400e;
}
.presupuesto-alerta.error {
    background: #fef2f2;
    color: #991b1b;
}
.presupuesto-alerta.warn ,
.presupuesto-alerta.error ,
.presupuesto-alerta.ok {
    position: fixed;
    bottom: 30px;
    right: 60px;
    z-index: 10;
    width: calc(100% - 298px);
}
.presupuesto-alerta.info {
	background: #eff6ff;
	color: #1e40af;
}
.presupuesto-leyenda {
	display: flex;
	justify-content: end;
	align-items: center;
	gap: 15px;
	flex:1;
	margin-right: 20px;
}
.presupuesto-leyenda-item {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
}
.presupuesto-leyenda-color.sin-asignar {
	color: #ef4444;
}
.presupuesto-leyenda-color.parcial {
	color: #f59e0b;
}
.presupuesto-leyenda-color.completo {
	color: #16a34a;
}
@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}


/* Tabla responsive mejorada */
.presupuesto-modulo .presupuesto-tabla .centrado {
	text-align: center !important;
}
.presupuesto-modulo .presupuesto-tabla td.codigo,
.presupuesto-modulo .presupuesto-tabla td.colegio {
	font-weight: 500;
}

@media (max-width: 1024px){
	.presupuesto-modulo .presupuesto-resumen-mini {
		gap: 24px;
	}
	.presupuesto-modulo .presupuesto-resumen-bloque { min-width: 120px; }
	.presupuesto-modulo .presupuesto-tabla { font-size: 12px; }
	.presupuesto-modulo .presupuesto-tabla th,
	.presupuesto-modulo .presupuesto-tabla td { padding: 8px 6px; }
}
@media (max-width: 768px){
	.presupuesto-modulo .presupuesto-filtro-busqueda { max-width: 100%; }
	.presupuesto-modulo .presupuesto-input-filtro { max-width: 100%; }
	.presupuesto-modulo .presupuesto-resumen-mini {
		flex-direction: column;
		gap: 12px;
	}
	.presupuesto-modulo .presupuesto-resumen-bloque { min-width: 100%; }
	.presupuesto-modulo .presupuesto-resumen-bloque.presupuesto-resumen-derecha { margin-left: 0; }
	.presupuesto-modulo .presupuesto-tabla-wrap { overflow-x: auto; }
	.presupuesto-modulo .presupuesto-tabla { font-size: 11px; }
	.presupuesto-modulo .presupuesto-tabla th,
	.presupuesto-modulo .presupuesto-tabla td { padding: 6px 4px; }
}

/* ==========================================================
   PASO 4 — CONSOLIDADO: Tabs internos con carga lazy
   ========================================================== */

/* Barra de filtros + exportar */
.consolidado-tab-barra {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	padding: 0 0 12px;
}

/* Leyenda de colores scoped al módulo — reutiliza .leyenda.leyenda-fila global */
.presupuesto-modulo .leyenda.leyenda-fila {
	flex: 0 0 auto;
	flex-wrap: wrap;
	gap: 0 14px;
	margin-bottom: 0;
}
.presupuesto-modulo .leyenda.leyenda-fila .leyenda-item {
	display: flex;
	align-items: center;
	margin-bottom: 0;
	margin-right: 0;
	font-size: 12px;
	color: #6b7280;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 200px;
}
.presupuesto-modulo .leyenda.leyenda-fila .leyenda-color {
	flex-shrink: 0;
	width: 12px;
	height: 12px;
	border-radius: 2px;
	margin-right: 5px;
	vertical-align: middle;
}

/* Contenedor flex de los Select2 del Consolidado */
.consolidado-filtros-select2 {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	min-width: 0;
	align-items: center;
}
.consolidado-filtros-select2 .select2 {
	flex: 1;
    flex-grow: initial;
    min-width: 200px;
}
.consolidado-filtros-select2 [data-consolidado-campo="codigo"] + .select2 {
	min-width: 100px;
}
/* Cada .select2-container generado es un ítem flex con ancho proporcional */
.consolidado-filtros-select2 .consolidado-s2 {
	min-width: 0;
	flex-shrink: 1;
}
/* Distribución proporcional por tipo de dato esperado */
.consolidado-filtros-select2 .consolidado-s2--sostenedor { flex: 2 1 140px; }
.consolidado-filtros-select2 .consolidado-s2--colegio    { flex: 3 1 160px; }
.consolidado-filtros-select2 .consolidado-s2--codigo     { flex: 1 1 75px;  }
.consolidado-filtros-select2 .consolidado-s2--item       { flex: 2 1 120px; }
.consolidado-filtros-select2 .consolidado-s2--favoritos  { flex: 0 0 148px; }
/* Ellipsis en textos largos dentro de los filtros del Consolidado */
.consolidado-filtros-select2 .select2-selection__rendered {
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	white-space: nowrap !important;
}

/* Compatibilidad residual */
.consolidado-solo-favoritos { display: none; }

/* Skeleton de carga */
.consolidado-skeleton {
	padding: 32px 16px;
	text-align: center;
	color: #9ca3af;
	font-size: 14px;
	animation: pres-pulse 1.4s ease-in-out infinite;
}
@keyframes pres-pulse {
	0%, 100% { opacity: 1; }
	50%       { opacity: 0.45; }
}

/* Wrapper con scroll horizontal para tablas anchas */
.presupuesto-tabla-wrap--scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* Tabla consolidado base */
.consolidado-tabla {
	min-width: 700px;
	border-collapse: collapse;
}

/* Encabezados de año (fila superior) */
.consolidado-tabla .consolidado-th-ano {
	background: #f1f5f9;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	white-space: nowrap;
	border-left: 2px solid #e2e8f0;
}
.consolidado-tabla .consolidado-th-ano.consolidado-ano-actual {
	background: var(--primario);
	color: white;
}

/* Subencabezados Solicitado/Aprobado */
.consolidado-tabla .consolidado-th-sub {
	font-size: 11px;
	font-weight: 600;
	color: #6b7280;
	white-space: nowrap;
}

/* Columnas del año actual destacadas */
.consolidado-tabla .consolidado-th-curr,
.consolidado-tabla td.consolidado-th-curr {
	background: #fafbff;
}

/* Fila de proyecto favorito */
.consolidado-tabla tr.consolidado-fila-favorito {
	background: #fefce8 !important; /* amarillo muy suave */
}
.consolidado-tabla tr.consolidado-fila-favorito:hover {
	background: #fef9c3 !important;
}

/* Fila de proyecto aprobado */
.consolidado-tabla tr.consolidado-fila-aprobada {
	background: #f0fdf4;
}

/* Fila de proyecto rechazado */
.consolidado-tabla tr.consolidado-fila-rechazada {
	background: #fef2f2;
	opacity: 0.85;
}
.consolidado-tabla tr.consolidado-fila-rechazada:hover {
	background: #fee2e2;
}
.consolidado-tabla tr.consolidado-fila-rechazada td.consolidado-th-curr {
	background: transparent;
}

/* Subencabezado de grupo de sostenedor */
.consolidado-tabla tr.consolidado-fila-grupo td {
	background: #f8fafc;
	padding: 8px 12px;
	font-size: 13px;
	color: #1e3a5f;
	border-top: 2px solid #e2e8f0;
}

/* Diferencia positiva (currYear > prevYear) */
.consolidado-tabla .val-ok  { color: #16a34a; font-weight: 600; }
/* Diferencia negativa (currYear < prevYear) */
.consolidado-tabla .val-error { color: #dc2626; font-weight: 600; }

/* Columnas fijas de tabla Totales por año (sticky) */
.consolidado-tabla .consolidado-th-fija {
	white-space: nowrap;
}

/* Responsive: reducir fuente en pantallas pequeñas */
@media (max-width: 1024px){
	.consolidado-tabla { font-size: 12px; }
}
@media (max-width: 768px){
	.consolidado-tab-barra .consolidado-filtro { max-width: 100%; }
	.consolidado-tabla { font-size: 11px; }
}

/* ── Estilos para el resumen del modal de distribución ──────────────── */
#modal-distribuir-meses .presupuesto-modal-resumen-wrapper {
	width: 100%;
	margin: 15px auto 10px;
}

#modal-distribuir-meses .presupuesto-modal-resumen-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	width: 100%;
	box-sizing: border-box;
}

#modal-distribuir-meses .presupuesto-resumen-card {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 10px 6px;
	text-align: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	min-width: 0;
	box-sizing: border-box;
}

#modal-distribuir-meses .presupuesto-resumen-card .lbl {
	font-size: 10.5px;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	margin-bottom: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	width: 100%;
	display: block;
}

#modal-distribuir-meses .presupuesto-resumen-card .val {
	font-size: 15px;
	font-weight: 700;
	color: #1e293b;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	width: 100%;
	display: block;
}

#modal-distribuir-meses .presupuesto-resumen-card .val.val-ok {
	color: #16a34a !important;
}

#modal-distribuir-meses .presupuesto-resumen-card .val.val-error {
	color: #dc2626 !important;
}

#modal-distribuir-meses .presupuesto-progreso {
	width: 100%;
	height: 8px;
	background: #e5e7eb;
	border-radius: 4px;
	overflow: hidden;
	margin-top: 10px;
}
#modal-distribuir-meses .presupuesto-progreso-bar {
	height: 100%;
	background: #6b7280;
	transition: width .2s ease, background .2s ease;
}
#modal-distribuir-meses .presupuesto-progreso-bar.ok    { background: #16a34a; }
#modal-distribuir-meses .presupuesto-progreso-bar.warn  { background: #f59e0b; }
#modal-distribuir-meses .presupuesto-progreso-bar.error { background: #dc2626; }

/* ── Aviso inline bajo tabs (paso bloqueado) ─────────────────────── */
#presupuesto-tab-aviso {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: #fef3c7;
	color: #92400e;
	font-size: 13px;
	border-bottom: 1px solid #fde68a;
}
#presupuesto-tab-aviso .bi {
	flex-shrink: 0;
	font-size: 14px;
}

/* ── Fila con monto asignado mayor al solicitado ─────────────────── */
.presupuesto-modulo .presupuesto-fila-excedente td {
	background: #fffbeb !important;
}
/* Sobreescribir el color de fila-completo para que el naranja sea visible */
.presupuesto-modulo .presupuesto-fila-excedente.presupuesto-fila-completo td {
	background: #fffbeb !important;
	border-left-color: #f59e0b;
}
/* Ícono de advertencia junto al porcentaje */
.presupuesto-modulo .presupuesto-icono-excedente {
	color: #d97706;
	font-size: 13px;
	margin-left: 5px;
	cursor: default;
	vertical-align: middle;
}
span.bi.bi-star-fill {
    font-size: 1.2rem;
}

/* ── Estilos para estado de exceso de presupuesto y bloqueo de controles ── */
.presupuesto-modulo .val-ok {
	color: #16a34a !important;
}
.presupuesto-modulo .val-error {
	color: #dc2626 !important;
}
.presupuesto-modulo .presupuesto-input-bloqueado {
	background-color: #f3f4f6 !important;
	color: #9ca3af !important;
	cursor: not-allowed !important;
	border-color: #e5e7eb !important;
	opacity: 0.6;
}
.presupuesto-modulo .presupuesto-fila-en-correccion td {
	background-color: #fff7ed !important;
}
.presupuesto-modulo .presupuesto-fila-en-correccion .presupuesto-input-colegio {
	border-color: #f97316 !important;
	box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.25) !important;
	background-color: #ffffff !important;
	opacity: 1 !important;
}

/* ── Estilo para inputs con error (exceso sobre solicitado) ── */
.presupuesto-modulo .presupuesto-input-error {
	border-color: #dc2626 !important;
	background-color: #fef2f2 !important;
	color: #991b1b !important;
}

/* ── Estilo para proyectos rechazados ── */
.presupuesto-modulo tr.presupuesto-fila-rechazada td {
	background-color: #f9fafb !important;
	color: #9ca3af;
}
.presupuesto-modulo tr.presupuesto-fila-rechazada td.presupuesto-td-aprobacion,
.presupuesto-modulo tr.presupuesto-fila-rechazada td:first-child {
	opacity: 1 !important;
}
.presupuesto-modulo tr.presupuesto-fila-rechazada .presupuesto-select-aprobacion {
	border-color: #dc2626;
	color: #dc2626;
	font-weight: 600;
}

/* ── Tags de cobertura histórica (% asignación sobre año anterior) ── */
.presupuesto-tag-historial {
	display: block;
	font-size: 10px;
	font-weight: 600;
	border-radius: 4px;
	padding: 1px 4px;
	margin-top: 2px;
	text-align: right;
	line-height: 1.2;
	white-space: nowrap;
	max-width: 100%;
}
.presupuesto-tag-historial.alza {
	background: #ecfdf5;
	color: #059669;
	border: 1px solid #a7f3d0;
}
.presupuesto-tag-historial.igual {
	background: #eff6ff;
	color: #2563eb;
	border: 1px solid #bfdbfe;
}
.presupuesto-tag-historial.baja {
	background: #f8fafc;
	color: #64748b;
	border: 1px solid #cbd5e1;
}
.presupuesto-tag-historial.na {
	background: transparent;
	color: #94a3b8;
	font-style: italic;
	font-weight: 400;
}

/* ── Botón SALDO PRESUPUESTO en resumen mini Paso 3 ── */
.presupuesto-btn-saldo-mini {
	font-size: 11px !important;
	padding: 4px 10px !important;
	font-weight: 600 !important;
	background: #ffffff !important;
	border-color: #cbd5e1 !important;
	color: #1e293b !important;
	box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 5px !important;
}
.presupuesto-btn-saldo-mini:hover {
	background: #f1f5f9 !important;
	border-color: #94a3b8 !important;
	color: var(--primario) !important;
}
@media (max-width: 768px) {
	.presupuesto-btn-saldo-mini {
		margin-left: 0 !important;
		margin-top: 6px !important;
		width: 100% !important;
		justify-content: center !important;
	}
}

/* ── Botón Aplicar % global en Paso 1 ── */
.presupuesto-modulo .box-sombra [data-rol-abrir-pct-global] .bi,
.presupuesto-modulo [data-rol-abrir-pct-global] .bi,
.box-sombra [data-rol-abrir-pct-global] .bi {
	font-size: 11px !important;
	line-height: 1 !important;
	margin: 0 3px 0 0 !important;
	vertical-align: middle !important;
	display: inline-block !important;
}