/*
  Asset canonico del sistema visual Disal BI.
  Fuente normativa: Base/sistema-visual.md
  Patron tipografico: Base/docs/patron-tipografias-dashboard.md

  Sistema visual maestro de informes Disal.
  Fuente de verdad centralizada para pantalla e impresion.
  Los alias legacy --type-* siguen disponibles solo por compatibilidad:
  no usarlos en nuevas hojas ni en font-size.
*/

* {
  box-sizing: border-box;
}

:root {
  --bg: #f5f7fa;
  --bg-soft: #f8fbff;
  --paper: rgba(248, 251, 255, 0.98);
  --paper-strong: #f8fbff;
  --line: #e5e7eb;
  --line-strong: #d7dce3;
  --ink: #111827;
  --ink-soft: #374151;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #2563eb;
  --shadow-card-soft:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 8px 18px rgba(15, 23, 42, 0.07);
  --radius-xl: 12px;
  --radius-lg: 12px;
  --radius-md: 10px;
  --font-display: "Inter", system-ui, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, "Segoe UI", sans-serif;

  /*
    Escala tipografica oficial.
    13 micro/captions, 14 datos/tablas/ejes, 14 cuerpo, 16 dato destacado,
    20 subtitulo/card, 24 titulo/KPI, 30-34 hero.
  */
  --fs-micro: 13px;
  --fs-data-sm: 14px;
  --fs-body: 14px;
  --fs-data-md: 16px;
  --fs-title-sm: 20px;
  --fs-title-md: 24px;
  --fs-hero: clamp(30px, 3vw, 34px);
  --type-1: 8px;
  --type-2: 10px;
  --type-3: 12px;
  --type-4: 14px;
  --type-5: 16px;
  --type-6: 18px;
  --type-7: clamp(22px, 1.8vw, 24px);
  --type-8: clamp(28px, 2.6vw, 32px);
  --fs-xs: var(--fs-micro);
  --fs-sm: var(--fs-data-sm);
  --fs-md: var(--fs-body);
  --fs-lg: var(--fs-data-md);
  --fs-xl: var(--fs-title-md);
  --fs-section: var(--fs-title-md);
  --fs-kpi: var(--fs-title-md);
  --disal-surface: rgba(255, 255, 255, 0.88);
  --disal-surface-strong: rgba(248, 251, 255, 0.98);
  --disal-surface-border: rgba(255, 255, 255, 0.86);
  --disal-line-soft: rgba(148, 163, 184, 0.24);
  --disal-shadow-lg:
    0 20px 42px rgba(98, 127, 163, 0.15),
    0 6px 16px rgba(97, 126, 162, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  --disal-shadow-md:
    0 14px 28px rgba(112, 144, 182, 0.12),
    0 3px 10px rgba(112, 144, 182, 0.08);
  --disal-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --disal-accent: #2563eb;
  --disal-accent-soft: rgba(37, 99, 235, 0.08);
  --disal-ink: #1f2937;
  --disal-muted: #6b7280;
  --page-width-max: 2109px;
  --page-width-gutter: 32px;
  --page-zoom: 0.8;
  --logo-width: 118px;
  --logo-width-mobile: 76px;
  --table-max-height: 440px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 10px;
  --space-4: 12px;
  --space-5: 14px;
  --space-6: 16px;
  --space-7: 18px;
  --space-8: 20px;
  --space-9: 24px;
  --panel-padding: 18px;
}

html {
  scroll-behavior: smooth;
}

body.theme-background {
  background:
    linear-gradient(190deg, rgba(72, 72, 157, 0.96) 0 30%, rgba(72, 72, 157, 0.88) 30% 100%),
    linear-gradient(12deg, transparent 0 70%, rgba(123, 145, 175, 0.24) 70% 100%),
    linear-gradient(196deg, transparent 0 76%, rgba(112, 111, 182, 0.42) 76% 100%);
}

body.theme-background::before,
body.theme-background::after {
  content: "";
  position: fixed;
  left: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
}

body.theme-background::before {
  width: 42vw;
  height: 26vw;
  background: linear-gradient(215deg, rgba(123, 145, 175, 0.88), rgba(123, 145, 175, 0.18));
  clip-path: polygon(0 16%, 52% 100%, 0 100%);
}

body.theme-background::after {
  width: 100vw;
  height: 28vw;
  background: linear-gradient(180deg, rgba(112, 111, 182, 0.72), rgba(112, 111, 182, 0.46));
  clip-path: polygon(0 50%, 100% 100%, 0 100%);
}

body.theme-soft-rounded {
  color: var(--disal-ink);
  font-family: var(--font-body);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body.text-scale-lg {
  --fs-micro: 13px;
  --fs-data-sm: 14px;
  --fs-body: 14px;
  --fs-data-md: 16px;
  --fs-title-sm: 20px;
  --fs-title-md: 24px;
  --fs-hero: clamp(30px, 3vw, 34px);
  --type-1: 8px;
  --type-2: 10px;
  --type-3: 12px;
  --type-4: 14px;
  --type-5: 16px;
  --type-6: 18px;
  --type-7: clamp(22px, 1.8vw, 24px);
  --type-8: clamp(28px, 2.6vw, 32px);
  --fs-xs: var(--fs-micro);
  --fs-sm: var(--fs-data-sm);
  --fs-md: var(--fs-body);
  --fs-lg: var(--fs-data-md);
  --fs-xl: var(--fs-title-md);
  --fs-section: var(--fs-title-md);
  --fs-kpi: var(--fs-title-md);
}

body.theme-soft-rounded .page {
  width: min(var(--page-width-max), calc((100vw - var(--page-width-gutter)) / var(--page-zoom)));
  margin: 0 auto;
  padding: 14px 0 24px;
  position: relative;
  z-index: 1;
  zoom: var(--page-zoom);
}

body.theme-soft-rounded .shell {
  display: grid;
  gap: var(--space-5);
}

body.report-variant-analytics .shell {
  gap: var(--space-3);
}

body.theme-soft-rounded section[id] {
  scroll-margin-top: 120px;
}

body.theme-soft-rounded .report-masthead,
body.theme-soft-rounded .masthead,
body.theme-soft-rounded .hero.report-masthead,
body.theme-soft-rounded .toolbar.report-masthead {
  position: sticky;
  top: 10px;
  z-index: 40;
  background: var(--disal-surface);
  border: 1px solid var(--disal-surface-border);
  box-shadow: var(--disal-shadow-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body.theme-soft-rounded .report-masthead,
body.theme-soft-rounded .hero.report-masthead,
body.theme-soft-rounded .masthead,
body.theme-soft-rounded .toolbar.report-masthead {
  border-radius: 20px;
}

body.theme-soft-rounded .report-masthead,
body.theme-soft-rounded .masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 92px;
  padding: 12px 16px;
  overflow: hidden;
  isolation: isolate;
}

body.theme-soft-rounded .hero.report-masthead {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  min-height: auto;
  align-items: start;
}

body.theme-soft-rounded .card,
body.theme-soft-rounded .panel,
body.theme-soft-rounded .company-section,
body.theme-soft-rounded .step-card,
body.theme-soft-rounded .board-section,
body.theme-soft-rounded .division-tabs,
body.theme-soft-rounded .sheet-tabs,
body.theme-soft-rounded .tabs-secondary,
body.theme-soft-rounded .liters-band,
body.theme-soft-rounded .region-chart-card,
body.theme-soft-rounded .table-shell,
body.theme-soft-rounded .monthly-shell,
body.theme-soft-rounded .calc-criteria,
body.theme-soft-rounded .hero.report-intro-card,
body.theme-soft-rounded .brand-card,
body.theme-soft-rounded .table-wrap,
body.theme-soft-rounded .toolbar-secondary,
body.theme-soft-rounded .sheet-nav-shell {
  background: var(--disal-surface);
  border: 1px solid var(--disal-surface-border);
  box-shadow: var(--disal-shadow-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body.theme-soft-rounded .card,
body.theme-soft-rounded .panel,
body.theme-soft-rounded .company-section,
body.theme-soft-rounded .step-card,
body.theme-soft-rounded .board-section,
body.theme-soft-rounded .division-tabs,
body.theme-soft-rounded .sheet-tabs,
body.theme-soft-rounded .tabs-secondary,
body.theme-soft-rounded .liters-band,
body.theme-soft-rounded .region-chart-card,
body.theme-soft-rounded .calc-criteria,
body.theme-soft-rounded .hero.report-intro-card,
body.theme-soft-rounded .table-wrap,
body.theme-soft-rounded .sheet-nav-shell {
  border-radius: 20px;
}

body.theme-soft-rounded .table-shell,
body.theme-soft-rounded .monthly-shell {
  border-radius: 20px;
  overflow: hidden;
}

body.theme-soft-rounded .panel::before,
body.theme-soft-rounded .liters-band::before,
body.theme-soft-rounded .hero::before,
body.theme-soft-rounded .hero.report-intro-card::before,
body.theme-soft-rounded .budget-panel::before,
body.theme-soft-rounded .executive-band::after {
  content: none !important;
  display: none !important;
}

body.theme-soft-rounded .report-masthead-main {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  min-width: 0;
}

body.theme-soft-rounded .report-masthead-copy {
  display: grid;
  gap: 2px;
  flex: 1 1 420px;
  min-width: 0;
}

body.theme-soft-rounded .masthead-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

body.theme-soft-rounded .report-toolbar-side {
  display: grid;
  gap: 12px;
  justify-items: end;
  flex: 0 0 auto;
}

body.theme-soft-rounded .report-kicker,
body.theme-soft-rounded .report-masthead .eyebrow,
body.theme-soft-rounded .report-masthead .masthead-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #5a6d93;
  font-size: var(--fs-data-sm);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}

body.theme-soft-rounded .report-title,
body.theme-soft-rounded .report-masthead h1,
body.theme-soft-rounded .report-masthead h2 {
  margin: 0;
  color: var(--disal-ink);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
}

body.theme-soft-rounded .report-title,
body.theme-soft-rounded .report-masthead h1 {
  font-size: var(--fs-hero);
}

body.theme-soft-rounded .report-masthead h2 {
  font-size: var(--fs-title-md);
}

body.theme-soft-rounded .report-note,
body.theme-soft-rounded .report-masthead p,
body.theme-soft-rounded .report-masthead .masthead-note {
  margin: 0;
  color: var(--disal-muted);
  max-width: 82ch;
  line-height: 1.55;
}

body.theme-soft-rounded .report-masthead .hero-copy,
body.theme-soft-rounded .report-masthead .masthead-copy,
body.theme-soft-rounded .report-masthead .masthead-brand {
  padding-top: 0 !important;
  color: inherit;
}

body.theme-soft-rounded .report-logo,
body.theme-soft-rounded .masthead-logo,
body.theme-soft-rounded .brand-logo.report-logo {
  display: block;
  width: min(118px, 18vw);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  align-self: center;
  flex: 0 0 auto;
  margin-left: auto;
}

body.theme-soft-rounded .report-nav,
body.theme-soft-rounded .sheet-tabs,
body.theme-soft-rounded .sheet-nav,
body.theme-soft-rounded .section-nav,
body.theme-soft-rounded .tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

body.theme-soft-rounded .report-nav a,
body.theme-soft-rounded .report-nav button,
body.theme-soft-rounded .section-nav a,
body.theme-soft-rounded .sheet-tab,
body.theme-soft-rounded .jump-link,
body.theme-soft-rounded .tab-button,
body.theme-soft-rounded .division-button,
body.theme-soft-rounded .tab-btn,
body.theme-soft-rounded .subview-switch-btn {
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.74);
  color: var(--disal-ink);
  border-radius: 999px;
  padding: 10px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  text-decoration: none;
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

body.theme-soft-rounded .report-nav a:hover,
body.theme-soft-rounded .report-nav button:hover,
body.theme-soft-rounded .section-nav a:hover,
body.theme-soft-rounded .sheet-tab:hover,
body.theme-soft-rounded .jump-link:hover,
body.theme-soft-rounded .tab-button:hover,
body.theme-soft-rounded .division-button:hover,
body.theme-soft-rounded .tab-btn:hover,
body.theme-soft-rounded .subview-switch-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--disal-accent);
}

body.theme-soft-rounded .report-nav a.active,
body.theme-soft-rounded .report-nav button.is-active,
body.theme-soft-rounded .section-nav a.active,
body.theme-soft-rounded .sheet-tab.is-active,
body.theme-soft-rounded .jump-link.active,
body.theme-soft-rounded .tab-button.is-active,
body.theme-soft-rounded .division-button.is-active,
body.theme-soft-rounded .tab-btn.is-active,
body.theme-soft-rounded .subview-switch-btn.is-active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

body.theme-soft-rounded .stat,
body.theme-soft-rounded .kpi,
body.theme-soft-rounded .kpi-card,
body.theme-soft-rounded .coverage-pick,
body.theme-soft-rounded .need-status-card,
body.theme-soft-rounded .sales-summary span,
body.theme-soft-rounded .side-note,
body.theme-soft-rounded .liters-note,
body.theme-soft-rounded .stat-card {
  box-shadow: var(--disal-shadow-md);
}

body.theme-soft-rounded .report-masthead .tabs,
body.theme-soft-rounded .report-masthead .sheet-tabs,
body.theme-soft-rounded .report-masthead .section-nav,
body.theme-soft-rounded .report-masthead .report-nav {
  margin-top: 0;
}

body.theme-soft-rounded a.kpi-card,
body.theme-soft-rounded a.kpi-card:visited,
body.theme-soft-rounded a.kpi-card:hover,
body.theme-soft-rounded a.kpi-card:active {
  color: inherit;
  text-decoration: none;
}

body.theme-soft-rounded .eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #5a6d93;
  font-size: var(--fs-data-sm);
  font-weight: 800;
  letter-spacing: 0.06em;
  margin: 0;
  text-transform: uppercase;
}

body.theme-soft-rounded .panel,
body.theme-soft-rounded .liters-band,
body.theme-soft-rounded .kpi-area {
  position: relative;
  overflow: hidden;
}

body.theme-soft-rounded .panel {
  padding: 16px;
}

body.theme-soft-rounded .liters-band {
  display: grid;
  gap: 12px;
  padding: 18px;
}

body.theme-soft-rounded .liters-header,
body.theme-soft-rounded .panel-header,
body.theme-soft-rounded .kpi-area-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  position: relative;
  z-index: 1;
}

