:root {
  --nav: #0b1020;
  --nav2: #111936;
  --gold: #f6b73c;
  --cyan: #28d3ff;
  --bg: #f3f6fb;
  --card: #ffffff;
  --txt: #1d2433;
  --muted: #6b7280;
  --green: #16a34a;
  --orange: #f59e0b;
  --red: #ef4444;
  --blue: #2563eb;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    Inter,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  background: linear-gradient(135deg, #eaf2ff, #f7f9fc);
  color: var(--txt);
}
.page-shell {
  width: 95%;
  max-width: 1760px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.04),
    0 30px 90px rgba(15, 23, 42, 0.14);
}
.preheader {
  background: #050816;
  color: #dbeafe;
  font-size: 12px;
  padding: 7px 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.pre-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pre-nav a,
.pre-nav span {
  color: #e0f2fe;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  transition: 0.2s;
}
.pre-nav a:hover {
  background: var(--gold);
  color: #0f172a;
  transform: translateY(-1px);
}
.topbar {
  background: linear-gradient(90deg, #0b1020, #162147);
  color: white;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #08111f;
}
.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.top-actions button,
.upload-box label,
.btn-primary,
.btn-dark {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn-primary {
  background: var(--gold);
  color: #111827;
}
.btn-dark {
  background: #202a44;
  color: #fff;
}
.btn-primary:hover,
.btn-dark:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.banner {
  min-height: 96px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(14, 165, 233, 0.82)),
    url("../img/banner.svg");
  background-size: cover;
  color: white;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.banner h1 {
  font-size: 24px;
  margin: 0;
}
.banner p {
  margin: 6px 0 0;
  color: #eaf2ff;
}
.badge {
  display: inline-block;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 800;
}
.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 190px);
}
.sidebar {
  background: linear-gradient(180deg, var(--nav), var(--nav2));
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.side-title {
  color: #93c5fd;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 8px 12px 14px;
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #d7def5;
  padding: 12px 14px;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  font-weight: 800;
  margin: 5px 0;
  transition: 0.18s;
}
.nav-btn:hover,
.nav-btn.active {
  background: linear-gradient(90deg, #1d4ed8, #0ea5e9);
  color: white;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.18);
  transform: translateX(2px);
}
.nav-program-toggle .program-chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
}
.nav-program-toggle.expanded .program-chevron {
  transform: rotate(180deg);
}
.program-submenu {
  display: none;
  padding: 2px 5px 8px 28px;
}
.program-submenu.open {
  display: grid;
  gap: 5px;
}
.program-subitem {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
  color: #dbeafe;
  padding: 9px;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}
.program-subitem:not(.program-subitem-all) {
  background: linear-gradient(135deg, rgba(30, 64, 175, .32), rgba(14, 165, 233, .12));
}
.program-code {
  flex: 0 0 43px;
  display: inline-grid;
  place-items: center;
  padding: 4px 5px;
  border-radius: 8px;
  background: #fbbf24;
  color: #172554;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .03em;
}
.program-subitem span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.program-subitem:hover,
.program-subitem.active {
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.85), rgba(14, 165, 233, 0.85));
  color: #fff;
}
.program-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 9px #38bdf8;
  flex: 0 0 auto;
}
.program-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(120deg, #0f172a, #1e40af);
  color: #fff;
  box-shadow: var(--shadow);
}
.program-kicker {
  display: block;
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.program-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(18px, 2vw, 28px);
}
.filter-traffic {
  display: none;
}
body.program-mode .program-filter-card > label,
body.program-mode .program-filter-card > select {
  display: none;
}
body.program-mode .program-filter-card {
  padding: 7px 9px;
  background: linear-gradient(145deg, #0f172a, #1e3a8a);
  position: relative;
  overflow: visible;
  transition: background .25s ease, box-shadow .25s ease;
}
body.program-mode .program-filter-card.signal-green { background: linear-gradient(145deg, #065f46, #16a34a); box-shadow: 0 10px 24px rgba(22,163,74,.34); }
body.program-mode .program-filter-card.signal-amber { background: linear-gradient(145deg, #92400e, #f59e0b); box-shadow: 0 10px 24px rgba(245,158,11,.36); }
body.program-mode .program-filter-card.signal-red { background: linear-gradient(145deg, #7f1d1d, #dc2626); box-shadow: 0 10px 26px rgba(220,38,38,.42); animation: budgetCardAlert 1.35s ease-in-out infinite; }
body.program-mode .filter-traffic {
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-areas: "lights value" "lights caption" "actual actual";
  align-items: center;
  column-gap: 8px;
  color: #fff;
}
.filter-traffic-lights {
  grid-area: lights;
  display: grid;
  justify-content: center;
  gap: 3px;
  width: 36px;
  padding: 5px;
  border-radius: 10px;
  background: linear-gradient(145deg, #fff1a8, #f59e0b);
  border: 1px solid #fde68a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 4px 12px rgba(120,53,15,.28);
}
.filter-traffic-lights i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.72); border: 1px solid rgba(120,53,15,.28); }
.filter-traffic-value { grid-area: value; align-self: end; font-size: 22px; line-height: 1; font-weight: 950; }
.filter-traffic-caption { grid-area: caption; align-self: start; color: #fff; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.filter-traffic small { grid-area: actual; margin-top: 4px; color: #e0f2fe; font-size: 10px; white-space: nowrap; }
.filter-traffic.is-red .filter-traffic-lights i:nth-child(1) { background: #ef4444; box-shadow: 0 0 10px #ef4444; }
.filter-traffic.is-amber .filter-traffic-lights i:nth-child(2) { background: #f59e0b; box-shadow: 0 0 10px #f59e0b; }
.filter-traffic.is-green .filter-traffic-lights i:nth-child(3) { background: #22c55e; box-shadow: 0 0 10px #22c55e; }
.budget-warning {
  display: none;
  position: absolute;
  z-index: 12;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 250px;
  padding: 8px 11px;
  border-radius: 12px;
  background: #fff1f2;
  border: 2px solid #ef4444;
  color: #991b1b;
  font-size: 10px;
  box-shadow: 0 12px 25px rgba(127,29,29,.32);
}
.budget-warning i { margin-right: 5px; color: #dc2626; }
.filter-traffic.is-red .budget-warning { display: block; animation: budgetWarningFloat 1.25s ease-in-out infinite; }
@keyframes budgetCardAlert { 50% { box-shadow: 0 12px 34px rgba(220,38,38,.68); } }
@keyframes budgetWarningFloat { 50% { transform: translate(-50%, 4px); } }
.traffic-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 310px;
  padding: 11px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
}
.traffic-alert small { display: block; margin-top: 3px; color: #dbeafe; }
.traffic-light {
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: #020617;
}
.traffic-light i { width: 13px; height: 13px; border-radius: 50%; background: #334155; }
.traffic-alert.is-red .traffic-light i:nth-child(1) { background: #ef4444; box-shadow: 0 0 12px #ef4444; }
.traffic-alert.is-amber .traffic-light i:nth-child(2) { background: #f59e0b; box-shadow: 0 0 12px #f59e0b; }
.traffic-alert.is-green .traffic-light i:nth-child(3) { background: #22c55e; box-shadow: 0 0 12px #22c55e; }
main {
  padding: 22px;
  min-width: 0;
}
.filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.filter-card {
  background: var(--card);
  padding: 12px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.filter-card label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 6px;
}
.filter-card select {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  padding: 10px;
  background: white;
  color: #111827;
}
.section {
  display: none;
}
.section.active {
  display: block;
}
@media (max-width: 900px) {
  .program-heading { align-items: stretch; flex-direction: column; }
  .traffic-alert { min-width: 0; }
}
.kpis {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.kpi {
  background: linear-gradient(180deg, #fff, #f8fbff);
  border-left: 5px solid var(--blue);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.kpi small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}
.kpi strong {
  font-size: 18px;
  display: block;
  margin-top: 6px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.card {
  background: var(--card);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.card h3 {
  margin: 0 0 12px;
  font-size: 17px;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-small {
  height: 250px;
}
.table-wrap {
  overflow: auto;
  max-height: 70vh;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: white;
  table-layout: fixed;
}
.data-table th {
  background: linear-gradient(90deg, #0f172a, #1e3a8a);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  font-size: 11px;
}
.data-table th,
.data-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.data-table td {
  color: #273449;
}
.data-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.data-table .col-cod {
  width: 82px;
}
.data-table .col-meta {
  width: 70px;
}
.data-table .col-fuente {
  width: 90px;
}
.data-table .col-generica {
  width: 92px;
}
.data-table .col-programa,
.data-table .col-nombre,
.data-table .col-detalle {
  width: 210px;
  max-width: 210px;
}
.data-table .col-largo {
  width: 260px;
  max-width: 260px;
}
#tblProgramaFinalidad,
#tblFuenteClasificador {
  table-layout: auto;
}
#tblProgramaFinalidad th:nth-child(4),
#tblProgramaFinalidad .report-description {
  width: 360px;
  min-width: 360px;
  max-width: 360px;
  white-space: normal;
}
#tblFuenteClasificador th:nth-child(4),
#tblFuenteClasificador .report-description {
  width: 340px;
  min-width: 340px;
  max-width: 340px;
  white-space: normal;
}
.data-table .col-monto {
  width: 118px;
}
.data-table .col-pct {
  width: 78px;
}
.compact-table .col-detalle {
  width: 160px;
  max-width: 160px;
}
.compact-table .col-monto {
  width: 110px;
}
.compact-table .col-pct {
  width: 62px;
}
.data-table tbody tr:nth-child(even) {
  background: #f8fafc;
}
.data-table tbody tr:nth-child(odd) {
  background: #ffffff;
}
.data-table tbody tr:hover {
  background: #eff6ff;
}
.note {
  font-size: 13px;
  color: #64748b;
  background: #f8fafc;
  border-left: 4px solid #38bdf8;
  border-radius: 12px;
  padding: 10px;
}
.gauge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gauge-card {
  text-align: center;
  background: #f8fafc;
  border-radius: 20px;
  padding: 16px;
}
.gauge-value {
  font-size: 28px;
  font-weight: 900;
  color: #0f172a;
  margin-top: -18px;
}
.report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.report-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-print-report {
  box-shadow: 0 12px 24px rgba(246, 183, 60, 0.22);
}
.report-tab {
  border: 0;
  border-radius: 999px;
  padding: 11px 14px;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 900;
  cursor: pointer;
}
.report-tab.active,
.report-tab:hover {
  background: linear-gradient(90deg, #2563eb, #0ea5e9);
  color: white;
}
.report-panel {
  display: none;
}
.report-panel.active {
  display: block;
}
.prefooter {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 18px;
  background: #0b1020;
  color: #dbeafe;
  padding: 26px 28px;
}
.prefooter h4 {
  color: white;
  margin: 0 0 10px;
}
.prefooter p {
  font-size: 13px;
  line-height: 1.45;
}
.socials {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.socials a {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: #172554;
  color: white;
  display: grid;
  place-items: center;
  text-decoration: none;
  font-size: 20px;
}
.socials a:hover {
  background: var(--gold);
  color: #0f172a;
}
.map {
  width: 100%;
  height: 210px;
  border: 0;
  border-radius: 16px;
}
.news {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  margin: 10px 0;
}
.footer {
  text-align: center;
  background: #050816;
  color: #cbd5e1;
  padding: 14px;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.modal-overlay.visible {
  display: flex;
}
.modal-card {
  width: min(720px, 95vw);
  background: white;
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.35);
  position: relative;
}
.modal-close {
  position: absolute;
  right: 16px;
  top: 16px;
  border: 0;
  background: #e2e8f0;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  cursor: pointer;
}
.admin-login,
.admin-panel {
  background: #f8fafc;
  border-radius: 18px;
  padding: 16px;
  margin-top: 14px;
  border: 1px solid #e2e8f0;
}
.admin-panel {
  display: none;
  background: #0f172a;
  color: white;
}
.admin-panel.visible {
  display: block;
}
.login-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.login-row input {
  flex: 1;
  min-width: 220px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 11px;
}
.upload-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.upload-box input {
  display: none;
}
@media (max-width: 1250px) {
  .page-shell {
    width: 97%;
  }
  .kpis {
    grid-template-columns: repeat(4, 1fr);
  }
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .filters {
    grid-template-columns: repeat(3, 1fr);
  }
  .prefooter {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 850px) {
  .page-shell {
    width: 100%;
  }
  .preheader,
  .topbar,
  .banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    height: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .side-title {
    grid-column: 1/-1;
  }
  .nav-btn {
    margin: 0;
  }
  .filters {
    grid-template-columns: 1fr;
  }
  .kpis {
    grid-template-columns: 1fr 1fr;
  }
  .grid-3,
  .gauge-grid,
  .prefooter {
    grid-template-columns: 1fr;
  }
  .chart-small {
    height: 220px;
  }
}
@media (max-width: 520px) {
  .sidebar {
    grid-template-columns: 1fr;
  }
  .kpis {
    grid-template-columns: 1fr;
  }
  .banner h1 {
    font-size: 20px;
  }
  .top-actions {
    width: 100%;
  }
  .top-actions button {
    width: 100%;
    justify-content: center;
  }
}
@media print {
  body {
    background: white;
  }
  .preheader,
  .topbar,
  .sidebar,
  .filters,
  .prefooter,
  .footer,
  .modal-overlay,
  .banner,
  .report-toolbar {
    display: none !important;
  }
  .page-shell {
    width: 100%;
    box-shadow: none;
    background: white;
  }
  .layout {
    display: block;
  }
  main {
    padding: 0;
  }
  .section {
    display: none !important;
  }
  .section.active {
    display: block !important;
  }
  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
    border-radius: 8px;
  }
  .table-wrap {
    max-height: none;
    overflow: visible;
    border: 0;
  }
  .data-table {
    font-size: 9px;
    table-layout: auto;
  }
  .data-table th,
  .data-table td {
    padding: 5px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .data-table .col-programa,
  .data-table .col-nombre,
  .data-table .col-detalle,
  .data-table .col-largo {
    width: auto;
    max-width: none;
  }
  body.print-report .section {
    display: none !important;
  }
  body.print-report #reportes {
    display: block !important;
  }
  body.print-report .report-panel {
    display: none !important;
  }
  body.print-report .report-panel.active {
    display: block !important;
  }
}

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

@media print {
  @page {
    size: A4 landscape;
    margin: 8mm;
  }
  body.print-report .page-shell > :not(.print-report-document) {
    display: none !important;
  }
  body.print-report .print-report-document {
    display: block !important;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
  }
  .print-report-page {
    min-height: 190mm;
    break-after: page;
    page-break-after: always;
    display: flex;
    flex-direction: column;
  }
  .print-report-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }
  .print-report-header {
    display: grid;
    grid-template-columns: 1fr 170px;
    align-items: start;
    border-bottom: 2px solid #0d3477;
    padding-bottom: 7px;
    margin-bottom: 8px;
  }
  .print-report-institution {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-left: 170px;
  }
  .print-report-institution strong {
    font-size: 15px;
  }
  .print-report-institution span {
    font-size: 12px;
    font-weight: 700;
  }
  .print-report-institution b {
    font-size: 11px;
  }
  .print-report-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 10px;
    text-align: right;
  }
  .print-report-page > h2 {
    margin: 2px 0 8px;
    font-size: 13px;
  }
  .print-program-title {
    margin: -3px 0 8px;
    font-size: 11px;
    line-height: 1.25;
  }
  .print-funding-group {
    margin: 0 0 9px;
    break-inside: auto;
    page-break-inside: auto;
  }
  .print-funding-group h3 {
    margin: 2px 0 5px;
    padding: 4px 7px;
    border-left: 4px solid #0d3477;
    background: #edf3fb !important;
    color: #0d3477;
    font-size: 11px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .print-budget-table,
  .print-consolidated table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 11px;
  }
  .print-budget-table th,
  .print-budget-table td,
  .print-consolidated th,
  .print-consolidated td {
    border: 1px solid #7b8491;
    padding: 3px 2px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .print-budget-table th,
  .print-consolidated th {
    background: #0d3477 !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    text-align: center;
  }
  .print-budget-table td.num,
  .print-consolidated td {
    text-align: right;
  }
  .print-report-rep2 .print-budget-table .report-description {
    width: 24%;
  }
  .print-report-rep3 .print-budget-table .report-description {
    width: 22%;
  }
  .print-consolidated {
    margin-top: 8px;
    padding-top: 0;
    break-inside: avoid;
  }
  .print-consolidated h3 {
    font-size: 11px;
    margin: 0 0 5px;
  }
  .print-progress-warning {
    border: 1px solid #b45309;
    border-left: 5px solid #b45309;
    background: #fff7ed !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    margin-top: 8px;
    padding: 7px 9px;
    font-size: 9px;
    line-height: 1.35;
  }
}

/* ===== Producción V6: actualización, menú externo y gauges animados ===== */
.banner-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.update-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(8, 8, 8, 0.28);
  color: #121111;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 25px rgba(2, 6, 23, 0.18);
}
.update-badge strong {
  color: #f50707;
}
.update-badge small {
  opacity: 0.9;
  border-left: 1px solid rgba(3, 3, 3, 0.35);
  padding-left: 8px;
}
.external-link {
  text-decoration: none;
}
.external-link .ms-auto {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.85;
}
.nav-btn.external-link {
  border: 1px solid rgba(40, 211, 255, 0.18);
  background: rgba(40, 211, 255, 0.06);
}
.nav-btn.external-link:hover {
  background: linear-gradient(90deg, #059669, #0ea5e9);
  color: #fff;
}
.gauge-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.08);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}
.gauge-card::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: radial-gradient(
    circle,
    rgba(40, 211, 255, 0.13),
    transparent 42%
  );
  animation: gaugeAura 4.5s ease-in-out infinite;
  pointer-events: none;
}
.gauge-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
  border-color: rgba(14, 165, 233, 0.35);
}
.gauge-card canvas {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 10px 12px rgba(15, 23, 42, 0.12));
  animation: gaugeFloat 2.8s ease-in-out infinite;
}
.gauge-value {
  position: relative;
  z-index: 2;
  animation: gaugeGlow 2.2s ease-in-out infinite;
}
.gauge-card.gauge-red .gauge-value {
  color: #dc2626;
}
.gauge-card.gauge-orange .gauge-value {
  color: #d97706;
}
.gauge-card.gauge-green .gauge-value {
  color: #16a34a;
}
.gauge-card.gauge-red {
  animation: dangerPulse 1.05s ease-in-out infinite;
}
.gauge-card.gauge-orange {
  animation: warnPulse 1.7s ease-in-out infinite;
}
.gauge-card.gauge-green {
  animation: okPulse 2.6s ease-in-out infinite;
}
@keyframes gaugeAura {
  0%,
  100% {
    transform: translate(-5%, -5%) scale(1);
    opacity: 0.55;
  }
  50% {
    transform: translate(5%, 5%) scale(1.08);
    opacity: 0.9;
  }
}
@keyframes gaugeFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-0.35deg);
  }
  50% {
    transform: translateY(-2px) rotate(0.35deg);
  }
}
@keyframes gaugeGlow {
  0%,
  100% {
    text-shadow: 0 0 6px rgba(14, 165, 233, 0.25);
  }
  50% {
    text-shadow: 0 0 18px rgba(14, 165, 233, 0.55);
  }
}
@keyframes dangerPulse {
  0%,
  100% {
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.12);
  }
  50% {
    box-shadow: 0 18px 44px rgba(239, 68, 68, 0.3);
  }
}
@keyframes warnPulse {
  0%,
  100% {
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.12);
  }
  50% {
    box-shadow: 0 18px 44px rgba(245, 158, 11, 0.25);
  }
}
@keyframes okPulse {
  0%,
  100% {
    box-shadow: 0 12px 28px rgba(22, 163, 74, 0.1);
  }
  50% {
    box-shadow: 0 18px 44px rgba(22, 163, 74, 0.2);
  }
}
@media (max-width: 850px) {
  .banner-status {
    align-items: flex-start;
  }
  .update-badge {
    border-radius: 16px;
    flex-wrap: wrap;
  }
  .update-badge small {
    border-left: 0;
    padding-left: 0;
    width: 100%;
  }
}
@media print {
  .update-badge {
    color: #111 !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
  }
  .banner-status {
    align-items: flex-start;
  }
}
/* lineas verticales */
.border-right-custom {
  position: relative;
  padding-left: 25px;
  padding-right: 25px;
}

.border-right-custom::after {
  content: "";
  position: absolute;
  top: 10%;
  right: 0;
  width: 2px;
  height: 80%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.65),
    transparent
  );
  animation: lineaPrefooter 2.5s ease-in-out infinite;
}

@keyframes lineaPrefooter {
  0% {
    opacity: 0.25;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 14px rgba(0, 212, 255, 0.85);
  }
  100% {
    opacity: 0.25;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
  }
}

@media (max-width: 768px) {
  .border-right-custom::after {
    display: none;
  }
}

/* enlace de la web */
.web-risascope {
  color: #fff;
  padding: 8px 15px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-decoration: none;
  transition: all 0.4s ease;
}

.web-risascope:hover {
  background: #d3e5a2;
  color: #0d0d0d;
  font-weight: 900;
  font-size: 17px;
  box-shadow: 0 0 10px rgb(254, 253, 253);
  transform: scale(1.08);
}
.border-right-custom {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}
.border-right-custom {
  position: relative;
  padding-left: 20px;
  padding-right: 20px;
}
