.presupuesto-layout {
  padding-bottom: 3.5rem;
}

.presupuesto-tabs-card {
  margin-bottom: 3rem !important;
}

.presupuesto-tab-pane {
  padding-bottom: 2rem;
}

.swal2-presupuesto-popup {
  border-radius: 10px;
}

.swal2-presupuesto-popup .swal2-title {
  font-size: 2rem;
}

.chart-presupuesto-wrap {
  position: relative;
  height: 360px;
  width: 100%;
}

.chartjs-tooltip-box {
  position: absolute;
  min-width: 260px;
  max-width: 360px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #ced4da;
  border-radius: 8px;
  padding: 10px 12px;
  color: #111;
  font-size: 13px;
  line-height: 1.35;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 0);
  transition: opacity 0.08s ease;
  z-index: 20;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.chartjs-tooltip-box .tt-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.presupuesto-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.presupuesto-chip.presupuesto-cero {
  background: #6c757d;
  color: #fff;
}

.presupuesto-chip.presupuesto-activo {
  background: #ffc107;
  color: #212529;
}

.presupuesto-matriz-wrap {
  overflow-x: auto;
  overflow-y: visible;
  position: relative;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.presupuesto-matriz-scroll-top {
  overflow-x: auto;
  overflow-y: hidden;
  height: 16px;
  margin-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
}

.presupuesto-matriz-scroll-top-inner {
  height: 1px;
}

.presupuesto-matriz-scroll-top::-webkit-scrollbar,
.presupuesto-matriz-wrap::-webkit-scrollbar {
  height: 12px;
}

.presupuesto-matriz-scroll-top::-webkit-scrollbar-thumb,
.presupuesto-matriz-wrap::-webkit-scrollbar-thumb {
  background: rgba(222, 226, 230, 0.45);
  border-radius: 999px;
}

.presupuesto-matriz-scroll-top::-webkit-scrollbar-track,
.presupuesto-matriz-wrap::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
}

.presupuesto-matriz-table {
  width: max-content;
  min-width: auto;
  margin-bottom: 0;
  table-layout: fixed;
  font-size: 0.98rem;
}

.presupuesto-matriz-table thead th,
.presupuesto-matriz-table tbody td,
.presupuesto-matriz-table tfoot th {
  padding: 0.45rem;
  vertical-align: top;
}

.presupuesto-matriz-table .matriz-col-concepto {
  min-width: 320px;
  width: 320px;
  position: sticky;
  left: 0;
  z-index: 4;
}

.presupuesto-matriz-table thead .matriz-col-concepto {
  background: #dee2e6;
  z-index: 7;
}

.presupuesto-matriz-table tbody .matriz-col-concepto {
  background: #454d55;
}

.presupuesto-matriz-table tfoot .matriz-col-concepto {
  background: #001f3f;
  z-index: 6;
}

.presupuesto-matriz-table .matriz-col-mes {
  min-width: 130px;
  width: 130px;
}

.presupuesto-matriz-table .matriz-col-total {
  min-width: 150px;
  width: 150px;
  position: sticky;
  right: 0;
  z-index: 4;
  background: #454d55;
}

.presupuesto-matriz-table thead .matriz-col-total {
  background: #dee2e6;
  z-index: 7;
}

.presupuesto-matriz-table tbody .matriz-col-total {
  background: #454d55;
}

.presupuesto-matriz-table tfoot .matriz-col-total {
  background: #001f3f;
  z-index: 6;
}

.presupuesto-matriz-table .matriz-rubro-row td {
  background: #001f3f;
  border-color: rgba(255, 255, 255, 0.12);
  font-size: 1.05rem;
}

.presupuesto-matriz-table .matriz-rubro-celda {
  z-index: 5;
}

.presupuesto-matriz-table .matriz-rubro-fill {
  min-width: 0;
}

.presupuesto-matriz-table .matriz-rubro-resumen {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.presupuesto-matriz-table .matriz-rubro-titulo {
  display: inline-block;
  font-size: 1rem;
  line-height: 1.25;
}

.presupuesto-matriz-table .matriz-rubro-total {
  display: inline-block;
  font-size: 0.98rem;
  padding: 0.45rem 0.7rem;
  white-space: normal;
  text-align: left;
}

.presupuesto-matriz-table .matriz-item-titulo {
  font-size: 1rem;
  line-height: 1.25;
}

.presupuesto-matriz-table .matriz-item-meta {
  font-size: 0.95rem;
  line-height: 1.2;
  color: #c8ced4 !important;
}

.presupuesto-matriz-table .matriz-input,
.presupuesto-matriz-table .matriz-observacion {
  min-width: 0;
  width: 100%;
  font-size: 1rem;
}

.presupuesto-matriz-table .matriz-input {
  height: 42px;
  font-weight: 600;
}

.presupuesto-matriz-table .matriz-observacion {
  min-height: 34px;
}

.presupuesto-single-month .presupuesto-matriz-table .matriz-col-mes {
  min-width: 220px;
  width: 220px;
}

.presupuesto-single-month .presupuesto-matriz-table tbody .matriz-col-mes .presupuesto-chip {
  font-size: 15px;
  padding: 5px 12px;
}

.presupuesto-single-month .presupuesto-matriz-table tbody .matriz-col-mes .matriz-input {
  height: 52px;
  font-size: 1.35rem;
}

.presupuesto-single-month .presupuesto-matriz-table tbody .matriz-col-mes .matriz-observacion {
  min-height: 42px;
  font-size: 1.05rem;
}

@media (max-width: 991.98px) {
  .presupuesto-matriz-table {
    font-size: 0.95rem;
  }

  .presupuesto-matriz-table .matriz-col-concepto {
    min-width: 280px;
    width: 280px;
  }

  .presupuesto-matriz-table .matriz-col-mes {
    min-width: 120px;
    width: 120px;
  }
}
