:root {
  --bipay-bg: #f8fafc;
  --bipay-surface: #ffffff;
  --bipay-text: #0f172a;
  --bipay-muted: #64748b;
  --bipay-border: #e8ecf1;
  --bipay-accent: #2563eb;
  --bipay-accent-soft: rgba(37, 99, 235, 0.1);
  --bipay-sidebar: #ffffff;
  --bipay-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --bipay-shadow-panel: 0 1px 3px rgba(15, 23, 42, 0.045);
  --bipay-radius: 10px;
  --bipay-input-border: #e2e7ee;
  --bipay-table-stripe: #fafbfc;
  --bipay-table-hover: #f4f6f9;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--bipay-text);
  background-color: var(--bipay-bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bipay-bg);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

#root {
  min-height: 100vh;
}

.app-loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: #334155;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px 1fr;
}

.app-sidebar {
  background: var(--bipay-sidebar);
  color: var(--bipay-text);
  padding: 22px 16px 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--bipay-border);
  box-shadow: var(--bipay-shadow-sm);
}

.app-brand {
  font-weight: 600;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--bipay-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-brand__title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bipay-text);
  line-height: 1.2;
}

.app-brand__subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--bipay-muted);
  letter-spacing: 0.02em;
}

.app-brand__tag {
  display: inline-block;
  width: fit-content;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--bipay-surface);
  color: var(--bipay-accent);
  border: 1px solid var(--bipay-border);
}

.app-shell--enterprise .app-topbar {
  background: var(--bipay-surface);
  border-bottom: 1px solid var(--bipay-border);
  box-shadow: var(--bipay-shadow-sm);
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.app-nav-group {
  display: grid;
  gap: 4px;
}

/* Auto-hide cabeceras de grupo cuando ningún item/submenu está visible (todos los
   hijos devolvieron null por permisos). Evita cabeceras huérfanas en sidebar. */
.app-nav-group:not(:has(> a, > .app-nav-submenu, > button, > nav)) {
  display: none;
}

.app-nav-group__label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  padding: 0 10px 6px;
}

.app-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 500;
  color: #475569;
  border: 0;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.app-nav a:hover {
  background: #f1f5f9;
  color: var(--bipay-text);
}

.app-nav a[aria-current='page'] {
  background: var(--bipay-accent-soft);
  color: var(--bipay-accent);
  font-weight: 600;
  border-color: rgba(37, 99, 235, 0.12);
}

/* Submenú (Reportería analítica → KPIs ventas) */
.app-nav-submenu {
  display: grid;
  gap: 2px;
}

.app-nav-submenu__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: #475569;
  cursor: pointer;
  text-align: left;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.app-nav-submenu__toggle:hover {
  background: #f1f5f9;
  color: var(--bipay-text);
}

.app-nav-submenu__toggle--open .app-nav-submenu__chevron {
  transform: rotate(-180deg);
}

.app-nav-submenu__toggle--child-active:not(:hover) {
  color: var(--bipay-accent);
  font-weight: 600;
}

.app-nav-submenu__chevron {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #94a3b8;
  transform-origin: 50% 40%;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.app-nav-submenu__items {
  display: grid;
  gap: 2px;
  padding: 2px 0 4px 6px;
  margin-left: 8px;
  border-left: 2px solid #e2e8f0;
}

.app-nav-submenu__section {
  display: grid;
  gap: 2px;
  padding: 4px 0 2px;
}

.app-nav-submenu__section + .app-nav-submenu__section {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
}

.app-nav-submenu__section-label {
  display: block;
  padding: 2px 10px 2px 12px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(380px, 480px);
  background: #0f172a;
}

.login-hero {
  position: relative;
  padding: 56px 56px 40px;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 36px;
  justify-content: space-between;
  background:
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.32), transparent 48%),
    radial-gradient(circle at 85% 28%, rgba(124, 58, 237, 0.28), transparent 52%),
    radial-gradient(circle at 60% 95%, rgba(14, 165, 233, 0.2), transparent 55%),
    linear-gradient(135deg, #0b1120 0%, #0f172a 55%, #0b1220 100%);
  overflow: hidden;
}

.login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  background-position: -1px -1px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 75%);
  pointer-events: none;
}

.login-hero > * {
  position: relative;
  z-index: 1;
}

.login-hero__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  flex: 1;
}

@media (max-width: 1200px) {
  .login-hero__body {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.login-hero__brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.login-hero__logo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.login-hero__tag {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-hero__content {
  max-width: 520px;
}

.login-hero__content h1 {
  font-size: 36px;
  line-height: 1.12;
  margin: 0 0 14px;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.login-hero__content p {
  font-size: 15.5px;
  line-height: 1.55;
  color: #cbd5e1;
  margin: 0 0 20px;
}

.login-hero__bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: #cbd5e1;
}

.login-hero__carousel {
  display: grid;
  gap: 16px;
  max-width: 540px;
}

.login-hero__slide {
  animation: heroFade 500ms ease-out;
  display: grid;
  gap: 12px;
}

@keyframes heroFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-hero__art {
  position: relative;
  width: 100%;
  aspect-ratio: 400 / 220;
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.07), transparent 45%),
    linear-gradient(160deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.6) 60%, rgba(11, 17, 32, 0.55) 100%);
  border: 1px solid rgba(148, 163, 184, 0.16);
  overflow: hidden;
  isolation: isolate;
  padding: 18px 20px;
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.06) inset,
    0 28px 48px -28px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(148, 163, 184, 0.05);
  transition: box-shadow 500ms ease, border-color 500ms ease;
}

.login-hero__art::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at 30% 30%, #000 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.login-hero__art::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  pointer-events: none;
  z-index: 2;
}

.login-hero__art-glow {
  position: absolute;
  inset: auto -15% -35% -15%;
  height: 70%;
  background: radial-gradient(ellipse at center, var(--slide-accent, #60a5fa) 0%, transparent 68%);
  opacity: 0.38;
  filter: blur(38px);
  z-index: 0;
  pointer-events: none;
  transition: background 600ms ease, opacity 600ms ease;
}

.login-hero__art svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.login-hero__slide-body {
  display: grid;
  gap: 4px;
}

.login-hero__fixed {
  max-width: 540px;
  display: grid;
  gap: 14px;
}

.login-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #93c5fd;
  flex-wrap: wrap;
}

.login-hero__ia-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #0b1120;
  background: linear-gradient(90deg, #c4b5fd 0%, #93c5fd 50%, #86efac 100%);
  text-transform: uppercase;
  box-shadow: 0 0 20px rgba(147, 197, 253, 0.25);
}

.login-hero__ia-pill::before {
  content: '✦';
  font-size: 12px;
  line-height: 1;
}

.login-hero__fixed h1 {
  font-size: 34px;
  line-height: 1.1;
  margin: 0;
  color: #f8fafc;
  letter-spacing: -0.012em;
  font-weight: 700;
}

.login-hero__fixed p {
  font-size: 15px;
  line-height: 1.55;
  color: #cbd5e1;
  margin: 0;
  max-width: 520px;
}

.login-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.login-hero__tags span {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.22);
  letter-spacing: 0.02em;
}

.login-hero__caption {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: -0.005em;
  line-height: 1.35;
}

.login-hero__caption-text {
  font-size: 13px;
  line-height: 1.5;
  color: #94a3b8;
  margin: 0;
  max-width: 480px;
}

.login-hero__progress {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
  margin-top: 4px;
  max-width: 320px;
}

.login-hero__bar {
  position: relative;
  height: 3px;
  border-radius: 999px;
  border: 0;
  background: rgba(148, 163, 184, 0.22);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
}

.login-hero__bar-fill {
  position: absolute;
  inset: 0;
  background: var(--slide-accent, #60a5fa);
  transform-origin: left center;
  transform: scaleX(0);
  border-radius: inherit;
}

.login-hero__bar.is-done .login-hero__bar-fill {
  transform: scaleX(1);
  opacity: 0.55;
}

.login-hero__bar.is-active .login-hero__bar-fill {
  animation: heroProgress 5000ms linear forwards;
}

@keyframes heroProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.login-hero__footer {
  font-size: 12px;
  color: #64748b;
  letter-spacing: 0.02em;
}

.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  position: relative;
}

.login-main::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.08), transparent);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  border: none;
  display: grid;
  gap: 22px;
}

.login-card__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.login-card__brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.45);
}

.login-card__head {
  display: grid;
  gap: 6px;
}

.login-card__eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #2563eb;
}

.login-card__head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  color: var(--bipay-text);
  letter-spacing: -0.012em;
  font-weight: 700;
}

.login-card__head p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: #64748b;
}

.login-card__divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
  margin-top: 4px;
}

.login-card__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #94a3b8;
  letter-spacing: 0.04em;
  justify-content: center;
}

.login-card__dot {
  opacity: 0.6;
}

.login-card__tls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #15803d;
  font-weight: 600;
}

.login-card__tls-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.5);
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form__field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

.login-form__field input {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  color: var(--bipay-text);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.login-form__field input:focus {
  outline: none;
  border-color: var(--bipay-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.login-form__password-wrap {
  position: relative;
}

.login-form__password-wrap input {
  width: 100%;
  padding-right: 72px;
}

.login-form__toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--bipay-accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.login-form__toggle:hover {
  background: #eff6ff;
}

.login-form__row {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.login-form__link {
  color: var(--bipay-accent);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}

.login-form__link:hover {
  text-decoration: underline;
}

.login-form__error {
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  margin: 0;
}

.login-form__ok {
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  margin: 0;
}

.login-card__help {
  margin: 0;
  font-size: 12.5px;
  color: #64748b;
  text-align: center;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-hero {
    display: none;
  }
}

.executive-dashboard__chart-section {
  margin-top: 20px;
  display: grid;
  gap: 16px;
}

.executive-dashboard__chart-panel {
  width: 100%;
}

.executive-dashboard__chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.executive-dashboard__metric-toggle {
  display: inline-flex;
  gap: 0;
  padding: 3px;
  background: #f1f5f9;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.executive-dashboard__metric-toggle button {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.executive-dashboard__metric-toggle button:hover {
  color: var(--bipay-text);
}

.executive-dashboard__metric-toggle button.is-active {
  background: #0f172a;
  color: #fff;
  box-shadow: none;
}

.dashboard-filters__field--wide {
  min-width: 260px;
}

.executive-dashboard__period-strip {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  margin: -8px 0 4px;
  font-size: 13px;
}

.executive-dashboard__period-strip > div {
  display: grid;
  gap: 2px;
}

.executive-dashboard__period-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.executive-dashboard__period-strip strong {
  font-size: 13px;
  color: var(--bipay-text);
  font-variant-numeric: tabular-nums;
}

.executive-dashboard__period-vs {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  padding: 3px 8px;
  border-radius: 3px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
}

.executive-dashboard__tarifas-section {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.executive-dashboard__section-head h3 {
  margin: 0 0 2px;
}

.tarifa-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.tarifa-card {
  border-radius: 12px;
  padding: 12px 14px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.tarifa-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--bipay-text);
}

.tarifa-card__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.tarifa-card__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
}

.tarifa-card__metrics > div {
  display: grid;
  gap: 2px;
}

.tarifa-card__metrics dt {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.tarifa-card__metrics dd {
  font-size: 16px;
  font-weight: 700;
  color: var(--bipay-text);
  margin: 0;
}

.tarifa-card__delta {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}

.tarifa-card__delta em {
  font-style: normal;
  color: #94a3b8;
  font-weight: 500;
}

.tarifa-card__delta.is-up {
  color: #0f172a;
}

.tarifa-card__delta.is-down {
  color: #991b1b;
}

.tarifa-card__delta.is-flat {
  color: #64748b;
}

.tarifa-cards__empty {
  font-size: 12px;
  color: #64748b;
  padding: 12px;
}

.forecast-kpi-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 16px 0 4px;
}

.forecast-kpi-card {
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: visible;
  display: flex;
  flex-direction: column;
  position: relative;
}

.forecast-kpi-card:hover,
.forecast-kpi-card:focus-within {
  z-index: 50;
}

.forecast-kpi-cards {
  overflow: visible;
}

.forecast-projection-table th,
.forecast-projection-table td {
  font-variant-numeric: tabular-nums;
}

.forecast-projection-table__head--real {
  color: #0f172a;
}

.forecast-projection-table__head--proj {
  color: #7c3aed;
  font-style: italic;
}

.forecast-projection-table__real {
  font-weight: 700;
  color: var(--bipay-text);
  white-space: nowrap;
}

.forecast-projection-table__dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #0f172a;
  margin-right: 6px;
  vertical-align: middle;
}

.forecast-projection-table__proj {
  color: #7c3aed;
  font-style: italic;
  white-space: nowrap;
}

.forecast-projection-table__prefix {
  display: inline-block;
  margin-right: 4px;
  font-style: normal;
  opacity: 0.6;
}

.kpi-card__delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.kpi-card__delta em {
  font-style: normal;
  font-weight: 500;
  color: #94a3b8;
}

.kpi-card__delta--up {
  color: #15803d;
}

.kpi-card__delta--down {
  color: #b91c1c;
}

.kpi-card__delta--flat {
  color: #64748b;
}

.forecast-kpi-card .kpi-metric-label__tooltip {
  z-index: 100;
}

.forecast-kpi-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 4px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  background: transparent;
}

.forecast-kpi-card__head strong {
  font-weight: 600;
  color: #475569;
}

.forecast-kpi-card__icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  flex-shrink: 0;
}

.forecast-kpi-card__body {
  display: grid;
  gap: 2px;
  padding: 4px 14px 14px;
}

.forecast-kpi-card__value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-top: 2px;
  color: var(--bipay-text);
}

.forecast-kpi-card__sub {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: #64748b;
}

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

.forecasting-summary__ia {
  padding: 14px 16px 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.04) 0%, rgba(37, 99, 235, 0.04) 50%, rgba(22, 163, 74, 0.04) 100%),
    #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  display: grid;
  gap: 12px;
}

.forecasting-summary__ia-head {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.forecasting-summary__ia-head strong {
  font-size: 14px;
  color: var(--bipay-text);
}

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

.forecasting-summary__real {
  display: flex;
}

.forecasting-summary__real > * {
  flex: 1;
}

@media (max-width: 1024px) {
  .forecasting-summary__split {
    grid-template-columns: 1fr;
  }
  .forecasting-kpi-grid--ia {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

.forecasting-info {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  display: grid;
  gap: 10px;
}

.forecasting-info header {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.forecasting-info header strong {
  font-size: 14px;
  color: var(--bipay-text);
}

.forecasting-info__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #c4b5fd, #93c5fd);
  color: #0b1120;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.forecasting-info__badge::before {
  content: '✦';
  font-size: 11px;
  line-height: 1;
}

.forecasting-info p {
  margin: 0;
  font-size: 13px;
  color: #334155;
  line-height: 1.55;
}

.forecasting-info__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 0;
}

.forecasting-info__grid > div {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.forecasting-info__grid dt {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin: 0 0 2px;
}

.forecasting-info__grid dd {
  font-size: 15px;
  font-weight: 700;
  color: var(--bipay-text);
  margin: 0;
}


.forecasting-info__hint {
  font-size: 12px;
  color: #64748b;
  padding-top: 2px;
  border-top: 1px dashed #e2e8f0;
  margin-top: 2px !important;
  padding-top: 10px;
}

.operational-insights {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  display: grid;
  gap: 12px;
}

.operational-insights__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.operational-insights__head h3 {
  margin: 0 0 2px;
  font-size: 16px;
  color: var(--bipay-text);
}

.operational-insights__head p {
  margin: 0;
  font-size: 12.5px;
  color: #64748b;
}

.operational-insights__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.operational-insights__item {
  padding: 12px 14px;
  border-radius: 10px;
  display: grid;
  gap: 6px;
}

.operational-insights__item header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.operational-insights__item header strong {
  font-size: 13.5px;
  color: var(--bipay-text);
  flex: 1 1 100%;
  margin-top: 4px;
}

.operational-insights__badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.operational-insights__area {
  font-size: 10.5px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.operational-insights__detail,
.operational-insights__reco {
  margin: 0;
  font-size: 13px;
  color: #334155;
  line-height: 1.45;
}

.operational-insights__reco strong {
  color: #0f172a;
}

.operational-insights__loading,
.operational-insights__empty,
.operational-insights__error {
  margin: 0;
  font-size: 12.5px;
  color: #64748b;
}

.operational-insights__error {
  color: #b91c1c;
}

.analitica-hub__toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(240px, 1fr);
  gap: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--bipay-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.analitica-hub__shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.analitica-hub__tile {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(124, 58, 237, 0.05));
  border: 1px solid #e2e8f0;
  color: var(--bipay-text);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.analitica-hub__tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px -10px rgba(15, 23, 42, 0.25);
}

.analitica-hub__tile-tag {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bipay-accent);
}

.analitica-hub__tile strong {
  font-size: 15px;
  margin-top: 4px;
}

.analitica-hub__tile p {
  margin: 2px 0 8px;
  font-size: 12.5px;
  color: #64748b;
}

.analitica-hub__tile-cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--bipay-accent);
}

.analitica-hub__section {
  margin-top: 8px;
  display: grid;
  gap: 12px;
}

.analitica-hub__section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.analitica-hub__section-head h3 {
  margin: 0;
  font-size: 16px;
  color: var(--bipay-text);
}

.analitica-hub__section-head p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: #64748b;
}

.analitica-hub__count {
  font-size: 11.5px;
  color: #94a3b8;
}

.analitica-hub__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.analitica-hub__card {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: var(--bipay-text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.analitica-hub__card:hover {
  transform: translateY(-2px);
  border-color: var(--bipay-accent);
  box-shadow: 0 6px 18px -10px rgba(37, 99, 235, 0.3);
}

.analitica-hub__card-code {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.analitica-hub__card strong {
  font-size: 14px;
}

.analitica-hub__card-status {
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  width: max-content;
  margin-top: 4px;
}

.analitica-hub__card-status--active {
  background: #dcfce7;
  color: #15803d;
}

.analitica-hub__card-cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--bipay-accent);
  margin-top: 6px;
}

.analitica-hub__empty {
  padding: 16px;
  font-size: 13px;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 10px;
  text-align: center;
  margin: 0;
}

.weekday-bars {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.weekday-bars__row {
  display: grid;
  grid-template-columns: 36px 1fr 56px;
  gap: 10px;
  align-items: center;
}

.weekday-bars__label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.weekday-bars__track {
  height: 10px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.weekday-bars__fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.weekday-bars__value {
  font-size: 12px;
  font-weight: 600;
  color: var(--bipay-text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.executive-dashboard__rankings {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.kpi-ventas__ranking-table td.is-up,
.kpi-ventas__ranking-table .delta-cell.is-up {
  color: #15803d;
  font-weight: 600;
}

.kpi-ventas__ranking-table td.is-down,
.kpi-ventas__ranking-table .delta-cell.is-down {
  color: #b91c1c;
  font-weight: 600;
}

.kpi-ventas__ranking-table td.is-flat,
.kpi-ventas__ranking-table .delta-cell.is-flat {
  color: #64748b;
}

.executive-dashboard__signals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.executive-dashboard__signal-card {
  padding-bottom: 12px;
}

.executive-dashboard__alerts,
.executive-dashboard__freshness {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding: 12px 16px 0;
  margin: 0;
}

.executive-dashboard__alerts > div,
.executive-dashboard__freshness > div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.executive-dashboard__alerts dt,
.executive-dashboard__freshness dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin: 0;
}

.executive-dashboard__alerts dd,
.executive-dashboard__freshness dd {
  font-size: 18px;
  font-weight: 700;
  color: var(--bipay-text);
  margin: 0;
}

.executive-dashboard__alerts--critical dd {
  color: #b91c1c;
}

.executive-dashboard__alerts--warning dd {
  color: #b45309;
}

.executive-dashboard__alerts--info dd {
  color: #1e40af;
}

.app-nav-submenu__link {
  display: block;
  padding: 6px 10px 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  border: 1px solid transparent;
  text-decoration: none;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.app-nav-submenu__link:hover {
  background: #f8fafc;
  color: var(--bipay-text);
}

.app-nav-submenu__link[aria-current='page'] {
  background: var(--bipay-accent-soft);
  color: var(--bipay-accent);
  font-weight: 600;
  border-color: rgba(37, 99, 235, 0.12);
}

/* ===================================================================
   SIDEBAR EJECUTIVO — estilo app-dashboard minimalista (Linear-inspired)
   Paleta: grises neutros, acento azul solo en activo, hairlines 1px.
   =================================================================== */

/* Grupo con divisor superior tenue */
.app-nav-group + .app-nav-group {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eef2f6;
}
.app-nav-group__label {
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.12em !important;
  color: #94a3b8 !important;
  padding: 0 12px 8px !important;
}

/* Toggle principal (AFT, Reportería, etc) = label jerarquía superior */
.app-nav-submenu__toggle {
  position: relative;
  padding: 7px 10px 7px 14px !important;
  border-radius: 6px;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #334155 !important;
  border: 0 !important;
  transition: background 0.12s, color 0.12s;
}
.app-nav-submenu__toggle:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
.app-nav-submenu__toggle--child-active {
  color: #0f172a !important;
  font-weight: 600 !important;
  background: transparent !important;
}

/* Chevron minimal delgado */
.app-nav-submenu__chevron {
  width: 0 !important;
  height: 0 !important;
  border-left: 3.5px solid transparent !important;
  border-right: 3.5px solid transparent !important;
  border-top: 5px solid #94a3b8 !important;
  opacity: 0.6;
  transition: transform 0.15s, opacity 0.12s;
}
.app-nav-submenu__toggle:hover .app-nav-submenu__chevron {
  opacity: 1;
}

/* Items nivel 1 (hijos directos AFT) — sin línea lateral, indent limpio */
.app-nav-submenu__items {
  padding: 2px 0 4px 0 !important;
  margin-left: 0 !important;
  border-left: 0 !important;
  gap: 1px !important;
}

/* Link base — con icono flat */
.app-nav-submenu__link {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 7px 10px !important;
  border-radius: 6px;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #64748b !important;
  border: 0 !important;
  text-decoration: none;
  letter-spacing: 0;
  transition: background 0.12s, color 0.12s;
}
.app-nav-submenu__link:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
.app-nav-submenu__link[aria-current='page'] {
  background: #eff6ff !important;
  color: #1e3a8a !important;
  font-weight: 600 !important;
  border: 0 !important;
}

/* Icono flat (lucide-style) */
.app-nav-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #94a3b8;
  transition: color 0.12s;
}
.app-nav-ico svg {
  width: 15px;
  height: 15px;
}
.app-nav-submenu__link:hover .app-nav-ico,
.app-nav-submenu__toggle--nested:hover .app-nav-ico {
  color: #475569;
}
.app-nav-submenu__link[aria-current='page'] .app-nav-ico,
.app-nav-submenu__toggle--nested.app-nav-submenu__toggle--child-active .app-nav-ico {
  color: #1e3a8a;
}

.app-nav-submenu__label-text {
  flex: 1;
  line-height: 1.3;
}

/* Nested submenu (Contabilidad / Mantenedores) — mismo patrón con iconos */
.app-nav-submenu--nested {
  display: grid;
  gap: 1px;
}
.app-nav-submenu__toggle--nested {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px !important;
  border-radius: 6px;
  background: transparent;
  border: 0 !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #64748b !important;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  letter-spacing: 0;
  text-transform: none;
  transition: background 0.12s, color 0.12s;
}
.app-nav-submenu__toggle--nested:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
.app-nav-submenu__toggle--nested.app-nav-submenu__toggle--child-active {
  color: #0f172a !important;
  font-weight: 600 !important;
  background: transparent !important;
}

/* Items nivel 2 — indent con línea guía */
.app-nav-submenu__items--nested {
  display: grid;
  gap: 1px;
  padding: 2px 0 4px 0 !important;
  margin: 2px 0 4px 18px !important;
  border-left: 1px solid #e2e8f0 !important;
}
.app-nav-submenu__link--nested {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 14px !important;
  border-radius: 6px;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #64748b !important;
  border: 0 !important;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.app-nav-submenu__link--nested .app-nav-ico {
  width: 16px;
  height: 16px;
}
.app-nav-submenu__link--nested .app-nav-ico svg {
  width: 13px;
  height: 13px;
}
.app-nav-submenu__link--nested:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
.app-nav-submenu__link--nested[aria-current='page'] {
  background: #eff6ff !important;
  color: #1e3a8a !important;
  font-weight: 600 !important;
}

.app-nav-submenu__toggle-text {
  letter-spacing: 0;
}

.app-main {
  display: grid;
  grid-template-rows: auto 1fr;
}

.app-topbar {
  border-bottom: 1px solid var(--bipay-border);
  background: var(--bipay-surface);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-topbar__user {
  min-width: 0;
}

.app-topbar__name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--bipay-text);
  letter-spacing: -0.01em;
}

.app-topbar__email {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--bipay-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42ch, 56vw);
}

.app-topbar__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-topbar__spacer {
  flex: 1 1 auto;
}

.app-topbar .ui-button--secondary {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  background: var(--bipay-surface);
  color: #475569;
  border: 1px solid var(--bipay-border);
  box-shadow: none;
}

.app-topbar .ui-button--secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--bipay-text);
}

.app-content {
  padding: 24px 28px 36px;
  width: min(1600px, 100%);
  margin: 0 auto;
}

.page-stack {
  display: grid;
  gap: 20px;
}

.page-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--bipay-text);
  line-height: 1.2;
}

.page-header p {
  margin: 10px 0 0;
  color: var(--bipay-muted);
  max-width: 72ch;
  font-size: 14px;
  line-height: 1.5;
}

.dashboard-context-summary {
  margin-top: 0;
  padding: 12px 16px;
  border: 1px solid var(--bipay-border);
  background: var(--bipay-surface);
  border-radius: 12px;
  box-shadow: var(--bipay-shadow-sm);
}

.dashboard-context-summary p {
  margin: 0;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}

.dashboard-context-summary strong {
  color: var(--bipay-text);
  font-weight: 600;
}

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

.ui-card {
  background: var(--bipay-surface);
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--bipay-shadow-sm);
}

.ui-card__title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--bipay-text);
}

.stat-card {
  display: grid;
  gap: 6px;
}

.stat-card__label {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-card__value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bipay-text);
  font-variant-numeric: tabular-nums;
}