body.theme-soft-rounded .panel-header,
body.theme-soft-rounded .liters-header {
  margin-bottom: 16px;
}

body.theme-soft-rounded .liters-header > div:first-child,
body.theme-soft-rounded .panel-header > div:first-child,
body.theme-soft-rounded .kpi-area-header > div:first-child {
  display: grid;
  align-content: start;
  gap: 8px;
}

body.theme-soft-rounded .liters-header h2,
body.theme-soft-rounded .panel-header h2 {
  margin: 0;
  font-size: var(--fs-section);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}

body.theme-soft-rounded .liters-header p,
body.theme-soft-rounded .panel-header p,
body.theme-soft-rounded .kpi-area-header p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.55;
  max-width: 82ch;
}

body.theme-soft-rounded .liters-note,
body.theme-soft-rounded .side-note {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  font-weight: 800;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

body.theme-soft-rounded .liters-grid,
body.theme-soft-rounded .report-grid,
body.theme-soft-rounded .kpis,
body.theme-soft-rounded .kpi-area-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  position: relative;
  z-index: 1;
}

body.theme-soft-rounded .grid-two {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 14px;
}

body.theme-soft-rounded .section-stack,
body.theme-soft-rounded .kpi-area-stack {
  display: grid;
  gap: 14px;
}

