:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #122033;
  --muted: #65738a;
  --primary: #275EFE;
  --primary-strong: #2F855A;
  --accent: #D97706;
  --line: #d9e2ec;
  --green: #2f855a;
  --amber: #c27803;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  background: var(--primary);
  color: #fff;
  padding: 24px 18px;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 18px;
}

.sidebar-profile {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .26);
  border-top: 1px solid rgba(255, 255, 255, .18);
  display: grid;
  gap: 10px;
  grid-template-columns: 48px 1fr;
  margin-bottom: 20px;
  padding: 14px 0;
}

.sidebar-profile img {
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 8px;
  height: 48px;
  object-fit: contain;
  padding: 4px;
  width: 48px;
}

.sidebar-profile strong,
.sidebar-profile span {
  display: block;
}

.sidebar-profile strong {
  font-size: 13px;
  line-height: 1.2;
}

.sidebar-profile span {
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
  margin-top: 4px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav a {
  border-radius: 6px;
  color: #d9e8f5;
  padding: 11px 12px;
  text-decoration: none;
}

.nav a.is-active,
.nav a:hover {
  background: var(--primary-strong);
  color: #fff;
}

.section-selector {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  display: grid;
  gap: 9px;
  padding: 12px;
}

.section-selector label {
  color: #fff;
  font-weight: 700;
}

.section-selector select {
  background: #fff;
  color: var(--text);
  min-width: 0;
  width: 100%;
}

.section-selector .button {
  background: var(--accent);
  color: #111827;
  text-align: center;
}

.section-menu-trigger {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #d9e8f5;
  cursor: pointer;
  font: inherit;
  padding: 11px 12px;
  text-align: left;
  width: 100%;
}

.section-menu-trigger:hover,
.section-menu-trigger:focus-visible {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .22);
  box-shadow: inset 4px 0 0 var(--accent);
  color: #fff;
  outline: none;
}

.section-dialog {
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(2, 8, 23, .42);
  color: var(--text);
  margin: auto;
  max-width: calc(100vw - 32px);
  padding: 0;
  width: 430px;
}

.section-dialog::backdrop {
  background: rgba(3, 12, 24, .66);
  backdrop-filter: blur(5px);
}

.section-dialog-form {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.section-dialog-header {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.section-dialog-header h2 {
  color: var(--text);
  font-size: 21px;
  margin: 0 0 6px;
  text-shadow: none;
}

.section-dialog-header p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.section-dialog-close {
  align-items: center;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #475569;
  cursor: pointer;
  display: flex;
  flex: 0 0 auto;
  font-size: 24px;
  height: 36px;
  justify-content: center;
  line-height: 1;
  padding: 0 0 2px;
  width: 36px;
}

.section-dialog-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.section-dialog-field {
  display: grid;
  gap: 8px;
}

.section-dialog-field span {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.section-dialog-field select {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
  min-height: 46px;
  width: 100%;
}

.section-dialog-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(39, 94, 254, .14);
  outline: none;
}

.section-dialog-actions {
  display: flex;
  justify-content: flex-end;
}

.section-dialog-actions .button {
  min-width: 130px;
  text-align: center;
}

@media (max-width: 520px) {
  .section-dialog {
    width: calc(100vw - 24px);
  }

  .section-dialog-form {
    gap: 18px;
    padding: 20px;
  }

  .section-dialog-actions .button {
    width: 100%;
  }
}

.subnav {
  border-left: 1px solid rgba(255, 255, 255, .24);
  display: grid;
  gap: 10px;
  margin: 2px 0 8px 18px;
  padding-left: 12px;
}

.subnav a {
  font-size: 15px;
  padding: 10px 10px;
}

.main {
  margin-left: 248px;
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 28px;
}

.topbar-section {
  align-items: center;
  display: flex;
  gap: 12px;
}

.content {
  padding: 28px;
}

.active-profile-strip {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  min-height: 70px;
  padding: 10px 28px;
}

.active-profile-strip img {
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 48px;
  object-fit: contain;
  padding: 4px;
  width: 48px;
}

.active-profile-strip strong,
.active-profile-strip span {
  display: block;
}

.active-profile-strip span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

h1 {
  font-size: 30px;
  margin: 0 0 22px;
}

h2 {
  font-size: 18px;
  margin: 0 0 16px;
}

.button {
  background: var(--primary);
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-weight: 700;
  padding: 10px 14px;
  text-decoration: none;
}

.button:hover {
  background: var(--primary-strong);
}

.button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--primary);
}

.button.small {
  padding: 7px 10px;
}

.metrics {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metrics.compact article {
  padding: 14px 16px;
}

.metrics.compact span {
  font-size: 26px;
}

.metrics article,
.panel,
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metrics article {
  padding: 20px;
}

.metrics span {
  color: var(--primary);
  display: block;
  font-size: 34px;
  font-weight: 700;
}

.metrics strong {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.panel {
  padding: 20px;
  margin-bottom: 18px;
}

.module-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-grid a,
.module-grid span {
  background: #eef5fb;
  border: 1px solid #cfdeeb;
  border-radius: 6px;
  color: #153c5c;
  min-height: 56px;
  padding: 18px;
  text-decoration: none;
}

.module-grid span {
  color: #7b8794;
}

/* Patrón institucional reutilizable para accesos y acciones principales. */
.module-grid a.institutional-button,
.institutional-button {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(18, 32, 51, 0.34), rgba(18, 32, 51, 0.20)),
    linear-gradient(135deg, var(--primary), var(--primary-strong));
  border: 1px solid rgba(255, 255, 255, .34) !important;
  box-shadow: 0 10px 24px rgba(2, 8, 23, .16);
  color: #fff !important;
  display: flex;
  font-weight: 700;
  justify-content: center;
  text-align: center;
  text-shadow: 0 1px 2px rgba(15, 23, 42, .45);
  transition: filter .18s ease, transform .18s ease;
}

.module-grid.institutional-buttons a.institutional-button:nth-child(3n + 2) {
  background:
    linear-gradient(135deg, rgba(18, 32, 51, 0.38), rgba(18, 32, 51, 0.24)),
    linear-gradient(135deg, var(--primary-strong), var(--accent));
}

.module-grid.institutional-buttons a.institutional-button:nth-child(3n) {
  background:
    linear-gradient(135deg, rgba(18, 32, 51, 0.46), rgba(18, 32, 51, 0.30)),
    linear-gradient(135deg, var(--accent), var(--primary));
}

.module-grid a.institutional-button:hover,
.module-grid a.institutional-button:focus-visible,
.institutional-button:hover,
.institutional-button:focus-visible {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.supersalud-upload-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.supersalud-file-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 16px;
}

.supersalud-file-field span {
  color: var(--primary);
  font-weight: 700;
}

.supersalud-upload-grid--single {
  grid-template-columns: minmax(0, 720px);
}

.institutional-action {
  background:
    linear-gradient(135deg, rgba(18, 32, 51, 0.34), rgba(18, 32, 51, 0.20)),
    linear-gradient(135deg, var(--primary), var(--primary-strong));
  border-color: transparent;
  color: #fff;
  font-weight: 700;
}

.institutional-action.is-disabled {
  filter: grayscale(.65);
  opacity: .55;
  pointer-events: none;
}

.supersalud-data-grid {
  max-height: 62vh;
  overflow: auto;
}

.supersalud-data-grid table {
  min-width: max-content;
}

.supersalud-data-grid thead th {
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}

@media (max-width: 720px) {
  .supersalud-upload-grid {
    grid-template-columns: 1fr;
  }
}

.budget-action-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.budget-action-grid > a,
.split-action {
  background: #eef5fb;
  border: 1px solid #cfdeeb;
  border-radius: 6px;
  color: #153c5c;
  min-height: 56px;
  text-decoration: none;
}

.budget-action-grid > a {
  padding: 18px;
}

.split-action {
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
}

.split-action > a {
  align-items: center;
  color: #153c5c;
  display: flex;
  padding: 18px;
  text-decoration: none;
}

.split-action form {
  border-left: 1px solid #cfdeeb;
  display: flex;
}

.file-button {
  align-items: center;
  background: #fff;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  min-width: 116px;
  padding: 10px;
  text-align: center;
}

.file-button input {
  display: none;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.entity-header {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px;
}

.entity-header img {
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 96px;
  object-fit: contain;
  padding: 6px;
  width: 96px;
}

.entity-header h1 {
  margin-bottom: 8px;
}

.entity-header p {
  color: var(--muted);
  margin: 4px 0;
}

.module-header {
  align-items: center;
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}

.module-header .print-button {
  margin-left: auto;
}

.module-header .print-button + .print-button {
  margin-left: 8px;
}

.print-report-header {
  display: none;
}

.module-header h1 {
  margin-bottom: 4px;
}

.module-header p,
.muted-note {
  color: var(--muted);
  margin: 0;
}

.budget-module-header {
  align-items: stretch;
}

.budget-module-header > div:first-child {
  align-self: center;
  flex: 0 0 auto;
}

.budget-header-menu {
  align-items: stretch;
  display: grid;
  flex: 1 1 auto;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-left: 14px;
}

/* Nómina tiene una cuarta opción: se distribuye en una sola fila en pantallas amplias. */
.nomina-header-menu {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1180px) and (min-width: 841px) {
  .nomina-header-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.budget-header-menu a {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(18, 32, 51, 0.34), rgba(18, 32, 51, 0.20)),
    linear-gradient(135deg, var(--primary), var(--primary-strong));
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(2, 8, 23, .16);
  color: #fff;
  display: flex;
  font-weight: 700;
  justify-content: center;
  min-height: 58px;
  padding: 12px 16px;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(15, 23, 42, .45);
  transition: filter .18s ease, transform .18s ease;
}

.budget-header-menu a:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(18, 32, 51, 0.38), rgba(18, 32, 51, 0.24)),
    linear-gradient(135deg, var(--primary-strong), var(--accent));
}

.budget-header-menu a:nth-child(3) {
  background:
    linear-gradient(135deg, rgba(18, 32, 51, 0.46), rgba(18, 32, 51, 0.30)),
    linear-gradient(135deg, var(--accent), var(--primary));
}

.budget-header-menu a:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

@media (max-width: 840px) {
  .budget-module-header {
    flex-direction: column;
  }

  .budget-header-menu {
    grid-template-columns: 1fr;
    margin-left: 0;
  }
}

.profile-modules a,
.profile-modules span {
  min-height: 72px;
}

