@@import url(https://fonts.googleapis.com/css?family=Roboto:400,500,300,700);

* {
	font-family: Roboto;
}

a {
	text-decoration: none;
}

/* Layout configuration */
html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}
/* Container system: max-width + responsive gutters */
:root {
    --container-max: 100%;
    --container-gutter: clamp(16px, 4vw, 32px); /* Coherent responsive side padding */
    --container-radius: 16px;
    --container-shadow: 0 6px 18px rgba(0, 0, 0, 0.08),
                        0 2px 6px rgba(0, 0, 0, 0.06);

    /* Brand + UI tokens */
    --brand-primary: #33BEFF;
    --brand-primary-dark: #1AA9E5; /* for borders/hover */
    --toggle-track-off: #d1d5db;   /* gray-300 */
    --toggle-knob-off: #E6F7FF;    /* subtle brand tint */
    --toggle-focus-ring: rgba(51, 190, 255, 0.35);
}

@media (min-width: 1280px) {
    :root {
        --container-max: 95vw; /* Wider layout on large screens */
    }
}

/* Generic container utility (optional) */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-gutter);
}

/* Vertical rhythm for stacked sections (prevents margin stacking) */
.stack > * + * {
    margin-top: clamp(12px, 2.5vw, 28px);
}

/* Neutral semantic helper for panels using stack spacing */
.section-block {
    /* No reset for vertical margins to allow utilities like my-2 */
    margin-left: 0;
    margin-right: 0;
}

/* Utility layout helpers (Tailwind-inspired) */
.grid {
    display: grid;
}

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

.gap-4 {
    gap: 1rem;
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:items-start {
        align-items: flex-start;
    }

    .md\:gap-6 {
        gap: 1.5rem;
    }
}

/* Brand-styled range slider (e.g., Records slider) */
#tpPagination {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}
#tpPagination:focus { outline: none; }
#tpPagination::-webkit-slider-runnable-track {
  height: 6px;
  background: var(--brand-primary);
  border-radius: 9999px;
}
#tpPagination::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  margin-top: -6px; /* centers thumb */
  background: #fff;
  border: 2px solid var(--brand-primary-dark);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
#tpPagination::-moz-range-track {
  height: 6px;
  background: var(--brand-primary);
  border-radius: 9999px;
}
#tpPagination::-moz-range-thumb {
  width: 18px; height: 18px;
  background: #fff;
  border: 2px solid var(--brand-primary-dark);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* Primary content container depth and gutters */
#main {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-gutter);
    padding-block: clamp(12px, 3vw, 24px);
    background: #ffffff;
    border-radius: var(--container-radius);
    box-shadow: var(--container-shadow);
}

/* Responsive auto-fit grid for KPI cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem; /* Matches gap-6 spacing for consistency */
}

/* Prevent KPI numbers from wrapping onto multiple lines */
.kpi-value {
    white-space: nowrap;
}