body.theme-soft-rounded .kpi-area {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(248, 251, 255, 0.82);
}

body.theme-soft-rounded .kpi-area-header > div {
  display: grid;
  gap: 4px;
}

body.theme-soft-rounded .kpi-area-header h3 {
  margin: 0;
  font-size: var(--fs-xl);
  line-height: 1.05;
  color: var(--ink);
}

body.theme-soft-rounded .kpi-area-grid .kpi-card {
  min-height: 170px;
}

body.theme-soft-rounded .tone-positive,
body.theme-soft-rounded .kpi-positive,
body.theme-soft-rounded .tone-success,
body.theme-soft-rounded .kpi-success {
  --kpi-color: #16a34a;
}

body.theme-soft-rounded .tone-info,
body.theme-soft-rounded .kpi-info {
  --kpi-color: #2563eb;
}

body.theme-soft-rounded .tone-attention,
body.theme-soft-rounded .kpi-attention {
  --kpi-color: #f59e0b;
}

body.theme-soft-rounded .tone-negative,
body.theme-soft-rounded .kpi-negative {
  --kpi-color: #dc2626;
}

body.theme-soft-rounded .tone-neutral,
body.theme-soft-rounded .kpi-neutral {
  --kpi-color: #64748b;
}

body.theme-soft-rounded .kpi-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    color-mix(in srgb, var(--kpi-color, #64748b) 10%, white) 100%
  );
  border: 1px solid color-mix(in srgb, var(--kpi-color, #64748b) 18%, var(--line));
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card-soft);
  min-width: 0;
}

body.theme-soft-rounded .kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--kpi-color, #64748b);
}

body.theme-soft-rounded .kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

body.theme-soft-rounded .kpi-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--kpi-color, #64748b) 12%, white);
  color: var(--kpi-color, #64748b);
  font-weight: 800;
  flex: 0 0 auto;
  font-size: var(--fs-sm);
  line-height: 1;
}

body.theme-soft-rounded .kpi-trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--kpi-color, #64748b) 12%, white);
  font-size: var(--fs-data-sm);
  font-weight: 800;
  color: var(--kpi-color, #64748b);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

body.theme-soft-rounded .kpi-label {
  margin: 0;
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

body.theme-soft-rounded .kpi-name {
  margin: 0;
  font-size: var(--fs-title-sm);
  line-height: 1.12;
  color: var(--ink);
  display: -webkit-box;
  min-height: calc(1.12em * 2);
  max-height: calc(1.12em * 2);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-wrap: balance;
}

body.theme-soft-rounded .kpi-value {
  font-size: var(--fs-kpi);
  line-height: 1.04;
  font-weight: 800;
  color: var(--ink);
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

body.theme-soft-rounded .kpi-note {
  margin: 0;
  font-size: var(--fs-body);
  color: var(--muted);
  line-height: 1.5;
}

body.theme-soft-rounded .kpi-note-strong {
  display: block;
  margin-bottom: 2px;
  font-size: var(--fs-body);
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink-soft);
}

body.theme-soft-rounded .kpi-note-detail {
  display: block;
}

body.theme-soft-rounded .liter-card,
body.theme-soft-rounded .portal-report-card {
  min-height: 180px;
}

body.theme-soft-rounded .portal-report-card {
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

body.theme-soft-rounded .portal-report-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--kpi-color, #64748b) 34%, var(--line));
}

body.theme-soft-rounded .portal-report-card .kpi-note {
  max-width: 40ch;
}

body.theme-soft-rounded .portal-open {
  color: var(--accent);
  font-size: var(--fs-sm);
  font-weight: 800;
  margin-top: auto;
}

body.theme-soft-rounded .panel-gap {
  margin-top: 14px;
}

body.theme-soft-rounded .table-shell {
  border: 1px solid var(--line);
  background: #fff;
}

body.theme-soft-rounded .table-shell > h3,
body.theme-soft-rounded .table-wrap > h3 {
  margin: 0;
  padding: 16px 16px 0;
  color: var(--ink);
  font-size: var(--fs-lg);
  line-height: 1.08;
}

body.theme-soft-rounded .table-shell > p,
body.theme-soft-rounded .table-wrap > p {
  margin: 0;
  padding: 8px 16px 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
  max-width: 88ch;
}

body.theme-soft-rounded .table-wrap {
  overflow: hidden;
}

body.theme-soft-rounded table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-sm);
}