.ui-button {
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.ui-button--primary {
  background: #2563eb;
  color: #ffffff;
}

.ui-button--secondary {
  background: #e2e8f0;
  color: #0f172a;
}

.ui-skeleton {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 37%, #e2e8f0 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.2s ease infinite;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.auth-page .ui-card {
  width: min(420px, 100%);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.auth-form input {
  border: 1px solid var(--bipay-input-border);
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 42px;
  font-size: 14px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.auth-form input:focus-visible {
  outline: none;
  border-color: var(--bipay-accent);
  box-shadow: 0 0 0 3px var(--bipay-accent-soft);
}

.auth-error {
  color: #b91c1c;
  margin: 0;
  font-size: 14px;
}

.dashboard-page {
  display: grid;
  gap: 22px;
  align-content: start;
}

.dashboard-filters {
  background: var(--bipay-surface);
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  padding: 16px 18px 14px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  align-items: end;
  gap: 12px 16px;
  box-shadow: var(--bipay-shadow-sm);
}

.dashboard-filters--with-extra {
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
}

.dashboard-filters label,
.dashboard-filters__field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--bipay-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.dashboard-filters input,
.dashboard-filters select {
  border: 1px solid var(--bipay-input-border);
  border-radius: 8px;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  background: var(--bipay-surface);
  color: var(--bipay-text);
  font-family: inherit;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

/* Native <select>: strip OS chevron y agregar uno SVG consistente con SearchableSelect */
.dashboard-filters select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 12px;
  cursor: pointer;
}

.dashboard-filters select:disabled {
  cursor: not-allowed;
  background-color: #f8fafc;
  color: #94a3b8;
  opacity: 0.85;
}

.dashboard-filters input:hover,
.dashboard-filters select:hover:not(:disabled) {
  border-color: #d1d9e4;
}

.dashboard-filters input:focus-visible,
.dashboard-filters select:focus-visible {
  outline: none;
  border-color: var(--bipay-accent);
  box-shadow: 0 0 0 3px var(--bipay-accent-soft);
}

/* Input numérico dentro del bar: oculta spinner nativo para look consistente */
.dashboard-filters input[type='number'] {
  -moz-appearance: textfield;
}

.dashboard-filters input[type='number']::-webkit-outer-spin-button,
.dashboard-filters input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.dashboard-filters__actions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  align-self: stretch;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-filters__actions .ui-button {
  min-height: 40px;
}

.dashboard-filters__extra-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.dashboard-filters__extra-actions button,
.dashboard-filters__extra-actions .ui-button {
  min-height: 40px;
}

.dashboard-filters__hint {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
}

/* Filtros incrustados en un panel (sin doble marco) */
.dashboard-panel .dashboard-filters--in-panel {
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 12px 16px 16px;
  margin: 0;
  background: transparent;
  grid-template-columns: 1fr;
  gap: 12px 14px;
}

.dashboard-updating {
  margin: -4px 0 0;
  font-size: 13px;
  color: #475569;
}

.dashboard-updating--warning {
  color: #b45309;
}

.dashboard-export-actions {
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: var(--bipay-surface);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: end;
  gap: 14px;
  box-shadow: var(--bipay-shadow-sm);
}

.dashboard-export-actions p {
  margin: 0;
  font-size: 13px;
  color: #334155;
  font-weight: 600;
}

.dashboard-export-actions__title small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.dashboard-export-actions__filters {
  display: flex;
  gap: 8px;
}

.dashboard-export-actions__filters label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}

.dashboard-export-actions__filters input {
  border: 1px solid var(--bipay-input-border);
  border-radius: 8px;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 13px;
}

.dashboard-export-actions > div {
  display: flex;
  gap: 8px;
}

.settings-contract-bar {
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: var(--bipay-surface);
  padding: 14px 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--bipay-shadow-sm);
}

.settings-contract-bar label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #334155;
  font-weight: 600;
}

.settings-contract-bar select {
  border: 1px solid var(--bipay-input-border);
  border-radius: 8px;
  min-height: 40px;
  min-width: 280px;
  padding: 8px 12px;
}

.settings-contract-bar p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

.settings-contract-bar--in-panel {
  margin: 0;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 12px 16px 16px;
  background: transparent;
  width: 100%;
}

.settings-contract-bar--in-panel label {
  font-size: 12px;
  color: var(--bipay-muted);
  letter-spacing: 0.02em;
}

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

.settings-form-grid--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #f1f5f9;
}

.settings-form-grid label,
.settings-threshold-grid label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #334155;
  font-weight: 600;
}

.settings-form-grid input,
.settings-form-grid select,
.settings-threshold-grid input {
  border: 1px solid var(--bipay-input-border);
  border-radius: 8px;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 13px;
}

.settings-toggle-grid {
  padding: 10px 12px 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 10px;
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
}

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

.settings-checkbox-inline {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  font-weight: 600;
}

.settings-checkbox-inline input {
  width: 16px;
  height: 16px;
}

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

.executive-kpi-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.kpi-card {
  background: var(--bipay-surface);
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  padding: 16px 18px 15px;
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 96px;
  box-shadow: var(--bipay-shadow-panel);
}

.kpi-card__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #94a3b8;
  text-transform: uppercase;
}

.kpi-card__value {
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--bipay-text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.kpi-card__skeleton {
  height: 30px;
  width: 70%;
}

.dashboard-panel {
  background: var(--bipay-surface);
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--bipay-shadow-panel);
}

.dashboard-panel__header {
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--bipay-border);
}

.dashboard-panel__header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--bipay-text);
}

.dashboard-panel__header p {
  margin: 6px 0 0;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.45;
}

.chart-wrap {
  padding: 12px 18px 18px;
}

.chart-skeleton {
  height: 320px;
  display: grid;
  align-content: end;
  gap: 12px;
  padding: 24px 16px;
}

.chart-skeleton__line {
  height: 16px;
}

.chart-skeleton__line--1 {
  width: 85%;
}

.chart-skeleton__line--2 {
  width: 65%;
}

.chart-skeleton__line--3 {
  width: 45%;
}

.chart-empty {
  height: 320px;
  display: grid;
  place-items: center;
  color: #64748b;
  font-size: 14px;
}

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

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

.executive-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.executive-multiselect {
  position: relative;
  min-width: 160px;
}

.executive-multiselect__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.executive-multiselect__trigger {
  width: 100%;
  text-align: left;
  border: 1px solid var(--bipay-input-border);
  border-radius: 8px;
  padding: 8px 12px;
  min-height: 40px;
  background: var(--bipay-surface);
  font-size: 13px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.executive-multiselect__trigger:hover {
  border-color: #d1d9e4;
}

.executive-multiselect__trigger:focus-visible {
  outline: none;
  border-color: var(--bipay-accent);
  box-shadow: 0 0 0 3px var(--bipay-accent-soft);
}

.executive-multiselect__preview {
  display: block;
  color: #64748b;
  font-weight: 400;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.executive-multiselect__panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 260px;
  background: var(--bipay-surface);
  border: 1px solid var(--bipay-border);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.1);
  padding: 10px;
}

.executive-multiselect__search {
  width: 100%;
  border: 1px solid var(--bipay-input-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  margin-bottom: 8px;
}

.executive-multiselect__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
}

.executive-multiselect__option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 4px;
  font-size: 13px;
  cursor: pointer;
}

.executive-multiselect__code {
  color: #64748b;
}

.executive-multiselect__footer {
  display: flex;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
  margin-top: 4px;
}

.executive-multiselect__hint {
  font-size: 12px;
  color: #64748b;
  margin: 4px 0;
}

.linkish {
  border: none;
  background: none;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 2px;
}

.executive-analytic-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
}

.executive-level-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.executive-level-chips button {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.executive-level-chips button.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.executive-drill-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-size: 13px;
  color: #1e3a8a;
}

.executive-table__sort {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.executive-table__sort.is-active {
  color: #2563eb;
}

.executive-table__sort-dir {
  font-size: 11px;
}

.executive-table tr.is-drillable {
  cursor: pointer;
}

.executive-table tr.is-drillable:hover {
  background: #f8fafc;
}

.executive-table__subtotal td,
.executive-table__grand td {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
}

.executive-table__pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 12px 12px;
  border-top: 1px solid #eef2f7;
}

.executive-table__pager button {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.executive-table__pager button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.executive-analytic-table__hint {
  color: #64748b;
  font-weight: 400;
}

.executive-export-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.executive-export-options__check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.operational-chart-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 12px;
}

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

.geospatial-map-wrap {
  padding: 10px 12px 12px;
}

.geospatial-map {
  height: 520px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--bipay-border);
}

.geospatial-map--pending {
  background: #f1f5f9;
}

.map-layer-toggle {
  display: inline-flex;
  border: 1px solid var(--bipay-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bipay-table-stripe);
  box-shadow: var(--bipay-shadow-sm);
}

.map-layer-toggle button {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.map-layer-toggle button.is-active {
  background: var(--bipay-surface);
  color: var(--bipay-accent);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.map-layer-toggle button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.dashboard-panel__header--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.map-skeleton {
  min-height: 520px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 24px;
  display: grid;
  align-content: end;
  gap: 12px;
}

.map-skeleton__line {
  height: 16px;
}

.map-skeleton__line--1 {
  width: 88%;
}

.map-skeleton__line--2 {
  width: 62%;
}

.map-skeleton__line--3 {
  width: 42%;
}

.map-empty {
  min-height: 520px;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  display: grid;
  place-items: center;
  color: #64748b;
  padding: 16px;
}

.map-empty--error {
  border-style: solid;
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.map-layer-empty {
  margin-top: 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
}

.map-layer-empty p {
  margin: 0;
}

.map-legend {
  border-top: 1px solid #e2e8f0;
  padding: 10px 12px 12px;
}

.map-legend p {
  margin: 0;
  font-size: 13px;
  color: #475569;
}

.map-legend ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.map-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #334155;
}

.map-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.map-legend__heat {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #334155;
}

.map-legend__heat-bar {
  height: 8px;
  flex: 1;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.18), rgba(220, 38, 38, 0.7));
}

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

.network-filters-extra {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.alerts-filters-extra {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.alerts-list {
  padding: 4px 16px 16px;
}

.alerts-list__items,
.alerts-list__skeletons {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.alerts-item {
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: var(--bipay-surface);
  padding: 14px 16px;
  display: grid;
  gap: 8px;
  box-shadow: var(--bipay-shadow-sm);
}

.alerts-item--skeleton {
  gap: 10px;
}

.alerts-item__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.alerts-item__top h4 {
  margin: 0;
  font-size: 15px;
  color: #0f172a;
}

.alerts-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.alerts-item__meta span {
  font-size: 12px;
  color: #475569;
  border: 1px solid var(--bipay-border);
  background: var(--bipay-table-stripe);
  border-radius: 999px;
  padding: 4px 10px;
}

.alerts-item__summary {
  margin: 0;
  font-size: 13px;
  color: #334155;
}

.alerts-list__empty {
  margin: 0;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: 14px;
  font-size: 14px;
}

.alerts-item__line {
  height: 14px;
  width: 100%;
}

.alerts-item__line--title {
  width: 65%;
  height: 18px;
}

.alerts-item__line--meta {
  width: 78%;
}

.alerts-item__line--summary {
  width: 92%;
}

.alert-severity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}

.alert-severity--critical {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

.alert-severity--warning {
  color: #92400e;
  background: #fefce8;
  border-color: #fde68a;
}

.alert-severity--info {
  color: #1e3a8a;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.benchmarking-chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.benchmarking-table-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.benchmarking-table-wrap {
  overflow-x: auto;
  padding: 4px 16px 16px;
}

.benchmarking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.benchmarking-table th,
.benchmarking-table td {
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--bipay-border);
  white-space: nowrap;
}

.benchmarking-table th {
  color: #94a3b8;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.benchmarking-table td {
  color: #0f172a;
}

.benchmarking-growth {
  font-weight: 600;
  color: #0f172a;
}

.benchmarking-growth--positive {
  color: #047857;
}

.benchmarking-growth--negative {
  color: #b91c1c;
}

.benchmarking-page .dashboard-panel__header h3 {
  letter-spacing: -0.01em;
}

.benchmarking-kpi-strip {
  margin: 12px 0 4px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--bipay-border);
  background: var(--bipay-surface);
  box-shadow: var(--bipay-shadow-sm);
}

.benchmarking-kpi-strip__hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.benchmarking-kpi-strip__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.benchmarking-kpi-strip .kpi-card {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.benchmarking-chart-panel .chart-wrap {
  padding-top: 4px;
}

.benchmarking-scope-toolbar {
  align-items: center;
}

.benchmarking-scope-toggle button.is-active {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
  color: #ffffff;
  border-color: #1d4ed8;
}

.benchmarking-table-panel .benchmarking-table-wrap {
  padding-top: 4px;
}

.benchmarking-table__row td:first-child {
  box-shadow: inset 3px 0 0 0 var(--benchmark-accent, #cbd5e1);
}

.benchmarking-table__row--top td {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.08), rgba(255, 255, 255, 0)) !important;
}

.benchmarking-table__row--outlier td {
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.07), rgba(255, 255, 255, 0)) !important;
}

.benchmarking-table__row--top.benchmarking-table__row--outlier td {
  background: linear-gradient(
      90deg,
      rgba(14, 165, 233, 0.08),
      rgba(248, 113, 113, 0.07),
      rgba(255, 255, 255, 0)
    )
    !important;
}

.benchmarking-table__rank-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 112px;
}

.benchmarking-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
}

.benchmarking-rank--gold {
  border-color: #fbbf24;
  background: linear-gradient(145deg, #fefce8, #fefce8);
  color: #92400e;
}

.benchmarking-rank--silver {
  border-color: #cbd5e1;
  background: linear-gradient(145deg, #f8fafc, #e2e8f0);
  color: #334155;
}

.benchmarking-rank--bronze {
  border-color: #fde68a;
  background: linear-gradient(145deg, #fff7ed, #ffedd5);
  color: #713f12;
}

.benchmarking-rank--muted {
  color: #64748b;
  font-weight: 600;
}

.benchmarking-chip {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.benchmarking-chip--top {
  color: #0c4a6e;
  background: #e0f2fe;
  border-color: #bae6fd;
}

.benchmarking-chip--outlier {
  color: #7f1d1d;
  background: #fee2e2;
  border-color: #fecaca;
}

.benchmarking-table__entity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 220px;
}

.benchmarking-table__entity-code {
  font-weight: 700;
  color: #0f172a;
  font-size: 13px;
}

.benchmarking-table__entity-name {
  font-size: 12px;
  color: #64748b;
  white-space: normal;
  line-height: 1.25;
}

.benchmarking-table__metric {
  font-weight: 600;
}

.dashboard-inline-toolbar {
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: var(--bipay-surface);
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--bipay-shadow-sm);
}

.dashboard-inline-toolbar h3 {
  margin: 0;
  font-size: 16px;
}

.dashboard-inline-toolbar p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.dashboard-filters__extra-group {
  display: grid;
  gap: 10px;
  align-items: end;
}

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

.dashboard-filters__extra-group--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-filters__extra-group--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.forecasting-summary {
  display: grid;
  gap: 10px;
}

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

.forecasting-summary__comparison {
  margin: 0;
  font-size: 13px;
  color: #475569;
}

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

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

.forecasting-table-wrap {
  overflow-x: auto;
  padding: 4px 16px 16px;
}

.forecasting-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.forecasting-table th,
.forecasting-table td {
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--bipay-border);
  white-space: nowrap;
}

.forecasting-table th {
  color: #94a3b8;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.forecasting-table td {
  color: var(--bipay-text);
}

.network-chart-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 12px;
}

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

.operational-status {
  display: grid;
  gap: 6px;
  padding: 8px 16px 18px;
}

.operational-status__chart {
  height: 260px;
}

.operational-status__legend {
  list-style: none;
  margin: 0;
  padding: 0 8px;
  display: grid;
  gap: 8px;
}

.operational-status__legend li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.operational-status__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.operational-status__name {
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operational-status__metric {
  color: #64748b;
}

.ranking-table-wrap {
  overflow-x: auto;
  padding: 4px 16px 16px;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ranking-table th,
.ranking-table td {
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--bipay-border);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ranking-table th {
  color: #94a3b8;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ranking-table td {
  color: var(--bipay-text);
}

.ranking-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bipay-table-stripe);
  border-bottom-color: var(--bipay-border);
}

.ranking-table tbody tr:hover td {
  background: var(--bipay-table-hover);
}

.ranking-table tbody tr:nth-child(even) td {
  background: var(--bipay-table-stripe);
}

.ranking-table tbody tr:nth-child(even):hover td {
  background: var(--bipay-table-hover);
}

.benchmarking-table th,
.benchmarking-table td,
.forecasting-table th,
.forecasting-table td {
  font-variant-numeric: tabular-nums;
}

.benchmarking-table thead th,
.forecasting-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bipay-table-stripe);
}

.benchmarking-table tbody tr:nth-child(even) td,
.forecasting-table tbody tr:nth-child(even) td {
  background: var(--bipay-table-stripe);
}

.benchmarking-table tbody tr:hover td,
.forecasting-table tbody tr:hover td {
  background: var(--bipay-table-hover);
}

.ranking-table__empty {
  text-align: center;
  color: #64748b;
}

.ranking-table__skeleton {
  height: 14px;
  width: 100%;
}

.dashboard-state {
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-state p {
  margin: 0;
  font-size: 14px;
}

.dashboard-state--warning {
  border: 1px solid #fde68a;
  background: #fefce8;
  color: #92400e;
}

.dashboard-state--error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    display: block;
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--bipay-border);
    box-shadow: none;
    padding: 12px 14px 14px;
  }

  .app-brand {
    display: none;
  }

  .app-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .app-nav-group {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
  }

  .app-nav-group__label {
    display: none;
  }

  .app-nav a {
    white-space: nowrap;
    font-size: 12px;
    padding: 8px 10px;
  }

  .app-nav-group--reporteria {
    flex-direction: column;
    align-items: stretch;
    min-width: min(280px, 88vw);
  }

  .app-nav-submenu__toggle {
    white-space: nowrap;
    font-size: 12px;
  }

  .app-nav-submenu__link {
    white-space: nowrap;
  }

  .app-content {
    padding: 16px;
  }

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

  .dashboard-filters {
    grid-template-columns: 1fr;
  }

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

  .executive-top-grid {
    grid-template-columns: 1fr;
  }

  .executive-charts-grid {
    grid-template-columns: 1fr;
  }

  .operational-chart-grid {
    grid-template-columns: 1fr;
  }

  .operational-table-grid {
    grid-template-columns: 1fr;
  }

  .network-filters-extra {
    grid-template-columns: 1fr;
  }

  .alerts-filters-extra {
    grid-template-columns: 1fr;
  }

  .dashboard-filters__extra-group,
  .dashboard-filters__extra-group--2,
  .dashboard-filters__extra-group--3,
  .dashboard-filters__extra-group--4 {
    grid-template-columns: 1fr;
  }

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

  .forecasting-chart-grid {
    grid-template-columns: 1fr;
  }

  .forecasting-table-grid {
    grid-template-columns: 1fr;
  }

  .benchmarking-chart-grid {
    grid-template-columns: 1fr;
  }

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

  .benchmarking-table-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-panel__header--row {
    flex-direction: column;
  }

  .dashboard-inline-toolbar {
    flex-direction: column;
  }

  .geospatial-map {
    height: 420px;
  }

  .map-skeleton,
  .map-empty {
    min-height: 420px;
  }

  .geospatial-top-grid {
    grid-template-columns: 1fr;
  }

  .network-chart-grid {
    grid-template-columns: 1fr;
  }

  .network-ranking-grid {
    grid-template-columns: 1fr;
  }

  .map-legend ul {
    grid-template-columns: 1fr;
  }

  .dashboard-state {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-export-actions {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .settings-contract-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .settings-contract-bar select {
    min-width: 0;
    width: 100%;
  }

  .settings-toggle-grid,
  .settings-threshold-grid,
  .settings-form-grid,
  .settings-form-grid--compact {
    grid-template-columns: 1fr;
  }

  .alerts-item__top {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Paraderos (enterprise) */
.stops-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 16px;
  align-items: end;
}

.stops-filters label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bipay-muted);
  letter-spacing: 0.02em;
}

.stops-filters select,
.stops-filters input {
  border: 1px solid var(--bipay-input-border);
  border-radius: 8px;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  background: var(--bipay-surface);
  color: var(--bipay-text);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.stops-filters select:focus-visible,
.stops-filters input:focus-visible {
  outline: none;
  border-color: var(--bipay-accent);
  box-shadow: 0 0 0 3px var(--bipay-accent-soft);
}

.stops-filters__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.stops-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 12px;
  margin-top: 12px;
}

.stops-table-wrap {
  overflow-x: auto;
  padding: 4px 16px 16px;
}

.stops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.stops-table th,
.stops-table td {
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--bipay-border);
}

.stops-table thead th {
  color: #94a3b8;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  background: var(--bipay-table-stripe);
  z-index: 1;
}

.stops-table tbody tr {
  cursor: pointer;
}

.stops-table tbody tr:hover td {
  background: var(--bipay-table-hover);
}

.stops-table tbody tr.is-selected td {
  background: #eff6ff;
}

.stops-table__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  white-space: normal;
}

.stops-table__empty {
  text-align: center;
  color: #64748b;
  padding: 16px 8px;
}

.stops-pagination {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
}

.stops-detail__placeholder {
  margin: 12px;
  color: #64748b;
}

.stops-detail__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 12px 8px;
}

.stops-detail__head h4 {
  margin: 0 0 4px;
}

.stops-detail__sub {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.stops-detail__period {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stops-detail__period label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
}

.stops-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.stops-kpi-value {
  margin: 6px 0 0;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.stops-geo-block,
.stops-tx-block {
  padding: 0 12px 12px;
}

.stops-geo-block h4,
.stops-tx-block h4 {
  margin: 0 0 8px;
}

.stops-geo-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #334155;
  margin-bottom: 8px;
}

.stops-geo-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.geo-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--bipay-border);
  background: var(--bipay-surface);
  font-size: 12px;
  color: var(--bipay-text);
}

.geo-pill--compact {
  padding: 2px 8px;
  font-size: 11px;
}

.geo-pill--muted {
  color: var(--bipay-muted);
  background: var(--bipay-table-stripe);
}

.stops-tx-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: var(--bipay-surface);
  box-shadow: var(--bipay-shadow-sm);
}

.stops-tx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.stops-tx-table th,
.stops-tx-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--bipay-border);
  text-align: left;
}

.stops-tx-table thead th {
  background: var(--bipay-table-stripe);
  color: #94a3b8;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stops-tx-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #64748b;
}

.stops-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}

.stops-modal {
  width: min(520px, 100%);
  background: var(--bipay-surface);
  border-radius: 12px;
  border: 1px solid var(--bipay-border);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12);
  padding: 20px 22px 18px;
}

.stops-modal h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--bipay-text);
}

.stops-modal__body {
  display: grid;
  gap: 14px;
}

.stops-modal__body label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bipay-muted);
  letter-spacing: 0.02em;
}

.stops-modal__body select,
.stops-modal__body input {
  border: 1px solid var(--bipay-input-border);
  border-radius: 8px;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  background: var(--bipay-surface);
  color: var(--bipay-text);
  width: 100%;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.stops-modal__body select:focus-visible,
.stops-modal__body input:focus-visible {
  outline: none;
  border-color: var(--bipay-accent);
  box-shadow: 0 0 0 3px var(--bipay-accent-soft);
}

.stops-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--bipay-border);
}

@media (max-width: 1024px) {
  .stops-filters {
    grid-template-columns: 1fr;
  }

  .stops-layout {
    grid-template-columns: 1fr;
  }

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

/* Reportes enterprise */
.dashboard-filters__field--checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.dashboard-filters__field--checkbox input[type='checkbox'] {
  min-height: auto;
  width: 18px;
  height: 18px;
}

.enterprise-reports-hub__tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  padding: 4px 16px 18px;
}

.enterprise-reports-hub__tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--bipay-border);
  background: var(--bipay-surface);
  text-decoration: none;
  color: var(--bipay-text);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  box-shadow: var(--bipay-shadow-sm);
}

.enterprise-reports-hub__tile:hover {
  border-color: #d1d9e4;
  box-shadow: var(--bipay-shadow-panel);
}

.enterprise-reports-hub__tile.is-active,
.enterprise-reports-hub__tile.active {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow:
    var(--bipay-shadow-sm),
    0 0 0 1px rgba(37, 99, 235, 0.12);
}

.enterprise-reports-hub__tile strong {
  font-size: 14px;
}

.enterprise-reports-hub__tile-slug {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.enterprise-reports-hub__tile-desc {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
  font-weight: 400;
}

.enterprise-reports-module-intro {
  margin: 0;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: var(--bipay-surface);
  box-shadow: var(--bipay-shadow-sm);
}

.enterprise-reports-module-intro__meta {
  font-weight: 500;
  color: #94a3b8;
}

.enterprise-reports-hub__footer {
  margin: 16px 0 0;
}

.enterprise-reports-hub__linkish {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: #2563eb;
  cursor: pointer;
  text-decoration: underline;
}

.enterprise-reports-hub__linkish:disabled {
  color: #94a3b8;
  cursor: not-allowed;
  text-decoration: none;
}

.enterprise-report-catalog__back {
  margin: 0 0 8px;
  font-size: 14px;
}

.enterprise-report-catalog__back a {
  color: #2563eb;
  text-decoration: none;
}

.enterprise-report-catalog__back a:hover {
  text-decoration: underline;
}

.enterprise-report-catalog__export {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: var(--bipay-surface);
  box-shadow: var(--bipay-shadow-sm);
}

.enterprise-report-catalog__export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.enterprise-report-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 4px 16px 18px;
}

.enterprise-report-kpis__meta {
  margin: 8px 0 0;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  line-height: 1.4;
}

.enterprise-report-kpis__meta .is-positive {
  color: #15803d;
}

.enterprise-report-kpis__meta .is-negative {
  color: #b45309;
}

.enterprise-report-catalog--kpi-ventas .dashboard-panel--kpi-ventas {
  border-radius: 14px;
}

.enterprise-report-catalog--kpi-ventas .dashboard-panel__lead {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
  font-weight: 400;
}

.enterprise-report-kpis--wall {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
  padding: 8px 16px 20px;
}

