/* Domus Mater — estilos base */

body.page-auth {
	background: #f0f4f8;
	min-height: 100vh;
}

.login-wrapper {
	padding-top: 60px;
	padding-bottom: 40px;
}

.login-panel {
	margin-top: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.login-panel .panel-heading {
	background-color: #2c3e50;
	color: #fff;
	border-color: #2c3e50;
}

.login-panel .panel-title {
	font-size: 22px;
	font-weight: 600;
	margin: 0;
}

.login-subtitle {
	margin: 6px 0 0;
	font-size: 13px;
	opacity: 0.85;
}

body.page-app,
body.page-dashboard {
	background: #f5f5f5;
}

.domus-navbar {
	margin-bottom: 0;
	border-radius: 0;
}

.domus-navbar .dropdown-menu {
	min-width: 240px;
}

.domus-navbar .dropdown-header {
	font-size: 11px;
	font-weight: bold;
	color: #999;
}

.main-content {
	padding: 20px 25px 40px;
}

.navbar-user {
	color: #ccc !important;
	margin-right: 10px;
}

.navbar-user small {
	color: #999;
}

/* bootstrap-table */
.domus-bt-wrap {
	margin-top: 10px;
}

.domus-bt-loading {
	padding: 40px 20px;
	text-align: center;
	color: #666;
	font-size: 14px;
}

.domus-bt-loading .domus-spin {
	animation: domus-spin 1s linear infinite;
	margin-right: 8px;
}

@keyframes domus-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.fixed-table-loading {
	background: rgba(255, 255, 255, 0.85) !important;
}

.fixed-table-toolbar .search {
	max-width: 280px;
}

/* Dashboards */
.dash-kpi .panel-body {
	padding: 24px 16px;
}

.dash-kpi-value {
	font-size: 42px;
	font-weight: 700;
	line-height: 1.1;
}

.dash-kpi-money {
	font-size: 32px;
}

.dash-kpi-label {
	font-size: 13px;
	color: #777;
	margin-top: 6px;
}

.dash-kpi-detail {
	font-size: 12px;
	color: #666;
	margin-top: 10px;
}

.dash-kpi-mini {
	padding: 12px 8px 20px;
}

.dash-kpi-mini .dash-kpi-value {
	font-size: 28px;
}

.dash-chart-scroll {
	overflow-x: auto;
	min-height: 280px;
}

.dash-chart-scroll canvas {
	min-width: 100%;
}

/* Punto de caja */
.caja-page {
	margin-bottom: 20px;
}

.caja-tabs {
	margin-bottom: 12px;
	border-bottom: 2px solid #ddd;
}

.caja-tabs > li > a {
	padding: 10px 20px;
	font-weight: 600;
	color: #666;
}

.caja-tabs > li.active > a,
.caja-tabs > li.active > a:hover,
.caja-tabs > li.active > a:focus {
	color: #337ab7;
	border-bottom: 2px solid #337ab7;
	margin-bottom: -2px;
}

.caja-tabs > li.disabled > a,
.caja-tabs > li.disabled > a:hover,
.caja-tabs > li.disabled > a:focus {
	color: #bbb;
	cursor: not-allowed;
	pointer-events: none;
}

.caja-tab-num {
	display: inline-block;
	width: 22px;
	height: 22px;
	line-height: 22px;
	text-align: center;
	border-radius: 50%;
	background: #e8e8e8;
	color: #666;
	font-size: 12px;
	margin-right: 6px;
}

.caja-tabs > li.active .caja-tab-num {
	background: #337ab7;
	color: #fff;
}

.caja-tab-content {
	padding-top: 4px;
}

.caja-paso-actions {
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid #eee;
}

.caja-pago-header {
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.caja-pago-header-alumno {
	flex: 1;
	min-width: 0;
	font-size: 15px;
}

.caja-pago-columnas > [class*="col-"] {
	margin-bottom: 16px;
}

.caja-resumen-metricas-panel {
	margin-bottom: 12px;
}

.caja-resumen-links {
	margin-top: 8px;
}

.caja-resumen-links .btn + .btn {
	margin-left: 6px;
}

.caja-totales-hr {
	margin: 10px 0;
	border-color: #dce8f0;
}

.caja-totales-panel .form-group {
	margin-bottom: 10px;
}

.caja-totales-panel .caja-carrito-total-row {
	margin-top: 4px;
	padding-top: 0;
	border-top: none;
}

.caja-buscar {
	margin-bottom: 12px;
}

.caja-tipo-busqueda {
	padding-top: 4px;
}

.caja-panel .panel-heading {
	font-size: 14px;
}

.caja-panel-fill {
	margin-bottom: 0;
}

.caja-panel-fill .panel-body {
	padding: 10px 12px;
}

.caja-placeholder {
	padding: 24px 10px;
	font-size: 13px;
}

.caja-workspace {
	margin-top: 0;
}

.caja-workspace > [class*="col-"] {
	margin-bottom: 16px;
}

.caja-resultados-wrap {
	max-height: 420px;
	overflow-y: auto;
}

.caja-panel-scroll {
	max-height: 520px;
	overflow-y: auto;
}

.caja-resumen-strip {
	margin-bottom: 12px;
	border: none;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.caja-resumen-strip .panel-body {
	padding: 12px 16px;
}

.caja-resumen-strip-main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}

.caja-resumen-identidad {
	min-width: 0;
}

.caja-resumen-nombre {
	font-size: 16px;
	margin-right: 4px;
}

.caja-resumen-metricas {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
}

.caja-metrica {
	display: flex;
	flex-direction: column;
	min-width: 72px;
}

.caja-metrica span {
	font-size: 10px;
	text-transform: uppercase;
	color: #888;
	letter-spacing: 0.04em;
}

.caja-metrica strong {
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

.caja-metrica-deuda strong {
	color: #c0392b;
	font-size: 16px;
}

.caja-metrica-sm {
	font-size: 12px !important;
	font-weight: 500 !important;
}

.caja-rut-alerta {
	margin: 10px 0 0;
	padding: 8px 12px;
	font-size: 12px;
}

.caja-tabla-resultados tbody tr.warning td,
.caja-tabla-compacta tbody tr.warning td {
	background-color: #fcf8e3;
}

.caja-td-rut {
	white-space: nowrap;
	font-size: 12px;
}

.caja-resultado-nombre,
.caja-cargo-nombre {
	font-size: 13px;
	line-height: 1.25;
	word-break: break-word;
}

.caja-carrito-totales {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid #e5e5e5;
}

.caja-carrito-total-row {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px dashed #ddd;
	font-size: 14px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.caja-carrito-total-row strong {
	color: #2c3e50;
	font-size: 16px;
}

.caja-form-pago {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid #e8e8e8;
}

.caja-cheques-toolbar {
	margin: 8px 0 6px;
}

.caja-cheques-wrap {
	margin-bottom: 10px;
	max-height: 140px;
	overflow-y: auto;
}

.caja-cheques-wrap .form-control {
	padding: 4px 6px;
	height: 28px;
	font-size: 12px;
}

.caja-pago-resumen {
	margin-top: 8px;
	padding: 10px 12px;
	background: #f0f7f0;
	border-radius: 4px;
	border: 1px solid #dcefdc;
}

.caja-pago-linea {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 4px;
	font-size: 13px;
}

.caja-efectivo-row {
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px dashed #c5dcc5;
	font-size: 14px;
}

.caja-form-actions {
	margin-top: 12px;
}

.caja-input-pago {
	width: 88px;
	margin-left: auto;
	display: inline-block;
}

.caja-btn-agregar,
.caja-btn-quitar {
	padding: 2px 8px;
	min-width: 28px;
	font-weight: bold;
	font-size: 14px;
	line-height: 1.2;
}

.caja-tabla-compacta > thead > tr > th,
.caja-tabla-compacta > tbody > tr > td {
	padding: 6px 4px;
	vertical-align: middle;
}

@media (min-width: 992px) {
	.caja-pago-columnas {
		display: flex;
		flex-wrap: wrap;
	}

	.caja-pago-columnas > [class*="col-"] {
		display: flex;
		flex-direction: column;
	}

	.caja-pago-columnas .caja-panel-fill {
		flex: 1;
		display: flex;
		flex-direction: column;
	}

	.caja-pago-columnas .caja-panel-scroll {
		flex: 1;
	}
}

@media (min-width: 1200px) {
	.caja-panel-scroll {
		max-height: calc(100vh - 320px);
		min-height: 360px;
	}

	.caja-resultados-wrap {
		max-height: calc(100vh - 280px);
		min-height: 200px;
	}
}

@media (max-width: 991px) {
	.caja-resumen-metricas {
		gap: 6px 12px;
	}

	.caja-metrica {
		min-width: 64px;
	}
}

/* Matrícula histórica (matriz curso × año) */
.matricula-historica-wrap {
	max-height: calc(100vh - 220px);
	overflow: auto;
}

.matricula-historica-tabla {
	margin-bottom: 0;
	font-size: 12px;
	white-space: nowrap;
}

.matricula-historica-tabla > thead > tr > th,
.matricula-historica-tabla > tbody > tr > td,
.matricula-historica-tabla > tfoot > tr > th {
	vertical-align: middle;
}

.matricula-historica-tabla .mh-ano,
.matricula-historica-tabla .mh-total {
	min-width: 52px;
}

.matricula-historica-tabla .mh-sticky {
	position: sticky;
	background: #fff;
	z-index: 2;
}

.matricula-historica-tabla thead .mh-sticky,
.matricula-historica-tabla tfoot .mh-sticky {
	z-index: 3;
	background: #f5f5f5;
}

.matricula-historica-tabla .mh-nivel {
	left: 0;
	min-width: 110px;
	max-width: 140px;
	font-weight: 600;
	color: #555;
	border-right: 1px solid #ddd;
}

.matricula-historica-tabla .mh-curso {
	left: 110px;
	min-width: 130px;
	max-width: 180px;
	font-weight: 600;
	border-right: 2px solid #ccc;
	box-shadow: 2px 0 4px rgba(0, 0, 0, 0.04);
}

.matricula-historica-tabla .mh-nivel-inicio {
	background: #f0f4f8;
}

.matricula-historica-tabla .mh-total {
	font-weight: 700;
	background: #f7fafc;
}

.matricula-historica-tabla tfoot .mh-footer th {
	background: #eef2f6;
}

.matricula-historica-tabla tbody tr:hover td.mh-sticky {
	background: #f5f9fc;
}