.report-grid {
  align-items: stretch;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.report-grid .report-button,
.report-grid span {
  align-items: center;
  background: #eef5fb;
  border: 1px solid #cfdeeb;
  border-radius: 6px;
  color: #153c5c;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 56px;
  min-width: 0;
  padding: 16px 18px;
  text-decoration: none;
  white-space: nowrap;
  width: auto;
}

.report-grid span {
  color: #7b8794;
}

.kpi-menu-heading {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  margin-bottom: 16px;
}

.kpi-title-with-light {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.kpi-title-with-light h2 {
  margin: 0;
}

.kpi-menu-row {
  align-items: center;
  display: grid;
  gap: 16px;
}

.traffic-light {
  align-items: center;
  background: #1f2937;
  border: 3px solid #111827;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  display: flex;
  gap: 7px;
  padding: 7px;
}

.traffic-light span {
  border-radius: 50%;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, .32), 0 0 8px rgba(255, 255, 255, .18);
  display: block;
  height: 18px;
  width: 18px;
}

.traffic-light .red {
  background: #dc2626;
}

.traffic-light .yellow {
  background: #facc15;
}

.traffic-light .green {
  background: #16a34a;
}

.dataset-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.dataset-table th,
.dataset-table td {
  font-size: 13px;
  white-space: nowrap;
}

.dataset-table td.table-code-value,
.dataset-table td.table-number-value {
  text-align: center;
}

.dataset-table th {
  text-align: center;
  white-space: normal;
  word-break: normal;
}

.kpi-options {
  display: flex;
  gap: 10px;
}

.kpi-options a {
  background: #eef5fb;
  border: 1px solid #cfdeeb;
  border-radius: 6px;
  color: #153c5c;
  font-weight: 700;
  padding: 10px 14px;
  text-decoration: none;
}

.kpi-options a.is-selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.kpi-light {
  border-radius: 999px;
  color: #fff;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  min-width: 86px;
  padding: 5px 8px;
  text-align: center;
}

.kpi-light.verde {
  background: #2f855a;
}

.kpi-light.amarillo {
  background: #c27803;
}

.kpi-light.rojo {
  background: #b42318;
}

.kpi-row-verde td {
  background: #dff3e8;
}

.kpi-row-amarillo td {
  background: #ffedb8;
}

.kpi-row-rojo td {
  background: #ffd7d2;
}

.kpi-row-verde:hover td {
  background: #ccebdc;
}

.kpi-row-amarillo:hover td {
  background: #ffe29a;
}

.kpi-row-rojo:hover td {
  background: #ffc3bb;
}

.kpi-chart-panel h2 {
  text-align: center;
  margin-bottom: 6px;
}

.kpi-chart-panel .muted-note {
  text-align: center;
}

.kpi-visual {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  justify-content: center;
  margin-top: 20px;
}

.kpi-pie-chart {
  flex: 0 1 760px;
  margin: 0;
  max-width: 100%;
  width: 760px;
}

.kpi-pie-chart svg {
  display: block;
  height: auto;
  overflow: visible;
  width: 100%;
}

.kpi-pie-slice {
  stroke: #fff;
  stroke-width: 4;
}

.kpi-pie-slice.verde {
  fill: #2f855a;
}

.kpi-pie-slice.amarillo {
  fill: #c27803;
}

.kpi-pie-slice.rojo {
  fill: #b42318;
}

.kpi-pie-hole {
  fill: #fff;
  stroke: #e5edf5;
  stroke-width: 1;
}

.kpi-pie-label {
  fill: #fff;
  font-size: 12px;
  font-weight: 700;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, .22);
  stroke-width: 3px;
  text-anchor: middle;
}

.kpi-pie-label-small {
  font-size: 9px;
}

.kpi-leader-line {
  fill: none;
  opacity: .58;
  stroke: #64748b;
  stroke-width: .9;
}

.kpi-leader-line.verde,
.kpi-leader-dot.verde {
  stroke: #2f855a;
}

.kpi-leader-line.amarillo,
.kpi-leader-dot.amarillo {
  stroke: #c27803;
}

.kpi-leader-line.rojo,
.kpi-leader-dot.rojo {
  stroke: #b42318;
}

.kpi-leader-dot.verde {
  fill: #2f855a;
}

.kpi-leader-dot.amarillo {
  fill: #c27803;
}

.kpi-leader-dot.rojo {
  fill: #b42318;
}

.kpi-external-label {
  fill: var(--text);
  font-size: 10px;
  font-weight: 700;
}

.kpi-external-label-pct {
  fill: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.kpi-pie-total {
  fill: var(--primary);
  font-size: 32px;
  font-weight: 700;
  text-anchor: middle;
}

.kpi-pie-caption {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-anchor: middle;
  text-transform: uppercase;
}

.kpi-donut {
  align-items: center;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  display: flex;
  flex: 0 0 220px;
  height: 220px;
  justify-content: center;
  position: relative;
  width: 220px;
}

.kpi-donut::after {
  background: #fff;
  border-radius: 50%;
  content: "";
  height: 124px;
  position: absolute;
  width: 124px;
}

.kpi-donut div {
  position: relative;
  text-align: center;
  z-index: 1;
}

.kpi-donut strong {
  color: var(--primary);
  display: block;
  font-size: 32px;
  line-height: 1;
}

.kpi-donut span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
  text-transform: uppercase;
}

.kpi-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: min(680px, 100%);
}