.kpi-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  position: relative;
}
.kpi-info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 9999px;
  border: 1px solid #cbd5e1; /* gray-300 */
  background: #ffffff;
  color: #2563eb; /* blue-600 */
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.kpi-info-button:hover,
.kpi-info-button:focus-visible {
  background: #eff6ff; /* blue-50 */
  border-color: #93c5fd; /* blue-300 */
  color: #1d4ed8; /* blue-700 */
  outline: none;
}
.kpi-info-button[aria-expanded="true"] {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.manual-info-button {
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.75rem;
}

.manual-amount-field {
  position: relative;
  display: inline-flex;
  width: 100%;
  min-width: calc(6ch + 3.1rem);
  max-width: 100%;
  flex: 1 1 auto;
}

.manual-amount-input {
  padding-right: 2.1rem;
  border: 1px solid var(--brand-primary);
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.manual-amount-input:focus {
  border-color: var(--brand-primary-dark);
  box-shadow: 0 0 0 3px var(--toggle-focus-ring);
}

.manual-amount-field__suffix {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-54%);
  font-weight: 600;
  color: #4c4f52;
  pointer-events: none;
}

.manual-amount-input::-webkit-outer-spin-button,
.manual-amount-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.manual-amount-input {
  -moz-appearance: textfield;
}

.box2 select.preset-amount-select,
.preset-amount-select {
  display: block;
  width: 100%;
  min-width: calc(6ch + 1.75rem);
  max-width: 100%;
  padding-left: 0.5rem;
  padding-right: 1.25rem;
  font-size: 1.125rem;
  text-align: center;
}
.kpi-tooltip-content {
  margin-top: 0.75rem;
  padding: 0.75rem 0.875rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb; /* gray-200 */
  background: #f9fafb; /* gray-50 */
  color: #374151; /* gray-700 */
  font-size: 0.875rem;
  line-height: 1.45;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}
.kpi-tooltip-content[hidden] {
  display: none;
}
.kpi-tooltip-content a {
  color: #2563eb;
  text-decoration: underline;
}

/* Reusable badge for KPI icons with pastel backgrounds */
.kpi-icon-badge {
  --kpi-accent-bg: #dbeafe; /* default blue-100 */
  /* Icon ink filter defaults (tuned for white-line PNGs) */
  --icon-invert: 1;        /* invert white to dark */
  --icon-brightness: .28;  /* darkness of the ink */
  --icon-contrast: 1.2;    /* pop on pastel */
  background: var(--kpi-accent-bg);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.kpi-icon-badge--blue { --kpi-accent-bg: #dbeafe; }   /* blue-100 */
.kpi-icon-badge--green { --kpi-accent-bg: #dcfce7; }  /* green-100 */
.kpi-icon-badge--yellow { --kpi-accent-bg: #fef9c3; --icon-brightness: .24; } /* yellow-100 */
.kpi-icon-badge--purple { --kpi-accent-bg: #ede9fe; } /* purple-100 */
.kpi-icon-badge--red { --kpi-accent-bg: #fee2e2; --icon-brightness: .26; }    /* red-100 */
.kpi-icon-badge--indigo { --kpi-accent-bg: #e0e7ff; } /* indigo-100 */
.kpi-icon-badge--teal { --kpi-accent-bg: #ccfbf1; }   /* teal-100 */
.kpi-icon-badge--orange { --kpi-accent-bg: #ffedd5; --icon-brightness: .26; } /* orange-100 */

.kpi-icon {
  width: 24px; height: 24px;
  /* Make white-line icons stand out over pastel badges */
  filter: invert(var(--icon-invert)) brightness(var(--icon-brightness)) contrast(var(--icon-contrast));
  mix-blend-mode: multiply; /* subtle tint with background */
}

/* Wrapper for page content to ensure full height */
.content-wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* Cards border */

.border-shadow {
	/* border: 1px solid #33BEFF; */
	box-shadow: rgba(19, 128, 245, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
}

/* Añadido: Custom shadow-lg */
.shadow-lg {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Añadido: Custom border-blue-500 */
.border-blue-500 {
    border-color: #33BEFF;
}

/* Header Button */

.imgButton {
	width: 25px;
	float: left;
}

.right {
	float: right;
}

.blueButton {
	float: right;
	border: none;
	color: white;
	padding: 6px 14px;
	text-align: center;
	text-decoration: none;
	font-size: 16px;
	cursor: pointer;
	border-radius: 4px;
	outline: none;
	/* margin-top: 3%;
	margin-right: 3%; */
}

Button:focus {
	box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.5);
	outline: none;
}

.inverted-color {
  filter: brightness(0) saturate(100%) invert(64%) sepia(83%) saturate(5591%) hue-rotate(169deg) brightness(105%) contrast(102%);
  -webkit-filter: brightness(0) saturate(100%) invert(64%) sepia(83%) saturate(5591%) hue-rotate(169deg) brightness(105%) contrast(102%);
}

.blueButton .inverted-color {
  filter: invert(100%) !important;
  -webkit-filter: invert(100%) !important;
}

/* Layout for action controls */
.header-actions {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start; /* asegura alineación a la izquierda */
}

/* Secondary button (neutral) */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #374151; /* gray-700 */
  background: #ffffff;
  border: 1px solid #d1d5db; /* gray-300 */
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn-secondary:hover {
  background: #f9fafb; /* gray-50 */
  border-color: #cbd5e1; /* gray-300/400 */
}
.btn-secondary:focus {
  outline: 2px solid #93c5fd; /* blue-300 focus ring */
  outline-offset: 2px;
}

/* Page title subtle counter and indentation */
.page-title {
  margin-left: 0.25rem;
}
.page-title .results-count {
  margin-left: 0.25rem;
  color: #6b7280; /* gray-500 */
  font-weight: 500;
}

/* Data table refinements */
.data-table {
  border-collapse: separate;
  border-spacing: 0;
}
.data-table thead tr.header-row th {
  vertical-align: bottom;
  font-weight: 600;
  color: #111827; /* gray-900 */
  border-bottom: 1px solid #e5e7eb; /* subtle bottom rule */
}
.data-table thead tr.filter-row th {
  padding-top: 6px;
  padding-bottom: 8px;
}
.data-table th,
.data-table td {
  border-left: none !important;
  border-right: none !important;
}
.data-table tbody tr:nth-child(even) {
  background-color: #f9fafb; /* zebra */
}
.data-table tbody tr:hover {
  background-color: #eef2ff; /* hover */
}
.actions-col {
  text-align: center;
  white-space: nowrap;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.table-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 2.5rem;
  min-height: 2.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.table-action-button:hover,
.table-action-button:focus-visible {
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.16);
  outline: none;
}

.table-action-button .imgButton {
  float: none;
  width: 1.25rem;
  height: 1.25rem;
}

.table-action-button--outlined {
  background-color: #ffffff;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.table-action-button--outlined:hover,
.table-action-button--outlined:focus-visible {
  background-color: rgba(51, 190, 255, 0.12);
  border-color: var(--brand-primary-dark);
  color: var(--brand-primary);
}

.table-action-button--outlined .imgButton {
  filter: brightness(0) saturate(100%) invert(64%) sepia(83%) saturate(5591%) hue-rotate(169deg) brightness(105%) contrast(102%);
  -webkit-filter: brightness(0) saturate(100%) invert(64%) sepia(83%) saturate(5591%) hue-rotate(169deg) brightness(105%) contrast(102%);
}

/* Table footer compact style */
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-block: 6px;
  font-size: 0.875rem;
}
.table-footer .footer-left a {
  margin-right: 6px;
}
.table-footer .page-indicator {
  color: #4b5563; /* gray-600 */
  margin-inline: 8px;
}

/* === Toggle (Tailwind-like) helpers ===
   Fallback styles so the peer-based toggles render consistently
   with or without Tailwind runtime. These rely on the markup pattern:
   <label class="inline-flex ...">
     <input type="checkbox" class="sr-only peer"> <div></div>
   </label>
*/
/* Hide sr-only elements accessibly if Tailwind is not present */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

label.inline-flex > input.sr-only.peer + div {
  position: relative;
  width: 2.25rem;   /* w-9 */
  height: 1.25rem;  /* h-5 */
  background: var(--toggle-track-off); /* más contraste */
  border-radius: 9999px;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}
label.inline-flex > input.sr-only.peer + div::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;  /* h-4 */
  height: 1rem; /* w-4 */
  /* Más diferencia y recorte profesional */
  background: var(--toggle-knob-off);
  border: 1px solid #b3e4ff; /* borde acorde al tinte */
  box-shadow: 0 1px 2px rgba(0,0,0,0.10), 0 0 0 1px rgba(0,0,0,0.06);
  border-radius: 9999px;
  transition: transform 160ms ease, border-color 160ms ease;
}
label.inline-flex > input.sr-only.peer:focus + div {
  outline: none;
  box-shadow: 0 0 0 4px var(--toggle-focus-ring); /* brand focus ring */
}
label.inline-flex > input.sr-only.peer:checked + div {
  background: var(--brand-primary); /* Zelebrix primary */
}
label.inline-flex > input.sr-only.peer:checked + div::after {
  transform: translateX(1.25rem); /* ~20px */
  /* En activo, bolita con borde/sombra para separarse del track */
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12); /* slate-900/12 */
  box-shadow: 0 1px 2px rgba(0,0,0,0.14), 0 0 0 1px rgba(0,0,0,0.08);
}

/* Fallback margin-left for ms-3 if Tailwind is not available */
.ms-3 { margin-left: 0.75rem; }
.me-3 { margin-right: 0.75rem; }

.header-actions .actions {
        margin-left: 0; /* evita empujar el botón primario a la derecha */
}

/* En el área de filtros/acciones de tabla, los botones no flotan a la derecha */
.header-actions .blueButton {
        float: none;
}

/* Hacer que el bloque de filtros ocupe el espacio restante y permita empujar toggles */
.header-actions .filters {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        flex: 1 1 auto; /* ocupa el ancho disponible */
}

/* Fallbacks para utilidades de Tailwind que no están generadas */
.ml-auto { margin-left: auto !important; }
.mr-1 { margin-right: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.gap-2 { gap: 0.5rem; }

@media (max-width: 640px) {
        .blueButton {
                margin: 1%;
        }
        .buttonText {
                display: none;
        }

        .right {
                float: none;
                display: flex;
                flex-direction: column;
                align-items: stretch;
                width: 100%;
        }

        .right label {
                margin-top: 0.5rem;
        }

        .right .blueButton {
                margin-left: 0;
                margin-top: 0.5rem;
                width: 100%;
                justify-content: center;
        }

        .header-actions .filters,
        .header-actions .actions {
                width: 100%;
                margin-left: 0;
                margin-top: 0.5rem;
        }
}

@media (min-width: 480px) and (max-width: 640px) {
        .blueButton .buttonText {
                display: inline;
        }
}

/* Footer estilos */

.footer-distributed {
        background-color: #292c2f;
        box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.12);
        box-sizing: border-box;
        width: 100%;
        text-align: left;
        padding: 22px 32px;
        margin-top: auto;
        /* position: fixed; */
}

/* === Sidebar (XSOAR-like) responsive layout ===
   - Desktop: persistent narrow sidebar with icons; labels on hover
   - Mobile: hidden by default, toggled via button; full-width clean panel with inline labels
*/

/* Base: keep content fluid unless overridden by breakpoints */
#lateralMenu { will-change: transform; }
/* Remove container chrome to keep only icon bubbles */
#lateralMenu {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Lock background scroll when mobile menu is open */
html.menu-open, body.menu-open {
  overflow: hidden !important;
  height: 100vh; /* prevent overscroll bounce */
}

/* Mobile <= 1023px: full-screen drawer navigation */
@media (max-width: 1023px) {
  #lateralMenu {
    width: 100vw !important;
    border-top-right-radius: 0.75rem;
    left: 0 !important;
    background: #f5f7fb !important;
    overflow-y: auto !important;
  }
  #lateralMenu nav ul li a {
    display: grid !important;
    grid-template-columns: 2rem 1fr;
    align-items: center;
    justify-content: start;
    height: 3rem;
    width: 100% !important;
    padding: 0 1rem;
  }
  #lateralMenu nav ul li a img {
    width: 1.5rem !important;
    height: 1.5rem !important;
    justify-self: center;
  }
  #lateralMenu nav ul li a span {
    position: static !important;
    opacity: 1 !important;
    transform: none !important;
    background: transparent !important;
    color: #111827 !important;
    box-shadow: none !important;
    margin-left: 0.75rem;
    white-space: nowrap;
  }
}

/* Desktop layout >= 1024px: bubble rail navigation */
@media (min-width: 1024px) {
  :root {
    --sb-size: clamp(34px, 2.7vw, 42px);
    --sb-gap: clamp(10px, 1.4vh, 18px);
    --sb-column: calc(var(--sb-size) * 2);
    --sb-label-offset: clamp(6px, 0.9vw, 12px);
    --sb-slot-gap: calc((var(--sb-column) - var(--sb-size)) / 2);
    --sb-bg-hover: var(--brand-primary);
    --sb-label-ink: #ffffff;
  }

  .app-shell {
    display: grid;
    grid-template-columns: var(--sb-column) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "header header"
      "nav main";
    min-height: 100vh;
  }

  header {
    grid-area: header;
    position: sticky;
    top: 0;
    z-index: 50;
  }

  #menuOverlay {
    display: none !important;
  }

  #toggleMenuButton {
    display: none !important;
  }

  #lateralMenu {
    grid-area: nav;
    width: var(--sb-column) !important;
    margin: 0 auto;
    padding: 0;
    display: flex !important;
    justify-content: center;
    background: transparent !important;
    overflow: visible !important;
  }

  #lateralMenu.hidden {
    display: flex !important;
  }

  #lateralMenu nav {
    width: var(--sb-size);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sb-gap);
  }

  #lateralMenu nav ul {
    display: flex;
    flex-direction: column;
    gap: var(--sb-gap);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  #lateralMenu nav li {
    display: flex;
    justify-content: center;
  }

  #lateralMenu nav a {
    position: relative;
    width: var(--sb-size);
    height: var(--sb-size);
    border-radius: 9999px;
    display: grid;
    place-items: center;
    background: transparent;
    box-shadow: none;
    transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
    outline: none;
    z-index: 0;
  }

  #lateralMenu nav a[aria-current="page"],
  #lateralMenu nav a:hover,
  #lateralMenu nav a:focus-visible {
    background: var(--sb-bg-hover);
    box-shadow: 0 12px 24px -12px rgba(51, 190, 255, 0.7);
    transform: translateX(0);
    z-index: 120;
  }

  #lateralMenu nav a img {
    width: calc(var(--sb-size) * 0.52) !important;
    height: calc(var(--sb-size) * 0.52) !important;
    transition: transform 160ms ease, filter 160ms ease;
  }

  #lateralMenu nav a[aria-current="page"] img,
  #lateralMenu nav a:hover img,
  #lateralMenu nav a:focus-visible img {
    transform: scale(1.06);
    filter: invert(1) brightness(1.05) contrast(1.05);
  }

  #lateralMenu nav a > span {
    position: absolute;
    top: 50%;
    left: 100%;
    margin-top: 0;
    margin-left: var(--sb-label-offset);
    transform: translate(8px, -50%);
    background: var(--sb-bg-hover);
    color: var(--sb-label-ink);
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.35rem 0.6rem;
    border-radius: 0.6rem;
    box-shadow: 0 16px 30px -12px rgba(24, 93, 120, 0.35);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    min-width: calc(var(--sb-size) + 12px);
    text-align: center;
    transition: opacity 160ms ease, transform 160ms ease;
    z-index: 140;
  }

  #lateralMenu nav a:hover > span,
  #lateralMenu nav a:focus-visible > span {
    opacity: 1;
    transform: translate(0, -50%);
  }

  .content-wrapper {
    grid-area: main;
    margin: 0;
  }

  #main {
    justify-self: stretch;
    margin: 0;
    max-width: min(var(--container-max), 100%);
    padding-right: var(--container-gutter);
    padding-left: max(12px, calc(var(--container-gutter) - var(--sb-slot-gap)));
    overflow: visible !important;
    height: auto;
  }

  footer.footer-distributed {
    grid-column: 1 / span 2;
    margin: 0;
    padding-inline: clamp(28px, 4vw, 52px);
  }
}