body.theme-soft-rounded th,
body.theme-soft-rounded td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  vertical-align: top;
  overflow-wrap: anywhere;
}

body.theme-soft-rounded th {
  background: linear-gradient(180deg, rgba(248, 252, 255, 0.98) 0%, rgba(236, 245, 255, 0.96) 100%);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.theme-soft-rounded td {
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink-soft);
  line-height: 1.4;
}

body.theme-soft-rounded tbody tr:nth-child(even) td {
  background: rgba(239, 247, 255, 0.44);
}

body.theme-soft-rounded tbody tr:hover td {
  background: rgba(37, 99, 235, 0.04);
}

body.theme-soft-rounded tbody tr:last-child td,
body.theme-soft-rounded tfoot tr:last-child td {
  border-bottom: 0;
}

body.theme-soft-rounded .sort-head {
  width: 100%;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

body.theme-soft-rounded .sort-head::after {
  content: "↕";
  color: var(--disal-muted);
  font-size: var(--fs-xs);
}

body.theme-soft-rounded .sort-head[data-direction="asc"]::after {
  content: "↑";
}

body.theme-soft-rounded .sort-head[data-direction="desc"]::after {
  content: "↓";
}

body.theme-soft-rounded .num {
  text-align: right;
  white-space: nowrap;
}

body.theme-soft-rounded .status-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--kpi-color, #64748b) 12%, white);
  color: var(--kpi-color, #64748b);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

body.theme-soft-rounded .table-access {
  white-space: nowrap;
}

body.theme-soft-rounded .table-link {
  color: var(--accent);
  font-size: var(--fs-sm);
  font-weight: 800;
  text-decoration: none;
}

body.theme-soft-rounded .table-link:hover {
  text-decoration: underline;
}

body.theme-soft-rounded footer {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.45;
  padding: 0 4px;
}

@media (max-width: 1220px) {
  body.theme-soft-rounded .grid-two,
  body.theme-soft-rounded .report-grid,
  body.theme-soft-rounded .liters-grid,
  body.theme-soft-rounded .kpis,
  body.theme-soft-rounded .kpi-area-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 921px) {
  body.theme-soft-rounded .report-masthead .sheet-tabs,
  body.theme-soft-rounded .report-masthead .section-nav,
  body.theme-soft-rounded .report-masthead .report-nav,
  body.theme-soft-rounded .masthead .sheet-tabs,
  body.theme-soft-rounded .masthead .section-nav,
  body.theme-soft-rounded .masthead .report-nav {
    flex-wrap: nowrap;
    justify-content: flex-end;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.theme-soft-rounded .report-masthead .sheet-tabs::-webkit-scrollbar,
  body.theme-soft-rounded .report-masthead .section-nav::-webkit-scrollbar,
  body.theme-soft-rounded .report-masthead .report-nav::-webkit-scrollbar,
  body.theme-soft-rounded .masthead .sheet-tabs::-webkit-scrollbar,
  body.theme-soft-rounded .masthead .section-nav::-webkit-scrollbar,
  body.theme-soft-rounded .masthead .report-nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 1180px) {
  body.theme-soft-rounded .report-masthead,
  body.theme-soft-rounded .hero.report-masthead,
  body.theme-soft-rounded .toolbar.report-masthead {
    position: relative;
    top: auto;
  }
}

@media (max-width: 920px) {
  body.theme-soft-rounded .page {
    width: min(100%, calc(100% - 20px));
    padding-top: 12px;
    zoom: 1;
  }

  body.theme-soft-rounded .report-masthead.masthead,
  body.theme-soft-rounded .masthead.report-masthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px;
    align-items: start;
    gap: 10px 12px;
    min-height: 0;
    padding: 10px 12px;
  }

  body.theme-soft-rounded .report-masthead-main {
    grid-column: 1 / 2;
    align-items: start;
  }

  body.theme-soft-rounded .masthead-brand.report-masthead-copy,
  body.theme-soft-rounded .hero-copy.report-masthead-copy {
    gap: 4px;
  }

  body.theme-soft-rounded .report-kicker,
  body.theme-soft-rounded .masthead-kicker,
  body.theme-soft-rounded .eyebrow {
    font-size: var(--fs-micro);
    letter-spacing: 0.1em;
  }

  body.theme-soft-rounded .report-title,
  body.theme-soft-rounded .report-masthead h1,
  body.theme-soft-rounded .report-masthead h2,
  body.theme-soft-rounded .masthead h1,
  body.theme-soft-rounded .masthead h2 {
    font-size: var(--fs-hero);
    line-height: 0.96;
    letter-spacing: -0.03em;
  }

  body.theme-soft-rounded .masthead-tools {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
  }

  body.theme-soft-rounded .masthead-nav,
  body.theme-soft-rounded .masthead-nav.section-nav,
  body.theme-soft-rounded .report-masthead .section-nav,
  body.theme-soft-rounded .section-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    white-space: nowrap;
    scrollbar-width: none;
  }

  body.theme-soft-rounded .masthead-nav::-webkit-scrollbar,
  body.theme-soft-rounded .masthead-nav.section-nav::-webkit-scrollbar,
  body.theme-soft-rounded .report-masthead .section-nav::-webkit-scrollbar,
  body.theme-soft-rounded .section-nav::-webkit-scrollbar {
    display: none;
  }

  body.theme-soft-rounded .section-nav a {
    flex: 0 0 auto;
    padding: 8px 12px;
    font-size: var(--fs-micro);
    letter-spacing: 0.06em;
  }

  body.theme-soft-rounded .grid-two,
  body.theme-soft-rounded .report-grid,
  body.theme-soft-rounded .liters-grid,
  body.theme-soft-rounded .kpis,
  body.theme-soft-rounded .kpi-area-grid {
    grid-template-columns: 1fr;
  }

  body.theme-soft-rounded .panel-header,
  body.theme-soft-rounded .liters-header,
  body.theme-soft-rounded .kpi-area-header {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  body.theme-soft-rounded .report-masthead.masthead,
  body.theme-soft-rounded .masthead.report-masthead {
    grid-template-columns: minmax(0, 1fr) 76px;
  }

  body.theme-soft-rounded .report-logo,
  body.theme-soft-rounded .masthead-logo,
  body.theme-soft-rounded .brand-logo.report-logo {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    justify-self: end;
    align-self: start;
    width: clamp(68px, 22vw, 76px);
    min-width: 68px;
    max-width: 76px;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  body.theme-soft-rounded .report-masthead-main {
    flex-direction: column;
    flex-wrap: wrap;
  }

  body.theme-soft-rounded .report-logo,
  body.theme-soft-rounded .masthead-logo,
  body.theme-soft-rounded .brand-logo.report-logo {
    width: min(104px, 32vw);
  }
}

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

  body.theme-soft-rounded {
    color: #111827 !important;
    font-size: var(--fs-data-sm) !important;
  }

  body.theme-background,
  body.theme-background::before,
  body.theme-background::after {
    background: #fff !important;
    content: none !important;
  }

  body.theme-soft-rounded .report-masthead,
  body.theme-soft-rounded .masthead,
  body.theme-soft-rounded .card,
  body.theme-soft-rounded .panel,
  body.theme-soft-rounded .company-section,
  body.theme-soft-rounded .step-card,
  body.theme-soft-rounded .board-section,
  body.theme-soft-rounded .division-tabs,
  body.theme-soft-rounded .sheet-tabs,
  body.theme-soft-rounded .tabs-secondary,
  body.theme-soft-rounded .liters-band,
  body.theme-soft-rounded .region-chart-card,
  body.theme-soft-rounded .table-shell,
  body.theme-soft-rounded .monthly-shell,
  body.theme-soft-rounded .calc-criteria,
  body.theme-soft-rounded .hero.report-intro-card,
  body.theme-soft-rounded .brand-card,
  body.theme-soft-rounded .table-wrap,
  body.theme-soft-rounded .toolbar.report-masthead {
    background: #fff !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body.theme-soft-rounded .page {
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    zoom: 1 !important;
  }

  body.theme-soft-rounded .shell,
  body.theme-soft-rounded .kpi-grid,
  body.theme-soft-rounded .split-layout,
  body.theme-soft-rounded .mini-grid,
  body.theme-soft-rounded .alert-list {
    gap: 8px !important;
  }

  body.theme-soft-rounded .report-masthead,
  body.theme-soft-rounded .masthead {
    position: static !important;
    top: auto !important;
  }

  body.theme-soft-rounded .panel,
  body.theme-soft-rounded .table-shell,
  body.theme-soft-rounded .calc-criteria,
  body.theme-soft-rounded .criteria-shell,
  body.theme-soft-rounded .alert-shell,
  body.theme-soft-rounded .kpi-card,
  body.theme-soft-rounded .mini-stat,
  body.theme-soft-rounded .alert-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.theme-soft-rounded .table-wrap {
    max-height: none !important;
    overflow: visible !important;
  }

  body.theme-soft-rounded table {
    font-size: var(--fs-micro) !important;
  }

  body.theme-soft-rounded th,
  body.theme-soft-rounded td {
    padding: 6px 8px !important;
    font-size: var(--fs-micro) !important;
  }

  body.theme-soft-rounded thead th {
    position: static !important;
  }

  body.theme-soft-rounded .kpi-card {
    min-height: auto !important;
  }

  body.theme-soft-rounded .kpi-value {
    font-size: var(--fs-title-md) !important;
  }
}

@page {
  margin: 10mm 12mm;
}

@page report-a4-portrait {
  size: A4 portrait;
  margin: 12mm;
}

@page report-a4-landscape {
  size: A4 landscape;
  margin: 10mm 12mm;
}

@page report-legal-landscape {
  size: legal landscape;
  margin: 10mm 12mm;
}

.print-page-a4-portrait {
  page: report-a4-portrait;
}

.print-page-a4-landscape {
  page: report-a4-landscape;
}

.print-page-legal-landscape {
  page: report-legal-landscape;
}

.break-before-page {
  break-before: page;
  page-break-before: always;
}

.break-after-page {
  break-after: page;
  page-break-after: always;
}

.avoid-break-inside {
  break-inside: avoid;
  page-break-inside: avoid;
}

@media screen {
  .screen-only {
    display: block;
  }

  .print-only {
    display: none !important;
  }
}

@media print {
  .screen-only {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }
}

/*
  Variante analitica densa basada en el informe modelo:
  `Costos/informe_costos_mp_pp_pt.html`
*/

body.theme-soft-rounded:is(.cost-report, .report-variant-analytics) {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 255, 255, 0.96) 0 0, rgba(255, 255, 255, 0) 20%),
    radial-gradient(circle at 82% 12%, rgba(185, 220, 255, 0.55) 0 0, rgba(185, 220, 255, 0) 24%),
    radial-gradient(circle at 18% 88%, rgba(143, 192, 255, 0.26) 0 0, rgba(143, 192, 255, 0) 26%),
    linear-gradient(180deg, #eef7ff 0%, #e0efff 48%, #c9ddf2 100%);
}

body.theme-soft-rounded:is(.cost-report, .report-variant-analytics)::before {
  width: 48vw;
  height: 32vw;
  background:
    radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 58%),
    linear-gradient(215deg, rgba(159, 197, 239, 0.56), rgba(159, 197, 239, 0.08));
  clip-path: ellipse(62% 52% at 18% 86%);
  filter: blur(2px);
}