.enterprise-report-kpis__card--rich {
  position: relative;
  padding: 14px 14px 12px;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--bipay-shadow-sm);
}

.enterprise-report-kpis__card--rich .kpi-card__label {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  line-height: 1.3;
}

.enterprise-report-kpis__value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.enterprise-report-kpis__card--rich .kpi-card__value {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.enterprise-report-kpis__delta-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.enterprise-report-kpis__delta-pill--up {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.enterprise-report-kpis__delta-pill--down {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.dashboard-context-summary--kpi-ventas {
  border-radius: 12px;
}

.dashboard-context-summary__note {
  margin: 6px 0 0;
  font-size: 12px;
  color: #64748b;
}

.enterprise-report-catalog--kpi-ventas .enterprise-report-table {
  font-size: 12px;
}

.enterprise-report-catalog--kpi-ventas .enterprise-report-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.enterprise-report-table {
  font-size: 13px;
}

.enterprise-report-table th,
.enterprise-report-table td {
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.enterprise-report-table-group {
  margin-top: 24px;
  padding-top: 4px;
  border-top: 1px solid var(--bipay-border);
}

.enterprise-report-table-group:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.enterprise-report-table-group__title {
  margin: 0 0 12px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

/* Analytic intelligence hub */
.intel-hub .dashboard-panel,
.intel-hero,
.intel-block,
.intel-kpis-panel {
  overflow: visible;
}

.intel-hub .dashboard-panel__header {
  overflow: visible;
}

.intel-panel__sub {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 12.5px;
}

.intel-empty {
  margin: 10px 12px 14px;
  padding: 12px 14px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 10px;
}

.intel-hero__body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  padding: 8px 16px 18px;
  align-items: center;
}

.intel-hero__components-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.intel-donut {
  position: relative;
  display: grid;
  place-items: center;
}

.intel-donut svg {
  display: block;
}

.intel-donut__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.intel-donut__value {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.intel-donut__suffix {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.intel-donut__band {
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.intel-components {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.intel-components__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.intel-components__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.intel-components__label {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.intel-components__value {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
}

.intel-components__weight {
  font-style: normal;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
}

.intel-components__track {
  height: 8px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.intel-components__fill {
  height: 100%;
  border-radius: 999px;
  transition: width 420ms ease-out;
}

.intel-cohort {
  padding: 8px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.intel-cohort__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

.intel-cohort__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.intel-cohort__cohort {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.intel-cohort__stats {
  display: flex;
  gap: 24px;
}

.intel-cohort__stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.intel-cohort__stats span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.intel-cohort__stats strong {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.intel-cohort__track {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.intel-cohort__scale {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: #94a3b8;
  letter-spacing: 0.04em;
}

.intel-cohort__bar {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: visible;
  display: flex;
}

.intel-cohort__zone {
  flex: 1;
  height: 100%;
}

.intel-cohort__zone--low {
  flex: 0 0 25%;
  background: linear-gradient(to right, #fca5a5, #fcd34d);
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.intel-cohort__zone--mid {
  flex: 0 0 50%;
  background: linear-gradient(to right, #fcd34d, #86efac);
}

.intel-cohort__zone--high {
  flex: 0 0 25%;
  background: linear-gradient(to right, #86efac, #15803d);
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.intel-cohort__marker {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid;
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.2);
}

.intel-kpis-panel .intel-kpi-strip {
  padding: 6px 16px 14px;
}

.intel-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px 16px;
  margin: 0;
}

.intel-kpi-strip__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #eef1f5;
  border-radius: 10px;
}

.intel-kpi-strip__value {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.intel-kpi-strip__delta {
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.intel-kpi-strip__delta.is-positive {
  color: #15803d;
}

.intel-kpi-strip__delta.is-negative {
  color: #b91c1c;
}

.intel-kpi-strip__delta.is-flat {
  color: #64748b;
  font-weight: 500;
}

.intel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.intel-block {
  margin: 0;
}

.intel-anomalies {
  list-style: none;
  margin: 0;
  padding: 0 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.intel-anomalies__item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border-left: 3px solid #cbd5e1;
  align-items: flex-start;
}

.intel-anomalies__item--high {
  border-left-color: #b91c1c;
  background: #fef2f2;
}

.intel-anomalies__item--medium {
  border-left-color: #ca8a04;
  background: #fefce8;
}

.intel-anomalies__item--low {
  border-left-color: #2563eb;
  background: #eff6ff;
}

.intel-anomalies__sev {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #e2e8f0;
  color: #334155;
}

.intel-anomalies__sev--high {
  background: #fee2e2;
  color: #7f1d1d;
}

.intel-anomalies__sev--medium {
  background: #fef3c7;
  color: #854d0e;
}

.intel-anomalies__sev--low {
  background: #dbeafe;
  color: #1e40af;
}

.intel-anomalies__body {
  flex: 1 1 auto;
  min-width: 0;
}

.intel-anomalies__detail {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.intel-anomalies__meta {
  margin: 0;
  font-size: 11px;
  color: #64748b;
}

.intel-insights {
  list-style: none;
  margin: 0;
  padding: 0 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.intel-insights__item {
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #eef1f5;
  border-radius: 10px;
}

.intel-insights__cat {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e0e7ff;
  color: #1e3a8a;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.intel-insights__text {
  margin: 0;
  font-size: 13px;
  color: #1f2937;
  line-height: 1.4;
}

.intel-recs-grid {
  list-style: none;
  margin: 0;
  padding: 0 16px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.intel-rec {
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e8ecf1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  border-top-width: 3px;
}

.intel-rec--high {
  border-top-color: #b91c1c;
}

.intel-rec--medium {
  border-top-color: #ca8a04;
}

.intel-rec--low {
  border-top-color: #2563eb;
}

.intel-rec__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.intel-rec__head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.intel-rec__pri {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #e2e8f0;
  color: #334155;
}

.intel-rec__pri--high {
  background: #fee2e2;
  color: #7f1d1d;
}

.intel-rec__pri--medium {
  background: #fef3c7;
  color: #854d0e;
}

.intel-rec__pri--low {
  background: #dbeafe;
  color: #1e40af;
}

.intel-rec p {
  margin: 0;
  font-size: 12.5px;
  color: #334155;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .intel-hero__body {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .intel-cohort__head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Enterprise product shell */
.enterprise-page .page-header p {
  color: var(--bipay-muted);
  max-width: 68ch;
}

/* Hub analítica: enlaces rápidos sin padding superior duplicado */
.analitica-hub .enterprise-reports-hub__tiles {
  padding-top: 0;
}

/* Ritmo vertical homogéneo en hubs (además de .dashboard-page) */
.intel-hub.dashboard-page,
.analitica-hub.dashboard-page {
  align-content: start;
}

.dashboard-persist-hint {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--bipay-border);
  background: var(--bipay-table-stripe);
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
}

.export-provenance-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--bipay-muted);
  max-width: 72ch;
}

.export-provenance-note strong {
  color: #334155;
}

.enterprise-muted-inline {
  margin: 0;
  font-size: 12px;
  color: var(--bipay-muted);
}

.enterprise-inline-tools {
  margin: -4px 0 14px;
  font-size: 14px;
}

.enterprise-inline-tools a {
  color: var(--bipay-accent);
  text-decoration: none;
}

.enterprise-inline-tools a:hover {
  text-decoration: underline;
}

.enterprise-kpi-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: var(--bipay-radius);
  border: 1px solid var(--bipay-border);
  background: var(--bipay-surface);
}

.enterprise-kpi-strip__item {
  min-width: 120px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.enterprise-kpi-strip__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bipay-muted);
  margin-bottom: 4px;
}

.enterprise-kpi-strip__value {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--bipay-text);
}

.enterprise-kpi-strip__value--critical {
  color: #b91c1c;
}

.enterprise-kpi-strip__value--warning {
  color: #b45309;
}

/* Maestros ETL · Empresas */
.etl-empresas-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.etl-empresas-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr auto;
  align-items: end;
  gap: 20px;
  padding: 16px 18px;
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.etl-empresas-toolbar--wide {
  grid-template-columns: minmax(220px, 280px) minmax(220px, 320px) 1fr auto;
}

.etl-empresas-toolbar__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.etl-empresas-toolbar__field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--bipay-border);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: #0f172a;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}

.etl-empresas-toolbar__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
  padding-bottom: 6px;
}

.etl-empresas-toolbar__meta strong {
  color: #0f172a;
  font-weight: 600;
}

.etl-empresas-toolbar__actions {
  display: flex;
  gap: 8px;
}

.etl-empresas-hint {
  margin: -4px 2px 0;
  font-size: 13px;
  color: #64748b;
}

.etl-empresas-table {
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: visible;
}

.etl-empresas-table .ranking-table {
  position: relative;
}

.etl-empresas-table .ranking-table tbody td {
  position: relative;
  isolation: isolate;
}

.etl-empresas-table .ranking-table tbody td:has(.ss-select--open) {
  z-index: 100;
}

.etl-empresas-table .ss-select {
  position: relative;
}

.etl-empresas-table .ss-select__panel {
  position: absolute;
  z-index: 1000;
  background: #fff;
}

.etl-empresas-table.ranking-table-wrap,
.etl-empresas-table .ranking-table-wrap {
  overflow: visible;
}

.etl-empresas-table .ranking-table {
  overflow: visible;
}

.etl-empresas-table .ranking-table thead th {
  position: static;
}

.etl-master-form {
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 18px 20px;
  display: grid;
  gap: 14px;
}

.etl-master-form__head h3 {
  margin: 0 0 2px;
  font-size: 16px;
  color: var(--bipay-text);
}

.etl-master-form__head p {
  margin: 0;
  font-size: 12.5px;
  color: #64748b;
}

.etl-master-form__grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.etl-master-form__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.etl-master-form__field input,
.etl-master-form__field select {
  padding: 8px 10px;
  border: 1px solid var(--bipay-border);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: var(--bipay-text);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.etl-master-form__field input:focus,
.etl-master-form__field select:focus {
  outline: none;
  border-color: var(--bipay-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.etl-master-form__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}

.etl-city-select {
  padding: 6px 10px;
  border: 1px solid var(--bipay-border);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: var(--bipay-text);
  min-width: 160px;
}

.etl-city-select:focus {
  outline: none;
  border-color: var(--bipay-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.etl-city-select:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.etl-empresas-table .ranking-table th.is-numeric,
.etl-empresas-table .ranking-table td.is-numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.etl-empresas-table .ranking-table thead th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 14px;
}

.etl-empresas-table .ranking-table tbody td {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--bipay-text);
  border-bottom: 1px solid #f1f5f9;
}

.etl-empresas-table .ranking-table tbody tr:last-child td {
  border-bottom: none;
}

.etl-empresas-table .ranking-table tbody tr:hover td {
  background: #fafbfd;
}

.etl-empresas-actions {
  text-align: right;
  white-space: nowrap;
}

.etl-empresas-actions__group {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.etl-empresas-actions a,
.etl-empresas-actions button {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.etl-empresas-actions a:hover,
.etl-empresas-actions button:hover {
  background: #e2e8f0;
  color: var(--bipay-accent);
  text-decoration: none;
}

.etl-empresas-actions button[data-variant='danger']:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.etl-empresas-actions__group {
  display: inline-flex;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
}

.etl-bus-types-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.etl-bus-types-form input[type='text'],
.etl-bus-types-form input[type='number'] {
  min-width: 160px;
  padding: 8px 10px;
  border: 1px solid var(--bipay-border);
  border-radius: 8px;
  font-size: 14px;
}

.etl-bus-types-actions {
  white-space: nowrap;
  text-align: right;
}

.etl-bus-types-actions .linkish {
  margin-left: 10px;
}

.etl-bus-types-actions .linkish.danger {
  color: #b91c1c;
}

.etl-buses-assign-cell {
  vertical-align: middle;
  min-width: 200px;
}

.etl-buses-type-select {
  width: 100%;
  max-width: 280px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--bipay-border);
  font-size: 13px;
}

/* Badge estado KMZ por variante */
.etl-variantes-kmz-cell {
  white-space: nowrap;
}

.kmz-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.kmz-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.kmz-badge--ok {
  color: #15803d;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.kmz-badge--missing {
  color: #92400e;
  background: #fefce8;
  border-color: #fde68a;
}

.etl-empresas-table .ranking-table tbody tr.is-kmz-missing td:not(.etl-variantes-kmz-cell):not(.etl-empresas-actions):not(.etl-variantes-stops-cell) {
  color: #64748b;
}

/* Badge de cantidad de paraderos por variante */
.etl-variantes-stops-cell {
  white-space: nowrap;
}

.stops-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
}

.stops-badge--empty {
  color: #64748b;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.analytics-reports-hub__badge {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  padding: 2px 6px;
  border-radius: 999px;
}

.analytics-reports-hub__section--org-ia {
  margin-bottom: 4px;
}

.analytics-reports-hub__section--kpi-ventas {
  margin-top: 20px;
}

.analytics-reports-hub__section--ventas {
  margin-top: 20px;
}

.enterprise-reports-hub__tile {
  position: relative;
}

.ventas-report-page .variant-stats-strip {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.ventas-report__period-hint {
  margin: 0 0 4px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

.ventas-report__period-hint strong {
  color: #0f172a;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ventas-report__section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.ventas-report__section-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0f172a;
}

.ventas-report__section-desc {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
  max-width: 720px;
}

.ventas-report__kpis > div {
  gap: 4px;
}

.ventas-report__kpi-dd {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.ventas-report__kpi-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
}

.ventas-report__kpi-ant {
  font-weight: 500;
}

.ventas-report__charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.ventas-report__chart-card {
  padding: 14px 16px;
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: var(--bipay-surface);
  box-shadow: var(--bipay-shadow-sm);
}

.ventas-report__chart-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.ventas-report__chart-sub {
  margin: 0 0 10px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.ventas-report__chart-inner {
  width: 100%;
  min-height: 240px;
}

.ventas-report__chart-skeleton {
  min-height: 220px;
  border-radius: 8px;
}

.ventas-report__chart-empty {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
  font-style: italic;
  padding: 24px 8px;
  text-align: center;
}

.ventas-report__rankings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.ventas-report__ranking-card {
  padding: 14px 16px;
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: var(--bipay-surface);
  box-shadow: var(--bipay-shadow-sm);
}

.ventas-report__mini-table {
  margin-top: 8px;
  font-size: 13px;
}

.ventas-report__rankings-caption {
  margin: 16px 0 4px;
}

/* Operación por empresa */
.operacion-empresa-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.operacion-empresa__kpis {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.operacion-empresa__kpis > div {
  gap: 4px;
}

.operacion-empresa__period-hint {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

.operacion-empresa__period-hint strong {
  color: #0f172a;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.operacion-empresa__block-desc--tight {
  margin-bottom: 8px;
  margin-top: 2px;
}

.demanda-transporte-page .demanda-section-title {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}

.demanda-horaria-panel {
  padding: 14px;
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: var(--bipay-surface);
  box-shadow: var(--bipay-shadow-sm);
}

.demanda-horaria-panel h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: #0f172a;
}

.demanda-horaria__bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  min-height: 140px;
  padding-top: 8px;
  overflow-x: auto;
}

.demanda-horaria__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 14px;
}

.demanda-horaria__pasajes-totals {
  margin: 0 0 10px;
  font-size: 12px;
  color: #334155;
  line-height: 1.45;
}

.demanda-horaria__pasajes-totals-label {
  color: #64748b;
  font-weight: 600;
}

.demanda-horaria__pasajes-line strong {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #0f172a;
}

.demanda-horaria__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 8px;
  font-size: 11px;
  color: #475569;
  font-weight: 600;
}

.demanda-horaria__legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.demanda-horaria__swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.demanda-horaria__swatch--estudiante {
  background: linear-gradient(180deg, #1d4ed8 0%, #3b82f6 100%);
}

.demanda-horaria__swatch--normal {
  background: linear-gradient(180deg, #ca8a04 0%, #eab308 100%);
}

.demanda-horaria__swatch--adulto {
  background: linear-gradient(180deg, #6d28d9 0%, #a855f7 100%);
}

.demanda-horaria__swatch--otros {
  background: linear-gradient(180deg, #475569 0%, #94a3b8 100%);
}

.demanda-horaria__bar-wrap {
  width: 100%;
  height: 110px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.demanda-horaria__stack {
  display: flex;
  flex-direction: column-reverse;
  width: 100%;
  max-width: 18px;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px #0f172a0a;
}

.demanda-horaria__seg {
  display: block;
  width: 100%;
  min-height: 0;
  flex: 0 0 auto;
}

.demanda-horaria__seg--estudiante {
  background: linear-gradient(180deg, #1d4ed8 0%, #3b82f6 100%);
}

.demanda-horaria__seg--normal {
  background: linear-gradient(180deg, #ca8a04 0%, #eab308 100%);
}

.demanda-horaria__seg--adulto {
  background: linear-gradient(180deg, #6d28d9 0%, #a855f7 100%);
}

.demanda-horaria__seg--otros {
  background: linear-gradient(180deg, #475569 0%, #94a3b8 100%);
}

.demanda-horaria__seg--empty {
  flex: 1 1 auto;
  min-height: 2px;
  background: #e2e8f0;
}

.demanda-horaria__label {
  font-size: 9px;
  color: #64748b;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.operacion-empresa__delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  align-self: flex-start;
  font-variant-numeric: tabular-nums;
}

.operacion-empresa__delta--up {
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #86efac;
}

.operacion-empresa__delta--down {
  color: #991b1b;
  background: #fff;
  border: 1px solid #fecaca;
}

.operacion-empresa__delta--flat {
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.operacion-empresa__delta--compact {
  font-size: 10px;
  padding: 1px 5px;
  gap: 2px;
}

.operacion-empresa__delta-prev {
  font-weight: 500;
  color: inherit;
  opacity: 0.75;
}

.operacion-empresa__map-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: var(--bipay-surface);
  box-shadow: var(--bipay-shadow-sm);
}

.operacion-empresa__map-toolbar {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #475569;
}

.operacion-empresa__map-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.operacion-empresa__map-hint {
  margin-left: auto;
  font-size: 12px;
  color: #64748b;
}

.operacion-empresa__map-wrap {
  position: relative;
}

.operacion-empresa__map {
  height: 560px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--bipay-border);
}

.operacion-empresa__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
  font-size: 12px;
  color: #475569;
}

.operacion-empresa__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.operacion-empresa__legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.operacion-empresa__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.operacion-empresa__panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: var(--bipay-surface);
  box-shadow: var(--bipay-shadow-sm);
  min-width: 0;
}

.operacion-empresa__panel h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f172a;
}

.operacion-empresa__panel .ranking-table {
  font-size: 13px;
}

.operacion-empresa__table-foot td {
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
  background: #f1f5f9;
  border-top: 2px solid #e2e8f0;
  padding-top: 10px;
  padding-bottom: 10px;
}

.operacion-empresa__table-foot td.is-numeric {
  font-variant-numeric: tabular-nums;
}

.operacion-empresa__table-foot--prev td {
  font-weight: 500;
  font-size: 12px;
  color: #64748b;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
  padding-bottom: 8px;
}

.operacion-empresa__metric-prev {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  color: #64748b;
}

/* Serie diaria como barras horizontales compactas */
.operacion-empresa__daily {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px 10px;
  align-items: center;
  font-size: 12px;
  color: #475569;
  font-variant-numeric: tabular-nums;
}

.operacion-empresa__daily-bar {
  height: 10px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.operacion-empresa__daily-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  border-radius: 999px;
}

.operacion-empresa__daily-value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.operacion-empresa__daily-count {
  color: #0f172a;
  font-weight: 600;
}

.operacion-empresa__daily-compare {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
}

.operacion-empresa__daily-empty {
  grid-column: 1 / -1;
  color: #94a3b8;
  font-style: italic;
  padding: 12px;
  text-align: center;
}

.operacion-empresa__daily-total {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  color: #475569;
}

.operacion-empresa__daily-total-label {
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}

.operacion-empresa__daily-total-values {
  font-variant-numeric: tabular-nums;
}

.operacion-empresa__daily-total-values strong {
  color: #0f172a;
  font-weight: 700;
}

.operacion-empresa__daily-total--compare {
  background: #fff;
  border-style: dashed;
}

.operacion-empresa__daily-total-deltas {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-left: 4px;
  font-weight: 500;
  color: #64748b;
  vertical-align: baseline;
}

@media (max-width: 960px) {
  .operacion-empresa__grid {
    grid-template-columns: 1fr;
  }
  .operacion-empresa__map {
    height: 420px;
  }
}

/* Gestión operacional */
.gestion-operacional-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gestion-op__methodology,
.operacion-empresa__methodology {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0 14px;
  background: #f8fafc;
}

.gestion-op__methodology summary,
.operacion-empresa__methodology summary {
  cursor: pointer;
  padding: 12px 0;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  list-style-position: outside;
}

.gestion-op__methodology-body,
.operacion-empresa__methodology-body {
  padding: 0 0 14px;
  font-size: 12px;
  line-height: 1.5;
  color: #475569;
}

.gestion-op__methodology-body p,
.operacion-empresa__methodology-body p {
  margin: 0 0 10px;
  max-width: 88ch;
}

.gestion-op__methodology-body ul,
.operacion-empresa__methodology-body ul {
  margin: 0;
  padding-left: 1.15rem;
}

.gestion-op__methodology-body li,
.operacion-empresa__methodology-body li {
  margin-bottom: 6px;
}

.gestion-op__methodology-body code,
.operacion-empresa__methodology-body code {
  font-size: 11px;
  background: #e2e8f0;
  padding: 1px 5px;
  border-radius: 4px;
}

.gestion-op__block-desc,
.operacion-empresa__block-desc {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
  max-width: 88ch;
}

.gestion-op__block-desc--tight {
  margin-bottom: 8px;
  margin-top: 4px;
}

.gestion-op__kpi-section .gestion-op__block-desc {
  margin-bottom: 10px;
}

.operacion-empresa__kpi-section .operacion-empresa__block-desc {
  margin-bottom: 10px;
}

.gestion-op__kpi-sub {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  margin-left: 4px;
}

.gestion-op__pct {
  font-size: 11px;
  font-weight: 700;
  color: #16a34a;
  padding: 2px 6px;
  border-radius: 999px;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  align-self: flex-start;
}

.gestion-op__pct.is-warn {
  color: #b45309;
  background: #fefce8;
  border-color: #fde68a;
}

.gestion-op__cumplimiento {
  padding: 12px 14px;
}

.gestion-op__cumplimiento-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #475569;
  padding: 3px 0;
}

.gestion-op__cumplimiento-date {
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  font-weight: 600;
}

.gestion-op__cumplimiento-stats strong {
  color: #0f172a;
  font-weight: 600;
}

.gestion-op__cumplimiento-sep {
  color: #cbd5e1;
  margin: 0 2px;
}

.operacion-empresa__panel--span2 {
  grid-column: 1 / -1;
}

.gestion-op__panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.gestion-op__panel-header h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f172a;
}

.gestion-op__filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.gestion-op__row-inactive td {
  color: #94a3b8;
}

.gestion-op__badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gestion-op__badge--ghost {
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.gestion-op__badge--warn {
  color: #92400e;
  background: #fefce8;
  border: 1px solid #fde68a;
}

.gestion-op__skeleton {
  height: 120px;
}

dd.is-alert {
  color: #b91c1c;
}

.etl-empresas-table .ranking-table tbody tr.has-off-route-alert td:not(.etl-empresas-actions) {
  box-shadow: inset 3px 0 0 #eab308;
}

.etl-variantes-off-route-cell {
  white-space: nowrap;
}

.off-route-cell-placeholder {
  color: #94a3b8;
  font-weight: 600;
}

.off-route-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.off-route-badge--alert {
  color: #713f12;
  background: #ffedd5;
  border: 1px solid #fde68a;
}

/* Variant Map Page */
.variant-map-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* Alto principal del mapa + panel de paraderos (viewport, con tope para pantallas grandes). */
  --variant-map-main-height: min(82vh, 980px);
}

.variant-map-toolbar {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: var(--bipay-surface);
  box-shadow: var(--bipay-shadow-sm);
}

.variant-map-toolbar__actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.variant-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 420px);
  gap: 16px;
  align-items: stretch;
  min-height: 0;
}

.variant-map-wrap {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.variant-map-wrap__hint {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

.variant-map {
  height: var(--variant-map-main-height);
  min-height: 560px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--bipay-border);
}

/* Stats strip de la variante */
.variant-stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: var(--bipay-surface);
  box-shadow: var(--bipay-shadow-sm);
}

.variant-stats-strip > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.variant-stats-strip dt {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Etiqueta KPI con icono (i) y tooltip al hover/focus */
.kpi-metric-label {
  margin: 0;
}

.kpi-metric-label__row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}

.kpi-metric-label__text {
  min-width: 0;
}

.kpi-metric-label__trigger-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
}

.kpi-metric-label__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  cursor: help;
  line-height: 0;
  vertical-align: middle;
}

.kpi-metric-label__btn:hover,
.kpi-metric-label__btn:focus-visible {
  color: #64748b;
  background: rgba(100, 116, 139, 0.12);
  outline: none;
}

.kpi-metric-label__icon {
  display: block;
}

.kpi-metric-label__tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 1000;
  min-width: 240px;
  max-width: min(420px, 90vw);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--bipay-border);
  background: var(--bipay-surface);
  box-shadow: var(--bipay-shadow-sm);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  color: #334155;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.kpi-metric-label__block + .kpi-metric-label__block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.kpi-metric-label__tooltip-label {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.kpi-metric-label__tooltip-text {
  margin: 0;
  font-weight: 500;
  color: #334155;
}

.kpi-metric-label__trigger-wrap:hover .kpi-metric-label__tooltip,
.kpi-metric-label__trigger-wrap:focus-within .kpi-metric-label__tooltip {
  opacity: 1;
  visibility: visible;
}

/* Cuando el KPI está cerca del borde derecho (últimas 2 columnas), alinear tooltip a la derecha. */
:is([style*="grid-template-columns"]) > :nth-last-child(-n+2) .kpi-metric-label__tooltip {
  left: auto;
  right: 0;
}

.variant-stats-strip dd {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

/* Marker endpoints A (inicio) / B (fin) */
.variant-endpoint-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.35);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.variant-endpoint-marker--start {
  background: #16a34a;
}

.variant-endpoint-marker--end {
  background: #dc2626;
}

.variant-endpoint-marker span {
  display: block;
  width: 100%;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  transform: translateY(5px);
}

/* Flechas de dirección a lo largo de la ruta */
.variant-route-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.variant-route-arrow span {
  display: inline-block;
  color: #2563eb;
  font-size: 12px;
  line-height: 1;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff;
  transform-origin: 50% 50%;
}

/* KPIs del panel de paraderos */
.variant-stops-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.variant-stops-kpis > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.variant-stops-kpis dt {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.variant-stops-kpis dd {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.variant-stops-kpis dd.is-alert {
  color: #b91c1c;
}

.variant-stops-list__item.is-off-track {
  border-color: #fde68a;
  background: #fefce8;
}

.variant-stops-list__offtrack {
  margin-left: 6px;
}

/* Marker numerado */
.variant-stop-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: #2563eb;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.35);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.variant-stop-marker span {
  display: block;
  width: 100%;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transform: translateY(4px);
}

/* Panel de paraderos */
.variant-stops-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: var(--bipay-surface);
  box-shadow: var(--bipay-shadow-sm);
  /* Misma altura que `.variant-map`; la lista interior scrollea. */
  max-height: var(--variant-map-main-height);
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.variant-stops-panel__header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.variant-stops-panel__header h3 {
  flex: 1 1 auto;
}

.variant-stops-panel__add-toggle {
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.variant-stops-panel__add-toggle:hover {
  background: #f1f5f9;
}

.variant-stops-panel__add-toggle[aria-expanded='true'] {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.variant-stops-panel__header h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f172a;
}

.variant-stops-panel__count {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 999px;
}

.variant-stops-list {
  list-style: none;
  padding: 0 2px 4px 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
}

.variant-stops-list__item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

.variant-stops-list__seq {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.variant-stops-list__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 2px;
  min-width: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 4px;
}

.variant-stops-list__info:hover {
  background: #f1f5f9;
}

.variant-stops-list__info:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.variant-stops-list__info strong {
  color: #0f172a;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.variant-stops-list__meta {
  color: #64748b;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.variant-stops-list__actions {
  display: flex;
  gap: 4px;
}

.variant-stops-list__action {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}

.variant-stops-list__action--up {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.variant-stops-list__action--down {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

.variant-stops-list__action--edit {
  background: #fef9c3;
  border-color: #fde047;
  color: #854d0e;
}

.variant-stops-list__action--remove {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #9f1239;
}

.variant-stops-list__action:hover:not(:disabled) {
  filter: brightness(0.94);
}

.variant-stops-list__action:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.variant-stops-list__action:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.variant-stops-list__empty {
  padding: 12px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.variant-stops-list__skeleton {
  height: 40px;
}

.variant-stops-list__edit {
  grid-column: 2 / span 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.variant-stops-list__edit input,
.variant-stops-form input {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
  width: 100%;
}

.variant-stops-list__edit-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.variant-stops-list__edit-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.variant-stops-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  flex: 0 0 auto;
}

.variant-stops-form__header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.variant-stops-form h4 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f172a;
}

.variant-stops-form__hint {
  margin: 0;
  font-size: 11px;
  color: #64748b;
}

/* Grid compacto 3 columnas: código/nombre/lat/lng/radio/sec/botón */
.variant-stops-form__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.variant-stops-form__code {
  grid-column: span 1;
}

.variant-stops-form__name {
  grid-column: span 2;
}

.variant-stops-form__lat,
.variant-stops-form__lng,
.variant-stops-form__radius,
.variant-stops-form__seq {
  grid-column: span 1;
}

.variant-stops-form__grid > button {
  grid-column: 1 / -1;
  width: 100%;
}

.variant-stops-form input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
  background: #fff;
  color: #0f172a;
}

.variant-stops-list__edit-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.variant-stops-list__edit-field input {
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: #0f172a;
  font-size: 13px;
}

.variant-stops-list__meta--coords {
  font-size: 10px;
  color: #94a3b8;
}

@media (max-width: 1200px) {
  .variant-map-layout {
    grid-template-columns: 1fr;
  }
  .variant-stops-panel {
    max-height: none;
    overflow: visible;
  }
  .variant-stops-list {
    overflow: visible;
  }
}

@media (max-width: 768px) {
  .variant-map-page {
    --variant-map-main-height: min(46vh, 440px);
  }

  .variant-map {
    min-height: 320px;
  }

  .variant-stops-panel {
    min-height: 0;
  }

  .variant-map-toolbar__actions {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .etl-empresas-toolbar,
  .etl-empresas-toolbar--wide {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .etl-empresas-toolbar__actions {
    justify-content: flex-end;
  }
}

/* ============================================================
   KPI VENTAS · Dashboard sobrio (Variantes / Buses / Empresas)
   Reutiliza variant-stats-strip + KpiMetricLabel + operacion-empresa__delta
   ============================================================ */

.kpi-ventas-dashboard {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 14px;
}

.kpi-ventas-dashboard__skeleton {
  height: 320px;
  border-radius: 12px;
}

.kpi-ventas__kpi-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kpi-ventas__kpi-section .demanda-section-title {
  margin: 0 0 2px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}

.kpi-ventas__stats {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.kpi-ventas__panel {
  padding: 14px 16px 16px;
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  background: var(--bipay-surface);
  box-shadow: var(--bipay-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kpi-ventas__panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.kpi-ventas__panel-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.005em;
}

.kpi-ventas__panel-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.kpi-ventas__panel-meta {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  padding: 3px 9px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  white-space: nowrap;
  align-self: flex-start;
}

.kpi-ventas__empty {
  margin: 10px 0 0;
  font-size: 13px;
  color: #94a3b8;
  padding: 14px 0;
  text-align: center;
}

/* ============================================================
   Mix EMV vs Pago — panel rediseñado
   ============================================================ */
.kpi-ventas__mix-panel {
  gap: 14px;
}

/* Chip "Top N ... N% del recaudo" — va alineado a la derecha del header */
.kpi-ventas__mix-pareto-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 12px;
  color: #475569;
  white-space: nowrap;
  align-self: flex-start;
}

.kpi-ventas__mix-pareto-chip strong {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.kpi-ventas__mix-pareto-chip small {
  font-size: 11px;
  color: #94a3b8;
}

.kpi-ventas__mix-pareto-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
}

/* Dos tarjetas KPI (EMV / Pago) lado a lado */
.kpi-ventas__mix-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.kpi-ventas__mix-card {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.kpi-ventas__mix-card--emv {
  --mix-card-accent: #3b5bdb;
  --mix-card-accent-deep: #1e3a8a;
}

.kpi-ventas__mix-card--pago {
  --mix-card-accent: #0e7490;
  --mix-card-accent-deep: #155e75;
}

.kpi-ventas__mix-card--dominant {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-color: color-mix(in srgb, var(--mix-card-accent) 45%, #e2e8f0);
  box-shadow: 0 4px 14px -8px color-mix(in srgb, var(--mix-card-accent) 55%, transparent);
}

.kpi-ventas__mix-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.kpi-ventas__mix-card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mix-card-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mix-card-accent) 18%, transparent);
  flex-shrink: 0;
}

.kpi-ventas__mix-card-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  flex: 1;
}

.kpi-ventas__mix-card-pct {
  font-size: 14px;
  font-weight: 700;
  color: var(--mix-card-accent-deep);
  font-variant-numeric: tabular-nums;
}

.kpi-ventas__mix-card-value {
  margin: 2px 0 0;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.kpi-ventas__mix-card-hint {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: #94a3b8;
}

/* Barra apilada con dos segmentos separados por un pequeño hueco */
.kpi-ventas__mix-bar {
  display: flex;
  gap: 3px;
  height: 18px;
  border-radius: 999px;
  background: transparent;
  border: none;
  overflow: visible;
  padding: 0;
}

.kpi-ventas__mix-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: width 0.3s ease-out;
  white-space: nowrap;
  overflow: hidden;
  border-radius: 999px;
}

.kpi-ventas__mix-seg strong {
  font-weight: 700;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.kpi-ventas__mix-seg--emv {
  background: linear-gradient(90deg, #1e3a8a 0%, #3b5bdb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.kpi-ventas__mix-seg--pago {
  background: linear-gradient(90deg, #0e7490 0%, #0891b2 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.kpi-ventas__mix-axis {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  padding: 0 2px;
  margin-top: -2px;
}

@media (max-width: 620px) {
  .kpi-ventas__mix-cards {
    grid-template-columns: 1fr;
  }
  .kpi-ventas__mix-card-value {
    font-size: 20px;
  }
}

/* --- Charts row --- */
.kpi-ventas__charts {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}

@media (max-width: 1080px) {
  .kpi-ventas__charts {
    grid-template-columns: 1fr;
  }
}

.kpi-ventas__panel--pareto,
.kpi-ventas__panel--donut {
  min-height: 320px;
}

/* --- Ranking table --- */
.kpi-ventas__ranking-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--bipay-border);
}

.kpi-ventas__ranking-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  background: #ffffff;
}

.kpi-ventas__ranking-table thead th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--bipay-border);
  white-space: pre-line;
  line-height: 1.2;
}

.kpi-ventas__ranking-table tbody td {
  padding: 5px 8px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.25;
  white-space: pre-line;
}

.kpi-ventas__ranking-table tbody tr:hover {
  background: #f8fafc;
}

.kpi-ventas__ranking-table tbody tr:last-child td {
  border-bottom: none;
}

.kpi-ventas__ranking-table .is-numeric,
.kpi-ventas__ranking-table thead th.is-numeric {
  text-align: right;
}

.kpi-ventas__col-rank {
  width: 46px;
  text-align: center;
}

.kpi-ventas__rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
}

.kpi-ventas__ranking-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 160px;
}

.kpi-ventas__ranking-label strong {
  font-weight: 600;
  color: #0f172a;
  font-size: 13px;
}

.kpi-ventas__ranking-sublabel {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.kpi-ventas__participation {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
}

.kpi-ventas__participation-bar {
  flex: 1;
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.kpi-ventas__participation-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #1e3a8a 0%, #3b5bdb 100%);
  border-radius: 999px;
}

.kpi-ventas__participation-label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  min-width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Armonización: cuando una .ranking-table (o enterprise-report-table)
   queda dentro de un .kpi-ventas__panel (Ventas / OperaciónEmpresa
   / Gestión operacional / Demanda), se alinea al look del dashboard
   KPI Ventas: sin zebra, cabeceras claras, hover sutil.
   ============================================================ */
.kpi-ventas__panel .ranking-table,
.kpi-ventas__panel .enterprise-report-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 13px;
  background: #ffffff;
  border: 1px solid var(--bipay-border);
  border-radius: 10px;
  overflow: hidden;
}

.kpi-ventas__panel .ranking-table thead th,
.kpi-ventas__panel .enterprise-report-table thead th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--bipay-border);
  white-space: nowrap;
}

.kpi-ventas__panel .ranking-table tbody td,
.kpi-ventas__panel .enterprise-report-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  background: #ffffff;
}

/* Anula el zebra heredado para que quede igual que en KPI Ventas */
.kpi-ventas__panel .ranking-table tbody tr:nth-child(even) td,
.kpi-ventas__panel .enterprise-report-table tbody tr:nth-child(even) td {
  background: #ffffff;
}

.kpi-ventas__panel .ranking-table tbody tr:hover td,
.kpi-ventas__panel .enterprise-report-table tbody tr:hover td,
.kpi-ventas__panel .ranking-table tbody tr:nth-child(even):hover td,
.kpi-ventas__panel .enterprise-report-table tbody tr:nth-child(even):hover td {
  background: #f8fafc;
}

.kpi-ventas__panel .ranking-table tbody tr:last-child td,
.kpi-ventas__panel .enterprise-report-table tbody tr:last-child td {
  border-bottom: none;
}

.kpi-ventas__panel .ranking-table .is-numeric,
.kpi-ventas__panel .enterprise-report-table .is-numeric,
.kpi-ventas__panel .ranking-table thead th.is-numeric,
.kpi-ventas__panel .enterprise-report-table thead th.is-numeric {
  text-align: right;
}

/* Cabecera de panel heredada: títulos en sentence-case (no uppercase) */
.kpi-ventas__panel .operacion-empresa__panel-header h3,
.kpi-ventas__panel.operacion-empresa__panel h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.005em;
  text-transform: none;
  color: #0f172a;
}

/* ============================================================
   Columna y botón de expandir para drill-down por variante.
   Diseño: pastilla accent circular con chevron nítido y rotación
   al abrir para que el operador identifique de un vistazo qué
   filas son expansibles y cuál está abierta.
   ============================================================ */
.kpi-ventas__col-expand {
  width: 44px;
  text-align: center;
  padding: 6px 4px !important;
}

.kpi-ventas__expand-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #cfd8e3;
  background: var(--bipay-surface);
  color: var(--bipay-accent);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.kpi-ventas__expand-btn > span {
  display: inline-flex;
  transition: transform 180ms ease;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.kpi-ventas__expand-btn:hover {
  background: var(--bipay-accent-soft);
  border-color: var(--bipay-accent);
  color: var(--bipay-accent);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.18);
}

.kpi-ventas__expand-btn:focus-visible {
  outline: none;
  border-color: var(--bipay-accent);
  box-shadow: 0 0 0 3px var(--bipay-accent-soft);
}

.kpi-ventas__expand-btn.is-open {
  background: var(--bipay-accent);
  border-color: var(--bipay-accent);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.kpi-ventas__expand-btn.is-open > span {
  transform: rotate(90deg);
}

.kpi-ventas__ranking-row--expanded > td {
  background: #eff4ff;
}

/* Panel del drill-down por variante */
.kpi-ventas__ranking-drill > td {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 0 !important;
}

.kpi-ventas__drill-panel {
  padding: 14px 16px 18px;
  border-left: 4px solid var(--bipay-accent);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5ff 100%);
}

.kpi-ventas__drill-panel--loading,
.kpi-ventas__drill-panel--error,
.kpi-ventas__drill-panel--empty {
  padding: 18px 16px;
  color: var(--bipay-muted);
  font-size: 13px;
}

.kpi-ventas__drill-skeleton {
  height: 64px;
  border-radius: 8px;
}

.kpi-ventas__drill-retry {
  margin-top: 8px;
  padding: 6px 12px;
  border: 1px solid var(--bipay-border);
  background: var(--bipay-surface);
  color: var(--bipay-accent);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}

.kpi-ventas__drill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.kpi-ventas__drill-head h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--bipay-text);
}

.kpi-ventas__drill-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--bipay-muted);
  background: var(--bipay-surface);
  border: 1px solid var(--bipay-border);
  border-radius: 999px;
  padding: 3px 10px;
}

.kpi-ventas__drill-table-wrap {
  overflow-x: auto;
  background: var(--bipay-surface);
  border: 1px solid var(--bipay-border);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.kpi-ventas__drill-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.kpi-ventas__drill-table thead th {
  text-align: left;
  padding: 8px 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bipay-muted);
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  white-space: nowrap;
}

.kpi-ventas__drill-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  vertical-align: middle;
}

.kpi-ventas__drill-table tbody tr:last-child td {
  border-bottom: none;
}

.kpi-ventas__drill-table .is-numeric,
.kpi-ventas__drill-table thead th.is-numeric {
  text-align: right;
}

/* Chip "NUEVO" cuando el paradero no tenía ventas en el periodo anterior */
.kpi-ventas__delta-new {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

@media (max-width: 780px) {
  .kpi-ventas__panel-head {
    flex-direction: column;
    gap: 6px;
  }

  .kpi-ventas__mix-legend {
    flex-direction: column;
    gap: 6px;
  }
}

/* ============================================================
   SearchableSelect (Select2-like, sobrio y moderno)
   ============================================================ */

.ss-select {
  position: relative;
  width: 100%;
  font-size: 14px;
  color: var(--bipay-text);
}

.ss-select__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 6px 10px 6px 12px;
  background: var(--bipay-surface);
  border: 1px solid var(--bipay-input-border);
  border-radius: 8px;
  color: var(--bipay-text);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.ss-select__trigger:hover:not(:disabled) {
  border-color: #d1d9e4;
}

.ss-select--open .ss-select__trigger {
  outline: none;
  border-color: var(--bipay-accent);
  box-shadow: 0 0 0 3px var(--bipay-accent-soft);
}

.ss-select__trigger:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.ss-select__value {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  color: var(--bipay-text);
  letter-spacing: -0.005em;
}

.ss-select__value--placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.ss-select__sublabel {
  color: #94a3b8;
  font-weight: 400;
}

.ss-select__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}

.ss-select__clear:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.ss-select__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}

.ss-select--open .ss-select__arrow {
  transform: rotate(180deg);
  color: var(--bipay-accent);
}

/* Panel (dropdown) */
.ss-select__panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--bipay-surface);
  border: 1px solid var(--bipay-border);
  border-radius: 10px;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.25), 0 4px 10px -4px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  animation: ss-select-fade 0.12s ease-out;
}

@keyframes ss-select-fade {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ss-select__search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid #eef1f5;
  background: #f8fafc;
}

.ss-select__search-icon {
  color: #94a3b8;
  flex-shrink: 0;
}

.ss-select__search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--bipay-text);
  font-family: inherit;
  outline: none;
  padding: 4px 0;
}

