* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { margin: 0; background: #f1f5f7; color: #173044; font: 15px/1.5 system-ui, sans-serif; }
.contenedor { width: min(1200px, 92%); margin: 0 auto; }
.cabecera { padding-top: 12px; }
.cabecera-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 1fr); align-items: center; gap: 8px; min-height: 80px; padding: 10px 14px; background: #fff; border: 1px solid #dbe5eb; border-radius: 10px; }
.cabecera-logo { display: block; max-width: 100%; max-height: 60px; object-fit: contain; }
.cabecera-logo:last-child { justify-self: end; }
.cabecera-titulo { text-align: center; }
.cabecera h1 { margin: 0; font-size: clamp(16px, 2.7vw, 28px); line-height: 1.15; }
.cabecera p { margin: 4px 0 0; color: #486476; font-size: 13px; }
main { padding: 14px 0 28px; }
.pagina-ingreso { display: flex; flex-direction: column; min-height: 100vh; }
.ingreso-contenedor { flex: 1; display: grid; place-items: center; }
.ingreso.panel { width: min(100%, 380px); margin: 0; padding: 0; border: 1px solid #337ab7; border-radius: 4px; box-shadow: 0 5px 20px rgba(0, 0, 0, .25); }
.ingreso .panel-heading { margin: 0; text-align: center; font-size: 18px; font-weight: 700; }
.ingreso .panel-body { padding: 24px; }
.ingreso .form-group { margin: 0 0 24px; }
.ingreso .form-control, .ingreso .btn { min-height: 34px; }
.footer-importacion { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid #ddd; color: #777; font-size: 12px; }
.footer-acceso { text-align: center; }
.footer-fechas { text-align: right; }
.footer-fechas span { display: block; }
.footer-salir, .footer-salir:hover { min-height: 0; padding: 4px 8px; border-radius: 4px; background: transparent; color: #d9534f; }
.footer-salir:hover { color: #a94442; }
@media (max-width: 600px) {
    .footer-importacion { grid-template-columns: 1fr; text-align: center; }
    .footer-fechas { text-align: center; }
}
.panel, .indicadores article { background: #fff; border: 1px solid #dbe5eb; border-radius: 10px; padding: 12px 14px; }
.panel { margin-bottom: 12px; }
.cabecera-panel, .panel { box-shadow: 0 5px 10px rgba(0, 0, 0, .25); }
.indicadores article { box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.filtros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr) auto; gap: 10px; align-items: end; }
label { display: grid; gap: 4px; font-weight: 600; }
input, select, button { font: inherit; min-width: 0; min-height: 36px; border-radius: 7px; padding: 5px 9px; }
input, select { background: #fff; border: 1px solid #afc0cc; color: inherit; width: 100%; }
.filtros input, .filtros select { text-align: center; }
.filtros { padding-top: 17px; row-gap: 18px; }
.filtro-campo { position: relative; min-width: 0; }
.filtro-campo label { position: absolute; z-index: 1; top: -8px; left: 12px; padding: 0 6px; background: #fff; color: #337ab7; font-size: 11px; }
.filtro-campo input, .filtro-campo select { font-size: 14px; border: 1px solid #ccc; border-radius: 4px; box-shadow: inset 0 1px 1px #00000013; }
.filtro-campo input:focus, .filtro-campo select:focus { border-color: #66afe9; outline: none; box-shadow: 0 0 6px #66afe980; }
.filtro-campo input[type="text"] { padding-inline: 30px; }
.filtros .filtro-calendario { position: absolute; inset: 1px 1px 1px auto; width: 28px; min-height: 0; padding: 0; background: transparent; color: #777; border-radius: 0 4px 4px 0; font-size: 12px; line-height: 1; }
.filtros .filtro-calendario:hover, .filtros .filtro-calendario:focus { color: #333; }
.btn-animated { transition: all .2s ease-in-out; }
.btn-animated:not(:disabled):not(.disabled):hover { border-color: rgba(0, 0, 0, .25); filter: brightness(90%); }
.filtros select { text-align-last: center; }
.filtros input[type="date"]::-webkit-datetime-edit { text-align: center; }
button { border: 0; background: #066859; color: #fff; padding-inline: 18px; cursor: pointer; font-weight: 650; }
button:hover { background: #034d42; }
a { color: #066859; }
h2 { margin: 0 0 7px; font-size: 17px; }
.indicadores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.indicadores article { border-left: 3px solid #219784; }
.indicadores h2 { margin-bottom: 3px; font-size: 14px; }
.indicadores strong { display: block; text-align: center; font-size: clamp(17px, 2.3vw, 27px); line-height: 1.25; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.indicadores span { display: block; text-align: right; color: #486476; font-size: 13px; }
.tabla { overflow-x: auto; }
.tabla table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabla th, .tabla td { padding: 6px 10px; border-bottom: 1px solid #e3ebef; text-align: center; }
.tabla thead { background: #edf4f7; }
.tabla .recaudacion { text-align: right; }
.tabla .sabado { background: #fff3cd; }
.tabla .domingo { background: #f8d7da; }
.detalle-grid .ag-header-cell-label { justify-content: center; }
.detalle-grid .ag-header-cell.detalle-derecha .ag-header-cell-label { justify-content: flex-end; }
.detalle-grid .ag-cell { text-align: center; }
.detalle-grid .ag-cell.detalle-derecha { text-align: right; }
.moneda-wrapper { display: flex; align-items: center; width: 100%; min-width: 0; }
.moneda-signo { flex: 0 0 10px; text-align: left; opacity: .8; }
.moneda-valor { flex: 1; min-width: 0; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.detalle-grid .ag-row-odd,
.detalle-tabla tbody tr:nth-child(even):not(.sabado):not(.domingo) { background-color: #f8f9fb; }
.detalle-grid .ag-row-even { background-color: #fff; }
.detalle-grid .ag-row.sabado { background-color: #fff3cd; }
.detalle-grid .ag-row.domingo { background-color: #f8d7da; }
.detalle-grid .ag-row.ag-row-pinned, .detalle-tabla tfoot { background-color: #d9edf7; font-weight: bold; }
.detalle-grid .ag-row:not(.ag-row-pinned), .detalle-tabla tbody td, .detalle-tabla tbody th { border-bottom-style: dashed; }
.detalle-grid .ag-layout-auto-height .ag-center-cols-clipper,
.detalle-grid .ag-layout-auto-height .ag-center-cols-viewport,
.detalle-grid .ag-layout-auto-height .ag-center-cols-container { min-height: 0; }
.evolucion-desplazable { overflow-x: auto; }
.evolucion-encabezado { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.evolucion-selector { display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.evolucion-selector select { width: auto; }
.evolucion-selector .evolucion-total-control { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: #08796b; }
.evolucion-acciones { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.evolucion-exportar { position: relative; font-size: 13px; }
.panel:not(:has(.evolucion-grafico)) .evolucion-exportar { display: none; }
.evolucion-exportar summary { display: grid; place-items: center; width: 36px; height: 36px; list-style: none; cursor: pointer; border: 1px solid #afc0cc; border-radius: 7px; }
.evolucion-exportar summary::-webkit-details-marker { display: none; }
.evolucion-exportar summary:hover, .evolucion-exportar[open] summary { background: #f0f5f8; }
.evolucion-exportar-icono { width: 16px; height: 2px; border-radius: 1px; background: currentColor; box-shadow: 0 -5px currentColor, 0 5px currentColor; }
.evolucion-exportar-opciones { position: absolute; top: calc(100% + 4px); right: 0; z-index: 5; min-width: 142px; padding: 4px; border: 1px solid #dbe5eb; border-radius: 7px; background: #fff; box-shadow: 0 4px 14px #17304422; }
.evolucion-exportar-opciones button { display: block; width: 100%; text-align: left; color: inherit; background: #fff; font-weight: 500; }
.evolucion-exportar-opciones button:hover, .evolucion-exportar-opciones button:focus-visible { background: #f0f5f8; }
.evolucion-panel-grafico { position: relative; }
.evolucion-con-leyenda { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, max-content); align-items: center; gap: 14px; }
.evolucion-grafico { display: block; width: 100%; min-width: 540px; max-width: 1000px; margin: 0 auto; }
.evolucion-grafico text { fill: #486476; font-size: 12px; }
.evolucion-guia { stroke: #edf1f5; }
.evolucion-guia-vertical { stroke: #dce5ee; stroke-dasharray: 3 4; }
.evolucion-linea { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.evolucion-linea[data-serie="Total"] { stroke-width: 3.5; }
.evolucion-punto { pointer-events: none; }
.evolucion-cursor { opacity: 0; pointer-events: none; stroke: #8c9baa; stroke-dasharray: 3 4; }
.evolucion-dia:hover .evolucion-punto { r: 4px; }
.evolucion-dia:hover .evolucion-cursor { opacity: 1; }
.evolucion-consulta { fill: transparent; pointer-events: fill; }
.evolucion-tooltip { position: absolute; top: 8px; z-index: 2; min-width: 155px; max-width: 100%; border: 1px solid #dbe5eb; border-radius: 7px; background: #fff; box-shadow: 0 4px 14px #17304422; pointer-events: none; font-size: 13px; }
.evolucion-tooltip-fecha { display: block; padding: 5px 9px; background: #f0f5f8; border-radius: 7px 7px 0 0; }
.evolucion-tooltip-fila { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 7px; padding: 3px 9px; }
.evolucion-tooltip-color { width: 8px; height: 8px; border-radius: 50%; }
.evolucion-leyenda { display: flex; flex-direction: column; gap: 8px; white-space: nowrap; list-style: none; padding: 0; margin: 0; font-size: 13px; }
.evolucion-leyenda li { display: flex; align-items: center; gap: 6px; }
.evolucion-leyenda span { flex: 0 0 16px; height: 3px; border-radius: 2px; }
.graficos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grafico-rosca { margin: 0; min-width: 0; }
.grafico-rosca figcaption { text-align: center; font-weight: 650; margin-bottom: 3px; }
.rosca {
    position: relative;
    width: 300px;
    max-width: 100%;
    margin: max(-38px, -12.67%) auto 4px;
}
.rosca svg { position: relative; display: block; width: 100%; }
.rosca-tooltip { position: absolute; z-index: 3; width: max-content; white-space: nowrap; background: #fff; border: 1px solid #dbe5eb; border-radius: 7px; box-shadow: 0 4px 14px #17304422; pointer-events: none; font-size: 13px; }
.rosca-tooltip-encabezado { display: flex; align-items: center; gap: 7px; }
.rosca-tooltip .evolucion-tooltip-fila { grid-template-columns: 1fr auto; }
.rosca-malla { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rosca-con-malla .rosca-paredes,
.rosca-con-malla .rosca-superior,
.rosca-con-malla .rosca-radial { visibility: hidden; }
.rosca-cara {
    pointer-events: none;
    transition: transform 280ms ease-in-out, filter 280ms ease-in-out;
}
.rosca-paredes { pointer-events: none; }
.rosca-lateral, .rosca-radial { filter: brightness(.74); }
.rosca-lateral { transition: transform 280ms ease-in-out; }
.rosca-lateral-activa { transform: translate(var(--desplazamiento)); }
.rosca-radial { opacity: 0; transition: opacity 280ms ease-in-out; }
.rosca-segmento:hover .rosca-radial { opacity: 1; }
.rosca-porcentaje {
    fill: #fff;
    stroke: #182a3c;
    stroke-width: 1px;
    paint-order: stroke;
    text-anchor: middle;
    dominant-baseline: central;
    font-size: 12px;
    font-weight: 650;
}
.rosca-interaccion { pointer-events: fill; }
.rosca-segmento:hover .rosca-cara {
    transform: translate(var(--desplazamiento));
    filter: brightness(1.11);
}
.rosca-total {
    display: block;
    margin: 0 0 8px;
    text-align: center;
    font-size: clamp(13px, 1.5vw, 18px);
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.rosca-estado { margin: 5px 0; text-align: center; color: #486476; font-size: 13px; }
.rosca-leyenda { list-style: none; width: calc(100% - 24px); max-width: 270px; margin: 0 auto; padding: 0; font-size: 13px; }
.rosca-leyenda li { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 2px 0; }
.rosca-leyenda strong { font-variant-numeric: tabular-nums; }
.rosca-muestra { width: 9px; height: 9px; border-radius: 50%; }
.aviso { background: #fff1d9; padding: 12px 16px; border-radius: 7px; }
#resultados { overflow-anchor: none; }
#estado-filtros { position: fixed; right: 14px; bottom: 14px; z-index: 10; max-width: calc(100% - 28px); margin: 0; pointer-events: none; }
.aviso-inconsistencias { margin-bottom: 12px; }
.aviso-inconsistencias summary { cursor: pointer; font-weight: 650; }
.aviso-inconsistencias .tabla { background: #fff; }
.aviso-inconsistencias .registros-inconsistencia { white-space: normal; min-width: 195px; text-align: left; }
.registros-inconsistencia div + div { margin-top: 6px; }
@media (max-width: 800px) {
    .filtros, .indicadores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filtros input, .filtros select, .filtros button { min-height: 44px; }
}
@media (max-width: 650px) {
    .graficos { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
    .filtros, .indicadores { grid-template-columns: 1fr; }
}

/* Calendario de los filtros */
.datepicker-dropdown {
	padding: 10px;
	border: 1px solid #c7d8e6;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
	color: #333;
	font-family: inherit;
}
.datepicker-dropdown table { border-collapse: separate; border-spacing: 3px; }
.datepicker-dropdown table tr th,
.datepicker-dropdown table tr td { width: 34px; height: 32px; border-radius: 4px; }
.datepicker-dropdown .datepicker-switch { font-weight: 600; text-transform: capitalize; }
.datepicker-dropdown thead tr:nth-child(2) th {
	background: #337ab7;
	color: #fff;
	height: 36px;
}
.datepicker-dropdown thead tr:nth-child(2) th:hover { background: #286090; }
.datepicker-dropdown .dow { color: #777; font-size: 11px; font-weight: 600; }
.datepicker-dropdown table tr td.old,
.datepicker-dropdown table tr td.new { color: #aaa; }
.datepicker-dropdown table tr td.day:hover { background: #d9edf7; }
/* Calendarios con semana de lunes a domingo. */
.datepicker-dropdown .datepicker-days .dow:nth-child(6) { color: #8a6d3b; }
.datepicker-dropdown .datepicker-days .dow:nth-child(7) { color: #a94442; }
.datepicker-dropdown .datepicker-days tbody tr td.day:nth-child(6):not(.active) {
	background: #fff3cd;
	background-image: none;
	color: #856404;
}
.datepicker-dropdown .datepicker-days tbody tr td.day:nth-child(7):not(.active) {
	background: #f8d7da;
	background-image: none;
	color: #a94442;
}
.datepicker-dropdown .datepicker-days tbody tr td.day:nth-child(6):not(.active):hover { background: #ffe69c; }
.datepicker-dropdown .datepicker-days tbody tr td.day:nth-child(7):not(.active):hover { background: #f1bfc4; }
.datepicker-dropdown .datepicker-days tbody tr td.day.old:not(.active),
.datepicker-dropdown .datepicker-days tbody tr td.day.new:not(.active) { color: #aaa; }
.datepicker-dropdown table tr td.today,
.datepicker-dropdown table tr td.today:hover {
	background: #e8f2fa;
	background-image: none;
	color: #286090;
	box-shadow: inset 0 0 0 1px #90b9db;
}
.datepicker-dropdown table tr td.active,
.datepicker-dropdown table tr td.active:hover,
.datepicker-dropdown table tr td.active.active {
	background: #337ab7;
	background-image: none;
	color: #fff;
	text-shadow: none;
	box-shadow: none;
}
.datepicker-dropdown tfoot th { color: #337ab7; border-top: 1px solid #e5edf3; }
.datepicker-dropdown .prev .glyphicon,
.datepicker-dropdown .next .glyphicon { font-size: 11px; }
.datepicker-dropdown table tr td span.active,
.datepicker-dropdown table tr td span.active:hover { background: #337ab7; background-image: none; text-shadow: none; }