body.theme-soft-rounded:is(.cost-report, .report-variant-analytics)::after {
  width: 100vw;
  height: 34vw;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 22%),
    linear-gradient(180deg, rgba(157, 193, 235, 0.46), rgba(120, 164, 214, 0.22));
  clip-path: polygon(0 42%, 100% 100%, 0 100%);
}

body:is(.cost-report, .report-variant-analytics) .page {
  width: min(var(--page-width-max), calc((100vw - var(--page-width-gutter)) / var(--page-zoom)));
  zoom: var(--page-zoom);
}

body:is(.cost-report, .report-variant-analytics) .shell {
  gap: var(--space-5);
}

body:is(.cost-report, .report-variant-analytics) .report-masthead.masthead {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, auto) var(--logo-width);
  align-items: center;
  gap: var(--space-5);
  min-height: 92px;
  padding: 12px 16px;
  border-radius: 20px;
  position: sticky;
  top: 0;
  z-index: 25;
  overflow: visible;
  isolation: isolate;
}

body:is(.cost-report, .report-variant-analytics) .report-masthead-main {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
}

body:is(.cost-report, .report-variant-analytics) .report-masthead-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-top: 6px;
}

body:is(.cost-report, .report-variant-analytics) .masthead-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  min-width: 0;
}

body:is(.cost-report, .report-variant-analytics) .toolbar-stack {
  display: grid;
  gap: var(--space-3);
  justify-items: end;
  min-width: 0;
}

body:is(.cost-report, .report-variant-analytics) .report-logo,
body:is(.cost-report, .report-variant-analytics) .masthead-logo {
  align-self: center;
  display: block;
  height: auto;
  justify-self: end;
  margin-left: auto;
  max-width: 100%;
  object-fit: contain;
  width: min(var(--logo-width), 18vw);
}