.ss-select__search input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.ss-select__list {
  list-style: none;
  margin: 0;
  padding: 4px;
  max-height: 260px;
  overflow-y: auto;
}

.ss-select__option {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #1e293b;
  transition: background 0.1s ease, color 0.1s ease;
  user-select: none;
}

.ss-select__option--active {
  background: #f1f5f9;
}

.ss-select__option--selected {
  background: var(--bipay-accent-soft);
  color: var(--bipay-accent);
  font-weight: 600;
}

.ss-select__option--selected.ss-select__option--active {
  background: var(--bipay-accent-soft);
}

.ss-select__option--clear {
  color: #64748b;
  font-style: italic;
  font-weight: 500;
  border-bottom: 1px solid #eef1f5;
  border-radius: 0;
  margin-bottom: 4px;
}

.ss-select__option-label {
  font-weight: 500;
  line-height: 1.3;
}

.ss-select__option--selected .ss-select__option-label {
  font-weight: 600;
}

.ss-select__option-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  font-weight: 400;
}

.ss-select__empty {
  padding: 14px 10px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
}

.ss-select__list::-webkit-scrollbar {
  width: 8px;
}

.ss-select__list::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 999px;
}

.ss-select__list::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1;
}

/* --- Variante sm --- */
.ss-select--sm .ss-select__trigger {
  min-height: 34px;
  padding: 4px 8px 4px 10px;
  font-size: 13px;
}

/* ============================================================
   DateField — estilos compartidos
   Nota: el borde, padding y background viven en .date-field__trigger
   (ver bloque "DatePicker · calendario propio, sobrio" más abajo).
   El wrapper .date-field es solo contenedor para posicionar el popover.
   ============================================================ */

.date-field__icon {
  color: #94a3b8;
  flex-shrink: 0;
}

.date-field--filled .date-field__icon,
.date-field--open .date-field__icon,
.date-field__trigger:focus-visible .date-field__icon {
  color: var(--bipay-accent);
}

.date-field__text {
  flex: 1;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: var(--bipay-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
  pointer-events: none;
  user-select: none;
}

.date-field__text--placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.date-field--disabled .date-field__text {
  color: #94a3b8;
}

/* ============================================================
   SearchableSelect · ajustes de multi y espaciado
   ============================================================ */

/* Dropdown con ancho mínimo cómodo (evita el "muy junto") */
.ss-select__panel {
  min-width: 280px;
}

.dashboard-filters__field--wide {
  grid-column: span 2;
}

/* Buscador dentro del dropdown con más aire */
.ss-select__search {
  padding: 10px 12px;
  gap: 8px;
}

.ss-select__search input {
  padding: 6px 0;
  font-size: 13px;
}

/* Chips dentro del trigger (multi) */
.ss-select--multiple .ss-select__trigger {
  padding: 4px 10px 4px 6px;
  min-height: 42px;
  align-items: center;
  flex-wrap: nowrap;
}

.ss-select__chips {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  align-items: center;
}

.ss-select__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 2px 8px;
  background: var(--bipay-accent-soft);
  color: var(--bipay-accent);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  max-width: 180px;
  line-height: 1.3;
}

.ss-select__chip > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-select__chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.15);
  color: var(--bipay-accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.ss-select__chip-x:hover {
  background: var(--bipay-accent);
  color: #ffffff;
}

/* Opciones con checkbox en multi */
.ss-select__option {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}

.ss-select__option-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.ss-select__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #ffffff;
  margin-top: 1px;
  transition: background 0.1s ease, border-color 0.1s ease;
}

.ss-select__option--selected .ss-select__check {
  background: var(--bipay-accent);
  border-color: var(--bipay-accent);
}

.ss-select__option--selected {
  background: var(--bipay-accent-soft);
  color: var(--bipay-accent);
}

.ss-select--multiple .ss-select__option--selected .ss-select__option-label {
  color: var(--bipay-accent);
  font-weight: 600;
}

/* ============================================================
   DatePicker · calendario propio, sobrio
   ============================================================ */

.date-field {
  position: relative;
}

.date-field__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 6px 10px 6px 12px;
  background: var(--bipay-surface);
  border: 1px solid var(--bipay-input-border);
  border-radius: 8px;
  color: var(--bipay-text);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.date-field__trigger:hover:not(:disabled) {
  border-color: #d1d9e4;
}

.date-field--open .date-field__trigger,
.date-field__trigger:focus-visible {
  outline: none;
  border-color: var(--bipay-accent);
  box-shadow: 0 0 0 3px var(--bipay-accent-soft);
}

.date-field__trigger:disabled {
  background: #f8fafc;
  cursor: not-allowed;
}

.date-field__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}

.date-field__clear:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.date-picker {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  min-width: 280px;
  padding: 12px;
  background: var(--bipay-surface);
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px -10px rgba(15, 23, 42, 0.22), 0 4px 10px -4px rgba(15, 23, 42, 0.08);
  animation: ss-select-fade 0.12s ease-out;
  user-select: none;
}

.date-picker__head {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.date-picker__title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.date-picker__title span {
  color: #64748b;
  font-weight: 600;
  margin-left: 4px;
}

.date-picker__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.date-picker__nav:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.date-picker__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.date-picker__weekdays > span {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 4px 0;
}

.date-picker__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.date-picker__cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 34px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
  font-variant-numeric: tabular-nums;
}

.date-picker__cell:hover:not(:disabled):not(.date-picker__cell--selected) {
  background: #f1f5f9;
}

.date-picker__cell--today {
  color: var(--bipay-accent);
  font-weight: 700;
  position: relative;
}

.date-picker__cell--today::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bipay-accent);
}

.date-picker__cell--selected {
  background: var(--bipay-accent);
  color: #ffffff;
  font-weight: 700;
}

.date-picker__cell--selected::after {
  display: none;
}

.date-picker__cell--disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

.date-picker__cell--disabled:hover {
  background: transparent;
}

.date-picker__cell--empty {
  background: transparent;
  cursor: default;
}

/* Rango resaltado (periodo de comparación) — banda translúcida detrás del día */
.date-picker__cell--in-range {
  background: color-mix(in srgb, var(--bipay-accent) 14%, transparent);
  color: #0f172a;
  border-radius: 0;
}

.date-picker__cell--in-range:hover:not(:disabled):not(.date-picker__cell--selected) {
  background: color-mix(in srgb, var(--bipay-accent) 22%, transparent);
}

.date-picker__cell--range-start {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.date-picker__cell--range-end {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.date-picker__cell--range-start,
.date-picker__cell--range-end {
  background: color-mix(in srgb, var(--bipay-accent) 22%, transparent);
  font-weight: 700;
  color: #0b1d3a;
}

/* La selección siempre gana al rango resaltado */
.date-picker__cell--selected.date-picker__cell--in-range,
.date-picker__cell--selected.date-picker__cell--range-start,
.date-picker__cell--selected.date-picker__cell--range-end {
  background: var(--bipay-accent);
  color: #ffffff;
  border-radius: 8px;
}

.date-picker__legend {
  margin-top: 10px;
  padding: 6px 8px;
  font-size: 11.5px;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #eef1f5;
  border-radius: 6px;
}

.date-picker__legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--bipay-accent) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--bipay-accent) 30%, transparent);
}

.date-picker__foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #eef1f5;
}