.footer-distributed .footer-left p {
	color: #8f9296;
	font-size: 14px;
	margin: 0;
}

/* Footer links */

.footer-distributed p.footer-links {
	font-size: 18px;
	font-weight: bold;
	color: #ffffff;
	margin: 0 0 10px;
	padding: 0;
	transition: ease .25s;
}

/* Chart legend table styling */
.chart-legend-table-wrapper {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  width: max-content;
  min-width: 100%;
  justify-content: center;
}

.chart-legend-table {
  width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb; /* gray-200 */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  min-width: 0;
  max-width: 100%;
  margin-inline: auto;
  --legend-row-height: 32px;
}

@supports not (width: max-content) {
  .chart-legend-table {
    width: auto;
  }
}

.chart-legend-table-wrapper .chart-legend-table--with-label {
  flex: 0 0 auto;
}

.chart-legend-table thead th {
  font-weight: 600;
  color: #111827; /* gray-900 */
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb; /* gray-50 */
  vertical-align: middle;
  position: sticky;
  top: 0;
  z-index: 2;
  line-height: 1.35;
  white-space: normal;
  text-wrap: balance;
  overflow-wrap: break-word;
  word-break: keep-all;
  hyphens: manual;
}
.chart-legend-table thead th { text-align: left; }

@media (max-width: 1023px) {
  .chart-legend-table thead th:not(:first-child) {
    max-width: clamp(9rem, 45vw, 14rem);
  }

  .chart-legend-table--with-label thead th:first-child {
    max-width: none;
  }
}
.chart-legend-table tbody td {
  padding: 6px 10px;
  text-align: left;
  color: #374151; /* gray-700 */
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  vertical-align: middle;
}
.chart-legend-table tbody tr:nth-child(even) td { background-color: #fafafa; }
.chart-legend-table tbody tr:hover td { background: #f3f4f6; }
.chart-legend-table--with-label td:first-child { font-weight: 500; }
.chart-legend-table--with-label th:first-child,
.chart-legend-table--with-label td:first-child {
  position: sticky;
  left: 0;
  background: #ffffff;
  z-index: 3;
}
.chart-legend-table--with-label thead th:first-child { background: #f9fafb; z-index: 4; }

.balance-grid,
.articulos-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: flex-start;
}

.balance-grid {
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

@media (max-width: 1023px) {
  .balance-grid {
    gap: clamp(0.5rem, 1.5vw, 0.875rem);
  }
}

.articulos-grid {
  gap: clamp(1rem, 2vw, 1.5rem);
}

.balance-grid > *,
.articulos-grid > * {
  min-width: 0;
  min-height: 0;
}

@media (min-width: 1024px) {
  .balance-grid {
    grid-template-columns: minmax(320px, clamp(320px, 30vw, 520px)) minmax(0, 1fr);
    align-items: stretch;
    gap: clamp(1rem, 2vw, 1.5rem);
  }
}

@media (min-width: 768px) {
  .articulos-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "articulos-chart-units"
      "articulos-legend"
      "articulos-chart-billed";
  }
}

@media (min-width: 1280px) {
  .articulos-grid {
    grid-template-columns: minmax(320px, clamp(320px, 30vw, 520px)) repeat(2, minmax(0, 1fr));
    grid-template-areas: "articulos-legend articulos-chart-units articulos-chart-billed";
    align-items: stretch;
  }
}

.balance-grid__legend,
.articulos-grid__legend {
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (min-width: 1024px) {
  .balance-grid__legend {
    justify-content: flex-start;
  }
}

@media (min-width: 768px) {
  .articulos-grid__legend {
    grid-area: articulos-legend;
  }
}

@media (min-width: 1280px) {
  .articulos-grid__legend {
    justify-content: flex-start;
  }
}

.balance-grid__legend-panel,
.articulos-grid__legend-panel {
  width: min(100%, clamp(320px, 30vw, 520px));
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-inline: auto;
  overflow-x: hidden;
}

.balance-grid__legend-panel .chart-legend-container,
.articulos-grid__legend-panel .chart-legend-container {
  width: 100%;
}

@media (max-width: 1023px) {
  .balance-grid__legend-panel,
  .articulos-grid__legend-panel {
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    scrollbar-gutter: stable both-edges;
  }
}

@media (min-width: 1024px) {
  .balance-grid__legend-panel {
    max-height: clamp(24rem, 80vh, 44rem);
    overflow-y: auto;
  }

  .articulos-grid__legend-panel {
    align-self: center;
    max-height: clamp(24rem, 80vh, 44rem);
    overflow-y: auto;
  }
}

.balance-grid__chart {
  display: grid;
  place-items: center;
  min-height: clamp(22rem, 48vh, 34rem);
}

.balance-grid__chart-inner {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
}

.balance-grid__chart-inner > .relative {
  width: 100%;
}

.articulos-grid__charts {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vh, 2.25rem);
  justify-content: flex-start;
}

@media (min-width: 768px) {
  .articulos-grid__charts {
    display: contents;
  }
}

.articulos-grid__chart {
  display: flex;
  justify-content: center;
}

.articulos-grid__chart--units {
  grid-area: articulos-chart-units;
}

.articulos-grid__chart--billed {
  grid-area: articulos-chart-billed;
}

.articulos-grid__chart > .relative {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.articulos-grid__chart > .relative canvas {
  width: 100% !important;
}

.articulos-grid__chart > .relative > .text-xs {
  align-self: flex-start;
}
/* Legend container responsive scroll */
.chart-legend-scroll {
  display: block !important;
  max-height: 25rem;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.chart-legend-scroll--active .chart-legend-table-wrapper {
  justify-content: flex-start;
}
.chart-legend-scroll--active .chart-legend-table {
  margin-inline: 0;
}
.chart-legend-scroll--active .chart-legend-table--with-label th:first-child,
.chart-legend-scroll--active .chart-legend-table--with-label td:first-child {
  box-shadow: 6px 0 8px -6px rgba(15, 23, 42, 0.2);
}
.chart-legend { width: 100%; }

/* Clickable X labels */
.clickable-x-label {
  color: #2563eb; /* blue-600 */
  cursor: pointer;
  text-decoration: none;
  border-radius: 4px;
}
.clickable-x-label:hover { text-decoration: underline; background: #eff6ff; }

/* Dataset header cell + swatch */
.legend-ds-th { white-space: nowrap; }
.balance-grid__legend-panel .legend-ds-th {
  white-space: normal;
  line-height: 1.3;
}
.legend-ds-th.is-hidden { opacity: .55; }
.legend-swatch {
  display: inline-block;
  width: 12px; height: 12px; border-radius: 3px; border: 1px solid #d1d5db; /* gray-300 */
}
.legend-swatch.legend-row-swatch { min-width: 10px; }
.legend-row-swatch { margin-right: 6px; }
.clickable-x-label { display: flex; align-items: center; gap: 6px; }

/* Reset hidden columns button */
.btn-reset-columns {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 9999px; /* pill */
  border: 1px solid #33BEFF; /* primary border */
  color: #0b6aa7; /* primary text */
  background: #fff;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn-reset-columns:hover {
  background: #eff6ff; /* light blue */
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.btn-reset-columns:active { transform: translateY(1px); }
.btn-reset-columns + .btn-reset-columns {
  margin-left: 8px;
}

.footer-distributed p.footer-links a {
	display: inline-block;
	line-height: 1.8;
	text-decoration: none;
	color: inherit;
	transition: ease .25s;
}

.footer-distributed .footer-links a:before {
	content: "·";
	font-size: 20px;
	left: 0;
	color: #fff;
	display: inline-block;
	padding-right: 5px;
}

.footer-distributed .footer-links .link-1:before {
	content: none;
}

.footer-distributed .footer-right {
	float: right;
	margin-top: 6px;
	max-width: 180px;
}

.footer-distributed .footer-right a {
	display: inline-block;
	border-radius: 2px;
	font-size: 20px;
	color: #ffffff;
	text-align: center;
	line-height: 35px;
	margin-left: 3px;
	transition: all .25s;
}

.footer-distributed .footer-right a:hover {
	transform: scale(1.1);
	-webkit-transform: scale(1.1);
}

.footer-distributed p.footer-links a:hover {
	text-decoration: underline;
}

/* Media Queries */

@media (max-width: 600px) {

	.footer-distributed .footer-left,
	.footer-distributed .footer-right {
		text-align: center;
	}

	.footer-distributed .footer-right {
		float: none;
		margin: 0 auto 20px;
	}

	.footer-distributed .footer-left p.footer-links {
		line-height: 1.8;
	}

	.button-64 {
		font-size: 24px;
		min-width: 196px;
	}
}

/* COLORES del botton premiumn Morado-Azul */
.button-64-recarga {
	--button-gradient: linear-gradient(144deg, #AF40FF, #5B42F3 50%, #00DDEB);
}

/* COLORES del botton premiumn Verde */
.button-64-envio {
	--button-gradient: linear-gradient(120deg, #00FF00, #2f9673);
}

/* COLORES del botton premiumn red */
.button-64-tickets {
	--button-gradient: linear-gradient(120deg, #FF0000, #FFFF00);
}

/* Button premium */

.button-64 {
	align-items: center;
	/* background-image: linear-gradient(144deg, #AF40FF, #5B42F3 50%, #00DDEB); */
	background-image: var(--button-gradient);
	background-color: rgb(24, 28, 28);
	border: 0;
	border-radius: 8px;
	box-shadow: rgba(151, 65, 252, 0.2) 0 15px 30px -5px;
	box-sizing: border-box;
	color: #FFFFFF;
	display: flex;
	/*font-family: Phantomsans, sans-serif;*/
	font-size: 20px;
	justify-content: center;
	line-height: 1em;
	max-width: 100%;
	min-width: 140px;
	padding: 3px;
	text-decoration: none;
	touch-action: manipulation;
	white-space: nowrap;
	cursor: pointer;
}

.button-64:active,
.button-64:hover {
	outline: 0;
}

.button-64 span {


	background-color: rgb(45, 45, 45);
	padding: 16px 24px;
	border-radius: 6px;
	width: 100%;
	height: 100%;
	transition: 300ms;
}

.button-64:hover span {
	background: none;
}

/* SELECTOR DE IMPORTES */

.box2 {
	border: 2px solid linear-gradient(144deg, #AF40FF, #5B42F3 50%, #00DDEB);
}

.box2 select {
	background-color: rgb(255, 252, 252);
	color: rgb(0, 0, 0);
	padding: 4px;
	width: 125px;
	border: none;
	font-size: 23px;
	text-align: center;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.963);
	-webkit-appearance: button;
	appearance: button;
	outline: none;
	border-radius: 4px;
	border-color: #AF40FF;
	border-width: 2px;
	border: 2px rgb(0, 0, 0);
}

.box2::before {
	content: "\f13a";
	font-family: FontAwesome;
	position: flex;
	top: 0;
	right: 0;
	width: 20%;
	height: 100%;
	font-size: 28px;
	line-height: 45px;
	color: rgba(255, 255, 255, 0.5);
	background-color: rgba(255, 255, 255, 0.7);
	border: 2px groove linear-gradient(144deg, #AF40FF, #5B42F3 50%, #00DDEB);
	pointer-events: none;
}

.box2:hover::before {
	color: rgba(255, 255, 255, 0.6);
	background-color: rgba(255, 255, 255, 0.2);
	border: 2px solid linear-gradient(144deg, #AF40FF, #5B42F3 50%, #00DDEB);
}

.box2 select option {
	padding: 30px;
	border: 2px solid linear-gradient(144deg, #AF40FF, #5B42F3 50%, #00DDEB);
}

/* Estilos para los inputs del modal envio a un amigo*/
.modal-content label,
.form-content label {
	display: block;
	margin-bottom: 5px;
	font-weight: bold;
	color: #333;
}

.form-content input[type="text"],
.form-content input[type="email"],
.form-content input[type="number"],
.form-content input[type="password"],
.form-content input[type="date"],
.form-content input[type="datetime-local"],
.form-content textarea,
.form-content select,
.modal-content select,
.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="number"],
.modal-content input[type="password"],
.modal-content input[type="date"],
.modal-content input[type="datetime-local"],
.modal-content textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	margin-bottom: 15px;
	font-size: 16px;
}

.form-content input[type="text"]:read-only,
.form-content input[type="email"]:read-only,
.form-content input[type="number"]:read-only,
.form-content input[type="password"]:read-only,
.form-content input[type="date"]:read-only,
.form-content input[type="datetime-local"]:read-only,
.form-content textarea:read-only,
.form-content select:disabled,
.modal-content input[type="text"]:read-only,
.modal-content input[type="email"]:read-only,
.modal-content input[type="number"]:read-only,
.modal-content input[type="password"]:read-only,
.modal-content input[type="date"]:read-only,
.modal-content input[type="datetime-local"]:read-only,
.modal-content textarea:read-only,
.modal-content select:disabled {
	background-color: #f0f0f0; /* Color de fondo gris */
	color: #808080; /* Color del texto gris */
	border-color: #d3d3d3; /* Color del borde gris más claro */
	cursor: not-allowed; /* Cursor para indicar que no se puede editar */
}

.input-error {
	border-color: red !important;
}

/* Estilos para el botón de enviar en el modal */

.form-content button[type="submit"]:hover,
.modal-content button[type="submit"]:hover {
	background-color: #07059bc2;
}

/* Estilos para el fondo y el contenido del modal */
.modal {
	position: fixed;
	z-index: 1;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
	background-color: #fefefe;
	margin: 10vh auto;
	padding: 20px;
	border-radius: 8px;
	max-width: 640px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
}

@media (max-width: 500px) {
    .modal-content {
        width: calc(100% - 20px); /* Se deja un margen de 10px a cada lado */
        margin: 10vh 10px; /* Ajusta el margen horizontal */
    }
}

.login-image {
        background-image: linear-gradient(to bottom,
                        rgba(255, 255, 255, 0.95),
                        rgba(128, 193, 231, 0.7),
                        #33beffa8,
                        rgba(0, 0, 255, 0.5)), url('../images/login.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        min-height: 100%;
        /* border-radius: 0 10px 10px 0; */
        backdrop-filter: blur(100px);
}

.form-control, .form-select {
    border: 1px solid #e5e7eb;
    padding: 5px;
    border-radius: 4px;
}

.triangle-desc:before {
    content: "\25BC";  /* Black down-pointing triangle */
}
.triangle-asc:before {
    content: "\25B2";  /* Black up-pointing triangle */
}

.fill-content {
	min-width: -webkit-fill-available;
}

/* Añadido: Clase list-disc */
.list-disc {
    list-style-type: disc;
}

/* ——— Agrupación “Usuarios” ——— */
.fieldset-users {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background-color: #f9fafb;
}

/* Ensure search inputs span the full width of the fieldset */
.fieldset-users input[type="text"] {
  width: 100%;
}

/* ——— Form-check inline ——— */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;         /* espaciado interno */
  margin-bottom: 0.75rem;
}
.form-check input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  accent-color: #2563eb; /* azul vivo */
  cursor: pointer;
}
.form-check label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  user-select: none;
}
.form-check:hover label {
  color: #1f2937;
}

/* ——— Ajuste input buscar ——— */
.mb-0 {
  margin-bottom: 0 !important;
}

/* Footer responsive container */
.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.footer-container .footer-left,
.footer-container .footer-right {
    float: none;
}

@media (min-width: 640px) {
    .footer-container {
        flex-direction: row;
    }
}

/* OCAD style section for filter cards */
.ocad-section {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem;
}