body:is(.cost-report, .report-variant-analytics) .report-kicker,
body:is(.cost-report, .report-variant-analytics) .masthead-kicker {
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.theme-soft-rounded:is(.cost-report, .report-variant-analytics) .report-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--fs-section);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

body:is(.cost-report, .report-variant-analytics) h2,
body:is(.cost-report, .report-variant-analytics) h3,
body:is(.cost-report, .report-variant-analytics) h4,
body:is(.cost-report, .report-variant-analytics) .side-note,
body:is(.cost-report, .report-variant-analytics) .meta-chip,
body:is(.cost-report, .report-variant-analytics) .dashboard-route-link,
body:is(.cost-report, .report-variant-analytics) .dashboard-route-row span,
body:is(.cost-report, .report-variant-analytics) .masthead-preview-block strong,
body:is(.cost-report, .report-variant-analytics) .objective-kicker,
body:is(.cost-report, .report-variant-analytics) .trend-kicker,
body:is(.cost-report, .report-variant-analytics) .trend-side-kicker,
body:is(.cost-report, .report-variant-analytics) .waterfall-kicker,
body:is(.cost-report, .report-variant-analytics) .chart-kicker,
body:is(.cost-report, .report-variant-analytics) .special-kicker,
body:is(.cost-report, .report-variant-analytics) .table-kicker,
body:is(.cost-report, .report-variant-analytics) .trend-card-kicker,
body:is(.cost-report, .report-variant-analytics) .trend-card-meta-item span,
body:is(.cost-report, .report-variant-analytics) .trend-fact-row span,
body:is(.cost-report, .report-variant-analytics) .chart-meta-row span,
body:is(.cost-report, .report-variant-analytics) .special-meta-row span,
body:is(.cost-report, .report-variant-analytics) .map-detail-row span,
body:is(.cost-report, .report-variant-analytics) .timeline-step span,
body:is(.cost-report, .report-variant-analytics) .orders-filter-kicker,
body:is(.cost-report, .report-variant-analytics) .orders-filter-label {
  text-transform: capitalize;
}

body:is(.cost-report, .report-variant-analytics) .report-masthead .report-note {
  display: none;
}

body:is(.cost-report, .report-variant-analytics) .report-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  max-width: 62ch;
}

body:is(.cost-report, .report-variant-analytics) .masthead-nav,
body:is(.cost-report, .report-variant-analytics) .section-nav {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding-top: 4px;
}

body:is(.cost-report, .report-variant-analytics) .masthead-nav a,
body:is(.cost-report, .report-variant-analytics) .section-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  font-weight: 800;
  transition: 160ms ease;
}

body:is(.cost-report, .report-variant-analytics) .masthead-nav a:hover,
body:is(.cost-report, .report-variant-analytics) .section-nav a:hover {
  background: #eef4ff;
  border-color: #cfe0ff;
  color: var(--accent);
}

body:is(.cost-report, .report-variant-analytics) .report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: -2px 0 14px;
}

body:is(.cost-report, .report-variant-analytics) .meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 700;
}

body:is(.cost-report, .report-variant-analytics) .report-periodbar {
  padding: 12px 16px;
}

body:is(.cost-report, .report-variant-analytics) .period-control {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: var(--space-5);
}

body:is(.cost-report, .report-variant-analytics) .period-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body:is(.cost-report, .report-variant-analytics) .period-summary .eyebrow,
body:is(.cost-report, .report-variant-analytics) .period-title,
body:is(.cost-report, .report-variant-analytics) .period-summary p {
  margin: 0;
}

body:is(.cost-report, .report-variant-analytics) .period-title {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

body:is(.cost-report, .report-variant-analytics) .period-summary p:not(.eyebrow):not(.period-title) {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.42;
}

body:is(.cost-report, .report-variant-analytics) .period-button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

body:is(.cost-report, .report-variant-analytics) .period-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

body:is(.cost-report, .report-variant-analytics) .period-button:hover,
body:is(.cost-report, .report-variant-analytics) .period-button:focus-visible {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(238, 244, 255, 0.9);
  color: var(--accent);
  outline: none;
}

body:is(.cost-report, .report-variant-analytics) .period-button.is-active {
  border-color: rgba(37, 99, 235, 0.55);
  background: linear-gradient(180deg, #2f66ee, #2557d6);
  color: #ffffff;
  box-shadow:
    0 12px 24px rgba(37, 99, 235, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

body:is(.cost-report, .report-variant-analytics) .panel,
body:is(.cost-report, .report-variant-analytics) .region-chart-card,
body:is(.cost-report, .report-variant-analytics) .table-shell,
body:is(.cost-report, .report-variant-analytics) .criteria-shell,
body:is(.cost-report, .report-variant-analytics) .alert-shell,
body:is(.cost-report, .report-variant-analytics) .calc-criteria {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow:
    0 20px 42px rgba(98, 127, 163, 0.15),
    0 6px 16px rgba(97, 126, 162, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body:is(.cost-report, .report-variant-analytics) .panel,
body:is(.cost-report, .report-variant-analytics) .region-chart-card,
body:is(.cost-report, .report-variant-analytics) .criteria-shell,
body:is(.cost-report, .report-variant-analytics) .alert-shell,
body:is(.cost-report, .report-variant-analytics) .calc-criteria {
  border-radius: 24px;
}

body:is(.cost-report, .report-variant-analytics) .panel {
  padding: var(--panel-padding);
  position: relative;
  overflow: hidden;
}

body:is(.cost-report, .report-variant-analytics) section[id] {
  scroll-margin-top: 120px;
}

body:is(.cost-report, .report-variant-analytics) .panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

body:is(.cost-report, .report-variant-analytics) .panel-header > div:first-child {
  display: grid;
  align-content: start;
}

body:is(.cost-report, .report-variant-analytics) .panel-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: var(--fs-section);
  line-height: 1.05;
  letter-spacing: 0;
}

body:is(.cost-report, .report-variant-analytics) .panel-header p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-md);
  max-width: 660px;
  line-height: 1.45;
}

body:is(.cost-report, .report-variant-analytics) .panel-header .eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body:is(.cost-report, .report-variant-analytics) .side-note {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid var(--line);
  padding: 7px 10px;
  border-radius: 999px;
  background: #f8fafc;
}

body:is(.cost-report, .report-variant-analytics) .kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--space-3);
}

body:is(.cost-report, .report-variant-analytics) .tone-positive,
body:is(.cost-report, .report-variant-analytics) .tone-success {
  --kpi-color: #16a34a;
}

body:is(.cost-report, .report-variant-analytics) .tone-info {
  --kpi-color: #2563eb;
}

body:is(.cost-report, .report-variant-analytics) .tone-attention {
  --kpi-color: #f59e0b;
}

body:is(.cost-report, .report-variant-analytics) .tone-negative {
  --kpi-color: #dc2626;
}

body:is(.cost-report, .report-variant-analytics) .tone-neutral {
  --kpi-color: #64748b;
}

body:is(.cost-report, .report-variant-analytics) .kpi-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--kpi-color) 10%, white) 100%);
  border: 1px solid color-mix(in srgb, var(--kpi-color) 18%, var(--line));
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card-soft);
  min-width: 0;
  min-height: 180px;
}