.date-picker__action {
  background: transparent;
  border: none;
  color: var(--bipay-accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: inherit;
}

.date-picker__action:hover {
  background: var(--bipay-accent-soft);
}

.date-picker__action--muted {
  color: #64748b;
}

.date-picker__action--muted:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* =========================================================================
   Dumbbell compare chart — patrón oficial para comparar periodo actual vs anterior
   Se aplica tanto en ranking de buses/variantes/empresas (KpiVentasDashboardView)
   como en otros comparativos agregados del proyecto.
   ========================================================================= */
.bipay-dumbbell {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.bipay-dumbbell__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  font-size: 12px;
  color: #64748b;
  padding: 4px 2px 10px;
  border-bottom: 1px dashed #e2e8f0;
}

.bipay-dumbbell__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bipay-dumbbell__legend-item--semantic {
  color: #475569;
  font-size: 11.5px;
}

.bipay-dumbbell__legend-line {
  display: inline-block;
  width: 18px;
  height: 3px;
  border-radius: 3px;
}

.bipay-dumbbell__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bipay-dumbbell__row {
  display: grid;
  grid-template-columns: minmax(150px, 200px) 1fr minmax(110px, 150px) minmax(70px, 90px);
  align-items: center;
  gap: 14px;
  padding: 10px 6px;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 120ms ease-out;
}

.bipay-dumbbell--has-spark .bipay-dumbbell__row,
.bipay-dumbbell__row:has(> .bipay-dumbbell__spark) {
  grid-template-columns: minmax(150px, 200px) 1fr minmax(110px, 150px) minmax(70px, 90px) 80px;
}

.bipay-dumbbell__row:hover {
  background: #f8fafc;
}

.bipay-dumbbell__row:last-child {
  border-bottom: none;
}

.bipay-dumbbell__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.bipay-dumbbell__label strong {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bipay-dumbbell__sublabel {
  font-size: 11px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bipay-dumbbell__track {
  position: relative;
  width: 100%;
  height: 20px;
  display: flex;
  align-items: center;
}

.bipay-dumbbell__track-base {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 2px;
  background: #eef2f7;
  border-radius: 2px;
}

.bipay-dumbbell__connector {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 2px;
  transition: background-color 180ms ease-out;
}

.bipay-dumbbell__dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border-width: 2px;
  border-style: solid;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.bipay-dumbbell__values {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.bipay-dumbbell__value-curr {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.bipay-dumbbell__value-prev {
  font-size: 11px;
  color: #64748b;
}

.bipay-dumbbell__value-prev--empty {
  color: #cbd5e1;
  font-style: italic;
}

.bipay-dumbbell__delta {
  display: flex;
  justify-content: flex-end;
}

.bipay-dumbbell__spark {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 22px;
}

@media (max-width: 720px) {
  .bipay-dumbbell__row {
    grid-template-columns: 1fr minmax(100px, 140px);
    grid-template-areas:
      "label      values"
      "track      track"
      "delta      spark";
    row-gap: 6px;
  }
  .bipay-dumbbell__label { grid-area: label; }
  .bipay-dumbbell__values { grid-area: values; }
  .bipay-dumbbell__track { grid-area: track; }
  .bipay-dumbbell__delta { grid-area: delta; justify-content: flex-start; }
  .bipay-dumbbell__spark { grid-area: spark; justify-content: flex-end; }
  .bipay-dumbbell__legend {
    gap: 10px;
    font-size: 11px;
  }
}

/* =========================================================================
   Chart panel helpers — header con DeltaBadge alineado
   ========================================================================= */
.chart-panel__header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.chart-panel__header-row > div:first-child {
  min-width: 0;
  flex: 1;
}

.chart-panel__delta-slot {
  flex-shrink: 0;
  padding-top: 4px;
}

/* -------------------------------------------------------------------------
 * Indicadores de frescura del ETL (header del tablero enterprise).
 * Pensado para que el operador detecte de un vistazo si los datos de ventas
 * o los maestros están desfasados antes de interpretar recaudo y KPIs.
 * ------------------------------------------------------------------------- */
.etl-freshness {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--bipay-border);
  background: var(--bipay-surface);
  border-radius: 12px;
  box-shadow: var(--bipay-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.etl-freshness--fresh {
  border-left: 4px solid #16a34a;
}

.etl-freshness--warn {
  border-left: 4px solid #d97706;
}

.etl-freshness--stale {
  border-left: 4px solid #dc2626;
  background: #fff8f7;
}

.etl-freshness--unknown {
  border-left: 4px solid #64748b;
}

.etl-freshness__header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.etl-freshness__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--bipay-text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.etl-freshness__summary {
  font-size: 12px;
  color: var(--bipay-muted);
  flex: 1;
  min-width: 0;
}

.etl-freshness__summary strong {
  color: var(--bipay-text);
}

.etl-freshness__refresh,
.etl-freshness__retry {
  border: 1px solid var(--bipay-border);
  background: var(--bipay-surface);
  color: var(--bipay-accent);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}

.etl-freshness__refresh:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.etl-freshness__muted {
  font-size: 12px;
  color: var(--bipay-muted);
}

.etl-freshness__inline-error {
  margin: 0;
  font-size: 12px;
  color: #b91c1c;
}

.etl-freshness__groups {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.etl-freshness__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.etl-freshness__group-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bipay-muted);
  font-weight: 600;
}

.etl-freshness__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.etl-freshness__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.3;
  border: 1px solid var(--bipay-border);
  background: var(--bipay-surface);
  color: var(--bipay-text);
  white-space: nowrap;
}

.etl-freshness__chip--fresh {
  background: #ecfdf5;
  border-color: #86efac;
  color: #14532d;
}

.etl-freshness__chip--warn {
  background: #fefce8;
  border-color: #fcd34d;
  color: #78350f;
}

.etl-freshness__chip--stale {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #7f1d1d;
}

.etl-freshness__chip--unknown {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

.etl-freshness__chip-label {
  font-weight: 500;
}

.etl-freshness__chip-lag {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.etl-freshness__pill {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
  flex-shrink: 0;
  display: inline-block;
}

.etl-freshness__pill--fresh {
  background: #16a34a;
}

.etl-freshness__pill--warn {
  background: #d97706;
}

.etl-freshness__pill--stale {
  background: #dc2626;
}

.etl-freshness__pill--unknown {
  background: #64748b;
}

/* ---------- EtlFreshnessBadge (topbar) ---------- */

.etl-badge {
  position: relative;
}

.etl-badge__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--bipay-border);
  border-radius: 999px;
  background: var(--bipay-surface);
  color: var(--bipay-text);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.etl-badge__trigger:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.etl-badge__trigger.is-open {
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

.etl-badge__trigger--fresh,
.etl-badge__trigger--warn,
.etl-badge__trigger--stale,
.etl-badge__trigger--unknown {
  background: #fff;
  border-color: #e2e8f0;
  color: #334155;
}

.etl-badge__label {
  letter-spacing: 0.01em;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.etl-badge__value {
  padding: 2px 8px;
  border-radius: 3px;
  background: #f1f5f9;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 12px;
}

.etl-badge__trigger--fresh .etl-badge__value,
.etl-badge__trigger--warn .etl-badge__value,
.etl-badge__trigger--stale .etl-badge__value {
  background: #f1f5f9;
  color: #0f172a;
}

.etl-badge__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.etl-badge__dot--fresh {
  background: #16a34a;
}

.etl-badge__dot--warn {
  background: #d97706;
}

.etl-badge__dot--stale {
  background: #dc2626;
  animation: etl-badge-pulse 1.4s infinite;
}

.etl-badge__dot--unknown {
  background: #64748b;
}

@keyframes etl-badge-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.08);
  }
}

.etl-badge__popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(440px, calc(100vw - 32px));
  background: var(--bipay-surface);
  border: 1px solid var(--bipay-border);
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
  z-index: 40;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.etl-badge__popover-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.etl-badge__popover-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--bipay-text);
}

.etl-badge__popover-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12.5px;
  color: var(--bipay-muted);
}

.etl-badge__popover-summary--stale {
  color: #991b1b;
}

.etl-badge__popover-progress {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: #1d4ed8;
}

.etl-badge__refresh-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.etl-badge__refresh-btn:hover:not(:disabled) {
  background: #1d4ed8;
}

.etl-badge__refresh-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.etl-badge__refresh-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fefce8;
  color: #92400e;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid #fde68a;
}

.etl-badge__refresh-spinner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fbbf24;
  border-top-color: transparent;
  animation: etl-badge-spin 0.9s linear infinite;
}

@keyframes etl-badge-spin {
  to {
    transform: rotate(360deg);
  }
}

.etl-badge__popover-error {
  margin: 0;
  padding: 8px 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  font-size: 12.5px;
}

.etl-badge__popover-hint {
  margin: 0;
  padding: 8px 10px;
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 8px;
  color: #92400e;
  font-size: 12px;
  line-height: 1.5;
}

.etl-badge__popover-hint code {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 6px;
  background: #fefce8;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: #78350f;
}

.etl-badge__groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 2px;
}

.etl-badge__group-label {
  margin: 0 0 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bipay-muted);
}

.etl-badge__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.etl-badge__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--bipay-border);
  background: #fff;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.etl-badge__item--fresh {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.etl-badge__item--warn {
  background: #fefce8;
  border-color: #fde68a;
}

.etl-badge__item--stale {
  background: #fef2f2;
  border-color: #fecaca;
}

.etl-badge__item--unknown {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.etl-badge__item--refreshed {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.12) inset;
}

.etl-badge__item-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1 1 auto;
  min-width: 0;
}

.etl-badge__item-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--bipay-text);
  line-height: 1.2;
}

.etl-badge__item-meta {
  font-size: 11.5px;
  color: var(--bipay-muted);
  line-height: 1.3;
}

.etl-badge__item-check {
  font-size: 14px;
  color: #16a34a;
  font-weight: 700;
}

/* ---------- UserMenu (topbar) ---------- */

.user-menu {
  position: relative;
}

.user-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--bipay-border);
  border-radius: 999px;
  background: var(--bipay-surface);
  cursor: pointer;
  color: var(--bipay-text);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.user-menu__trigger:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.user-menu__trigger.is-open {
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

.user-menu__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.user-menu__avatar--lg {
  width: 42px;
  height: 42px;
  font-size: 14px;
}

.user-menu__identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  max-width: 170px;
}

.user-menu__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--bipay-text);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.user-menu__name--block {
  display: block;
  margin: 0;
  font-size: 14px;
}

.user-menu__email {
  font-size: 11.5px;
  color: var(--bipay-muted);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.user-menu__email--block {
  display: block;
  margin: 2px 0 0;
  font-size: 12px;
}

.user-menu__chevron {
  color: var(--bipay-muted);
  font-size: 11px;
  transition: transform 0.15s ease;
}

.user-menu__chevron.is-open {
  transform: rotate(180deg);
}

.user-menu__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  background: var(--bipay-surface);
  border: 1px solid var(--bipay-border);
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
  z-index: 40;
  overflow: hidden;
}

.user-menu__dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--bipay-border);
  background: linear-gradient(180deg, #f8fafc, #fff);
}

.user-menu__list {
  list-style: none;
  padding: 6px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--bipay-text);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.user-menu__item:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.user-menu__item--danger {
  color: #991b1b;
}

.user-menu__item--danger:hover {
  background: #fef2f2;
  color: #7f1d1d;
}

.user-menu__item:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.user-menu__item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #94a3b8;
  flex: none;
}

.user-menu__item:hover .user-menu__item-icon {
  color: #1f2937;
}

.user-menu__item--danger .user-menu__item-icon {
  color: #ef4444;
}

.user-menu__item--danger:hover .user-menu__item-icon {
  color: #b91c1c;
}

.user-menu__icon {
  display: block;
}

/* ---------- Mi perfil / Cambiar contraseña ---------- */

.account-page__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 18px;
}

@media (max-width: 960px) {
  .account-page__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.account-page__card {
  padding: 22px 24px;
}

.account-page__card--narrow {
  max-width: 520px;
  margin-top: 18px;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--bipay-text);
}

.account-form__field input {
  padding: 10px 12px;
  border: 1px solid var(--bipay-border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--bipay-text);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.account-form__field input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.account-form__field input:read-only,
.account-form__field input:disabled {
  background: #f8fafc;
  color: var(--bipay-muted);
}

.account-form__hint {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--bipay-muted);
}

.account-form__error {
  margin: 0;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 8px;
  font-size: 13px;
}

.account-form__ok {
  margin: 0;
  padding: 10px 12px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #065f46;
  border-radius: 8px;
  font-size: 13px;
}

.account-form__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.account-form__link {
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.account-form__link:hover {
  text-decoration: underline;
}

.account-empty {
  margin: 0;
  color: var(--bipay-muted);
  font-size: 13px;
}

.account-contract-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-contract-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--bipay-border);
  border-radius: 10px;
  background: #fff;
}

.account-contract-list__name {
  margin: 0 0 2px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--bipay-text);
}

.account-contract-list__meta {
  margin: 0;
  font-size: 11.5px;
  color: var(--bipay-muted);
}