.kpi-summary article {
  border: 1px solid var(--line);
  border-left-width: 6px;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.kpi-summary article.verde {
  border-left-color: #2f855a;
}

.kpi-summary article.amarillo {
  border-left-color: #c27803;
}

.kpi-summary article.rojo {
  border-left-color: #b42318;
}

.kpi-summary strong {
  color: var(--text);
  display: block;
  font-size: 28px;
}

.kpi-summary span {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.kpi-summary small {
  color: var(--muted);
}

.kpi-slice-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.kpi-slice-detail span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  padding: 5px 9px;
}

.kpi-slice-detail b {
  margin-right: 4px;
}

.kpi-slice-detail .verde {
  background: #dff3e8;
}

.kpi-slice-detail .amarillo {
  background: #ffedb8;
}

.kpi-slice-detail .rojo {
  background: #ffd7d2;
}

.kpi-table {
  margin: 0 auto;
  table-layout: fixed;
  width: 100%;
}

.kpi-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.kpi-table,
.kpi-table th,
.kpi-table td,
.kpi-light,
.kpi-pie-chart,
.kpi-pie-chart * {
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.kpi-table th {
  font-size: 10px;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

.kpi-table td {
  font-size: 11px;
  line-height: 1.25;
  padding: 8px 7px;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
}

.kpi-table td:nth-child(2) {
  max-width: 220px;
  min-width: 160px;
  text-align: left;
  white-space: normal;
}

.kpi-table th:nth-child(1),
.kpi-table td:nth-child(1) {
  width: 58px;
}

.kpi-table th:nth-child(2),
.kpi-table td:nth-child(2) {
  width: 170px;
}

.kpi-table th:nth-child(12),
.kpi-table td:nth-child(12) {
  width: 90px;
}

.kpi-table-bpin {
  min-width: 1500px;
}

.kpi-table-bpin th:nth-child(1),
.kpi-table-bpin td:nth-child(1) {
  width: 180px;
}

.kpi-table-bpin th:nth-child(2),
.kpi-table-bpin td:nth-child(2) {
  width: 360px;
}

.kpi-table-bpin td:nth-child(1) {
  font-size: 10px;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: normal;
}

.kpi-table-bpin td:nth-child(2) {
  max-width: 360px;
  overflow-wrap: break-word;
  word-break: normal;
}

.kpi-table-bpin th:nth-child(n+3):nth-child(-n+7),
.kpi-table-bpin td:nth-child(n+3):nth-child(-n+7),
.kpi-table-bpin th:nth-child(11),
.kpi-table-bpin td:nth-child(11) {
  width: 126px;
}

.kpi-table-bpin th:nth-child(n+8):nth-child(-n+10),
.kpi-table-bpin td:nth-child(n+8):nth-child(-n+10) {
  width: 94px;
}

@media print {
  @page {
    margin: 10mm;
    size: landscape;
  }

  body {
    background: #fff;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .sidebar,
  .topbar,
  .button,
  .kpi-options,
  .saldos-tabs > input,
  .saldos-tabs > label,
  .active-profile-strip,
  .module-header,
  body::before,
  body::after {
    display: none !important;
  }

  .main {
    margin-left: 0;
  }

  .content {
    padding: 0;
  }

  .print-report-header {
    align-items: center;
    border-bottom: 4px solid var(--profile-primary);
    display: flex !important;
    gap: 12px;
    margin-bottom: 10px;
    padding: 0 0 8px;
  }

  .print-report-header img {
    border: 2px solid var(--profile-secondary);
    border-radius: 8px;
    height: 58px;
    object-fit: contain;
    padding: 4px;
    width: 58px;
  }

  .print-report-header strong {
    color: var(--profile-primary);
    display: block;
    font-size: 18px;
    line-height: 1.15;
  }

  .print-report-header span {
    color: #111827;
    display: block;
    font-size: 11px;
    margin-top: 2px;
  }

  .print-report-header small {
    color: var(--profile-accent);
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
    text-transform: uppercase;
  }

  .panel,
  .table-wrap {
    border: 1px solid #d9e2ec;
    box-shadow: none;
    page-break-inside: avoid;
  }

  .saldos-tab-panel .table-wrap,
  .saldos-table {
    page-break-inside: auto;
  }

  .kpi-chart-panel {
    padding: 10px;
  }

  .kpi-chart-panel h2 {
    color: #111827;
    font-size: 15px;
  }

  .kpi-chart-panel .muted-note {
    font-size: 10px;
  }

  .kpi-visual {
    gap: 16px;
  }

  .kpi-pie-chart {
    flex-basis: 100%;
    width: 100%;
  }

  .kpi-pie-slice {
    stroke-width: 5;
  }

  .kpi-pie-label {
    font-size: 10px;
    stroke-width: 3px;
  }

  .kpi-external-label {
    font-size: 8px;
  }

  .kpi-external-label-pct {
    font-size: 7px;
  }

  .kpi-pie-label-small {
    font-size: 7px;
  }

  .kpi-pie-total {
    font-size: 28px;
  }

  .kpi-pie-caption {
    font-size: 10px;
  }

  .kpi-summary {
    gap: 8px;
  }

  .kpi-summary article {
    padding: 8px;
  }

  .kpi-summary strong {
    font-size: 18px;
  }

  .kpi-summary span,
  .kpi-summary small {
    font-size: 9px;
  }

  .kpi-slice-detail {
    gap: 4px;
    margin-top: 8px;
  }

  .kpi-slice-detail span {
    font-size: 7px;
    padding: 2px 5px;
  }

  .table-wrap {
    margin-top: 8px;
    overflow: visible;
  }

  .kpi-table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
  }

  .kpi-table thead th {
    background: var(--profile-primary, #075985) !important;
    color: #fff !important;
  }

  .saldos-tab-panel {
    display: block !important;
    margin-bottom: 14px;
  }

  .saldos-tabs {
    display: block;
  }

  .saldos-table thead th {
    background: var(--profile-primary, var(--primary)) !important;
    color: #fff !important;
  }

  .saldos-toolbar {
    border: 1px solid #d9e2ec;
    margin-bottom: 10px;
    padding: 6px 8px;
  }

  .saldos-table {
    break-inside: auto;
  }

  .saldos-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .kpi-row-verde td {
    background: #dff3e8 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .kpi-row-amarillo td {
    background: #ffedb8 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .kpi-row-rojo td {
    background: #ffd7d2 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .kpi-table th {
    border: 1px solid #cbd5e1;
    font-size: 7px;
    padding: 5px 4px;
  }

  .kpi-table td {
    border: 1px solid #d9e2ec;
    font-size: 7px;
    padding: 5px 4px;
  }

  .kpi-light {
    font-size: 8px;
    min-width: 54px;
    padding: 3px 5px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

.profile-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 64px 1fr;
  padding: 14px;
}

.profile-card img {
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 64px;
  object-fit: contain;
  padding: 6px;
  width: 64px;
}

.profile-card strong,
.profile-card span {
  display: block;
}

.profile-card span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}

.profile-actions {
  display: flex;
  gap: 8px;
  grid-column: 1 / -1;
}

.profile-actions a {
  background: #eef5fb;
  border: 1px solid #cfdeeb;
  border-radius: 6px;
  color: #153c5c;
  padding: 8px 10px;
  text-decoration: none;
}

.profile-list-logo {
  display: block;
  height: 48px !important;
  max-height: 48px !important;
  max-width: 48px !important;
  object-fit: contain;
  width: 48px !important;
}

.logo-cell {
  height: 56px;
  width: 80px;
}

.logo-cell img {
  height: 48px !important;
  max-height: 48px !important;
  max-width: 48px !important;
  width: 48px !important;
}

.home-logo-only {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 22px;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 24px;
}

.home-logo-only img {
  display: block;
  height: auto;
  max-height: 420px;
  max-width: min(520px, 70vw);
  object-fit: contain;
  width: 100%;
}

.home-logo-only .home-main-logo {
  background: transparent;
  filter:
    drop-shadow(0 18px 28px rgba(0, 0, 0, .28));
  max-height: min(420px, 52vh);
  max-width: min(520px, 72vw);
  object-fit: contain;
}

.profile-switch-button {
  min-width: 180px;
  text-align: center;
}

.table-wrap {
  overflow-x: auto;
  width: 100%;
}

table {
  border-collapse: collapse;
  min-width: 100%;
}

th,
td {
  border: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

.profiles-table th,
.profiles-table td {
  padding-bottom: 6px;
  padding-top: 6px;
  vertical-align: middle;
}

.profiles-table th:first-child,
.profiles-table td:first-child {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  min-width: 118px;
  text-align: center;
  white-space: nowrap;
}

.profiles-table th:nth-child(2),
.profiles-table td:nth-child(2) {
  min-width: 68px;
  text-align: center;
  width: 68px;
}

.profile-user-form {
  margin-top: 18px;
}

.password-input-wrap {
  display: block;
  min-width: 0;
  position: relative;
  width: 100%;
}

.password-input-wrap input {
  padding-right: 88px;
  width: 100%;
}

.password-visibility-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 6px 6px 0;
  color: var(--profile-primary, var(--primary));
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  height: calc(100% - 2px);
  justify-content: center;
  min-width: 78px;
  padding: 0 10px;
  position: absolute;
  right: 1px;
  top: 1px;
}

.password-visibility-toggle:hover,
.password-visibility-toggle:focus-visible {
  background: #eef4fb;
  outline: 2px solid var(--profile-accent, var(--accent));
  outline-offset: -2px;
}

.profile-admin-form {
  margin-top: 18px;
}

.module-construction-panel {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 260px;
  text-align: center;
}

.module-construction-panel h2 {
  margin-bottom: 14px;
}

.construction-badge {
  background: linear-gradient(135deg, var(--profile-primary, var(--primary)), var(--profile-secondary, var(--secondary)));
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
  margin: 0 0 16px;
  padding: 10px 20px;
}

.asset-action-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.asset-upload-form {
  margin-bottom: 18px;
}

.asset-upload-form {
  align-items: end;
  display: flex;
  gap: 10px;
}

.asset-upload-form label {
  flex: 1;
}

.asset-dropzone {
  align-items: center;
  border: 2px dashed var(--line);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 94px;
  padding: 14px;
  text-align: center;
  transition: border-color .2s, background .2s;
}

.asset-dropzone.is-dragging {
  background: rgba(39, 94, 254, .08);
  border-color: var(--primary);
}

.asset-dropzone input {
  margin-top: 10px;
}

.asset-kpis {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0;
}

.asset-kpis article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.asset-kpis span,
.asset-kpis strong {
  display: block;
}

.asset-kpis strong {
  font-size: 21px;
  margin-top: 7px;
}

.asset-preview-wrap {
  max-height: 62vh;
}

.asset-preview-table {
  min-width: 3600px;
}

.asset-preview-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.asset-preview-table input,
.asset-preview-table select {
  min-width: 155px;
  width: 100%;
}

.asset-preview-table small {
  color: #b91c1c;
  display: block;
  font-size: 11px;
  margin-top: 4px;
}

.asset-cell-error {
  background: #fee2e2 !important;
  box-shadow: inset 0 0 0 2px #dc2626;
}

.asset-row-error > td:first-child {
  background: #dc2626;
  color: #fff;
  font-weight: 800;
}

@media (max-width: 900px) {
  .asset-kpis {
    grid-template-columns: 1fr;
  }
  .asset-upload-form {
    align-items: stretch;
    flex-direction: column;
  }
}

.tns-sync-page {
  display: grid;
  gap: 16px;
}

.tns-sync-description,
.tns-sync-note {
  color: var(--muted);
  margin: 0;
}

.tns-sync-panel {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.tns-sync-panel form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
  width: 100%;
}

.tns-sync-filter-grid {
  display: grid;
  flex: 1 1 680px;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.tns-sync-filter-grid input,
.tns-sync-filter-grid select {
  min-width: 0;
  width: 100%;
}

.tns-sync-button {
  min-height: 44px;
  min-width: 210px;
}

.tns-sync-button:disabled {
  cursor: wait;
  opacity: .72;
}

.tns-sync-status {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px;
}

.tns-sync-indicator {
  background: #64748b;
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

.tns-sync-status[data-state="pending"] .tns-sync-indicator,
.tns-sync-status[data-state="connecting"] .tns-sync-indicator,
.tns-sync-status[data-state="authenticating"] .tns-sync-indicator,
.tns-sync-status[data-state="navigating"] .tns-sync-indicator,
.tns-sync-status[data-state="extracting"] .tns-sync-indicator {
  animation: tns-status-pulse 1s infinite alternate;
  background: var(--profile-primary, var(--primary));
}

.tns-sync-status[data-state="completed"] .tns-sync-indicator { background: #16803c; }
.tns-sync-status[data-state="error"] .tns-sync-indicator { background: #c53030; }
.tns-sync-note { flex-basis: 100%; font-size: 12px; }
.tns-sync-results h2 { margin-top: 0; }
.tns-result-table td[data-numeric="true"] { text-align: center; }
.tns-json-result { max-height: 420px; overflow: auto; white-space: pre-wrap; }

@keyframes tns-status-pulse {
  from { opacity: .35; transform: scale(.8); }
  to { opacity: 1; transform: scale(1.15); }
}

@media (max-width: 620px) {
  .tns-sync-panel { align-items: stretch; flex-direction: column; }
  .tns-sync-panel form,
  .tns-sync-button,
  .tns-sync-status { width: 100%; }
  .tns-sync-filter-grid { grid-template-columns: 1fr; }
}

/* Botones compactos de Activos Fijos: el texto siempre queda dentro del control. */
.asset-action-bar > a.button.institutional-button {
  border-radius: 8px !important;
  flex: 0 0 auto !important;
  font-size: 11.5px !important;
  height: 48px !important;
  line-height: 1.15 !important;
  min-height: 48px !important;
  min-width: 230px !important;
  overflow-wrap: anywhere;
  padding: 0 16px !important;
  white-space: normal !important;
  width: 230px !important;
}

@media (max-width: 520px) {
  .asset-action-bar > a.button.institutional-button {
    flex-basis: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
  }
}

.tns-error-grid-wrap {
  border: 1px solid #fecaca;
  margin-top: 12px;
  overflow-x: auto;
}

.tns-error-grid {
  table-layout: fixed;
  width: 100%;
}

.tns-error-grid th,
.tns-error-grid td {
  line-height: 1.45;
  overflow-wrap: anywhere;
  padding: 12px;
  vertical-align: top;
  white-space: normal;
}

.tns-error-grid th:first-child,
.tns-error-grid td:first-child {
  text-align: center;
  width: 18%;
}

.tns-error-grid th:nth-child(2),
.tns-error-grid td:nth-child(2) {
  width: 23%;
}

.tns-error-grid th:nth-child(3),
.tns-error-grid td:nth-child(3) {
  width: 36%;
}

.tns-error-grid th:nth-child(4),
.tns-error-grid td:nth-child(4) {
  width: 23%;
}

.tns-error-code {
  color: #991b1b;
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .tns-error-grid {
    min-width: 760px;
  }
}

.profile-management-header {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.profile-management-header h1 {
  margin: 0;
}

.color-input-row {
  align-items: center;
  display: flex;
  gap: 8px;
}

.color-input-row input[type="color"] {
  min-width: 48px;
  padding: 4px;
  width: 48px;
}

.color-input-row strong {
  color: var(--muted);
  font-size: 12px;
}

.view-tabs {
  align-items: center;
  display: flex;
  gap: 10px;
  margin: 0 0 14px;
}

.view-tabs .button.profile-tab {
  background: #f8fbff;
  border: 1px solid #bfd2e6;
  border-radius: 6px;
  color: var(--primary);
  display: inline-flex;
  font-weight: 700;
  min-width: 92px;
  padding: 9px 16px;
  place-content: center;
  text-decoration: none;
}

.view-tabs .button.profile-tab:hover {
  background: #e8f2fb;
  border-color: var(--primary);
}

.view-tabs .button.profile-tab.is-selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 6px 14px rgba(39, 94, 254, 0.16);
}

th {
  background: #f8fafc;
  color: #52606d;
  font-size: 12px;
  text-transform: uppercase;
}

.filters {
  align-items: end;
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  gap: 6px;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  min-height: 40px;
  min-width: 220px;
  padding: 8px 10px;
}

textarea {
  font-family: inherit;
  min-height: 150px;
  resize: vertical;
  width: 100%;
}

.section-menu {
  display: flex;
  justify-content: flex-start;
}

.section-picker {
  align-items: end;
  gap: 12px;
}

.section-picker label {
  font-weight: 700;
}

.section-menu details {
  position: relative;
}

.section-menu summary {
  background: var(--primary);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  list-style: none;
  min-width: 150px;
  padding: 12px 16px;
}

.section-menu summary::-webkit-details-marker {
  display: none;
}

.section-menu summary::after {
  content: "v";
  margin-left: auto;
  padding-left: 18px;
}

.section-menu nav {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 32px rgba(16, 42, 67, .16);
  display: grid;
  left: 0;
  min-width: 240px;
  padding: 8px;
  position: absolute;
  top: calc(100% + 8px);
  z-index: 10;
}

.section-menu nav a {
  border-radius: 6px;
  color: var(--text);
  padding: 11px 12px;
  text-decoration: none;
}

.section-menu nav a:hover {
  background: #eef5fb;
}

.saldos-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.saldos-toolbar span {
  color: var(--primary);
  font-weight: 700;
}

.saldos-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.saldos-tabs > input {
  display: none;
}

.saldos-tabs > label {
  background: #eef5fb;
  border: 1px solid #cfdeeb;
  border-radius: 6px 6px 0 0;
  color: #153c5c;
  cursor: pointer;
  font-weight: 700;
  padding: 11px 14px;
}

.saldos-tab-panel {
  display: none;
  flex-basis: 100%;
  order: 10;
}

.saldos-tabs > input:checked + label {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.saldos-tabs > input:checked + label + .saldos-tab-panel {
  display: block;
}

.saldos-table th {
  background: var(--primary);
  color: #fff;
}

.saldos-table {
  table-layout: auto;
  width: max-content;
}

.saldos-table th,
.saldos-table td {
  vertical-align: middle;
}

.saldos-table .saldos-col-codigo-programa,
.saldos-table .saldos-col-cod-entidad,
.saldos-table .saldos-col-rubro,
.saldos-table .saldos-col-fuente {
  white-space: nowrap;
  width: 1%;
}

.saldos-table .saldos-col-unidad-ejecutora {
  min-width: 210px;
  white-space: normal;
}

.saldos-table .saldos-col-nombre-programa {
  min-width: 360px;
  white-space: normal;
}

.saldos-table .saldos-col-nombre-rubro {
  min-width: 360px;
  white-space: normal;
}

.saldos-table .saldos-col-nombre-fuente {
  min-width: 300px;
  white-space: normal;
}

.saldos-table .saldos-col-disponible {
  min-width: 150px;
  white-space: nowrap;
}

.saldos-table-funcionamiento,
.saldos-table-deuda {
  min-width: 100%;
}

.saldos-table-inversion {
  min-width: 1180px;
}

.money-cell {
  font-weight: 700;
  text-align: center;
}

.center-cell {
  text-align: center;
}

.code-cell,
.percent-cell {
  text-align: center;
}

.login-page {
  background: #fff;
  min-height: 100vh;
}

.login-shell {
  align-items: center;
  display: grid;
  gap: 90px;
  grid-template-columns: minmax(320px, 560px) minmax(360px, 520px);
  justify-content: center;
  min-height: 100vh;
  padding: 48px 72px;
}

.login-logo-panel img {
  display: block;
  max-height: 520px;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.login-form-panel {
  display: grid;
  gap: 26px;
  width: 100%;
}

.login-row {
  align-items: center;
  color: #000;
  display: grid;
  font-size: 15px;
  gap: 18px;
  grid-template-columns: 84px minmax(260px, 1fr);
}

.login-row b {
  color: #d74a4a;
  font-weight: 700;
}

.login-row input {
  border: 1px solid #c9c9c9;
  border-radius: 0;
  height: 35px;
  min-height: 35px;
  width: 100%;
}

.login-submit {
  background: #000;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  height: 42px;
  justify-self: center;
  margin-top: 6px;
  min-width: 164px;
  padding: 0 28px;
}

.forgot-password-link {
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  justify-self: center;
  text-decoration: none;
}

.forgot-password-link:hover {
  text-decoration: underline;
}

.reset-form-panel h1 {
  margin-bottom: 0;
}

.reset-actions {
  align-items: center;
  justify-content: center;
}

.alert {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  border-radius: 6px;
  color: #9b2c2c;
  padding: 10px 12px;
}

.notice {
  border-radius: 6px;
  margin-bottom: 18px;
  padding: 11px 12px;
}

.notice.success {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  color: #22543d;
}

.notice.error {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  color: #9b2c2c;
}

.edit-grid {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
  padding: 18px;
}

.edit-grid.reports-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nomina-config-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tools-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wide-field {
  grid-column: 1 / -1;
}

.settings-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-grid article {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
}

.settings-grid span,
.settings-grid strong {
  display: block;
}

.settings-grid span {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.settings-grid strong {
  color: var(--primary);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.embedded-table {
  border: 0;
  border-radius: 0;
  margin-bottom: 0;
}

.form-actions {
  align-items: end;
  display: flex;
  gap: 10px;
}

.row-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.row-actions form {
  margin: 0;
}

.associate-profiles-form {
  align-items: start;
}

.profile-checkbox-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-column: span 2;
  margin: 0;
  max-height: 320px;
  overflow: auto;
  padding: 12px;
}

.profile-checkbox-list legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 0 6px;
}

.profile-checkbox-list label {
  align-items: center;
  color: var(--text);
  display: flex;
  gap: 8px;
}

.profile-checkbox-list input {
  min-height: auto;
  min-width: auto;
  width: auto;
}

.associated-profile-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 220px;
}

.associated-profile-list span {
  background: #eef5fb;
  border: 1px solid #cfdeeb;
  border-radius: 999px;
  color: #153c5c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  padding: 5px 8px;
}

.capacidad-table th,
.capacidad-table td,
.capacidad-summary-table th,
.capacidad-summary-table td {
  vertical-align: middle;
}

.capacidad-major-row td {
  background: #e8f2fb;
  font-weight: 700;
}

.capacidad-aux-row td:first-child {
  color: var(--muted);
  font-size: 12px;
}

.capacidad-aux-row td:nth-child(2),
.capacidad-aux-row td:nth-child(3) {
  padding-left: 24px;
}

.capacidad-summary-panel {
  margin-top: 18px;
}

.nomina-action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nomina-config-shortcuts {
  margin-bottom: 14px;
}

.nomina-config-shortcuts a,
.nomina-action-grid > a,
.nomina-action-grid .split-action,
.nomina-action-card,
.nomina-report-grid > a,
.budget-loaded-grid .split-action,
.budget-calculate-actions .button,
.budget-report-grid .report-button,
.budget-kpi-grid a {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(18, 32, 51, 0.36), rgba(18, 32, 51, 0.22)),
    linear-gradient(135deg, var(--primary), var(--primary-strong));
  border-color: var(--primary);
  color: #ffffff;
  display: flex;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.45);
}

.nomina-config-shortcuts a:nth-child(2),
.budget-loaded-grid .split-action:nth-child(2),
.budget-report-grid .report-button:nth-child(2n),
.budget-kpi-grid a:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(18, 32, 51, 0.38), rgba(18, 32, 51, 0.24)),
    linear-gradient(135deg, var(--primary-strong), var(--accent));
}

.nomina-config-shortcuts a:nth-child(3),
.nomina-report-grid > a:nth-child(2),
.budget-report-grid .report-button:nth-child(3n),
.budget-kpi-grid a:nth-child(3) {
  background:
    linear-gradient(135deg, rgba(18, 32, 51, 0.46), rgba(18, 32, 51, 0.30)),
    linear-gradient(135deg, var(--accent), var(--primary));
}

.nomina-config-shortcuts a:hover,
.nomina-config-shortcuts a.is-active,
.nomina-action-grid > a:hover,
.nomina-action-grid .split-action:hover,
.nomina-action-card:hover,
.nomina-report-grid > a:hover,
.budget-loaded-grid .split-action:hover,
.budget-calculate-actions .button:hover,
.budget-report-grid .report-button:hover,
.budget-kpi-grid a:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.nomina-action-grid .split-action > a,
.nomina-action-card button,
.budget-loaded-grid .split-action > a {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.45);
}

.nomina-action-grid .split-action,
.budget-loaded-grid .split-action {
  align-items: stretch;
  display: grid;
}

.nomina-action-grid .split-action form,
.budget-loaded-grid .split-action form {
  border-left-color: rgba(255, 255, 255, 0.35);
}

.nomina-action-grid .file-button,
.budget-loaded-grid .file-button {
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary);
  text-shadow: none;
}

.budget-loaded-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.budget-loaded-grid .budget-calculate-actions {
  align-self: center;
  justify-self: end;
  margin: 0;
}

.budget-report-grid .report-button {
  border-color: var(--primary);
  color: #ffffff;
  /*
   * Mantener esta banda balanceada cuando se agreguen o retiren reportes:
   * cuatro botones por fila en escritorio y la ultima fila se estira para
   * ocupar todo el ancho, sin dejar un espacio vacio a la derecha.
   */
  flex: 1 1 calc((100% - 36px) / 4);
  text-align: center;
}

@media (max-width: 1100px) {
  .budget-report-grid .report-button {
    flex-basis: calc((100% - 12px) / 2);
  }
}

.budget-calculate-actions .button {
  border: 1px solid var(--primary);
  min-height: 44px;
}

.nomina-action-card {
  border-radius: 6px;
  min-height: 56px;
}

.nomina-action-card button {
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  height: 100%;
  min-height: 56px;
  padding: 18px;
  text-align: left;
  width: 100%;
}

.nomina-report-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nomina-actions-band {
  border-left: 4px solid var(--primary-strong);
}

.nomina-reports-band {
  border-left: 4px solid var(--accent);
}

.nomina-table {
  min-width: 1900px;
}

.nomina-table-secondary {
  margin-top: 16px;
}

.nomina-check-grid {
  display: grid;
  gap: 10px 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nomina-check-grid label {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  display: flex;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
}

.nomina-check-grid input,
.compact-checkbox {
  min-height: auto;
  min-width: auto;
  width: auto;
}

.nomina-check-grid .form-actions {
  grid-column: 1 / -1;
}

.button.danger {
  background: #b42318;
}

.button.danger:hover {
  background: #8f1d14;
}

.button.secondary {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--primary);
}

.button.secondary:hover {
  border-color: var(--primary);
  background: #f8fafc;
}

@media (min-width: 841px) and (max-width: 1180px) {
  .content {
    padding: 22px;
  }

  .module-grid,
  .budget-action-grid,
  .profile-grid,
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .edit-grid,
  .edit-grid.reports-form,
  .nomina-config-form,
  .tools-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-summary {
    grid-template-columns: 1fr;
  }

  .kpi-table-bpin {
    min-width: 1380px;
  }

  .kpi-table-bpin th,
  .kpi-table-bpin td {
    font-size: 10px;
    padding: 7px 6px;
  }

  .kpi-table-bpin th:nth-child(2),
  .kpi-table-bpin td:nth-child(2) {
    width: 330px;
  }
}

@media (max-width: 840px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .main {
    margin-left: 0;
  }

  .topbar,
  .active-profile-strip,
  .content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .metrics,
  .module-grid,
  .budget-action-grid,
  .profile-grid,
  .settings-grid,
  .tools-form,
  .nomina-action-grid,
  .nomina-report-grid,
  .nomina-check-grid {
    grid-template-columns: 1fr;
  }

  .split-action {
    grid-template-columns: 1fr;
  }

  .split-action form {
    border-left: 0;
    border-top: 1px solid #cfdeeb;
  }

  .nomina-action-grid .split-action form,
  .budget-loaded-grid .split-action form {
    border-top-color: rgba(255, 255, 255, 0.35);
  }

  .file-button {
    width: 100%;
  }

  .topbar-section,
  .section-picker {
    flex-wrap: wrap;
  }

  .entity-header,
  .module-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .module-header .print-button {
    margin-left: 0;
  }

  .filters {
    align-items: stretch;
    display: grid;
  }

  .edit-grid {
    grid-template-columns: 1fr;
  }

  .edit-grid.reports-form {
    grid-template-columns: 1fr;
  }

  .nomina-config-form {
    grid-template-columns: 1fr;
  }

  input,
  select,
  textarea {
    min-width: 0;
    width: 100%;
  }

  .section-menu details,
  .section-menu summary {
    width: 100%;
  }

  .section-menu nav {
    margin-top: 8px;
    position: static;
    width: 100%;
  }

  .kpi-options,
  .profile-actions,
  .row-actions {
    flex-wrap: wrap;
  }

  .kpi-pie-chart {
    flex-basis: 100%;
    max-width: 100%;
    width: 100%;
  }

  .kpi-summary {
    grid-template-columns: 1fr;
  }

  .dataset-table th,
  .dataset-table td,
  .kpi-table th,
  .kpi-table td {
    font-size: 11px;
    padding: 8px 7px;
  }

  .kpi-table-wrap-bpin {
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
  }

  .kpi-table-bpin {
    min-width: 1280px;
  }

  .kpi-table-bpin th,
  .kpi-table-bpin td {
    font-size: 10px;
    padding: 7px 6px;
  }

  .kpi-table-bpin th:nth-child(1),
  .kpi-table-bpin td:nth-child(1) {
    width: 168px;
  }

  .kpi-table-bpin th:nth-child(2),
  .kpi-table-bpin td:nth-child(2) {
    width: 300px;
  }

  .kpi-table-bpin th:nth-child(n+3):nth-child(-n+7),
  .kpi-table-bpin td:nth-child(n+3):nth-child(-n+7),
  .kpi-table-bpin th:nth-child(11),
  .kpi-table-bpin td:nth-child(11) {
    width: 108px;
  }

  .kpi-table-bpin th:nth-child(n+8):nth-child(-n+10),
  .kpi-table-bpin td:nth-child(n+8):nth-child(-n+10) {
    width: 82px;
  }

  .kpi-table-bpin .kpi-light {
    min-width: 74px;
  }

  .login-shell {
    gap: 28px;
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .login-logo-panel img {
    margin: 0 auto;
    max-height: 320px;
  }

  .login-row {
    grid-template-columns: 1fr;
  }

  .profile-checkbox-list {
    grid-column: 1;
  }
}

@media (max-width: 600px) {
  .sidebar {
    padding: 18px 14px;
  }

  .brand {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .nav {
    gap: 6px;
  }

  .nav a {
    padding: 10px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    padding-bottom: 12px;
    padding-top: 12px;
  }

  .topbar .button {
    text-align: center;
    width: 100%;
  }

  .content {
    padding-top: 18px;
  }

  h1 {
    font-size: 24px;
    line-height: 1.18;
  }

  .profile-management-header,
  .view-tabs,
  .saldos-toolbar,
  .kpi-options,
  .form-actions,
  .inline-actions,
  .report-grid {
    align-items: stretch;
    flex-direction: column;
  }

  .view-tabs .button.profile-tab,
  .button,
  .login-submit,
  .profile-switch-button,
  .report-grid .report-button,
  .report-grid span {
    text-align: center;
    width: 100%;
  }

  .metrics article,
  .panel,
  .table-wrap,
  .edit-grid {
    border-radius: 6px;
  }

  .metrics span,
  .settings-grid strong,
  .kpi-summary strong {
    font-size: 24px;
    overflow-wrap: anywhere;
  }

  .table-wrap {
    margin-left: -16px;
    margin-right: -16px;
    max-width: calc(100% + 32px);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  table {
    min-width: 760px;
  }

  th,
  td {
    font-size: 12px;
    padding: 9px 10px;
  }

  td {
    overflow-wrap: anywhere;
  }

  .money-cell,
  .center-cell,
  .dataset-table td:nth-child(n+3),
  .kpi-table td:nth-child(n+3) {
    white-space: nowrap;
  }

  .row-actions {
    align-items: stretch;
    flex-direction: column;
    white-space: normal;
  }

  .row-actions .button,
  .row-actions button {
    width: 100%;
  }

  .login-shell {
    min-height: 100svh;
    padding: 22px 18px;
  }

  .login-logo-panel img {
    max-height: 240px;
  }

  .login-form-panel {
    gap: 18px;
  }

  .login-row {
    gap: 8px;
  }

  .home-logo-only {
    min-height: auto;
    padding: 18px 0;
  }

  .home-logo-only .home-main-logo {
    max-width: min(360px, 86vw);
  }
}

.dataset-table thead th.report-heading-cell {
  text-align: center !important;
  vertical-align: middle;
  white-space: normal;
  word-break: normal;
}

.dataset-table tbody td.report-centered-cell {
  text-align: center !important;
}

.budget-dataset-table-wrap {
  max-height: calc(100vh - 220px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.budget-dataset-table-wrap .dataset-table {
  min-width: max-content;
}

.budget-dataset-table-wrap .dataset-table th,
.budget-dataset-table-wrap .dataset-table td {
  white-space: nowrap;
}

.budget-dataset-table-wrap .dataset-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

body {
  background:
    radial-gradient(circle at 18px 22px, rgba(255, 255, 255, .34) 1px, transparent 1.5px),
    radial-gradient(circle at 94px 84px, rgba(255, 255, 255, .18) 1px, transparent 1.5px),
    radial-gradient(circle at 50% 36%, rgba(92, 151, 204, .18), transparent 35%),
    linear-gradient(135deg, #142b46 0%, #1f3d5b 46%, #2a4b6c 100%);
  background-attachment: fixed;
  background-size: 128px 128px, 164px 164px, auto, auto;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(7, 17, 31, .92), rgba(16, 24, 39, .94)),
    linear-gradient(135deg, var(--primary), var(--primary-strong));
  border-right: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 16px 0 42px rgba(0, 0, 0, .22);
}

.topbar,
.active-profile-strip,
.metrics article,
.panel,
.table-wrap,
.edit-grid,
.entity-header,
.profile-card,
.settings-grid article {
  background: rgba(255, 255, 255, .94);
  border-color: rgba(255, 255, 255, .62);
  box-shadow: 0 18px 48px rgba(2, 8, 23, .18);
}

.topbar {
  backdrop-filter: blur(14px);
}

.brand::after {
  background: var(--accent);
  border-radius: 999px;
  content: "";
  display: block;
  height: 3px;
  margin-top: 8px;
  width: 72px;
}

.nav a {
  border: 1px solid transparent;
}

.nav a.is-active,
.nav a:hover {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .22);
  box-shadow: inset 4px 0 0 var(--accent);
}

.button,
.report-grid .report-button,
.module-grid a,
.budget-action-grid > a,
.split-action,
.kpi-options a {
  box-shadow: 0 10px 24px rgba(2, 8, 23, .16);
}

.button {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.button.ghost,
.button.secondary {
  box-shadow: none;
}

.module-grid a,
.module-grid span,
.budget-action-grid > a,
.split-action,
.report-grid .report-button,
.report-grid span,
.kpi-options a {
  border-color: rgba(39, 94, 254, .22);
}

.module-grid a,
.module-grid span,
.budget-action-grid > a,
.split-action > a,
.report-grid .report-button,
.report-grid span,
.kpi-options a,
.nomina-config-shortcuts a,
.nomina-action-card button,
.button {
  text-transform: uppercase;
}

th {
  background: rgba(15, 23, 42, .92);
  color: #eef6ff;
}

tbody tr:hover td {
  background: rgba(39, 94, 254, .06);
}

.fut-toolbar .inline-actions,
.fut-registros-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
}

.fut-toolbar .fut-catalog-button,
.fut-registros-actions .fut-action-button {
  align-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border: 0;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(2, 8, 23, .16);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  min-width: 0;
  padding: 0 16px;
  white-space: nowrap;
  width: auto;
  text-decoration: none;
  text-transform: uppercase;
}

.fut-toolbar .fut-catalog-button:hover,
.fut-registros-actions .fut-action-button:hover {
  background: linear-gradient(135deg, var(--primary-strong), var(--primary));
}

.fut-registros-actions .fut-file-field {
  display: grid;
  gap: 6px;
}

.fut-registros-inline-form {
  align-items: end;
  display: flex;
  gap: 12px;
}

.fut-import-guide-panel {
  margin-top: 18px;
  scroll-margin-top: 20px;
}

.fut-import-guide-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.fut-modal {
  display: none;
  inset: 0;
  position: fixed;
  z-index: 1000;
}

.fut-modal:target {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.fut-modal-backdrop {
  background: rgba(2, 8, 23, .7);
  inset: 0;
  position: absolute;
}

.fut-modal-card {
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .38);
  color: #122033;
  max-width: 680px;
  padding: 22px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.fut-modal-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.fut-modal-header h2 {
  color: #122033;
  font-weight: 800;
  margin: 0;
  text-shadow: none;
}

.fut-modal-close {
  color: #475569;
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
}

.fut-plano-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 190px 190px auto;
  justify-content: start;
}

.fut-plano-form label {
  color: #334155;
  font-weight: 700;
  min-width: 0;
}

.fut-plano-form input,
.fut-plano-form select {
  background: #fff;
  color: #122033;
  min-width: 0;
  width: 190px;
}

.fut-plano-form .button {
  height: 40px;
  min-width: 112px;
  padding: 0 16px;
  width: auto;
}

.fut-edit-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fut-file-field input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
  height: 40px;
  padding: 7px 10px;
}

.fut-registros-table td {
  vertical-align: top;
}

.fut-registros-table .long-object-cell {
  background: #ffe4e6;
  color: #7f1d1d;
  white-space: normal;
  min-width: 360px;
}

.fut-registros-table th:nth-child(3),
.fut-registros-table td:nth-child(3) {
  max-width: 520px;
  white-space: normal;
}

.content > h1,
.content > h2,
.content > h3,
.module-header h1,
.module-header h2,
.module-header h3 {
  color: #f8fbff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .38);
}

.module-header h2,
.module-header h3 {
  margin-bottom: 4px;
}

.module-header p,
.content > .muted-note {
  color: rgba(226, 236, 255, .86);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .28);
}

.module-header .button.ghost {
  border-color: rgba(255, 255, 255, .62);
  color: #fff3d6;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .34);
}

.module-header .button.ghost:hover {
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
}

.content > .filters {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(2, 8, 23, .18);
  padding: 14px;
}

.panel h1,
.panel h2,
.panel h3,
.table-wrap h1,
.table-wrap h2,
.table-wrap h3,
.edit-grid h1,
.edit-grid h2,
.edit-grid h3 {
  color: var(--text);
  text-shadow: none;
}

@media (max-width: 840px) {
  .fut-edit-grid {
    grid-template-columns: 1fr;
  }

  .fut-registros-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .fut-registros-actions .fut-action-button {
    width: 100%;
  }

  .fut-registros-inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .fut-plano-form {
    grid-template-columns: 1fr;
  }

  .fut-plano-form input,
  .fut-plano-form select,
  .fut-plano-form .button {
    width: 100%;
  }
}

@media print {
  body {
    background: #fff !important;
  }

  .topbar,
  .active-profile-strip,
  .metrics article,
  .panel,
  .table-wrap,
  .content > .filters,
  .edit-grid,
  .entity-header,
  .profile-card,
  .settings-grid article {
    background: #fff !important;
    box-shadow: none !important;
  }
}

.fut-registros-table {
  table-layout: fixed;
  min-width: 1740px;
}

.fut-registros-table th {
  line-height: 1.2;
  overflow-wrap: normal;
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
  white-space: normal !important;
  word-break: normal;
}

.fut-registros-table td {
  line-height: 1.25;
  white-space: normal;
}

.fut-registros-table th:nth-child(1),
.fut-registros-table td:nth-child(1) {
  width: 92px;
}

.fut-registros-table th:nth-child(2),
.fut-registros-table td:nth-child(2) {
  width: 92px;
}

.fut-registros-table th:nth-child(3),
.fut-registros-table td:nth-child(3) {
  width: 520px;
}

.fut-registros-table th:nth-child(4),
.fut-registros-table td:nth-child(4) {
  width: 168px;
}

.fut-registros-table th:nth-child(5),
.fut-registros-table td:nth-child(5) {
  width: 132px;
}

.fut-registros-table th:nth-child(6),
.fut-registros-table td:nth-child(6) {
  width: 260px;
}

.fut-registros-table th:nth-child(7),
.fut-registros-table td:nth-child(7) {
  width: 172px;
}

.fut-registros-table th:nth-child(8),
.fut-registros-table td:nth-child(8) {
  width: 156px;
}

.fut-registros-table th:nth-child(9),
.fut-registros-table td:nth-child(9) {
  width: 168px;
}

.fut-registros-table th:nth-child(10),
.fut-registros-table td:nth-child(10) {
  width: 156px;
}

.fut-registros-table td:nth-child(10) {
  white-space: nowrap;
}

.pac-view-header,
.pac-page-header {
  align-items: center;
  background: rgba(9, 23, 41, .18);
  border-radius: 8px;
  padding: 2px 0;
}

.pac-view-title,
.pac-section-heading {
  color: #f8fbff !important;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .55), 0 0 1px rgba(0, 0, 0, .95) !important;
}

.pac-view-header p {
  color: #eef6ff !important;
  font-weight: 500;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .42) !important;
}

.pac-view-header .button.ghost {
  background: rgba(3, 12, 24, .42);
  border-color: rgba(255, 255, 255, .72);
  color: #ffb454 !important;
}

.pac-view-header .button.ghost:hover {
  background: rgba(255, 255, 255, .14);
  color: #ffffff !important;
}

/* Keep profile-management copy legible on the dark application background. */
.profile-management-header h1 {
  color: #f8fbff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .55), 0 0 1px rgba(0, 0, 0, .95);
}

.profile-admin-form label,
.profile-admin-form legend {
  color: #334155;
  font-weight: 600;
}

.profile-admin-form .color-input-row strong {
  color: #475569;
}

/* One consistent action-button size across every application view. */
a.button,
button.button,
input.button {
  align-items: center;
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 150px;
  font-size: 13px;
  height: 40px !important;
  justify-content: center;
  line-height: 1.1;
  min-height: 40px !important;
  min-width: 150px !important;
  padding: 0 12px !important;
  text-align: center;
  white-space: nowrap;
  width: 150px !important;
}

@media (max-width: 520px) {
  a.button,
  button.button,
  input.button {
    flex-basis: 100%;
    width: 100% !important;
  }
}

/* Keep the home profile switch compact; this must override global button sizing. */
.home-logo-only a.button.profile-switch-button {
  align-items: center !important;
  aspect-ratio: auto !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  font-size: 13px !important;
  height: 40px !important;
  justify-content: center !important;
  line-height: 1 !important;
  max-height: 40px !important;
  max-width: 180px !important;
  min-height: 40px !important;
  min-width: 180px !important;
  overflow: hidden !important;
  padding: 0 14px !important;
  text-align: center !important;
  white-space: nowrap !important;
  width: 180px !important;
}

/* Dashboard consolidado de los tres procesos del modulo Presupuesto. */
.budget-smart-dashboard {
  background: rgba(248, 251, 255, .97);
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 12px;
  box-shadow: 0 22px 60px rgba(2, 8, 23, .24);
  color: #122033;
  margin-top: 6px;
  padding: 22px;
}

.budget-dashboard-heading {
  align-items: flex-end;
  border-bottom: 1px solid #dce5ef;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 16px;
}

.budget-dashboard-heading h2,
.budget-dashboard-heading p {
  margin: 0;
}

.budget-dashboard-heading h2 {
  color: #122033;
  font-size: 24px;
  margin: 2px 0 5px;
}

.budget-dashboard-heading > div > p:last-child,
.budget-dashboard-freshness {
  color: #65738a;
  font-size: 13px;
}

.budget-dashboard-kicker {
  color: var(--primary) !important;
  font-size: 11px !important;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.budget-dashboard-freshness {
  background: #eef3f8;
  border-radius: 999px;
  flex: 0 0 auto;
  padding: 7px 11px;
}

.budget-dashboard-grid {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.budget-dashboard-card {
  background: #fff;
  border: 1px solid #dce5ef;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-height: 350px;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.budget-dashboard-card::before {
  background: var(--primary);
  content: "";
  height: 4px;
  inset: 0 0 auto;
  position: absolute;
}

.budget-dashboard-pac::before { background: var(--primary-strong); }
.budget-dashboard-fut::before { background: var(--accent); }

.budget-card-heading,
.budget-card-heading > div {
  align-items: center;
  display: flex;
}

.budget-card-heading {
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.budget-card-heading > div { gap: 9px; }

.budget-card-heading span {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}

.budget-card-heading h3 {
  font-size: 16px;
  margin: 0;
}

.budget-card-heading a {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.budget-kpi-pair,
.budget-kpi-trio {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.budget-kpi-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.budget-kpi-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.budget-kpi-pair > div,
.budget-kpi-trio > div {
  background: #f5f8fb;
  border-radius: 8px;
  min-width: 0;
  padding: 11px;
}

.budget-kpi-pair strong,
.budget-kpi-trio strong,
.budget-kpi-pair span,
.budget-kpi-trio span,
.budget-kpi-pair small {
  display: block;
}

.budget-kpi-pair strong { color: #163d61; font-size: 20px; }
.budget-kpi-trio strong { color: #163d61; font-size: 16px; overflow-wrap: anywhere; }
.budget-kpi-pair span,
.budget-kpi-trio span { color: #475569; font-size: 11px; font-weight: 800; margin-top: 3px; text-transform: uppercase; }
.budget-kpi-pair small { color: #718096; font-size: 10px; margin-top: 5px; }

.budget-progress-list > div {
  display: grid;
  gap: 5px 8px;
  grid-template-columns: 1fr auto;
  margin: 12px 0;
}

.budget-progress-list span,
.budget-progress-list b { font-size: 12px; }
.budget-progress-list i,
.fut-source-chart i {
  background: #e8eef4;
  border-radius: 999px;
  display: block;
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
}

.budget-progress-list em,
.fut-source-chart em {
  background: var(--primary);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.budget-progress-list > div:nth-child(2) em { background: var(--accent); }

.pac-mini-chart {
  align-items: stretch;
  border-bottom: 1px solid #cbd5e1;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  height: 112px;
  padding: 3px 2px 0;
}

.pac-mini-chart > div,
.pac-mini-chart i {
  align-items: flex-end;
  display: flex;
  height: 100%;
  justify-content: center;
}

.pac-mini-chart > div { flex-direction: column; }
.pac-mini-chart i { gap: 2px; width: 100%; }
.pac-mini-chart em,
.pac-mini-chart b { background: var(--primary); display: block; min-height: 1px; width: 42%; }
.pac-mini-chart b { background: var(--primary-strong); }
.pac-mini-chart span { color: #64748b; font-size: 8px; margin-top: 5px; width: 100%; text-align: center; }

.budget-chart-legend {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 10px;
}

.budget-chart-legend span { color: #64748b; font-size: 10px; }
.budget-chart-legend i { background: var(--primary); display: inline-block; height: 7px; margin-right: 5px; width: 7px; }
.budget-chart-legend span:nth-child(2) i { background: var(--primary-strong); }

.budget-dashboard-card h4 {
  color: #475569;
  font-size: 11px;
  margin: 0 0 9px;
  text-transform: uppercase;
}

.fut-source-chart { display: grid; gap: 9px; }
.fut-source-chart > div { align-items: center; display: grid; gap: 7px; grid-template-columns: minmax(66px, .8fr) minmax(80px, 1fr) auto; }
.fut-source-chart span { font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fut-source-chart i { grid-column: auto; height: 7px; }
.fut-source-chart em { background: var(--accent); }
.fut-source-chart b { font-size: 9px; text-align: right; }

.budget-card-insight {
  background: #f6f8fb;
  border-left: 3px solid #94a3b8;
  color: #475569;
  font-size: 11px;
  line-height: 1.45;
  margin: auto 0 0;
  padding: 8px 10px;
}

.budget-dashboard-empty {
  align-items: center;
  background: #f6f8fb;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  display: flex;
  flex: 1;
  font-size: 13px;
  justify-content: center;
  line-height: 1.5;
  margin: 0;
  padding: 24px;
  text-align: center;
}

@media (max-width: 1180px) {
  .budget-dashboard-grid { grid-template-columns: 1fr 1fr; }
  .budget-dashboard-card:last-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .budget-smart-dashboard { padding: 15px; }
  .budget-dashboard-heading { align-items: flex-start; flex-direction: column; }
  .budget-dashboard-grid { grid-template-columns: 1fr; }
  .budget-dashboard-card:last-child { grid-column: auto; }
  .budget-kpi-trio { grid-template-columns: 1fr; }
}

/* Dashboard v2: visualizaciones SVG y acabado ejecutivo. */
.budget-smart-dashboard {
  background: linear-gradient(145deg, #f8fbff 0%, #eef4fa 100%);
  border: 1px solid rgba(203, 213, 225, .78);
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(2, 12, 27, .28);
  padding: 26px;
}

.budget-dashboard-heading {
  align-items: center;
  border-bottom: 0;
  margin-bottom: 22px;
  padding: 0;
}

.budget-dashboard-heading h2 {
  font-size: 28px;
  letter-spacing: -.03em;
}

.budget-dashboard-grid { gap: 18px; }

.budget-dashboard-card {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 42, 67, .10);
  min-height: 390px;
  padding: 22px;
  transition: box-shadow .2s ease, transform .2s ease;
}

.budget-dashboard-card:hover {
  box-shadow: 0 18px 38px rgba(15, 42, 67, .16);
  transform: translateY(-2px);
}

.budget-dashboard-card::before { height: 5px; }

.budget-card-heading { margin-bottom: 20px; }
.budget-card-heading h3 { color: #122033; font-size: 18px; }
.budget-card-heading > div > span {
  align-items: center;
  background: #edf3f9;
  border-radius: 50%;
  color: #64748b;
  display: inline-flex;
  height: 29px;
  justify-content: center;
  width: 29px;
}

.budget-card-heading a {
  background: #eef4fa;
  border-radius: 999px;
  padding: 7px 11px;
}

.execution-gauges {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 4px 0 20px;
}

.execution-gauge { min-width: 0; text-align: center; }
.execution-gauge svg { display: block; margin: 0 auto 8px; max-width: 150px; width: 100%; }
.execution-gauge circle { fill: none; stroke-width: 10; }
.execution-gauge .gauge-track { stroke: #e5edf5; }
.execution-gauge .gauge-value {
  stroke: var(--primary);
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
}
.execution-gauge.is-expense .gauge-value { stroke: var(--accent); }
.gauge-number { fill: #102a43; font-size: 17px; font-weight: 800; text-anchor: middle; }
.gauge-label { fill: #64748b; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-anchor: middle; text-transform: uppercase; }
.execution-gauge > strong { color: #163d61; display: block; font-size: 14px; }
.execution-gauge > span { color: #7b8794; display: block; font-size: 10px; margin-top: 3px; }

.budget-kpi-pair > div,
.budget-kpi-trio > div {
  background: linear-gradient(145deg, #f7faff, #edf3f8);
  border: 1px solid #e2eaf2;
  padding: 13px;
}

.pac-line-chart {
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
  border: 1px solid #e4ebf3;
  border-radius: 12px;
  margin-top: 2px;
  padding: 8px;
}

.pac-line-chart svg { display: block; overflow: visible; width: 100%; }
.pac-grid line { stroke: #dbe5ee; stroke-dasharray: 3 5; stroke-width: 1; }
.pac-area { fill: rgba(39, 94, 254, .08); stroke: none; }
.pac-income-line,
.pac-expense-line { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; }
.pac-income-line { stroke: var(--primary); }
.pac-expense-line { stroke: var(--primary-strong); stroke-dasharray: 7 5; }
.pac-line-chart text { fill: #718096; font-size: 8px; text-anchor: middle; }

.budget-chart-legend i { border-radius: 50%; height: 9px; width: 9px; }

.fut-source-chart { gap: 12px; }
.fut-source-chart > div { grid-template-columns: minmax(75px, .75fr) minmax(110px, 1.35fr) auto; }
.fut-source-chart i { height: 10px; }
.fut-source-chart em { background: linear-gradient(90deg, #d97706, #f4a340); }
.fut-source-chart span { color: #475569; font-size: 11px; font-weight: 700; }
.fut-source-chart b { color: #334155; font-size: 10px; }

.budget-card-insight {
  background: #f1f6fa;
  border-left-color: var(--primary);
  border-radius: 0 8px 8px 0;
  font-size: 12px;
  padding: 10px 12px;
}

@media (max-width: 760px) {
  .budget-smart-dashboard { border-radius: 12px; padding: 16px; }
  .budget-dashboard-heading h2 { font-size: 23px; }
  .execution-gauges { gap: 10px; }
}

/* Ajustes finales de las bandas de Reportes Ejecucion. */
.budget-loaded-grid .budget-calculate-actions {
  align-items: center;
  align-self: stretch;
  display: flex;
  height: 100%;
  justify-content: flex-end;
  margin: 0;
}

.budget-loaded-grid .budget-calculate-actions .button {
  margin: auto 0;
}

.budget-report-grid .report-button {
  /* Formula compatible: cuatro botones por fila; cualquier ultima fila se expande completa. */
  flex: 1 1 calc(25% - 9px);
  justify-content: center;
  min-width: 0;
  text-align: center;
}

@media (max-width: 1100px) {
  .budget-report-grid .report-button {
    flex-basis: calc(50% - 6px);
  }
}

@media (max-width: 700px) {
  .budget-loaded-grid .budget-calculate-actions,
  .budget-loaded-grid .budget-calculate-actions .button {
    width: 100% !important;
  }

  .budget-report-grid .report-button {
    flex-basis: 100%;
  }
}

/* Banda Reportes: cinco columnas uniformes y texto siempre contenido. */
.report-grid.budget-report-grid {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.report-grid.budget-report-grid .report-button {
  box-sizing: border-box;
  display: flex;
  flex: none;
  font-size: 13px;
  height: 62px;
  line-height: 1.2;
  max-width: none;
  min-height: 62px;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  text-align: center;
  white-space: normal;
  width: 100%;
  word-break: normal;
}

@media (max-width: 1180px) {
  .report-grid.budget-report-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .report-grid.budget-report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .report-grid.budget-report-grid {
    grid-template-columns: 1fr;
  }
}

/* Informe KPI: titulo, semaforo y botones en una sola fila. */
.kpi-inline-panel {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: auto minmax(0, 1fr);
}

.kpi-inline-panel .kpi-menu-heading {
  margin: 0;
  white-space: nowrap;
}

.kpi-inline-panel .kpi-menu-row,
.kpi-inline-panel .budget-kpi-grid {
  min-width: 0;
  width: 100%;
}

.kpi-inline-panel .budget-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi-inline-panel .budget-kpi-grid a {
  min-height: 58px;
}

@media (max-width: 900px) {
  .kpi-inline-panel {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .kpi-inline-panel .budget-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* Administracion de privilegios, exclusiva del usuario admin. */
.privileges-header { margin-bottom: 18px; }

.privileges-form {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(180px, .7fr) minmax(280px, 1.8fr) auto;
}

.privileges-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.privileges-form label span {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.privileges-form input,
.privileges-form select {
  min-height: 42px;
  width: 100%;
}

.privileges-section-builder { display: grid; gap: 7px; min-width: 0; }
.privileges-section-builder > span { color: #334155; font-size: 13px; font-weight: 700; }
.privileges-section-picker { display: grid; gap: 8px; grid-template-columns: minmax(220px, 1fr) auto; }
.privileges-selected-sections { display: flex; flex-wrap: wrap; gap: 7px; min-height: 34px; }
.privileges-section-chip {
  align-items: center; background: #e9f2fb; border: 1px solid #c9d9ea; border-radius: 999px;
  color: #173a5e; display: inline-flex; font-size: 13px; font-weight: 700; gap: 6px; padding: 6px 8px 6px 12px;
}
.privileges-section-chip button { background: transparent; border: 0; color: #9b1c1c; cursor: pointer; font-size: 18px; line-height: 1; padding: 0 3px; }
.privileges-section-builder small { color: #64748b; }

.privileges-form-actions,
.privileges-row-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.privileges-form-actions { flex-wrap: wrap; margin-top: 24px; }
.privileges-grid { width: 100%; }
.privileges-grid th:first-child,
.privileges-grid td:first-child { width: 220px; }
.privileges-grid th:last-child,
.privileges-grid td:last-child { width: 330px; }
.privileges-row-actions form { margin: 0; }

.privileges-delete-button {
  background: #b42318 !important;
  border-color: #b42318 !important;
}

@media (max-width: 900px) {
  .privileges-form { grid-template-columns: 1fr; }
  .privileges-form-actions { margin-top: 0; }
  .privileges-form-actions .button { width: 100% !important; }
}

@media (max-width: 700px) {
  .privileges-grid-wrap { overflow-x: auto; }
  .privileges-grid { min-width: 720px; }
}

/* KPI por sector: grafico horizontal adaptable a todo el ancho del resumen. */
.budget-sector-kpi-card {
  grid-column: 1 / -1;
  min-height: 0;
}

.budget-sector-kpi-card::before {
  background: linear-gradient(90deg, #2f855a, #d69e2e, #b42318);
}

.sector-kpi-subtitle {
  color: #64748b;
  font-size: 12px;
  margin: -8px 0 18px;
}

.sector-kpi-layout {
  align-items: start;
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1fr) 210px;
}

.sector-kpi-chart {
  display: grid;
  gap: 11px;
  min-width: 0;
}

.sector-kpi-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 30%) minmax(120px, 1fr) 62px;
  min-width: 0;
}

.sector-kpi-row > span {
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sector-kpi-row > i {
  background: #e7edf4;
  border-radius: 999px;
  display: block;
  height: 13px;
  overflow: hidden;
}

.sector-kpi-row > i > em {
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 2px;
}

.sector-kpi-row > i > em.verde { background: #2f855a; }
.sector-kpi-row > i > em.amarillo { background: #d69e2e; }
.sector-kpi-row > i > em.rojo { background: #b42318; }

.sector-kpi-row > b {
  color: #163d61;
  font-size: 12px;
  text-align: right;
}

.sector-kpi-summary {
  background: #f5f8fb;
  border: 1px solid #e0e8f0;
  border-radius: 12px;
  display: grid;
  gap: 1px;
  overflow: hidden;
  padding: 5px 14px;
}

.sector-kpi-summary > div {
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  display: grid;
  gap: 2px 9px;
  grid-template-columns: auto 1fr;
  padding: 12px 0;
}

.sector-kpi-summary > div:last-child { border-bottom: 0; }
.sector-kpi-summary i { border-radius: 50%; grid-row: 1 / 3; height: 11px; width: 11px; }
.sector-kpi-summary .verde i { background: #2f855a; }
.sector-kpi-summary .amarillo i { background: #d69e2e; }
.sector-kpi-summary .rojo i { background: #b42318; }
.sector-kpi-summary span { color: #334155; font-size: 11px; font-weight: 700; }
.sector-kpi-summary strong { font-size: 17px; margin-right: 3px; }
.sector-kpi-summary small { color: #7b8794; font-size: 9px; }

@media (max-width: 900px) {
  .sector-kpi-layout { grid-template-columns: 1fr; }
  .sector-kpi-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sector-kpi-summary > div { border-bottom: 0; border-right: 1px solid #e2e8f0; }
  .sector-kpi-summary > div:last-child { border-right: 0; }
}

@media (max-width: 620px) {
  .sector-kpi-row {
    gap: 6px 9px;
    grid-template-columns: minmax(0, 1fr) 55px;
  }
  .sector-kpi-row > span { grid-column: 1 / -1; white-space: normal; }
  .sector-kpi-summary { grid-template-columns: 1fr; }
  .sector-kpi-summary > div { border-bottom: 1px solid #e2e8f0; border-right: 0; }
}

/* Resumen financiero en matriz 2 x 2. */
.budget-dashboard-grid {
  align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.budget-sector-kpi-card {
  grid-column: auto;
}

.budget-sector-kpi-card .sector-kpi-layout {
  grid-template-columns: minmax(0, 1fr);
}

.budget-sector-kpi-card .sector-kpi-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.budget-sector-kpi-card .sector-kpi-summary > div {
  border-bottom: 0;
  border-right: 1px solid #e2e8f0;
}

.budget-sector-kpi-card .sector-kpi-summary > div:last-child {
  border-right: 0;
}

.budget-sector-kpi-card .sector-kpi-row {
  gap: 7px 10px;
  grid-template-columns: minmax(150px, 42%) minmax(90px, 1fr) 58px;
}

@media (max-width: 900px) {
  .budget-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .budget-sector-kpi-card .sector-kpi-row {
    grid-template-columns: minmax(180px, 32%) minmax(120px, 1fr) 60px;
  }
}

.liquidacion-grid {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.liquidacion-tabs {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  margin-bottom: 18px;
}

.liquidacion-tabs .liquidacion-tab {
  border-radius: 8px;
  min-height: 52px;
  overflow-wrap: anywhere;
  padding: 12px 18px;
  width: min(260px, 50%);
}

.liquidacion-tabs .liquidacion-tab:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(18, 32, 51, 0.38), rgba(18, 32, 51, 0.24)),
    linear-gradient(135deg, var(--primary-strong), var(--accent));
}

.liquidacion-tabs .liquidacion-tab.is-active {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .72), 0 10px 24px rgba(2, 8, 23, .22);
  filter: brightness(1.1);
}

.liquidacion-tab-panel[hidden] {
  display: none;
}

.vacaciones-form {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vacaciones-employee-block,
.vacaciones-values-block,
.vacaciones-period-block {
  background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(239, 246, 241, .92));
  border: 1px solid rgba(47, 133, 90, .28);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  padding: 14px;
}

.vacaciones-employee-block {
  grid-column: 1 / -1;
}

.vacaciones-values-block {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vacaciones-enjoyment-block {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vacaciones-days {
  background: #f3f7f5;
  font-weight: 700;
  text-align: center;
}

.vacaciones-employee-block legend,
.vacaciones-values-block legend,
.vacaciones-period-block legend {
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 800;
  padding: 0 6px;
  text-transform: uppercase;
}

.vacaciones-actions {
  grid-column: 1 / -1;
}

.liquidacion-employee-block {
  background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(239, 246, 241, .92));
  border: 1px solid rgba(47, 133, 90, .28);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  min-width: 0;
  padding: 14px;
}

.liquidacion-employee-block legend {
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 800;
  padding: 0 6px;
  text-transform: uppercase;
}

.liquidacion-actions {
  grid-column: 1 / -1;
}

.liquidacion-total-row td {
  background: #e7f4ec;
  color: #123522;
  font-weight: 800;
}

@media (max-width: 900px) {
  .liquidacion-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .liquidacion-employee-block {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vacaciones-form {
    grid-template-columns: 1fr;
  }

  .vacaciones-values-block {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .liquidacion-grid {
    grid-template-columns: 1fr;
  }

  .liquidacion-employee-block {
    grid-template-columns: 1fr;
  }

  .vacaciones-employee-block,
  .vacaciones-values-block,
  .vacaciones-period-block {
    grid-template-columns: 1fr;
  }

  .liquidacion-tabs .liquidacion-tab {
    font-size: 12px;
    padding-inline: 10px;
  }
}

/* Dos columnas independientes: reparte los graficos altos y elimina huecos verticales. */
.budget-dashboard-grid {
  align-items: start;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.budget-dashboard-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.budget-dashboard-column .budget-dashboard-card {
  width: 100%;
}

@media (max-width: 900px) {
  .budget-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .budget-sector-kpi-card .sector-kpi-row {
    grid-template-columns: minmax(0, 1fr) 55px;
  }

  .budget-sector-kpi-card .sector-kpi-row > span {
    grid-column: 1 / -1;
  }

  .budget-sector-kpi-card .sector-kpi-summary {
    grid-template-columns: 1fr;
  }

  .budget-sector-kpi-card .sector-kpi-summary > div {
    border-bottom: 1px solid #e2e8f0;
    border-right: 0;
  }
}
.supersalud-verifier-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.module-grid.supersalud-execution-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-grid.supersalud-execution-options .institutional-button {
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
}

.supersalud-analysis-dialog {
  max-height: calc(100vh - 32px);
  overflow: auto;
  width: min(1180px, calc(100vw - 32px));
}

.supersalud-analysis-dialog .section-dialog-form {
  max-width: none;
}

.supersalud-analysis-dialog .section-dialog-actions,
.supersalud-ft-dialog .section-dialog-actions {
  gap: 16px;
}

.supersalud-ft-dialog {
  width: min(620px, calc(100vw - 32px));
}

.supersalud-ft-fields {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 220px));
}

.supersalud-ft-fields .section-dialog-field input {
  min-height: 46px;
  width: 100%;
}

.supersalud-data-grid tr.income-overcollection-row td {
  background: #fff2a8 !important;
  color: #172033 !important;
}

.supersalud-data-grid tr.income-overcollection-row:hover td {
  background: #ffe680 !important;
  color: #111827 !important;
}

.button.long-action-button {
  flex: 0 0 260px;
  font-size: 11px;
  min-width: 260px !important;
  padding-inline: 10px !important;
  width: 260px !important;
}

@media (max-width: 520px) {
  .supersalud-ft-fields {
    grid-template-columns: 1fr;
  }

  .button.long-action-button {
    flex-basis: 100%;
    min-width: 0 !important;
    width: 100% !important;
  }
}

@media (max-width: 900px) {
  .supersalud-verifier-split {
    grid-template-columns: 1fr;
  }
}

/* TNS: contraste sobre el fondo oscuro y boton largo sin desbordamiento.
   Se mantiene al final para prevalecer sobre el tamano global de .button. */
.tns-sync-page > h1 {
  color: #f8fbff;
  font-size: 30px;
  line-height: 1.2;
  margin-bottom: 4px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .38);
}

.tns-sync-page > .tns-sync-description {
  color: rgba(238, 245, 255, .92);
  font-size: 15px;
  line-height: 1.5;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .32);
}

.tns-sync-panel .tns-sync-note {
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.tns-sync-panel button.button.tns-sync-button {
  border-radius: 8px !important;
  flex: 0 0 225px !important;
  font-size: 12px !important;
  height: 46px !important;
  line-height: 1.15 !important;
  min-height: 46px !important;
  min-width: 225px !important;
  padding: 0 14px !important;
  white-space: normal !important;
  width: 225px !important;
}

@media (max-width: 620px) {
  .tns-sync-page > h1 {
    font-size: 24px;
  }

  .tns-sync-panel button.button.tns-sync-button {
    flex-basis: auto !important;
    width: 100% !important;
  }
}