body:is(.cost-report, .report-variant-analytics) .kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--kpi-color);
}

body:is(.cost-report, .report-variant-analytics) .kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}

body:is(.cost-report, .report-variant-analytics) .kpi-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--kpi-color) 12%, white);
  color: var(--kpi-color);
  font-weight: 800;
  font-size: var(--fs-sm);
  line-height: 1;
}

body:is(.cost-report, .report-variant-analytics) .kpi-trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--kpi-color) 12%, white);
  color: var(--kpi-color);
  font-size: var(--fs-micro);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

body:is(.cost-report, .report-variant-analytics) .kpi-label {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-micro);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body:is(.cost-report, .report-variant-analytics) .kpi-name {
  margin: 0;
  font-size: var(--fs-title-sm);
  line-height: 1.12;
  color: var(--ink);
  display: -webkit-box;
  min-height: calc(1.12em * 2);
  max-height: calc(1.12em * 2);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-wrap: balance;
}

body:is(.cost-report, .report-variant-analytics) .kpi-value {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--fs-kpi);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
  font-variant-numeric: tabular-nums;
  text-wrap: balance;
}

body:is(.cost-report, .report-variant-analytics) .kpi-note {
  margin: 0;
  font-size: var(--fs-body);
  color: var(--muted);
  line-height: 1.5;
}

body:is(.cost-report, .report-variant-analytics) .kpi-note-strong {
  display: block;
  margin-bottom: 2px;
  font-size: var(--fs-body);
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink-soft);
}

body:is(.cost-report, .report-variant-analytics) .kpi-note-detail {
  display: block;
}

body:is(.cost-report, .report-variant-analytics) .split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: var(--space-5);
}

body:is(.cost-report, .report-variant-analytics) .region-chart-card,
body:is(.cost-report, .report-variant-analytics) .criteria-shell,
body:is(.cost-report, .report-variant-analytics) .alert-shell {
  padding: 16px;
}

body:is(.cost-report, .report-variant-analytics) .region-chart-card h3,
body:is(.cost-report, .report-variant-analytics) .table-shell h3,
body:is(.cost-report, .report-variant-analytics) .criteria-shell h3,
body:is(.cost-report, .report-variant-analytics) .alert-shell h3,
body:is(.cost-report, .report-variant-analytics) .calc-criteria h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: var(--fs-lg);
  line-height: 1.12;
  letter-spacing: 0;
}

body:is(.cost-report, .report-variant-analytics) .region-chart-card p,
body:is(.cost-report, .report-variant-analytics) .table-shell p,
body:is(.cost-report, .report-variant-analytics) .criteria-shell p,
body:is(.cost-report, .report-variant-analytics) .alert-shell p,
body:is(.cost-report, .report-variant-analytics) .calc-criteria p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.45;
}

body:is(.cost-report, .report-variant-analytics) .table-shell {
  border-radius: 20px;
  overflow: hidden;
  padding: 14px;
}

body:is(.cost-report, .report-variant-analytics) .table-wrap {
  max-height: var(--table-max-height);
  overflow-y: auto;
  overflow-x: hidden;
  background: transparent;
  border: 0;
  border-radius: 18px;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body:is(.cost-report, .report-variant-analytics) table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: var(--fs-md);
  font-variant-numeric: tabular-nums;
}

body:is(.cost-report, .report-variant-analytics) th,
body:is(.cost-report, .report-variant-analytics) td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body:is(.cost-report, .report-variant-analytics) thead th {
  position: sticky;
  top: 0;
  background: rgba(243, 247, 255, 0.98);
  color: #41506b;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
  z-index: 2;
}

body:is(.cost-report, .report-variant-analytics) tbody tr:hover {
  background: rgba(37, 99, 235, 0.04);
}

body:is(.cost-report, .report-variant-analytics) .num,
body:is(.cost-report, .report-variant-analytics) td.num {
  text-align: right;
}