.account-contract-list__role {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.account-contract-list__perm-count {
  font-size: 11px;
  color: var(--bipay-muted);
}

.account-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.vehicle-geo-page__summary { margin-bottom: 14px; }
.vehicle-geo-page__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 0; }
.vehicle-geo-page__stat { padding: 10px 12px; background: #f8fafc; border: 1px solid #eef1f5; border-radius: 10px; }
.vehicle-geo-page__stat.is-critical { background: #fef2f2; border-color: #fecaca; }
.vehicle-geo-page__stat.is-warning { background: #fefce8; border-color: #fde68a; }
.vehicle-geo-page__stat.is-ok { background: #f0fdf4; border-color: #bbf7d0; }
.vehicle-geo-page__stat dd { margin: 2px 0 0; font-size: 22px; font-weight: 800; color: #0f172a; line-height: 1.1; }
.vehicle-geo-page__summary-skel { height: 72px; border-radius: 10px; }
.vehicle-geo-page__table-panel { margin-top: 14px; overflow: visible; }
.vehicle-geo-page__table-panel .dashboard-panel__header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.vehicle-geo-table__row.is-critical { background: rgba(254, 226, 226, 0.35); }
.vehicle-geo-table__row.is-warning { background: rgba(254, 243, 199, 0.35); }
.vehicle-geo-table__plate { color: #64748b; font-weight: 400; font-size: 12px; }
.vehicle-geo-table__cov { min-width: 140px; }
.vehicle-geo-table__bar { width: 100%; height: 8px; border-radius: 999px; background: #eef2f7; overflow: hidden; margin-bottom: 2px; }
.vehicle-geo-table__fill { height: 100%; border-radius: 999px; }
.vehicle-geo-table__fill--critical { background: #b91c1c; }
.vehicle-geo-table__fill--warning { background: #eab308; }
.vehicle-geo-table__fill--ok { background: #15803d; }
.vehicle-geo-table__chip { padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.vehicle-geo-table__chip--critical { background: #fee2e2; color: #7f1d1d; }
.vehicle-geo-table__chip--warning { background: #fef3c7; color: #854d0e; }
.vehicle-geo-table__chip--ok { background: #dcfce7; color: #14532d; }
.vehicle-geo-table__ticket { padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; background: #dbeafe; color: #1e40af; }
.vehicle-geo-table__ticket--resolved, .vehicle-geo-table__ticket--closed { background: #dcfce7; color: #14532d; }
.vehicle-geo-table__muted { color: #94a3b8; font-size: 11.5px; }
.vehicle-geo-table__skel { height: 220px; border-radius: 8px; }
.vehicle-geo-modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.42); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.vehicle-geo-modal { background: #fff; border-radius: 14px; width: min(480px, 92vw); max-height: 90vh; overflow: auto; padding: 20px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22); }
.vehicle-geo-modal header h3 { margin: 0 0 4px; font-size: 16px; }
.vehicle-geo-modal header p { margin: 0 0 14px; color: #64748b; font-size: 12.5px; }
.vehicle-geo-modal__body { display: flex; flex-direction: column; gap: 12px; }
.vehicle-geo-modal__body label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: #334155; }
.vehicle-geo-modal__body input, .vehicle-geo-modal__body textarea, .vehicle-geo-modal__body select { padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; }
.vehicle-geo-modal__footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.admin-page { max-width: 1200px; margin: 0 auto; }
.admin-tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid #e2e8f0; }
.admin-tabs__btn { padding: 10px 16px; background: transparent; border: none; font-size: 13px; font-weight: 600; color: #64748b; border-bottom: 2px solid transparent; cursor: pointer; }
.admin-tabs__btn.is-active { color: #2563eb; border-bottom-color: #2563eb; }
.admin-panel { overflow: visible; }
.admin-panel__header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.admin-panel__actions { display: flex; align-items: center; gap: 8px; }
.admin-panel__actions input { padding: 6px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 12.5px; }
.admin-table td, .admin-table th { vertical-align: top; }
.admin-chip { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; }
.admin-chip.is-active { background: #dcfce7; color: #14532d; }
.admin-chip.is-inactive { background: #fee2e2; color: #7f1d1d; }
.admin-chip--scope { background: #e0e7ff; color: #1e3a8a; margin-left: 6px; }
.admin-assignments { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.admin-muted { color: #94a3b8; font-size: 11.5px; }
.admin-link-danger { background: transparent; border: none; color: #b91c1c; cursor: pointer; font-size: 11px; font-weight: 600; margin-left: 8px; }
.admin-skel { height: 200px; border-radius: 10px; }
.admin-modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.42); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.admin-modal { background: #fff; border-radius: 14px; width: min(600px, 96vw); overflow: visible; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22); }
.admin-modal__body { overflow: visible; }
.admin-modal-backdrop { overflow-y: auto; align-items: flex-start; padding: 40px 20px; }
.admin-modal header { padding: 18px 20px 0; }
.admin-modal header h3 { margin: 0; font-size: 16px; }
.admin-modal__body { padding: 14px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.admin-modal__body label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: #334155; }
.admin-modal__body input, .admin-modal__body textarea, .admin-modal__body select { padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; }
.admin-check { flex-direction: row !important; align-items: center; gap: 8px !important; }
.admin-permissions { border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; }
.admin-permissions legend { font-size: 11.5px; font-weight: 700; color: #334155; padding: 0 6px; }
.admin-permissions__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px 14px; }
.admin-permissions__item { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; }
.admin-permissions__item span { display: flex; flex-direction: column; }
.admin-scope-fieldset { border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; }
.admin-scope-fieldset legend { font-size: 11.5px; font-weight: 700; color: #334155; padding: 0 6px; }
.admin-scope-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 12px; max-height: 240px; overflow: auto; }
.admin-scope-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.admin-modal__footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.tarifa-card__prev { display: block; margin-top: 6px; font-size: 11px; color: #64748b; font-weight: 500; }
.tarifa-card__delta { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; }
.tarifa-card__delta.is-positive { color: #15803d; }
.tarifa-card__delta.is-negative { color: #b91c1c; }
.tarifa-card__delta.is-flat { color: #64748b; font-weight: 500; }
.tarifa-card__franja-deltas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tarifa-card__delta-chip { padding: 2px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em; background: #f1f5f9; color: #334155; }
.tarifa-card__delta-chip.is-positive { background: #dcfce7; color: #14532d; }
.tarifa-card__delta-chip.is-negative { background: #fee2e2; color: #7f1d1d; }
.tarifa-card__delta-chip.is-flat { background: #f1f5f9; color: #475569; }

.bus-score-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.bus-score-chip strong { font-weight: 800; font-size: 12px; }
.bus-score-chip.is-excellent { background: #dcfce7; color: #14532d; }
.bus-score-chip.is-good { background: #dbeafe; color: #1e3a8a; }
.bus-score-chip.is-regular { background: #fef3c7; color: #854d0e; }
.bus-score-chip.is-low { background: #fee2e2; color: #7f1d1d; }
.bus-score-chip.is-inactive { background: #f1f5f9; color: #64748b; }

.sondeo-page__kpi-panel { overflow: visible; }
.sondeo-kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 14px; padding: 8px 16px 14px; margin: 0; }
.sondeo-kpi-strip__item { padding: 10px 12px; background: #f8fafc; border: 1px solid #eef1f5; border-radius: 10px; display: flex; flex-direction: column; gap: 2px; }
.sondeo-kpi-strip__item dd { margin: 2px 0 0; font-size: 18px; font-weight: 800; color: #0f172a; line-height: 1.15; }
.sondeo-page__skeleton { height: 120px; border-radius: 10px; margin: 8px 16px 14px; }
.sondeo-page__chart-skel { height: 240px; border-radius: 10px; margin: 8px 16px 14px; }
.sondeo-page__row-skel { height: 140px; border-radius: 8px; }
.sondeo-page__empty { padding: 20px; text-align: center; color: #64748b; font-size: 13px; }
.sondeo-page__chart-panel { padding-bottom: 14px; }
.sondeo-page__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.sondeo-kpi-strip__item.is-ok { background: #f0fdf4; border-color: #bbf7d0; }
.sondeo-kpi-strip__item.is-warning { background: #fefce8; border-color: #fde68a; }
.sondeo-kpi-strip__item.is-critical { background: #fef2f2; border-color: #fecaca; }

.sondeo-filters { display: flex; flex-wrap: wrap; gap: 12px; padding: 14px 16px; align-items: flex-end; overflow: visible; }
.sondeo-filters .dashboard-filters__field { flex: 1 1 180px; min-width: 180px; display: flex; flex-direction: column; gap: 4px; }
.sondeo-filters label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: #64748b; margin-bottom: 4px; }
.sondeo-filters input[type="text"] { width: 100%; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; }
.sondeo-filters > button { flex: 0 0 auto; }

.sondeo-map-panel { overflow: hidden; }
.sondeo-map-wrap { height: 420px; }
.sondeo-map { width: 100%; height: 100%; }
.sondeo-map--small { height: 220px; border-radius: 8px; }
.sondeo-map .leaflet-tile-pane { filter: grayscale(1) contrast(0.95) brightness(1.02); }
.sondeo-map__link { background: transparent; border: none; color: #2563eb; font-weight: 600; cursor: pointer; font-size: 12px; padding: 0; }

.sondeo-status { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.sondeo-status--online { background: #dcfce7; color: #14532d; }
.sondeo-status--stale { background: #fef3c7; color: #854d0e; }
.sondeo-status--offline { background: #fee2e2; color: #7f1d1d; }
.sondeo-gps { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; display: inline-block; }
.sondeo-gps--ok { background: #dcfce7; color: #14532d; }
.sondeo-gps--missing { background: #f1f5f9; color: #64748b; }
.sondeo-filters > button { flex: 0 0 auto; align-self: flex-end; }
.sondeo-filters input[type="number"] { width: 100%; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; }
.sondeo-sync-msg { padding: 10px 16px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; border-radius: 10px; }
.sondeo-sync-msg p { margin: 0; font-size: 12.5px; }
.sondeo-sync-hint { padding: 6px 16px; margin: 0; color: #64748b; font-size: 11.5px; }

.contracts-admin__panel { overflow: visible; }
.contracts-admin__panel .dashboard-panel__header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.contracts-admin__skel { height: 260px; border-radius: 10px; margin: 12px 16px; }
.contracts-admin__table code { font-size: 12px; color: #1e40af; }
.contracts-admin__chip { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.contracts-admin__chip--active { background: #dcfce7; color: #14532d; }
.contracts-admin__chip--inactive { background: #fee2e2; color: #7f1d1d; }
.contracts-admin__aft-flag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; letter-spacing: 0.2px; }
.contracts-admin__aft-flag--on { background: #dcfce7; color: #14532d; border: 1px solid #bbf7d0; }
.contracts-admin__aft-flag--off { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.contracts-admin__aft-dot { width: 6px; height: 6px; border-radius: 50%; }
.contracts-admin__aft-flag--on .contracts-admin__aft-dot { background: #16a34a; box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2); }
.contracts-admin__aft-flag--off .contracts-admin__aft-dot { background: #94a3b8; }
.contracts-admin__apis { display: flex; flex-wrap: wrap; gap: 4px; }
.contracts-admin__api-chip { padding: 2px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; cursor: help; }
.contracts-admin__api-chip--on { background: #dcfce7; color: #14532d; }
.contracts-admin__api-chip--off { background: #f1f5f9; color: #64748b; }

.etl-mtt-input { width: 100%; min-width: 110px; padding: 4px 8px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 12px; background: #ffffff; }
.etl-mtt-input:disabled { background: #f8fafc; color: #64748b; }
.etl-mtt-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15); }

.rnt-filters { display: flex; flex-wrap: wrap; gap: 12px; padding: 14px 16px; align-items: flex-end; overflow: visible; }
.rnt-filters .dashboard-filters__field { flex: 1 1 200px; min-width: 180px; display: flex; flex-direction: column; gap: 4px; }
.rnt-filters .dashboard-filters__field--checkbox { flex: 0 0 auto; flex-direction: row !important; align-items: center; gap: 6px; }
.rnt-filters label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: #64748b; margin-bottom: 4px; }
.rnt-filters input[type="text"] { width: 100%; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; }
.rnt-filters > button { flex: 0 0 auto; }

.rnt-tabs { display: flex; gap: 6px; margin: 14px 0; border-bottom: 1px solid #e2e8f0; }
.rnt-tabs__btn { padding: 10px 16px; background: transparent; border: none; font-size: 13px; font-weight: 600; color: #64748b; border-bottom: 2px solid transparent; cursor: pointer; }
.rnt-tabs__btn.is-active { color: #2563eb; border-bottom-color: #2563eb; }

.rnt-skel { height: 200px; border-radius: 10px; margin: 12px 16px; }
.rnt-empty { padding: 20px; text-align: center; color: #64748b; font-size: 13px; margin: 0; }

.rnt-event-list { list-style: none; padding: 0 16px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.rnt-event { padding: 12px 14px; border-radius: 10px; background: #f8fafc; border-left: 4px solid #cbd5e1; }
.rnt-event--critical { background: #fef2f2; border-left-color: #b91c1c; }
.rnt-event--warning { background: #fefce8; border-left-color: #eab308; }
.rnt-event--info { background: #eff6ff; border-left-color: #2563eb; }
.rnt-event.is-ack { opacity: 0.65; }
.rnt-event__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 4px; }
.rnt-event__sev { padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.rnt-event__sev--critical { background: #fee2e2; color: #7f1d1d; }
.rnt-event__sev--warning { background: #fef3c7; color: #854d0e; }
.rnt-event__sev--info { background: #dbeafe; color: #1e40af; }
.rnt-event__type { font-size: 11px; color: #475569; font-family: 'SF Mono', Menlo, monospace; background: #e2e8f0; padding: 1px 6px; border-radius: 4px; }
.rnt-event__when { margin-left: auto; font-size: 11.5px; color: #64748b; }
.rnt-event__summary { margin: 4px 0; font-size: 13px; color: #0f172a; font-weight: 600; }
.rnt-event__changes { margin: 6px 0; padding: 8px 10px; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 11.5px; max-height: 160px; overflow: auto; }
.rnt-event__actions { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.rnt-event__ack { font-size: 11.5px; color: #14532d; background: #dcfce7; padding: 4px 10px; border-radius: 999px; }

.rnt-cell-critical { background: #fee2e2; color: #7f1d1d; font-weight: 700; }

.rnt-status { padding: 14px 16px; }
.rnt-status__row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; font-size: 12.5px; color: #334155; }
.rnt-status__row code { background: #f1f5f9; padding: 1px 6px; border-radius: 4px; font-size: 11.5px; }
.rnt-status__chip { padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.rnt-status__chip--on { background: #dcfce7; color: #14532d; }
.rnt-status__chip--off { background: #f1f5f9; color: #64748b; }
.rnt-status__chip--err { background: #fee2e2; color: #7f1d1d; }
.rnt-status__chip--warn { background: #fef9c3; color: #854d0e; }
.rnt-status__error { margin: 10px 0 0; padding: 10px 12px; background: #fef2f2; color: #7f1d1d; border: 1px solid #fecaca; border-radius: 8px; font-size: 11.5px; white-space: pre-wrap; }

.rnt-log-modal { width: min(900px, 96vw); }
.rnt-log-actions { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.rnt-log-pre { background: #0f172a; color: #f1f5f9; padding: 12px; border-radius: 8px; font-size: 11.5px; font-family: 'SF Mono', Menlo, Consolas, monospace; max-height: 60vh; overflow: auto; white-space: pre-wrap; word-break: break-word; }

.rnt-events__summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #eef1f5; flex-wrap: wrap; }
.rnt-events__counts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; color: #64748b; }
.rnt-events__group-toggle { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #64748b; cursor: pointer; }
.rnt-events__group { padding: 0 16px 14px; }
.rnt-events__group-head { margin: 12px 0 6px; font-size: 13px; font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 8px; }
.rnt-events__table-wrap { overflow-x: auto; }
.rnt-events__table { font-size: 12.5px; }
.rnt-events-row--critical td { background: #fef2f2; }
.rnt-events-row--warning td { background: #fefce8; }
.rnt-events-row--info td { background: rgba(239, 246, 255, 0.5); }
.rnt-events-row.is-ack td { opacity: 0.55; }
.rnt-events-row__summary { max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
.rnt-events-row__actions { display: flex; gap: 4px; flex-wrap: wrap; }
.rnt-events-row__toggle, .rnt-events-row__ack { padding: 3px 8px; border-radius: 6px; border: 1px solid #e2e8f0; background: #fff; font-size: 11px; font-weight: 600; cursor: pointer; color: #334155; }
.rnt-events-row__ack { background: #2563eb; color: #fff; border-color: #2563eb; }
.rnt-events-row__toggle:hover { background: #f1f5f9; }
.rnt-events-row__ack:hover { background: #1d4ed8; }
.rnt-events-row__detail pre { margin: 4px 0; }

.rnt-fleet-summary { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-bottom: 1px solid #eef1f5; font-size: 12px; color: #334155; }
.rnt-fleet-table { font-size: 12.5px; }
.rnt-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.rnt-badge { padding: 2px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.rnt-badge--ok { background: #dcfce7; color: #14532d; }
.rnt-badge--warn { background: #fef3c7; color: #854d0e; }
.rnt-badge--critical { background: #fee2e2; color: #7f1d1d; }
.rnt-badge--off { background: #f1f5f9; color: #64748b; }

.sondeo-rnt { padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em; display: inline-block; }
.sondeo-rnt--ok { background: #dcfce7; color: #14532d; }
.sondeo-rnt--warn { background: #fef3c7; color: #854d0e; }
.sondeo-rnt--critical { background: #fee2e2; color: #7f1d1d; }
.sondeo-rnt--missing { background: #f1f5f9; color: #64748b; }

/* Empresas: tabla compacta, celdas verticalmente centradas. */
.etl-empresas-table .ranking-table { border-collapse: separate; border-spacing: 0; }
.etl-empresas-table .ranking-table thead th { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; padding: 10px 10px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; white-space: nowrap; }
.etl-empresas-table .ranking-table tbody td { padding: 10px 10px; vertical-align: middle; border-bottom: 1px solid #f1f5f9; font-size: 12.5px; }
.etl-empresas-table .ranking-table tbody tr:hover td { background: #f8fafc; }
.etl-empresas-table .etl-mtt-input { min-width: 90px; max-width: 130px; }
.etl-empresas-table input[type="date"].etl-mtt-input { min-width: 125px; }
.etl-empresas-table .etl-city-select { padding: 4px 8px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 12px; background: #fff; min-width: 140px; }
.etl-empresas-table .etl-rnt-toggle { white-space: nowrap; }
.etl-rnt-readonly { font-size: 12.5px; color: #0f172a; font-weight: 500; padding: 3px 8px; background: #f1f5f9; border-radius: 4px; display: inline-block; }

/* AFT KPIs */
.aft-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; padding: 0 14px 14px; }
.aft-kpi { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; }
.aft-kpi__label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; font-weight: 700; }
.aft-kpi__value { font-size: 18px; font-weight: 700; color: #0f172a; font-variant-numeric: tabular-nums; }
.aft-kpi__sub { font-size: 11px; color: #64748b; }
.aft-kpi--primary { background: #dbeafe; border-color: #93c5fd; }
.aft-kpi--primary .aft-kpi__value { color: #1e3a8a; }
.aft-kpi--ok { background: #dcfce7; border-color: #bbf7d0; }
.aft-kpi--ok .aft-kpi__value { color: #166534; }
.aft-kpi--warn { background: #fef9c3; border-color: #fde68a; }
.aft-kpi--warn .aft-kpi__value { color: #854d0e; }
.aft-kpi--err { background: #fee2e2; border-color: #fecaca; }
.aft-kpi--err .aft-kpi__value { color: #b91c1c; }
.aft-status-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }

/* PDV — tabla ejecutiva compacta */
.pdv-table-wrap { border: 1px solid #e2e8f0; border-radius: 10px; overflow-x: auto; overflow-y: visible; background: #fff; max-width: 100%; padding: 0 !important; }
.pdv-table-wrap::-webkit-scrollbar { height: 8px; }
.pdv-table-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.pdv-table { width: 100%; table-layout: auto; }
.pdv-table th:nth-child(1), .pdv-table td:nth-child(1) { width: 45%; min-width: 240px; }
.pdv-table th:nth-child(2), .pdv-table td:nth-child(2) { width: 13%; min-width: 100px; white-space: nowrap; }
.pdv-table th:nth-child(3), .pdv-table td:nth-child(3) { width: 13%; min-width: 110px; }
.pdv-table th:nth-child(4), .pdv-table td:nth-child(4) { width: 12%; min-width: 100px; text-align: right; white-space: nowrap; }
.pdv-table th:nth-child(5), .pdv-table td:nth-child(5) { width: 7%; min-width: 65px; text-align: center; }
.pdv-table th:nth-child(6), .pdv-table td:nth-child(6) { width: 14%; min-width: 150px; text-align: right; white-space: nowrap; padding-right: 14px; }
.pdv-table { width: 100%; font-size: 12.5px; border-collapse: separate; border-spacing: 0; }
.pdv-table thead th { position: sticky; top: 0; background: #f8fafc; color: #475569; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; padding: 10px 12px; border-bottom: 1px solid #e2e8f0; text-align: left; z-index: 1; }
.pdv-table tbody td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: #0f172a; }
.pdv-table tbody tr:last-child td { border-bottom: none; }
.pdv-table tbody tr:nth-child(even) td { background: #fcfcfd; }
.pdv-table tbody tr:hover td { background: #eff6ff; }
.pdv-table .pdv-row--hidden td { opacity: 0.55; }
.pdv-col-num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pdv-name { font-weight: 600; color: #0f172a; line-height: 1.3; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pdv-name .pdv-chip { font-size: 9.5px; padding: 2px 6px; }
.pdv-sub { font-size: 11px; color: #64748b; margin-top: 2px; line-height: 1.3; }
.pdv-sub-cell { color: #64748b; font-size: 12px; }
.pdv-mono { font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 11.5px; color: #334155; letter-spacing: 0.2px; white-space: nowrap; }
.pdv-email { color: #2563eb; font-size: 12px; word-break: break-all; }
.pdv-dash { color: #cbd5e1; }
.pdv-amount { font-weight: 600; }
.pdv-amount--neg { color: #b91c1c; }
.pdv-amount--warn { color: #854d0e; }
.pdv-amount--zero { color: #94a3b8; font-weight: 500; }
.pdv-chip { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap; }
.pdv-chip--primary { background: #dcfce7; color: #166534; }
.pdv-chip--info { background: #dbeafe; color: #1e3a8a; }
.pdv-chip--neutral { background: #f1f5f9; color: #475569; }
.pdv-chip--muted { background: #fef9c3; color: #854d0e; }

/* PDV filters panel */
.pdv-filters { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px !important; overflow: visible; position: relative; z-index: 5; }
.pdv-filters .ss-select__panel { z-index: 100; }
.pdv-filters__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 2fr auto; gap: 12px; align-items: end; position: relative; z-index: 10; }
.pdv-filters__field label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; font-weight: 700; margin-bottom: 5px; }
.pdv-filters__actions { display: inline-flex; gap: 6px; padding-bottom: 0; }
.pdv-icon-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid #e2e8f0; background: #fff; color: #475569; font-size: 16px; font-weight: 700; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; display: inline-flex; align-items: center; justify-content: center; }
.pdv-icon-btn:hover:not(:disabled) { background: #f1f5f9; border-color: #cbd5e1; }
.pdv-icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pdv-icon-btn--danger:hover:not(:disabled) { background: #fef2f2; border-color: #fecaca; color: #dc2626; }

.pdv-search-wrap { position: relative; display: flex; align-items: center; }
.pdv-search-wrap input { width: 100%; padding: 8px 32px 8px 32px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; background: #fff; transition: border-color 0.15s, box-shadow 0.15s; }
.pdv-search-wrap input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.pdv-search-icon { position: absolute; left: 10px; font-size: 13px; color: #94a3b8; pointer-events: none; }
.pdv-search-clear { position: absolute; right: 8px; background: transparent; border: 0; color: #94a3b8; cursor: pointer; font-size: 12px; padding: 2px 6px; border-radius: 4px; }
.pdv-search-clear:hover { background: #f1f5f9; color: #475569; }

.pdv-chip-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 18px; padding: 12px 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; position: relative; z-index: 1; }
.pdv-chip-filters__group { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pdv-chip-filters__label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; font-weight: 700; margin-right: 4px; min-width: 52px; }
.pdv-fchip { padding: 3px 10px; font-size: 11.5px; font-weight: 600; background: #fff; color: #475569; border: 1px solid #e2e8f0; border-radius: 999px; cursor: pointer; transition: background 0.12s, border-color 0.12s, color 0.12s; white-space: nowrap; }
.pdv-fchip:hover { background: #f1f5f9; border-color: #cbd5e1; }
.pdv-fchip.is-active { background: #1e3a8a; color: #fff; border-color: #1e3a8a; }

@media (max-width: 1100px) {
  .pdv-filters__top { grid-template-columns: 1fr 1fr auto; }
  .pdv-filters__field--search { grid-column: 1 / -1; }
}

.pdv-actions-cell { white-space: nowrap; }
.pdv-actions-cell > * { vertical-align: middle; }
.pdv-actions-cell .pdv-gps-btn + button { margin-left: 6px; }
.pdv-gps-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px; padding: 0; font-size: 15px; line-height: 1; cursor: pointer; transition: background 0.15s, transform 0.1s; }
.pdv-gps-btn:hover { background: #dbeafe; transform: scale(1.08); }

.pdv-stock-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 24px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pdv-stock-badge.is-ok { background: #dcfce7; color: #166534; }
.pdv-stock-badge.is-low { background: #dbeafe; color: #1e3a8a; }
.pdv-stock-badge.is-empty { background: #fef2f2; color: #b91c1c; border: 1px dashed #fecaca; }

.pdv-row--hidden td { opacity: 0.45; }

.pdv-map-modal { width: min(820px, 96vw); max-height: 92vh; overflow: hidden; display: flex; flex-direction: column; }
.pdv-map-body { padding: 0 !important; flex: 1; min-height: 420px; }
.pdv-map { width: 100%; height: 480px; }
.pdv-map-ext { color: #2563eb; text-decoration: none; font-size: 12.5px; font-weight: 500; margin-right: auto; padding: 6px 10px; border: 1px solid #bfdbfe; border-radius: 6px; }
.pdv-map-ext:hover { background: #eff6ff; }
.pdv-map-icon { background: transparent; border: none; font-size: 24px; }
.etl-empresas-actions { min-width: 220px; }
.etl-empresas-actions a,
.etl-empresas-actions button { padding: 4px 8px !important; font-size: 11.5px !important; }

.etl-rnt-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: #334155; padding: 4px 8px; border-radius: 999px; background: #f1f5f9; border: 1px solid #e2e8f0; cursor: pointer; user-select: none; transition: background 0.15s, border-color 0.15s; }
.etl-rnt-toggle:hover { background: #e2e8f0; }
.etl-rnt-toggle input[type="checkbox"] { width: 14px; height: 14px; margin: 0; accent-color: #16a34a; cursor: pointer; }
.etl-rnt-toggle input[type="checkbox"]:checked + span { color: #166534; }
.etl-rnt-toggle:has(input:checked) { background: #dcfce7; border-color: #bbf7d0; }
.etl-rnt-toggle:has(input:disabled) { opacity: 0.55; cursor: not-allowed; }

.sondeo-rnt-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 14px 0 10px; }
.sondeo-rnt-tab { padding: 8px 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #475569; }
.sondeo-rnt-tab span { background: #e2e8f0; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.sondeo-rnt-tab.is-active { background: #2563eb; color: #fff; border-color: #2563eb; }
.sondeo-rnt-tab.is-active span { background: rgba(255, 255, 255, 0.25); color: #fff; }
.sondeo-rnt-tab--ok { color: #14532d; }
.sondeo-rnt-tab--ok.is-active { background: #15803d; border-color: #15803d; color: #fff; }
.sondeo-rnt-tab--warn { color: #854d0e; }
.sondeo-rnt-tab--warn.is-active { background: #ca8a04; border-color: #ca8a04; color: #fff; }
.sondeo-rnt-tab--critical { color: #7f1d1d; }
.sondeo-rnt-tab--critical.is-active { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.sondeo-rnt-tab--off { color: #64748b; }
.sondeo-rnt-tab--off.is-active { background: #475569; border-color: #475569; color: #fff; }

.sort-th { cursor: pointer; user-select: none; white-space: nowrap; }
.sort-th:hover { background: #f1f5f9; }
.sort-th.is-active { color: #1e40af; background: #eff6ff; }
.sort-th__arrow { margin-left: 4px; font-size: 10px; color: #94a3b8; }
.sort-th.is-active .sort-th__arrow { color: #1e40af; }

.sondeo-tx-delta { margin-left: 6px; font-size: 10.5px; font-weight: 700; color: #64748b; }
.sondeo-tx-delta.is-up { color: #15803d; }
.sondeo-tx-delta.is-down { color: #b91c1c; }

.sondeo-tx-cell { text-align: right; min-width: 90px; line-height: 1.2; }
.sondeo-tx-cell__current { font-weight: 700; color: #0f172a; font-size: 13px; }
.sondeo-tx-cell__previous { font-size: 10.5px; color: #94a3b8; }

.sondeo-trxpend-cell { text-align: right; min-width: 70px; }
.sondeo-trxpend { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: #f1f5f9; color: #475569; }
.sondeo-trxpend--alert { background: #fef9c3; color: #854d0e; border: 1px solid #eab308; }

.sondeo-bus-cell { line-height: 1.2; min-width: 80px; }
.sondeo-bus-cell__nbus { font-weight: 700; color: #0f172a; font-size: 13px; }
.sondeo-bus-cell__plate { font-size: 11px; color: #64748b; font-family: 'SF Mono', Menlo, monospace; letter-spacing: 0.5px; }

.sondeo-conn-cell { line-height: 1.2; min-width: 140px; }
.sondeo-conn-cell__primary { font-size: 12.5px; color: #0f172a; font-weight: 600; }
.sondeo-conn-cell__secondary { font-size: 10.5px; color: #64748b; margin-top: 2px; }
.sondeo-equip-icon { margin-left: 6px; font-size: 11px; cursor: help; }
.sondeo-equip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 4px 12px; margin: 4px 0; padding: 8px 10px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; font-size: 12px; color: #14532d; }

.sondeo-table tr.is-offline { background: rgba(254, 226, 226, 0.3); }
.sondeo-table tr.is-stale { background: rgba(254, 243, 199, 0.3); }
.sondeo-muted { color: #94a3b8; font-size: 11px; margin-left: 4px; }

.sondeo-modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.42); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.sondeo-modal { background: #fff; border-radius: 14px; width: min(720px, 96vw); max-height: 92vh; overflow: auto; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22); }
.sondeo-modal header { padding: 18px 20px 0; }
.sondeo-modal header h3 { margin: 0 0 4px; font-size: 16px; }
.sondeo-modal header p { margin: 0; color: #64748b; font-size: 12.5px; }
.sondeo-modal__body { padding: 14px 20px; display: flex; flex-direction: column; gap: 16px; }
.sondeo-modal__info { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 14px; font-size: 12.5px; color: #334155; background: #f8fafc; padding: 10px 12px; border-radius: 10px; }
.sondeo-modal__info strong { color: #0f172a; }

.sondeo-detail-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; }
.sondeo-detail-card--ok { background: #f0fdf4; border-color: #bbf7d0; }
.sondeo-detail-card--muted { background: #f8fafc; border-color: #e2e8f0; }
.sondeo-detail-card--note { background: #fffbeb; border-color: #fde68a; }
.sondeo-detail-card--note p { margin: 0; font-size: 12.5px; color: #78350f; line-height: 1.5; white-space: pre-wrap; }
.sondeo-detail-card__title { margin: 0 0 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #475569; display: flex; align-items: center; gap: 8px; }
.sondeo-detail-card--ok .sondeo-detail-card__title { color: #166534; }
.sondeo-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 16px; margin: 0; font-size: 12.5px; }
.sondeo-detail-grid > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sondeo-detail-grid__full { grid-column: 1 / -1; }
.sondeo-detail-grid dt { margin: 0; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; font-weight: 600; }
.sondeo-detail-grid dd { margin: 0; color: #0f172a; font-weight: 500; word-break: break-word; }
.sondeo-mono { font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; letter-spacing: 0.2px; }
.sondeo-modal__map { border-radius: 10px; overflow: hidden; border: 1px solid #e2e8f0; }
.sondeo-modal__comments h4 { margin: 4px 0 8px; font-size: 14px; }
.sondeo-modal__comment-list { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow: auto; margin-bottom: 10px; }
.sondeo-comment { padding: 8px 10px; background: #f8fafc; border: 1px solid #eef1f5; border-radius: 8px; }
.sondeo-comment__head { display: flex; gap: 8px; font-size: 11px; color: #64748b; margin-bottom: 4px; align-items: center; }
.sondeo-comment__head strong { color: #0f172a; font-size: 12px; }
.sondeo-comment__del { background: transparent; border: none; color: #b91c1c; font-size: 10.5px; cursor: pointer; margin-left: auto; }
.sondeo-comment p { margin: 0; font-size: 12.5px; color: #1f2937; line-height: 1.4; }
.sondeo-modal__comment-form { display: flex; gap: 8px; align-items: flex-end; }
.sondeo-modal__comment-form textarea { flex: 1; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; }
.sondeo-modal__footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; border-top: 1px solid #eef1f5; }

.chart-card {
  background: #ffffff;
  border: 1px solid #e8ecf1;
  border-radius: 14px;
  padding: 18px 18px 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.chart-card__header {
  margin-bottom: 10px;
}

.chart-card__title {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.chart-card__subtitle {
  margin: 0;
  color: #64748b;
  font-size: 12.5px;
}

.chart-card__summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 14px;
  margin: 6px 0 14px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #eef1f5;
  border-radius: 10px;
}

.chart-card__summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}

.chart-card__summary-item dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
}

.chart-card__summary-item dd {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.15;
}

.chart-card__summary-main {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.chart-card__summary-sub {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: #64748b;
  margin-top: 2px;
}

.chart-card__loading,
.chart-card__empty,
.chart-card__error {
  padding: 28px 12px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

.chart-card__error {
  color: #b91c1c;
}

.alerts-panel {
  background: #ffffff;
  border: 1px solid #e8ecf1;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.alerts-panel__header {
  margin-bottom: 10px;
}

.alerts-panel__title {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.alerts-panel__subtitle {
  margin: 0;
  color: #64748b;
  font-size: 12.5px;
}

.alerts-panel__loading,
.alerts-panel__empty {
  margin: 14px 0 4px;
  padding: 14px 12px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 10px;
}

.alerts-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alerts-panel__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border-left: 3px solid #cbd5e1;
}

.alerts-panel__item--info {
  border-left-color: #2563eb;
  background: #eff6ff;
}

.alerts-panel__item--warning {
  border-left-color: #eab308;
  background: #fefce8;
}

.alerts-panel__item--critical {
  border-left-color: #b91c1c;
  background: #fef2f2;
}

.alerts-panel__sev {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #334155;
  background: #e2e8f0;
}

.alerts-panel__sev--info {
  background: #dbeafe;
  color: #1e40af;
}

.alerts-panel__sev--warning {
  background: #fef3c7;
  color: #854d0e;
}

.alerts-panel__sev--critical {
  background: #fee2e2;
  color: #7f1d1d;
}

.alerts-panel__body {
  flex: 1 1 auto;
  min-width: 0;
}

.alerts-panel__title-line {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.alerts-panel__message {
  margin: 0;
  font-size: 12.5px;
  color: #334155;
  line-height: 1.4;
}

.alerts-panel__meta {
  margin: 6px 0 0;
  font-size: 11px;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
}

.alerts-panel__head-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.alerts-panel__chip {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: #e2e8f0;
  color: #334155;
}

.alerts-panel__entity {
  margin: 2px 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: #1e3a8a;
}

.alerts-panel__diagnostic {
  margin: 4px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  border-left: 3px solid #cbd5e1;
}

.alerts-panel__diagnostic--info {
  border-left-color: #2563eb;
  color: #1e3a8a;
}

.alerts-panel__diagnostic--warning {
  border-left-color: #eab308;
  color: #713f12;
}

.alerts-panel__diagnostic--critical {
  border-left-color: #b91c1c;
  color: #7f1d1d;
}

.alerts-panel__context {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px 12px;
  margin: 6px 0 2px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 8px;
}

.alerts-panel__context-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
}

.alerts-panel__context-item dt {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
}

.alerts-panel__context-item dd {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
}

/* AFT Liquidaciones — diseño ejecutivo */
.aft-exec-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; padding: 0 14px 14px; }
.aft-exec-kpi { position: relative; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 2px rgba(15,23,42,0.04); transition: transform 0.12s, box-shadow 0.12s; }
.aft-exec-kpi:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15,23,42,0.08); }
.aft-exec-kpi__head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.aft-exec-kpi__label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.45px; color: #64748b; font-weight: 700; line-height: 1.2; }
.aft-exec-kpi__icon { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.aft-exec-kpi__value { font-size: 22px; font-weight: 700; color: #0f172a; font-variant-numeric: tabular-nums; line-height: 1.1; }
.aft-exec-kpi__sub { font-size: 11px; color: #64748b; display: flex; align-items: center; gap: 4px; }
.aft-exec-kpi__accent { position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; }
.aft-exec-kpi--primary .aft-exec-kpi__accent { background: #2563eb; }
.aft-exec-kpi--primary .aft-exec-kpi__icon { background: #dbeafe; color: #1e3a8a; }
.aft-exec-kpi--ok .aft-exec-kpi__accent { background: #16a34a; }
.aft-exec-kpi--ok .aft-exec-kpi__icon { background: #dcfce7; color: #166534; }
.aft-exec-kpi--ok .aft-exec-kpi__value { color: #166534; }
.aft-exec-kpi--warn .aft-exec-kpi__accent { background: #eab308; }
.aft-exec-kpi--warn .aft-exec-kpi__icon { background: #fef9c3; color: #854d0e; }
.aft-exec-kpi--warn .aft-exec-kpi__value { color: #854d0e; }
.aft-exec-kpi--err .aft-exec-kpi__accent { background: #dc2626; }
.aft-exec-kpi--err .aft-exec-kpi__icon { background: #fee2e2; color: #b91c1c; }
.aft-exec-kpi--err .aft-exec-kpi__value { color: #b91c1c; }
.aft-exec-kpi--neutral .aft-exec-kpi__accent { background: #64748b; }
.aft-exec-kpi--neutral .aft-exec-kpi__icon { background: #f1f5f9; color: #475569; }
.aft-exec-kpi__progress { height: 4px; background: #f1f5f9; border-radius: 999px; overflow: hidden; margin-top: 4px; }
.aft-exec-kpi__progress-bar { height: 100%; background: #16a34a; border-radius: 999px; transition: width 0.3s ease; }

/* Quick filter chips */
.aft-quick-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; align-items: center; }
.aft-quick-filters__label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; font-weight: 700; margin-right: 4px; }
.aft-qf { padding: 5px 12px; font-size: 11.5px; font-weight: 600; background: #fff; color: #475569; border: 1px solid #e2e8f0; border-radius: 999px; cursor: pointer; transition: all 0.12s; white-space: nowrap; }
.aft-qf:hover { background: #f1f5f9; border-color: #cbd5e1; }
.aft-qf.is-active { background: #1e3a8a; color: #fff; border-color: #1e3a8a; }

/* Filters 4-col grid con filas por tipo: row1 sin popover HTML (labels siempre visibles). */
.aft-filters-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; padding: 14px; overflow: visible; }
@media (max-width: 1024px) { .aft-filters-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .aft-filters-grid { grid-template-columns: 1fr; } }
.aft-filters-grid .ss-select__panel, .aft-filters-grid .date-picker { z-index: 50; }
.dashboard-panel:has(> .aft-filters-grid) { overflow: visible; }

.aft-filters-grid .dashboard-filters__field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.aft-filters-grid .dashboard-filters__field label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; font-weight: 700; }
.aft-filters-grid input[type="date"], .aft-filters-grid input[type="number"], .aft-filters-grid input[type="text"] { width: 100%; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; background: #fff; transition: border-color 0.12s, box-shadow 0.12s; min-height: 36px; }
.aft-filters-grid input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.aft-filters-grid select.aft-native-select { width: 100%; padding: 8px 28px 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") right 10px center no-repeat; -webkit-appearance: none; appearance: none; color: #0f172a; cursor: pointer; min-height: 36px; }
.aft-filters-grid select.aft-native-select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.aft-filters-grid .dashboard-filters__field label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; font-weight: 700; margin-bottom: 5px; }
.aft-filters-grid input[type="date"], .aft-filters-grid input[type="number"], .aft-filters-grid input[type="text"] { width: 100%; padding: 7px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; background: #fff; transition: border-color 0.12s, box-shadow 0.12s; }
.aft-filters-grid input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }

/* Bulk action toolbar — sticky */
.aft-bulk-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 100%); color: #fff; border-radius: 10px; margin: 0 14px 12px; box-shadow: 0 2px 8px rgba(30,58,138,0.25); }
.aft-bulk-bar__info { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.aft-bulk-bar__count { background: rgba(255,255,255,0.2); padding: 2px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; font-weight: 700; }
.aft-bulk-bar__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.aft-bulk-btn { padding: 6px 12px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.3); border-radius: 8px; cursor: pointer; transition: background 0.12s; white-space: nowrap; }
.aft-bulk-btn:hover { background: rgba(255,255,255,0.28); }
.aft-bulk-btn--primary { background: #fff; color: #1e3a8a; border-color: #fff; }
.aft-bulk-btn--primary:hover { background: #f1f5f9; color: #1e3a8a; }
.aft-bulk-btn--ghost { background: transparent; }

/* Status chips mapped por código */
.aft-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap; }
.aft-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.aft-chip--pending { background: #fef9c3; color: #854d0e; }
.aft-chip--pending::before { background: #eab308; }
.aft-chip--approved { background: #dbeafe; color: #1e3a8a; }
.aft-chip--approved::before { background: #2563eb; }
.aft-chip--sent { background: #e0e7ff; color: #3730a3; }
.aft-chip--sent::before { background: #4f46e5; }
.aft-chip--paid { background: #dcfce7; color: #166534; }
.aft-chip--paid::before { background: #16a34a; }
.aft-chip--rejected { background: #fee2e2; color: #b91c1c; }
.aft-chip--rejected::before { background: #dc2626; }
.aft-chip--cancelled { background: #f1f5f9; color: #475569; }
.aft-chip--cancelled::before { background: #64748b; }
.aft-chip--partial { background: #fef9c3; color: #854d0e; }
.aft-chip--partial::before { background: #eab308; }
.aft-chip--neutral { background: #f1f5f9; color: #475569; }
.aft-chip--neutral::before { background: #94a3b8; }

/* Progress bar en fila */
.aft-progress-cell { min-width: 110px; }
.aft-progress { display: flex; align-items: center; gap: 6px; }
.aft-progress__bar { flex: 1; height: 6px; background: #f1f5f9; border-radius: 999px; overflow: hidden; min-width: 60px; }
.aft-progress__fill { height: 100%; border-radius: 999px; transition: width 0.3s; }
.aft-progress__fill--ok { background: #16a34a; }
.aft-progress__fill--partial { background: #eab308; }
.aft-progress__fill--zero { background: #cbd5e1; }
.aft-progress__pct { font-size: 11px; font-weight: 700; color: #475569; min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }

/* Action menu cell */
.aft-row-actions { display: inline-flex; gap: 4px; align-items: center; justify-content: flex-end; }
.aft-icon-btn { width: 30px; height: 30px; border-radius: 7px; border: 1px solid #e2e8f0; background: #fff; color: #475569; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all 0.12s; font-size: 13px; }
.aft-icon-btn:hover:not(:disabled) { background: #eff6ff; border-color: #93c5fd; color: #2563eb; }
.aft-icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.aft-icon-btn--primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.aft-icon-btn--primary:hover:not(:disabled) { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

/* Dropdown menu */
.aft-dropdown { position: relative; display: inline-block; }
.aft-dropdown__menu { position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 8px 24px rgba(15,23,42,0.12); padding: 6px; min-width: 200px; z-index: 20; }
.aft-dropdown__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: 12.5px; color: #334155; cursor: pointer; border-radius: 6px; background: transparent; border: 0; width: 100%; text-align: left; transition: background 0.1s; }
.aft-dropdown__item svg { flex-shrink: 0; color: #64748b; }
.aft-dropdown__item:hover { background: #f1f5f9; color: #0f172a; }
.aft-dropdown__item--danger { color: #b91c1c; }
.aft-dropdown__item--danger:hover { background: #fee2e2; color: #b91c1c; }
.aft-dropdown__sep { height: 1px; background: #e2e8f0; margin: 4px 0; }

/* Tabla ejecutiva Liquidaciones */
.aft-clearings-table { width: 100%; font-size: 12.5px; border-collapse: separate; border-spacing: 0; }
.aft-clearings-table thead th { position: sticky; top: 0; background: #f8fafc; color: #475569; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.45px; font-weight: 700; padding: 11px 12px; border-bottom: 2px solid #e2e8f0; text-align: left; z-index: 1; white-space: nowrap; }
.aft-clearings-table thead th.is-numeric { text-align: right; }
.aft-clearings-table tbody td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: #0f172a; }
.aft-clearings-table tbody tr:nth-child(even) td { background: #fafbfc; }
.aft-clearings-table tbody tr:hover td { background: #eff6ff; }
.aft-clearings-table tbody tr.is-selected td { background: #dbeafe; }
.aft-clearings-table tbody tr.is-selected:hover td { background: #bfdbfe; }
.aft-clearings-table tbody tr:last-child td { border-bottom: none; }
.aft-clearings-table .is-numeric { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.aft-clearings-table .is-checkbox { width: 36px; text-align: center; }
.aft-clearings-table .is-actions { width: 120px; text-align: right; }
.aft-clearings-table .aft-id-cell { font-weight: 700; color: #1e3a8a; font-variant-numeric: tabular-nums; }
.aft-clearings-table .aft-period { font-size: 12px; }
.aft-clearings-table .aft-period__range { color: #64748b; font-size: 10.5px; margin-top: 1px; }

/* Detail modal KPIs */
.aft-detail-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; padding: 12px; background: #f8fafc; border-radius: 10px; border: 1px solid #e2e8f0; }
.aft-detail-kpi { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; background: #fff; border-radius: 8px; border: 1px solid #e2e8f0; }
.aft-detail-kpi__label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; font-weight: 700; }
.aft-detail-kpi__value { font-size: 15px; font-weight: 700; color: #0f172a; font-variant-numeric: tabular-nums; }

/* Calugas clickeables filtro */
button.aft-detail-kpi { text-align: left; font: inherit; }
.aft-detail-kpi--clickable { cursor: pointer; transition: all 0.12s; position: relative; }
.aft-detail-kpi--clickable:hover { border-color: #93c5fd; background: #eff6ff; }
.aft-detail-kpi--clickable.is-active { border-color: #1e3a8a; background: #dbeafe; box-shadow: inset 0 0 0 1px #1e3a8a; }
.aft-detail-kpi--clickable.is-active .aft-detail-kpi__label { color: #1e3a8a; }
.aft-detail-kpi--reset { cursor: pointer; background: #f1f5f9; border-color: #cbd5e1; }
.aft-detail-kpi--reset:hover { background: #e2e8f0; }

/* Toolbar superior (botones export) */
.aft-toolbar { display: flex; align-items: center; gap: 8px; padding: 0 14px 12px; flex-wrap: wrap; }
.aft-toolbar__spacer { flex: 1; }
.aft-toolbar__group { display: inline-flex; gap: 4px; padding: 3px; background: #f1f5f9; border-radius: 8px; }
.aft-toolbar__btn { padding: 5px 10px; font-size: 11.5px; font-weight: 600; background: transparent; color: #475569; border: 0; border-radius: 6px; cursor: pointer; transition: background 0.12s, color 0.12s; white-space: nowrap; }
.aft-toolbar__btn:hover:not(:disabled) { background: #fff; color: #1e3a8a; box-shadow: 0 1px 2px rgba(15,23,42,0.06); }
.aft-toolbar__btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Panel header acción secundaria */
.aft-panel-meta { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: #64748b; }
.aft-panel-meta strong { color: #0f172a; font-weight: 700; }

/* Conciliación PDF */
.aft-reconcile-panel { padding: 14px 18px; }
.aft-reconcile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.aft-reconcile-head h3 { margin: 0 0 4px; font-size: 15px; color: #0f172a; font-weight: 700; }
.aft-reconcile-head p { margin: 0; font-size: 12px; color: #64748b; }
.aft-reconcile-actions { display: flex; gap: 8px; align-items: center; }
.aft-file-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; border-radius: 999px; font-size: 12px; font-weight: 600; margin-bottom: 10px; width: fit-content; }
.aft-file-chip svg { flex-shrink: 0; }

/* Search box */
.aft-search-box { position: relative; display: flex; align-items: center; gap: 0; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; padding: 0 8px 0 32px; transition: border-color 0.12s, box-shadow 0.12s; width: 100%; min-height: 36px; }
.aft-search-box:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.aft-search-box > svg { position: absolute; left: 10px; color: #94a3b8; pointer-events: none; width: 14px; height: 14px; flex-shrink: 0; }
.aft-search-box input, .aft-filters-grid .aft-search-box input[type="text"] { flex: 1; border: 0 !important; padding: 7px 2px !important; font-size: 13px; background: transparent; outline: none; color: #0f172a; min-width: 0; box-shadow: none !important; min-height: 0 !important; width: auto !important; }
.aft-search-box input:focus, .aft-filters-grid .aft-search-box input[type="text"]:focus { border: 0 !important; box-shadow: none !important; }
.aft-search-clear { background: transparent; border: 0; color: #94a3b8; cursor: pointer; padding: 3px 5px; border-radius: 4px; display: inline-flex; align-items: center; }
.aft-search-clear:hover { background: #f1f5f9; color: #475569; }

/* Check pills (conciliación: RUT/CTA/BCO/MTO) */
.aft-checks { display: inline-flex; gap: 3px; flex-wrap: nowrap; }
.aft-check-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; padding: 2px 6px; border-radius: 4px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.3px; }
.aft-check-pill.is-ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.aft-check-pill.is-bad { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

/* Propose → Confirm bar */
.aft-propose-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; background: linear-gradient(90deg, #eff6ff 0%, #dbeafe 100%); border: 1px solid #bfdbfe; border-radius: 10px; margin: 12px 0; flex-wrap: wrap; }
.aft-propose-info { display: flex; flex-direction: column; gap: 2px; }
.aft-propose-info strong { font-size: 13px; color: #1e3a8a; font-weight: 700; }
.aft-propose-info span { font-size: 11.5px; color: #475569; }
.aft-propose-checks { display: flex; gap: 14px; flex-wrap: wrap; }
.aft-propose-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #0f172a; font-weight: 600; cursor: pointer; user-select: none; }
.aft-propose-chk input[type="checkbox"] { width: 16px; height: 16px; accent-color: #1e3a8a; cursor: pointer; }
.aft-propose-confirm { background: #1e3a8a; color: #fff; border: 1px solid #1e3a8a; padding: 8px 16px; font-size: 13px; font-weight: 700; border-radius: 8px; cursor: pointer; transition: background 0.12s; white-space: nowrap; }
.aft-propose-confirm:hover:not(:disabled) { background: #1d4ed8; border-color: #1d4ed8; }
.aft-propose-confirm:disabled { opacity: 0.6; cursor: not-allowed; }

/* Fecha/hora pago dentro propose bar */
.aft-propose-datetime { display: flex; flex-direction: column; gap: 4px; min-width: 280px; }
.aft-propose-datetime label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; font-weight: 700; }
.aft-propose-datetime__row { display: flex; gap: 6px; align-items: stretch; }
.aft-propose-datetime__date { flex: 1; min-width: 160px; }
.aft-propose-datetime__time { width: 80px; padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; background: #fff; color: #0f172a; font-variant-numeric: tabular-nums; text-align: center; letter-spacing: 0.5px; }
.aft-propose-datetime__time:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.aft-propose-datetime__hint { font-size: 10.5px; color: #64748b; }

/* SweetAlert custom AFT */
.aft-swal-popup { border-radius: 12px !important; padding: 20px 24px 18px !important; font-family: inherit; border: 1px solid #e2e8f0; box-shadow: 0 20px 60px rgba(15,23,42,0.20); }
.aft-swal-popup .swal2-title { font-size: 18px !important; font-weight: 600 !important; color: #0f172a !important; padding: 0 0 4px !important; }
.aft-swal-popup .swal2-html-container { font-size: 13px !important; color: #334155 !important; margin: 12px 0 0 !important; padding: 0 !important; text-align: left !important; }
.aft-swal-popup .swal2-icon { margin: 12px auto 8px !important; }
.aft-swal-popup .swal2-actions { margin-top: 16px !important; gap: 8px !important; }

.aft-swal-intro { margin: 0 0 12px; font-size: 12.5px; color: #334155; line-height: 1.5; }
.aft-swal-intro strong { color: #0f172a; font-weight: 600; }
.aft-swal-intro .pdv-mono { color: #475569; }
.aft-swal-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 12px; }
.aft-swal-meta > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aft-swal-meta span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: #94a3b8; font-weight: 600; }
.aft-swal-meta strong { font-size: 12.5px; color: #0f172a; font-weight: 600; word-break: break-word; }

.aft-swal-table { width: 100%; border-collapse: collapse; margin: 4px 0; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.aft-swal-table thead th { background: #f8fafc; padding: 8px 10px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; font-weight: 600; border-bottom: 1px solid #e2e8f0; text-align: left; }
.aft-swal-table tbody td { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; font-size: 12.5px; color: #0f172a; }
.aft-swal-table tbody tr:last-child td { border-bottom: none; }

.aft-swal-pill { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.2px; border: 1px solid; white-space: nowrap; }

.aft-swal-footer-note { margin-top: 10px; padding: 8px 10px; background: #fef9c3; border: 1px solid #fde68a; border-radius: 6px; font-size: 11px; color: #854d0e; line-height: 1.4; }
.aft-swal-footer-note strong { color: #713f12; font-weight: 700; }

.aft-swal-confirm { padding: 7px 14px !important; font-size: 12.5px !important; font-weight: 500 !important; background: #334155 !important; color: #fff !important; border: 1px solid #334155 !important; border-radius: 6px !important; cursor: pointer; transition: background 0.12s; font-family: inherit; }
.aft-swal-confirm:hover { background: #1e293b !important; border-color: #1e293b !important; }
.aft-swal-cancel { padding: 7px 14px !important; font-size: 12.5px !important; font-weight: 500 !important; background: #fff !important; color: #475569 !important; border: 1px solid #e2e8f0 !important; border-radius: 6px !important; cursor: pointer; transition: all 0.12s; font-family: inherit; }
.aft-swal-cancel:hover { background: #f8fafc !important; border-color: #cbd5e1 !important; color: #0f172a !important; }

/* Swal form (pagar diferencia) */
.aft-swal-form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.aft-swal-form label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; font-weight: 600; text-align: left; }
.aft-swal-form label .req { color: #b91c1c; text-transform: none; }
.aft-swal-form input, .aft-swal-form select { padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; color: #0f172a; background: #fff; font-family: inherit; }
.aft-swal-form input:focus, .aft-swal-form select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.aft-swal-form__row { display: grid; grid-template-columns: 1fr 120px; gap: 10px; }

/* Compact swal — ejecutivo sobrio unificado para todos los modales de empresarios */
.aft-swal-popup--compact {
  padding: 0 !important;
  border-radius: 10px !important;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.16);
}
.aft-swal-popup--compact .swal2-icon { display: none !important; }
.aft-swal-popup--compact .swal2-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  text-align: left !important;
  padding: 16px 20px !important;
  margin: 0 !important;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  letter-spacing: 0.1px;
}
.aft-swal-popup--compact .swal2-html-container {
  margin: 0 !important;
  padding: 16px 20px !important;
  background: #f8fafc;
  color: #334155 !important;
  font-size: 12.5px !important;
  text-align: left !important;
  line-height: 1.5;
}
.aft-swal-popup--compact .swal2-actions {
  margin: 0 !important;
  padding: 12px 20px !important;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  justify-content: flex-end !important;
  gap: 6px !important;
}
.aft-swal-popup--compact .swal2-validation-message {
  margin: 8px 0 0 !important;
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border-radius: 6px;
  font-size: 11.5px;
  padding: 6px 10px !important;
}

.aft-diff-card { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-left: 3px solid #1e3a8a; border-radius: 6px; margin-bottom: 14px; }
.aft-diff-card__label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.45px; color: #64748b; font-weight: 600; }
.aft-diff-card__value { font-size: 18px; font-weight: 600; color: #0f172a; font-variant-numeric: tabular-nums; }

.aft-diff-form { display: flex; flex-direction: column; gap: 10px; }
.aft-diff-form__grid { display: grid; grid-template-columns: 1fr 100px; gap: 10px; }
.aft-diff-form__field { display: flex; flex-direction: column; gap: 4px; }
.aft-diff-form__field label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; font-weight: 600; text-align: left; margin: 0; }
.aft-diff-form__opt { text-transform: none; color: #94a3b8; font-weight: 500; letter-spacing: normal; margin-left: 4px; }
.aft-diff-form__req { text-transform: none; color: #9a3412; font-weight: 600; letter-spacing: normal; margin-left: 4px; font-size: 10px; }

/* Asignar motivos - Swal ejecutivo sobrio */
.aft-swal-popup--rec { padding: 22px 26px 20px !important; }
.aft-swal-popup--rec .swal2-title { font-size: 14px !important; font-weight: 600 !important; color: #0f172a !important; letter-spacing: 0.1px; text-transform: uppercase; letter-spacing: 0.5px !important; text-align: left !important; padding: 0 !important; margin-bottom: 14px !important; }
.aft-swal-popup--rec .swal2-icon { display: none !important; }
.aft-swal-popup--rec .swal2-html-container { margin-top: 0 !important; }
.aft-rec-intro { font-size: 12.5px; color: #334155; margin-bottom: 12px; padding: 10px 14px; background: #fff7ed; border: 1px solid #fdba74; border-radius: 6px; line-height: 1.45; }
.aft-rec-intro__count { display: inline-block; min-width: 22px; padding: 2px 7px; background: #ea580c; color: #fff; border-radius: 10px; font-size: 11px; font-weight: 700; text-align: center; margin-right: 6px; font-variant-numeric: tabular-nums; }
.aft-rec-table-wrap { max-height: 440px; overflow: auto; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; }
.aft-rec-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.aft-rec-table thead { background: #f8fafc; position: sticky; top: 0; z-index: 1; }
.aft-rec-table th { text-align: left; padding: 10px 12px; font-size: 10px; font-weight: 700; letter-spacing: 0.6px; color: #64748b; text-transform: uppercase; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.aft-rec-td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.aft-rec-table tr:last-child .aft-rec-td { border-bottom: none; }
.aft-rec-td__primary { font-weight: 600; color: #0f172a; font-size: 12.5px; line-height: 1.3; }
.aft-rec-td__secondary { margin-top: 3px; font-size: 10.5px; color: #64748b; letter-spacing: 0.1px; }
.aft-rec-chip { display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: 0.5px; padding: 3px 9px; border-radius: 3px; border: 1px solid; text-transform: uppercase; white-space: nowrap; line-height: 1.3; }
.aft-rec-select { width: 100%; padding: 7px 28px 7px 10px; font-size: 12.5px; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center; color: #0f172a; font-family: inherit; appearance: none; -webkit-appearance: none; -moz-appearance: none; cursor: pointer; min-height: 34px; box-sizing: border-box; }
.aft-rec-select:focus { outline: none; border-color: #0f172a; box-shadow: 0 0 0 2px rgba(15,23,42,0.08); }
.aft-rec-select:invalid { color: #94a3b8; }
.aft-rec-bulk { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; }
.aft-rec-bulk__label { font-size: 10px; font-weight: 700; letter-spacing: 0.6px; color: #64748b; text-transform: uppercase; flex-shrink: 0; }
.aft-rec-select--bulk { flex: 1; max-width: 320px; }
.aft-rec-bulk__btn { padding: 7px 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.2px; background: #fff; color: #334155; border: 1px solid #cbd5e1; border-radius: 4px; cursor: pointer; font-family: inherit; min-height: 34px; transition: background 0.12s, border-color 0.12s; }
.aft-rec-bulk__btn:hover { background: #f1f5f9; border-color: #94a3b8; }
.aft-rec-bulk__btn:active { background: #e2e8f0; }
.aft-diff-form__field textarea { padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; color: #0f172a; background: #fff; font-family: inherit; resize: vertical; min-height: 70px; }
.aft-diff-form__field textarea:focus { outline: none; border-color: #1e3a8a; box-shadow: 0 0 0 2px rgba(30,58,138,0.12); }
.aft-diff-form__field input, .aft-diff-form__field select { padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; color: #0f172a; background: #fff; font-family: inherit; min-height: 34px; }
.aft-diff-form__field input:focus, .aft-diff-form__field select:focus { outline: none; border-color: #1e3a8a; box-shadow: 0 0 0 2px rgba(30,58,138,0.12); }
.aft-diff-form__field select { -webkit-appearance: none; -moz-appearance: none; appearance: none; padding-right: 30px; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") right 10px center no-repeat; cursor: pointer; }

/* Modal form (empresario, etc) - variante cuerpo form */
.aft-modal--form { max-width: 620px; }
.aft-modal__header--plain { background: #fff; }
.aft-modal__body--form { gap: 12px; }
.aft-form-error { padding: 9px 12px; background: #fee2e2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 6px; font-size: 12.5px; font-weight: 500; }
.aft-form-toggle { padding: 10px 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; }
.aft-form-toggle label { display: grid; grid-template-columns: 16px 1fr; column-gap: 10px; row-gap: 2px; align-items: center; cursor: pointer; }
.aft-form-toggle input[type="checkbox"] { width: 16px; height: 16px; accent-color: #1e3a8a; cursor: pointer; grid-row: span 2; }
.aft-form-toggle label > span:first-of-type { font-size: 12.5px; font-weight: 600; color: #0f172a; }
.aft-form-toggle__hint { font-size: 11px; color: #64748b; font-weight: 400; }

/* Expandable row (empresario → buses) */
.aft-expand-btn { background: transparent; border: 1px solid #e2e8f0; border-radius: 6px; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; color: #64748b; cursor: pointer; transition: all 0.12s; }
.aft-expand-btn:hover { background: #eff6ff; border-color: #93c5fd; color: #1e3a8a; }

/* Fila expandida — card embebida */
.aft-expand-row > td {
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%) !important;
  padding: 0 !important;
  border-bottom: 1px solid #cbd5e1 !important;
  border-top: 1px solid #cbd5e1 !important;
  box-shadow: inset 3px 0 0 #1e3a8a, inset 0 2px 4px rgba(15,23,42,0.04) !important;
  animation: aft-expand-slide 0.2s ease-out;
}
@keyframes aft-expand-slide {
  from { opacity: 0; }
  to { opacity: 1; }
}

.aft-expand-content {
  padding: 16px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.aft-expand-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px dashed #cbd5e1;
}
.aft-expand-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-size: 13px;
}
.aft-expand-title svg {
  color: #475569;
  background: transparent;
  padding: 0;
  border-radius: 0;
  width: 16px !important;
  height: 16px !important;
  box-sizing: content-box;
}
.aft-expand-title strong {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.aft-expand-title .aft-modal__section-count {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  font-variant-numeric: tabular-nums;
}

/* KPIs compactos en el header expand */
.aft-expand-kpis {
  display: inline-flex;
  gap: 0;
  align-items: stretch;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  font-size: 11px;
}
.aft-expand-kpis > span:not(.aft-expand-kpis__sep) {
  padding: 6px 12px;
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
  border-right: 1px solid #e2e8f0;
}
.aft-expand-kpis > span:last-child { border-right: none; }
.aft-expand-kpis b {
  color: #0f172a;
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-transform: none;
  letter-spacing: 0;
}

/* Alert grid — KPIs de anomalías */
.aft-alert-grid { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.aft-alert-grid__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px; }
.aft-alert-grid__title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: #64748b; font-weight: 700; }
.aft-alert-grid__hint { font-size: 10.5px; color: #94a3b8; font-style: italic; }
.aft-alert-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.aft-alert-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: all 0.12s;
  position: relative;
  overflow: hidden;
}
.aft-alert-card::before {
  content: '';
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #cbd5e1;
  transition: background 0.12s;
}
.aft-alert-card:hover { border-color: #93c5fd; box-shadow: 0 2px 6px rgba(15,23,42,0.06); transform: translateY(-1px); }
.aft-alert-card.is-active { border-color: #1e3a8a; background: #dbeafe; box-shadow: inset 0 0 0 1px #1e3a8a; }
.aft-alert-card.is-active::before { background: #1e3a8a; }

.aft-alert-card__head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #64748b;
  font-weight: 700;
}
.aft-alert-card__head svg { color: #94a3b8; }
.aft-alert-card__value {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.aft-alert-card__sub { font-size: 11px; color: #94a3b8; }

/* Tone variations */
.aft-alert-card.is-ok::before { background: #16a34a; }
.aft-alert-card.is-ok .aft-alert-card__value { color: #166534; }
.aft-alert-card.is-ok .aft-alert-card__head svg { color: #16a34a; }

.aft-alert-card.is-warn::before { background: #eab308; }
.aft-alert-card.is-warn .aft-alert-card__value { color: #854d0e; }
.aft-alert-card.is-warn .aft-alert-card__head svg { color: #eab308; }

.aft-alert-card.is-err::before { background: #dc2626; }
.aft-alert-card.is-err .aft-alert-card__value { color: #b91c1c; }
.aft-alert-card.is-err .aft-alert-card__head svg { color: #dc2626; }

.aft-alert-card.is-active .aft-alert-card__head { color: #1e3a8a; }
.aft-alert-card.is-active .aft-alert-card__value { color: #1e3a8a; }

/* Expand sections container */
.aft-expand-sections { display: flex; flex-direction: column; gap: 14px; }
.aft-expand-section { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(15,23,42,0.03); }
.aft-expand-section__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #f1f5f9; }

.aft-expand-hint { font-size: 11px; color: #94a3b8; font-style: italic; }

/* Botón Asignar bus (sobrio) */
.aft-assign-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: #334155;
  color: #fff;
  border: 1px solid #334155;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  font-family: inherit;
  white-space: nowrap;
}
.aft-assign-btn:hover { background: #1e293b; border-color: #1e293b; }
.aft-assign-btn__plus {
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: rgba(255,255,255,0.85);
}

/* Botones acción por fila (tabla embebida) */
.aft-row-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.12s;
  font-family: inherit;
  white-space: nowrap;
}
.aft-row-btn:hover { background: #f8fafc; border-color: #cbd5e1; color: #0f172a; }
.aft-row-btn--danger { color: #991b1b; border-color: #fecaca; }
.aft-row-btn--danger:hover { background: #fef2f2; border-color: #f87171; color: #7f1d1d; }
.aft-row-btn--neutral { color: #475569; border-color: #cbd5e1; }
.aft-row-btn--neutral:hover { background: #f1f5f9; border-color: #94a3b8; color: #0f172a; }
.aft-row-btn--primary { color: #fff; background: #1e293b; border-color: #1e293b; }
.aft-row-btn--primary:hover { background: #0f172a; border-color: #0f172a; color: #fff; }
.aft-row-actions { display: inline-flex; gap: 6px; align-items: center; flex-wrap: nowrap; }

/* Settle modal (Cobrar / Pagar) */
.aft-swal-popup--settle { padding: 0 !important; border-radius: 12px !important; overflow: hidden; }
.aft-swal-popup--settle .swal2-title { display: none !important; }
.aft-swal-popup--settle .swal2-html-container { margin: 0 !important; padding: 0 !important; text-align: left; }
.aft-swal-popup--settle .swal2-actions { padding: 14px 22px !important; margin: 0 !important; border-top: 1px solid #e2e8f0; background: #fff; justify-content: flex-end !important; gap: 8px; }
.aft-swal-confirm--receivable { background: #15803d !important; border-color: #15803d !important; }
.aft-swal-confirm--receivable:hover { background: #166534 !important; border-color: #166534 !important; }
.aft-swal-confirm--payable { background: #1e3a8a !important; border-color: #1e3a8a !important; }
.aft-swal-confirm--payable:hover { background: #172554 !important; border-color: #172554 !important; }

.aft-settle { display: flex; flex-direction: column; text-align: left; }
.aft-settle__header { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid #f1f5f9; }
.aft-settle__icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.aft-settle__icon--receivable { background: #dcfce7; color: #15803d; }
.aft-settle__icon--payable { background: #dbeafe; color: #1e3a8a; }
.aft-settle__head-text { flex: 1; min-width: 0; }
.aft-settle__eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.5px; color: #64748b; text-transform: uppercase; }
.aft-settle__title { font-size: 16px; font-weight: 700; color: #0f172a; margin: 2px 0 0; letter-spacing: -0.2px; line-height: 1.25; }
.aft-settle__sub { font-size: 11.5px; color: #64748b; margin-top: 2px; }

.aft-settle__summary { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 14px 22px; background: #f8fafc; border-bottom: 1px solid #f1f5f9; }
.aft-settle__summary-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.aft-settle__summary-col--amount { text-align: right; }
.aft-settle__summary-label { font-size: 10.5px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.4px; }
.aft-settle__summary-value { font-size: 13px; color: #0f172a; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.aft-settle__amount { font-size: 20px; font-weight: 700; color: #0f172a; letter-spacing: -0.3px; font-variant-numeric: tabular-nums; }

.aft-settle__body { display: flex; flex-direction: column; gap: 16px; padding: 18px 22px 18px; }
.aft-settle__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.aft-settle .aft-diff-form__field { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.aft-settle .aft-diff-form__field label { font-size: 11px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.4px; display: flex; align-items: center; gap: 6px; }
.aft-settle .aft-diff-form__field input,
.aft-settle .aft-diff-form__field select { padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 13px; background: #fff; color: #0f172a; outline: none; transition: border-color 0.12s; }
.aft-settle .aft-diff-form__field input:focus,
.aft-settle .aft-diff-form__field select:focus { border-color: #334155; }
.aft-settle__badge { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 10px; font-weight: 600; background: #e0f2fe; color: #075985; text-transform: uppercase; letter-spacing: 0.3px; margin-left: 6px; }
.aft-settle__badge--warn { background: #fef9c3; color: #854d0e; }
.aft-settle__hint { font-size: 11px; color: #64748b; margin-top: 6px; line-height: 1.4; }


/* Tabla embebida ajustes */
.aft-expand-content .aft-modal__table-wrap {
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15,23,42,0.06);
  background: #fff;
}
.aft-expand-content .aft-modal__table thead th {
  background: #fafbfc;
  font-size: 10px;
}

.aft-swal-popup--compact .swal2-actions { justify-content: flex-end !important; margin-top: 18px !important; padding-top: 12px !important; border-top: 1px solid #e2e8f0; gap: 6px !important; }

/* Link cell (nombre empresario clickeable) */
.aft-link-cell { background: transparent; border: 0; padding: 0; font: inherit; color: #1e3a8a; cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: #93c5fd; text-decoration-thickness: 1px; text-underline-offset: 2px; transition: color 0.12s, text-decoration-color 0.12s; }
.aft-link-cell:hover { color: #2563eb; text-decoration-color: #2563eb; }
.aft-link-cell strong { color: inherit; }

/* Key-value table (modal cabecera) */
.aft-kv-table { width: 100%; border-collapse: collapse; margin-bottom: 6px; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.aft-kv-table th, .aft-kv-table td { padding: 8px 12px; font-size: 12.5px; text-align: left; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.aft-kv-table tr:last-child th, .aft-kv-table tr:last-child td { border-bottom: none; }
.aft-kv-table th { width: 180px; background: #f8fafc; color: #64748b; font-weight: 600; text-transform: none; font-size: 11.5px; }
.aft-kv-table td { color: #0f172a; background: #fff; }

/* ============ Modal sobrio AFT ============ */
.aft-modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.35); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 24px; animation: aft-modal-fade 0.12s ease-out; }
@keyframes aft-modal-fade { from { opacity: 0; } to { opacity: 1; } }
.aft-modal { background: #fff; border-radius: 10px; width: min(1040px, 96vw); max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(15, 23, 42, 0.16); overflow: hidden; border: 1px solid #e2e8f0; }
.aft-modal__loading { padding: 48px 24px; }

/* Header sobrio: fondo blanco, border-bottom */
.aft-modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 22px; background: #fff; border-bottom: 1px solid #e2e8f0; flex-shrink: 0; }
.aft-modal__owner { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.aft-modal__avatar { width: 40px; height: 40px; border-radius: 8px; background: #f1f5f9; border: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #475569; flex-shrink: 0; letter-spacing: 0.3px; }
.aft-modal__owner-info { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.aft-modal__eyebrow { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; color: #94a3b8; font-weight: 600; }
.aft-modal__title { margin: 1px 0 0; font-size: 16px; font-weight: 600; color: #0f172a; line-height: 1.25; }
.aft-modal__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; font-size: 11.5px; color: #64748b; }
.aft-modal__meta .pdv-mono { color: #475569; }
.aft-modal__dot { opacity: 0.4; }
.aft-modal__tag { padding: 1px 6px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 4px; font-size: 10px; font-weight: 600; color: #475569; letter-spacing: 0.2px; text-transform: uppercase; }
.aft-modal__close { background: transparent; border: 1px solid transparent; color: #94a3b8; width: 30px; height: 30px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.12s; flex-shrink: 0; }
.aft-modal__close:hover { background: #f1f5f9; color: #475569; }

/* Body */
.aft-modal__body { padding: 18px 22px 24px; overflow-y: auto; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 18px; background: #fff; }

/* KPIs: plano, sin accent bar lateral, solo borde */
.aft-modal__kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
@media (max-width: 780px) { .aft-modal__kpis { grid-template-columns: repeat(2, 1fr); } }
.aft-modal__kpi { padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; border-right: 1px solid #e2e8f0; position: relative; }
.aft-modal__kpi:last-child { border-right: none; }
@media (max-width: 780px) {
  .aft-modal__kpi { border-right: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
  .aft-modal__kpi:nth-child(2n) { border-right: none; }
  .aft-modal__kpi:nth-last-child(-n+2) { border-bottom: none; }
}
.aft-modal__kpi-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.45px; color: #94a3b8; font-weight: 600; }
.aft-modal__kpi-value { font-size: 18px; font-weight: 600; color: #0f172a; font-variant-numeric: tabular-nums; line-height: 1.15; }
.aft-modal__kpi-sub { font-size: 11px; color: #94a3b8; }
.aft-modal__kpi-bar { height: 3px; background: #f1f5f9; border-radius: 999px; overflow: hidden; margin-top: 3px; }
.aft-modal__kpi-bar-fill { height: 100%; background: #475569; border-radius: 999px; transition: width 0.3s; }
.aft-modal__kpi--ok .aft-modal__kpi-bar-fill { background: #16a34a; }
.aft-modal__kpi--warn .aft-modal__kpi-bar-fill { background: #eab308; }
.aft-modal__kpi--neutral .aft-modal__kpi-bar-fill { background: #cbd5e1; }

/* Info grid */
.aft-modal__info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; background: #fff; }
.aft-modal__info-item { padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; min-width: 0; }
.aft-modal__info-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: #94a3b8; font-weight: 600; }
.aft-modal__info-value { font-size: 12.5px; color: #0f172a; font-weight: 500; word-break: break-word; }

/* Section head */
.aft-modal__section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.aft-modal__section-title { display: flex; align-items: center; gap: 8px; color: #334155; }
.aft-modal__section-title h3 { margin: 0; font-size: 13px; font-weight: 600; color: #0f172a; }
.aft-modal__section-title svg { color: #64748b; }
.aft-modal__section-count { font-size: 11px; color: #64748b; padding: 1px 8px; background: #f1f5f9; border-radius: 4px; font-weight: 500; }
.aft-modal__search { width: 260px; max-width: 100%; }

/* Table */
.aft-modal__table-wrap { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; overflow: auto; max-height: 360px; }
.aft-modal__table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.aft-modal__table-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.aft-modal__table-wrap::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.aft-modal__table-wrap::-webkit-scrollbar-track { background: transparent; }
.aft-modal__table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.aft-modal__table thead th { position: sticky; top: 0; background: #f8fafc; color: #64748b; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; padding: 9px 12px; border-bottom: 1px solid #e2e8f0; text-align: left; z-index: 1; white-space: nowrap; }
.aft-modal__table thead th.is-numeric { text-align: right; }
.aft-modal__table tbody td { padding: 9px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: #0f172a; }
.aft-modal__table tbody tr:hover td { background: #fafbfc; }
.aft-modal__table tbody tr:last-child td { border-bottom: none; }
.aft-modal__table .is-numeric { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.aft-modal__table tbody tr:last-child td { border-bottom: 1px solid #e2e8f0; }
.aft-modal__table tfoot td { padding: 10px 12px; background: #f8fafc; border-top: 1px solid #e2e8f0; border-bottom: none !important; font-size: 12px; color: #475569; font-weight: 600; position: sticky; bottom: 0; z-index: 1; }
.aft-modal__table tfoot td.is-numeric { text-align: right; font-variant-numeric: tabular-nums; }
.aft-modal__table tfoot tr:last-child td:first-child { border-bottom-left-radius: 7px; }
.aft-modal__table tfoot tr:last-child td:last-child { border-bottom-right-radius: 7px; }
.aft-modal__empty { padding: 24px 12px !important; text-align: center; color: #94a3b8; }

/* Plate: mono simple sin color fuerte */
.aft-plate { font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; font-weight: 600; color: #0f172a; letter-spacing: 0.3px; }

/* ==================== AFT Executive Dashboard ==================== */
.aft-exec-dashboard { display: flex; flex-direction: column; gap: 14px; }
.aft-exec-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.aft-exec-hero__card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 2px rgba(15,23,42,0.04); position: relative; overflow: hidden; }
.aft-exec-hero__card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #cbd5e1; }
.aft-exec-hero__card--primary::before { background: linear-gradient(90deg, #1e40af, #2563eb); }
.aft-exec-hero__head { display: flex; align-items: center; gap: 6px; color: #64748b; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.aft-exec-hero__value { font-size: 22px; font-weight: 700; color: #0f172a; line-height: 1.1; letter-spacing: -0.3px; }
.aft-exec-hero__footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aft-exec-hero__footer-label { font-size: 11px; color: #64748b; }
.aft-exec-hero__footer-strong { font-size: 12px; color: #0f172a; font-weight: 600; }

.aft-exec-delta { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; }
.aft-exec-delta--up { background: #dcfce7; color: #15803d; }
.aft-exec-delta--down { background: #fee2e2; color: #b91c1c; }
.aft-exec-delta--neutral { background: #f1f5f9; color: #64748b; }

.aft-exec-split { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.aft-exec-split--three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 1100px) { .aft-exec-split, .aft-exec-split--three { grid-template-columns: 1fr; } }

.aft-exec-panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.aft-exec-panel--narrow { max-width: 380px; }
.aft-exec-panel__head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f1f5f9; padding-bottom: 8px; }
.aft-exec-panel__head h3 { font-size: 13px; font-weight: 600; color: #0f172a; margin: 0; letter-spacing: 0.1px; }
.aft-exec-legend { display: inline-flex; align-items: center; font-size: 11px; color: #64748b; gap: 4px; }
.aft-exec-legend__dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }

.aft-exec-chart { width: 100%; height: auto; }

.aft-exec-donut-row { display: flex; align-items: center; gap: 16px; padding: 8px 4px; }
.aft-exec-legend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; font-size: 12px; }
.aft-exec-legend-list li { display: flex; align-items: center; gap: 6px; }
.aft-exec-legend-list strong { font-weight: 500; color: #0f172a; text-transform: capitalize; flex: 1; }
.aft-exec-legend__val { font-weight: 600; color: #334155; font-variant-numeric: tabular-nums; }

.aft-exec-aging { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.aft-exec-aging__row { display: grid; grid-template-columns: 90px 1fr 120px; align-items: center; gap: 12px; }
.aft-exec-aging__label { font-size: 12px; color: #475569; font-weight: 500; }
.aft-exec-aging__bar { height: 8px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.aft-exec-aging__fill { height: 100%; border-radius: 999px; transition: width 0.3s; }
.aft-exec-aging__fill--0 { background: linear-gradient(90deg, #16a34a, #22c55e); }
.aft-exec-aging__fill--1 { background: linear-gradient(90deg, #eab308, #fbbf24); }
.aft-exec-aging__fill--2 { background: linear-gradient(90deg, #ea580c, #f97316); }
.aft-exec-aging__fill--3 { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.aft-exec-aging__value { text-align: right; font-size: 12px; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.aft-exec-aging__value strong { color: #0f172a; font-weight: 600; }

.aft-exec-ranking { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.aft-exec-ranking li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 12px; }
.aft-exec-ranking li:last-child { border-bottom: none; }
.aft-exec-ranking__num { background: #f1f5f9; color: #475569; width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; }
.aft-exec-ranking li:first-child .aft-exec-ranking__num { background: #1e293b; color: #fff; }
.aft-exec-ranking__info { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.aft-exec-ranking__info strong { font-weight: 600; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aft-exec-ranking__amount { text-align: right; display: flex; flex-direction: column; line-height: 1.2; }
.aft-exec-ranking__amount strong { font-weight: 600; color: #0f172a; font-variant-numeric: tabular-nums; }

.aft-exec-banks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.aft-exec-bank-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; border-left: 3px solid #334155; }
.aft-exec-bank-card__bank { font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.aft-exec-bank-card__acc { font-size: 12px; color: #475569; }
.aft-exec-bank-card__balance { font-size: 15px; font-weight: 700; color: #0f172a; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* Contract editor + APIs modals (sobrio ejecutivo) */
.aft-modal--contract-editor { max-width: 720px; }
.aft-modal--contract-apis { max-width: 640px; }
.aft-form-body { display: flex; flex-direction: column; gap: 14px; padding: 18px 22px; }
.aft-form-section { display: flex; flex-direction: column; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid #f1f5f9; }
.aft-form-section:last-child { border-bottom: none; padding-bottom: 0; }
.aft-form-section__title { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.aft-textarea-mono { font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; color: #0f172a; }
.aft-toggle-card { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer; transition: all 0.12s; }
.aft-toggle-card:hover { background: #f1f5f9; border-color: #cbd5e1; }
.aft-toggle-card input[type="checkbox"] { margin-top: 3px; width: 16px; height: 16px; cursor: pointer; accent-color: #1e40af; flex: 0 0 auto; }
.aft-toggle-card__body { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: #0f172a; }
.aft-toggle-card__body strong { font-weight: 600; }
.aft-toggle-card__hint { font-size: 11.5px; color: #64748b; line-height: 1.4; font-weight: 400; }

.aft-api-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; border-left: 3px solid #1e40af; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.aft-api-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid #f1f5f9; }
.aft-api-card__title { display: flex; flex-direction: column; gap: 1px; }
.aft-api-card__title strong { font-size: 13px; font-weight: 700; color: #0f172a; letter-spacing: 0.4px; }
.aft-api-card__title .pdv-sub { font-size: 11px; color: #64748b; font-weight: 400; }
.aft-api-card__toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: #475569; cursor: pointer; font-weight: 500; }
.aft-api-card__toggle input[type="checkbox"] { width: 14px; height: 14px; cursor: pointer; accent-color: #1e40af; }
.aft-api-card__telemetry { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.aft-api-card__tel-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.aft-api-card__tel-label { color: #64748b; font-weight: 500; }
.aft-api-card__error { margin-top: 4px; padding: 8px 10px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 6px; color: #991b1b; font-size: 12px; }

/* Assign bus modal */
.aft-modal--assign-bus { max-width: 980px; }
.aft-assign-body { display: flex; flex-direction: column; gap: 14px; padding: 18px 22px; }
.aft-assign-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.aft-assign-filters__search { position: relative; flex: 1 1 260px; display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 10px; color: #64748b; }
.aft-assign-filters__search input { flex: 1; border: none; outline: none; font-size: 13px; background: transparent; color: #0f172a; }
.aft-assign-filters select { font-size: 12.5px; border: 1px solid #e2e8f0; background: #fff; color: #0f172a; border-radius: 8px; padding: 7px 10px; min-width: 180px; }
.aft-assign-table-wrap { max-height: 380px; overflow: auto; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.aft-assign-table thead th { position: sticky; top: 0; background: #f8fafc; z-index: 1; }
.aft-assign-row { cursor: pointer; transition: background 0.1s; }
.aft-assign-row:hover:not(.is-disabled) { background: #f1f5f9; }
.aft-assign-row.is-selected { background: #e0e7ff !important; }
.aft-assign-row.is-disabled { cursor: not-allowed; opacity: 0.55; }
.aft-assign-row input[type="radio"] { cursor: pointer; }
.aft-assign-row.is-disabled input[type="radio"] { cursor: not-allowed; }
.aft-assign-selected { background: #f8fafc; border: 1px solid #cbd5e1; border-left: 3px solid #334155; border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.aft-assign-selected__head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #0f172a; }
.aft-assign-selected__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.aft-loading { padding: 40px; text-align: center; color: #64748b; font-size: 13px; }

/* Footer */
.aft-modal__footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 22px; border-top: 1px solid #e2e8f0; background: #fff; flex: 0 0 auto; position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -2px 8px rgba(15, 23, 42, 0.04); }
.aft-modal__btn { padding: 7px 14px; font-size: 12.5px; font-weight: 500; background: #fff; color: #475569; border: 1px solid #e2e8f0; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all 0.12s; }
.aft-modal__btn:hover { background: #f8fafc; border-color: #cbd5e1; color: #0f172a; }
.aft-modal__btn--primary { background: #334155; color: #fff; border-color: #334155; }
.aft-modal__btn--primary:hover { background: #1e293b; border-color: #1e293b; color: #fff; }
.aft-modal__btn--warn { background: #eab308; color: #0f172a; border-color: #ca8a04; font-weight: 600; }
.aft-modal__btn--warn:hover { background: #ca8a04; border-color: #a16207; color: #fff; }

/* Sibling bar — varios pagos mismo empresario misma liquidación */
.aft-sibling-bar { background: #fff; border: 1px solid #e2e8f0; border-left: 3px solid #1e3a8a; border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.aft-sibling-bar__label { font-size: 12px; color: #475569; }
.aft-sibling-bar__label strong { color: #0f172a; font-weight: 600; }
.aft-sibling-bar__tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.aft-sibling-tab { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; cursor: pointer; transition: all 0.12s; font-family: inherit; }
.aft-sibling-tab:hover { background: #eff6ff; border-color: #93c5fd; }
.aft-sibling-tab.is-active { background: #1e3a8a; border-color: #1e3a8a; }
.aft-sibling-tab.is-active .aft-sibling-tab__idx { color: #dbeafe; }
.aft-sibling-tab.is-active .aft-sibling-tab__amount { color: #fff; }
.aft-sibling-tab.is-active .aft-chip { background: rgba(255,255,255,0.2); color: #fff; }
.aft-sibling-tab.is-active .aft-chip::before { background: #fff; }
.aft-sibling-tab__idx { font-size: 10.5px; color: #64748b; font-weight: 700; letter-spacing: 0.3px; }
.aft-sibling-tab__amount { font-size: 12.5px; color: #0f172a; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Timeline eventos pago */
.aft-events { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px 16px; }
.aft-events__title { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: #0f172a; }
.aft-events__list { list-style: none; margin: 0; padding: 0; position: relative; }
.aft-events__list::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: #e2e8f0; }
.aft-event { position: relative; padding: 8px 0 8px 22px; display: flex; gap: 10px; }
.aft-event + .aft-event { border-top: 1px dashed #f1f5f9; }
.aft-event__dot { position: absolute; left: 0; top: 14px; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 2px solid #64748b; box-sizing: border-box; }
.aft-event--ok .aft-event__dot { border-color: #16a34a; background: #dcfce7; }
.aft-event--warn .aft-event__dot { border-color: #eab308; background: #fef9c3; }
.aft-event--err .aft-event__dot { border-color: #dc2626; background: #fee2e2; }
.aft-event--neutral .aft-event__dot { border-color: #64748b; background: #f1f5f9; }
.aft-event__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.aft-event__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.aft-event__label { font-size: 12.5px; color: #0f172a; font-weight: 600; }
.aft-event__amount { font-size: 13px; color: #166534; font-weight: 700; font-variant-numeric: tabular-nums; }
.aft-event--err .aft-event__amount, .aft-event--neutral .aft-event__amount { color: #94a3b8; font-weight: 500; }
.aft-event__running { font-size: 11px; color: #64748b; margin-left: auto; }
.aft-event__meta { font-size: 11.5px; color: #475569; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.aft-event__sep { color: #cbd5e1; }
.aft-event__reason { font-size: 11.5px; color: #64748b; font-style: italic; }

/* Bus participación % (columna dentro de tabla modal) */
.aft-bus-pct { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; min-width: 120px; }
.aft-bus-pct__bar { width: 70px; height: 5px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.aft-bus-pct__fill { height: 100%; background: #64748b; border-radius: 999px; transition: width 0.3s; }
.aft-bus-pct__num { font-size: 11.5px; color: #475569; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 38px; }


/* ============================================================
   Estilo ejecutivo — Reportería Enterprise + Reportes Hub.
   Sobrio, ordenado, slate con acentos sutiles. Alinea look a
   AftClearingsPage / Sobre components.
   ============================================================ */
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) {
  background: #f8fafc;
}
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page)__back a {
  font-size: 12px;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page)__back a:hover { text-decoration: underline; }

/* Filters bar en modo ejecutivo: panel blanco con borde slate, campos compactos */
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) .dashboard-filters,
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) .dashboard-filters-bar {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) .dashboard-filters__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #64748b;
}
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) .dashboard-filters__field--checkbox {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  text-transform: none;
  letter-spacing: normal;
  font-size: 12px;
  color: #0f172a;
  font-weight: 500;
}
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) .dashboard-filters__field input[type='text'],
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) .dashboard-filters__field input[type='number'],
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) .dashboard-filters__field input[type='date'],
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) .dashboard-filters__field input:not([type='checkbox']),
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) .dashboard-filters__field select {
  width: 100%;
  padding: 8px 10px;
  font-size: 12.5px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
}
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) .dashboard-filters__field input:focus,
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) .dashboard-filters__field select:focus {
  outline: none;
  border-color: #475569;
  box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.12);
}

/* Botones export — estilo sobre. */
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page)__export {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page)__export-actions {
  display: flex;
  gap: 8px;
}
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page)__export button {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page)__export button:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #94a3b8;
}
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page)__export button[variant='primary'],
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page)__export button:nth-child(2):not([variant='secondary']) {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page)__export button[variant='primary']:hover:not(:disabled),
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page)__export button:nth-child(2):hover:not(:disabled) {
  background: #1e293b;
}

/* Context summary sobre */
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) .dashboard-context-summary {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: #475569;
}
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) .dashboard-context-summary strong { color: #0f172a; }

/* Tabla detalle — densidad ejecutiva */
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) table {
  font-size: 12.5px;
  border-collapse: collapse;
  width: 100%;
  background: #fff;
}
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) table thead th {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 9px 12px;
  text-align: left;
  font-weight: 700;
}
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
  font-weight: 500;
  vertical-align: middle;
}
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) table tbody tr:hover td {
  background: #f8fafc;
}

/* KPI cards wrapper ejecutivo */
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) .kpi-strip,
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) .kpi-grid {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
}

/* Aplicar filtros button sobre */
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) button[type='submit'],
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) .dashboard-filters__apply {
  padding: 8px 16px;
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) button[type='submit']:hover:not(:disabled),
:is(.enterprise-report-catalog, .analytics-reports-hub, .enterprise-reports-hub, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .entity-insight-page) .dashboard-filters__apply:hover:not(:disabled) {
  background: #1e293b;
}

/* Estilo ejecutivo - botón Aplicar al final de primera fila (inline en extraFilters).
   Ocultamos el botón default del DashboardFiltersBar (que está al final DOM)
   y el custom se renderiza dentro de los filtros justo antes del row-break. */
:is(.enterprise-report-catalog, .executive-dashboard, .forecasting-dashboard, .benchmarking-dashboard, .operacion-empresa-page, .gestion-operacional-page, .demanda-transporte-page, .entity-insight-page) .dashboard-filters__actions {
  display: none !important;
}
.dashboard-filters__apply-inline {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* matchear vertical rhythm de los labels: hueco "label" arriba y input abajo */
}
.dashboard-filters__apply-inline::before {
  content: '\00a0';
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 5px;
  visibility: hidden;
}
.dashboard-filters__apply-inline button {
  padding: 8px 16px;
  height: 36px;
  background: #0f172a;
  color: #fff;
  border: 1px solid #0f172a;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
  width: 100%;
  line-height: 1;
}
.dashboard-filters__apply-inline button:hover:not(:disabled) {
  background: #1e293b;
  border-color: #1e293b;
}
.dashboard-filters__apply-inline button:disabled { opacity: 0.55; cursor: not-allowed; }

/* Salto de fila forzado en grid auto-fit: elemento ocupa ancho completo con altura 0. */
.dashboard-filters__row-break {
  grid-column: 1 / -1;
  height: 0;
  padding: 0;
  margin: 0;
  visibility: hidden;
}