body:is(.cost-report, .report-variant-analytics) .sort-head,
body:is(.cost-report, .report-variant-analytics) .sort-head.num {
  width: 100%;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

body:is(.cost-report, .report-variant-analytics) .sort-head::after {
  content: "↕";
  color: var(--disal-muted);
  font-size: var(--fs-xs);
}

body:is(.cost-report, .report-variant-analytics) .sort-head[data-direction="asc"]::after {
  content: "↑";
}

body:is(.cost-report, .report-variant-analytics) .sort-head[data-direction="desc"]::after {
  content: "↓";
}

body:is(.cost-report, .report-variant-analytics) .status-chip,
body:is(.cost-report, .report-variant-analytics) .status-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: var(--fs-micro);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body:is(.cost-report, .report-variant-analytics) .status-chip.suba,
body:is(.cost-report, .report-variant-analytics) .status-chip.alta,
body:is(.cost-report, .report-variant-analytics) .status-chip.critico,
body:is(.cost-report, .report-variant-analytics) .status-pill.tone-negative {
  background: rgba(239, 68, 68, 0.1);
  color: #b42318;
}

body:is(.cost-report, .report-variant-analytics) .status-chip.baja,
body:is(.cost-report, .report-variant-analytics) .status-chip.bueno,
body:is(.cost-report, .report-variant-analytics) .status-pill.tone-success {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}

body:is(.cost-report, .report-variant-analytics) .status-chip.neutral,
body:is(.cost-report, .report-variant-analytics) .status-pill.tone-neutral {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

body:is(.cost-report, .report-variant-analytics) .status-chip.info,
body:is(.cost-report, .report-variant-analytics) .status-chip.referencia,
body:is(.cost-report, .report-variant-analytics) .status-chip.pp,
body:is(.cost-report, .report-variant-analytics) .status-chip.pt,
body:is(.cost-report, .report-variant-analytics) .status-chip.mp,
body:is(.cost-report, .report-variant-analytics) .status-pill.tone-info {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

body:is(.cost-report, .report-variant-analytics) .status-chip.alerta,
body:is(.cost-report, .report-variant-analytics) .status-pill.tone-attention {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

body:is(.cost-report, .report-variant-analytics) .mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

body:is(.cost-report, .report-variant-analytics) .mini-stat {
  padding: 14px;
  border-radius: var(--radius-lg);
  background: rgba(245, 248, 255, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

body:is(.cost-report, .report-variant-analytics) .mini-stat span {
  display: block;
  margin-bottom: 8px;
  color: #65738d;
  font-size: var(--fs-micro);
  font-weight: 800;
}

body:is(.cost-report, .report-variant-analytics) .mini-stat strong {
  font-size: var(--fs-xl);
  line-height: 1;
}

body:is(.cost-report, .report-variant-analytics) .empty-state {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(148, 163, 184, 0.3);
  color: var(--disal-muted);
  background: rgba(248, 250, 255, 0.82);
}

body:is(.cost-report, .report-variant-analytics) .footnote {
  color: #6c7890;
  font-size: var(--fs-data-sm);
}

body:is(.cost-report, .report-variant-analytics) .code-wrap {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: var(--fs-data-sm);
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
}

body:is(.cost-report, .report-variant-analytics) .criteria-list {
  margin: 0;
  padding-left: 18px;
  color: #55627a;
  line-height: 1.6;
}

body:is(.cost-report, .report-variant-analytics) .alert-list {
  display: grid;
  gap: 10px;
}

body:is(.cost-report, .report-variant-analytics) .alert-item {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.74);
}

body:is(.cost-report, .report-variant-analytics) .alert-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: var(--fs-body);
}

body:is(.cost-report, .report-variant-analytics) .alert-item p {
  margin: 0;
  color: #55627a;
  font-size: var(--fs-body);
}

body:is(.cost-report, .report-variant-analytics) .alert-item.warning {
  background: rgba(255, 246, 231, 0.88);
}

body:is(.cost-report, .report-variant-analytics) .alert-item.positive {
  background: rgba(236, 249, 241, 0.88);
}

body:is(.cost-report, .report-variant-analytics) .alert-item.neutral {
  background: rgba(243, 247, 255, 0.88);
}

body:is(.cost-report, .report-variant-analytics) .panel-gap {
  margin-top: 16px;
}

body:is(.cost-report, .report-variant-analytics) .calc-criteria {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 251, 255, 0.72);
}

body:is(.cost-report, .report-variant-analytics) .chart-label {
  fill: #4b5a74;
  font-size: var(--fs-micro);
}

body:is(.cost-report, .report-variant-analytics) .chart-callout {
  fill: var(--disal-ink);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.05em;
}

body:is(.cost-report, .report-variant-analytics) svg text {
  font-family: var(--font-body);
}

@media (min-width: 921px) {
  body:is(.cost-report, .report-variant-analytics) .masthead-nav.section-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body:is(.cost-report, .report-variant-analytics) .masthead-nav.section-nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 920px) {
  body:is(.cost-report, .report-variant-analytics) .page {
    width: min(100%, calc(100% - 20px));
    zoom: 1;
  }

  body:is(.cost-report, .report-variant-analytics) .report-masthead.masthead {
    grid-template-columns: minmax(0, 1fr) 88px;
    align-items: start;
    align-content: start;
    gap: 10px 12px;
    min-height: 0;
    padding: 10px 12px;
    top: 10px;
  }

  body:is(.cost-report, .report-variant-analytics) .report-masthead-main {
    display: block;
    grid-column: 1 / 2;
    width: auto;
  }

  body:is(.cost-report, .report-variant-analytics) .masthead-brand.report-masthead-copy {
    display: grid;
    gap: 4px;
    padding-top: 0;
  }

  body:is(.cost-report, .report-variant-analytics) .masthead-tools {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--space-2);
    width: auto;
    margin-left: 0;
  }

  body:is(.cost-report, .report-variant-analytics) .toolbar-stack {
    width: 100%;
    justify-items: start;
  }

  body:is(.cost-report, .report-variant-analytics) .masthead-nav,
  body:is(.cost-report, .report-variant-analytics) .masthead-nav.section-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    white-space: nowrap;
    scrollbar-width: none;
  }

  body:is(.cost-report, .report-variant-analytics) .masthead-nav::-webkit-scrollbar,
  body:is(.cost-report, .report-variant-analytics) .masthead-nav.section-nav::-webkit-scrollbar {
    display: none;
  }

  body:is(.cost-report, .report-variant-analytics) .masthead-nav a {
    flex: 0 0 auto;
    padding: 8px 12px;
    font-size: var(--fs-micro);
    letter-spacing: 0.06em;
  }

  body:is(.cost-report, .report-variant-analytics) .period-control,
  body:is(.cost-report, .report-variant-analytics) .split-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body:is(.cost-report, .report-variant-analytics) .page {
    padding-top: 10px;
  }

  body:is(.cost-report, .report-variant-analytics) .report-masthead.masthead {
    grid-template-columns: minmax(0, 1fr) var(--logo-width-mobile);
    top: 8px;
  }

  body:is(.cost-report, .report-variant-analytics) .report-logo,
  body:is(.cost-report, .report-variant-analytics) .masthead-logo {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    justify-self: end;
    align-self: start;
    width: min(var(--logo-width-mobile), 22vw);
    min-width: 68px;
    max-width: var(--logo-width-mobile);
    margin-left: 0;
  }

  body:is(.cost-report, .report-variant-analytics) .report-kicker,
  body:is(.cost-report, .report-variant-analytics) .masthead-kicker {
    font-size: var(--fs-micro);
    letter-spacing: 0.1em;
  }

  body.theme-soft-rounded:is(.cost-report, .report-variant-analytics) .report-title,
  body:is(.cost-report, .report-variant-analytics) .report-masthead h1,
  body:is(.cost-report, .report-variant-analytics) .report-masthead h2 {
    font-size: var(--fs-hero);
    line-height: 0.96;
    letter-spacing: -0.03em;
  }

  body:is(.cost-report, .report-variant-analytics) .report-note,
  body:is(.cost-report, .report-variant-analytics) .report-masthead p {
    font-size: var(--fs-body);
    line-height: 1.42;
  }

  body:is(.cost-report, .report-variant-analytics) .table-shell {
    padding: 10px;
  }

  body:is(.cost-report, .report-variant-analytics) table {
    font-size: var(--fs-micro);
  }

  body:is(.cost-report, .report-variant-analytics) th,
  body:is(.cost-report, .report-variant-analytics) td {
    padding: 6px;
  }

  body:is(.cost-report, .report-variant-analytics) thead th {
    font-size: var(--fs-micro);
  }

  body:is(.cost-report, .report-variant-analytics) td.num {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
