/* =========================================================
   WIRTZ HUB · DIRECCIÓN EJECUTIVA
   DASHBOARD EJECUTIVO

   PARTE 1 DE 3

   UBICACIÓN:
   frontend/src/pages/dashboard-ejecutivo/dashboard-ejecutivo.css
   ========================================================= */


/* =========================================================
   01 · VARIABLES · MODO CLARO
   ========================================================= */

.executive-dashboard {
  --ex-bg: #f5f5f5;
  --ex-surface: #ffffff;
  --ex-surface-soft: #f7f7f7;
  --ex-surface-hover: #f1f1f1;
  --ex-surface-active: #ebebeb;

  --ex-text: #171717;
  --ex-text-strong: #050505;
  --ex-text-soft: #414141;
  --ex-text-muted: #646464;

  --ex-border: #cecece;
  --ex-border-strong: #a9a9a9;
  --ex-border-soft: #dedede;

  --ex-primary: #303030;
  --ex-primary-soft: #ededed;

  --ex-success: #147d4b;
  --ex-success-soft: #e7f5ed;
  --ex-success-border: #99c9ad;

  --ex-danger: #c53535;
  --ex-danger-soft: #fff0f0;
  --ex-danger-border: #e7a5a5;

  --ex-warning: #a56a12;
  --ex-warning-soft: #fff6e8;
  --ex-warning-border: #e3c290;

  --ex-info: #245cbe;
  --ex-info-soft: #edf3ff;
  --ex-info-border: #abc3e8;

  --ex-mayorista: #7450c5;
  --ex-mercado-libre: #2577cd;
  --ex-full: #bb8419;
  --ex-shopify: #158456;

  --ex-radius-xs: 6px;
  --ex-radius-sm: 8px;
  --ex-radius: 11px;
  --ex-radius-lg: 14px;
  --ex-radius-xl: 18px;

  --ex-ease:
    cubic-bezier(0.22, 1, 0.36, 1);

  --ex-transition-fast:
    160ms var(--ex-ease);

  --ex-transition:
    260ms var(--ex-ease);

  --ex-transition-slow:
    520ms var(--ex-ease);

  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 15px;

  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0 0 24px;

  background: transparent;
  color: var(--ex-text);

  font-family:
    "DM Sans",
    "Inter",
    system-ui,
    sans-serif;

  font-size: 13px;
  font-weight: 550;
  line-height: 1.45;

  overflow: visible;
  isolation: isolate;
}


/* =========================================================
   02 · VARIABLES · MODO OSCURO
   ========================================================= */

html[data-theme="dark"] .executive-dashboard,
body[data-theme="dark"] .executive-dashboard,
body.dark .executive-dashboard {
  --ex-bg: #050505;
  --ex-surface: #090909;
  --ex-surface-soft: #101010;
  --ex-surface-hover: #151515;
  --ex-surface-active: #1c1c1c;

  --ex-text: #ededed;
  --ex-text-strong: #ffffff;
  --ex-text-soft: #d4d4d4;
  --ex-text-muted: #a7a7a7;

  --ex-border: #393939;
  --ex-border-strong: #575757;
  --ex-border-soft: #292929;

  --ex-primary: #f0f0f0;
  --ex-primary-soft: #1b1b1b;

  --ex-success: #56cf8d;
  --ex-success-soft: #102419;
  --ex-success-border: #306f4c;

  --ex-danger: #ff7777;
  --ex-danger-soft: #291515;
  --ex-danger-border: #843d3d;

  --ex-warning: #edb14d;
  --ex-warning-soft: #282014;
  --ex-warning-border: #826031;

  --ex-info: #85b0ff;
  --ex-info-soft: #111e35;
  --ex-info-border: #405c89;

  --ex-mayorista: #b29aff;
  --ex-mercado-libre: #76b5ff;
  --ex-full: #f0c65f;
  --ex-shopify: #66dda0;
}


/* =========================================================
   03 · BOX SIZING
   ========================================================= */

.executive-dashboard,
.executive-dashboard *,
.executive-dashboard *::before,
.executive-dashboard *::after {
  box-sizing: border-box;
}


/* =========================================================
   04 · RESET LOCAL
   ========================================================= */

.executive-dashboard button,
.executive-dashboard input,
.executive-dashboard select {
  font: inherit;
}

.executive-dashboard button {
  -webkit-tap-highlight-color: transparent;
}

.executive-dashboard button:focus-visible,
.executive-dashboard input:focus-visible,
.executive-dashboard [tabindex]:focus-visible {
  outline: 2px solid var(--ex-info);
  outline-offset: 3px;
}

.executive-dashboard button:disabled {
  cursor: default;
  opacity: 0.55;
}

.executive-dashboard button:not(:disabled) {
  cursor: pointer;
}

.executive-dashboard h1,
.executive-dashboard h2,
.executive-dashboard h3,
.executive-dashboard h4,
.executive-dashboard p {
  margin: 0;
}

.executive-dashboard strong,
.executive-dashboard b {
  font-weight: 800;
}

.executive-dashboard .icon {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke-width: 1.9;
}


/* =========================================================
   05 · CONTENEDORES GENERALES
   ========================================================= */

.executive-dashboard__mount {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.executive-dashboard__two-columns {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 15px;

  width: 100%;
  min-width: 0;
}

.executive-dashboard__two-columns
> .executive-dashboard__mount {
  min-width: 0;
}

.executive-dashboard__two-columns
> .executive-dashboard__mount
> .executive-section {
  height: 100%;
}


/* =========================================================
   06 · ANIMACIÓN DE ENTRADA
   ========================================================= */

@keyframes executive-enter {
  from {
    opacity: 0;
    transform: translateY(13px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes executive-scale-enter {
  from {
    opacity: 0;
    transform: scale(0.97);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes executive-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes executive-skeleton {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

.executive-dashboard .is-spinning {
  animation: executive-spin 850ms linear infinite;
}

.executive-dashboard__mount {
  animation:
    executive-enter
    650ms
    var(--ex-ease)
    both;
}

.executive-dashboard__mount:nth-child(2) {
  animation-delay: 45ms;
}

.executive-dashboard__mount:nth-child(3) {
  animation-delay: 85ms;
}

.executive-dashboard__mount:nth-child(4) {
  animation-delay: 125ms;
}

.executive-dashboard__mount:nth-child(5) {
  animation-delay: 165ms;
}


/* =========================================================
   07 · HEADER EJECUTIVO
   ========================================================= */

.executive-header {
  position: relative;
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;

  width: 100%;
  min-width: 0;
  min-height: 102px;
  padding: 19px 21px;

  border: 1px solid var(--ex-border);
  border-radius: var(--ex-radius-lg);
  background: var(--ex-surface);

  overflow: hidden;
}

.executive-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 1px;
  background: var(--ex-border-strong);
  opacity: 0.7;
}

.executive-header__identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.executive-header__mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;

  width: 48px;
  height: 48px;

  border: 1px solid var(--ex-border-strong);
  border-radius: var(--ex-radius);
  background: var(--ex-surface-soft);
  color: var(--ex-text-strong);
}

.executive-header__mark .icon {
  width: 22px;
  height: 22px;
}

.executive-header__mark::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 7px;
  height: 7px;

  border: 2px solid var(--ex-surface);
  border-radius: 50%;
  background: var(--ex-success);
}

.executive-header__titles {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
}

.executive-eyebrow {
  display: block;
  color: var(--ex-text-muted);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.executive-header__titles h1 {
  color: var(--ex-text-strong);
  font-size: clamp(23px, 2vw, 32px);
  font-weight: 850;
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.executive-header__titles p {
  color: var(--ex-text-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
}


/* =========================================================
   08 · CONTROLES DEL HEADER
   ========================================================= */

.executive-header__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  min-width: 0;
}

.executive-header__periods {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;

  border: 1px solid var(--ex-border);
  border-radius: 9px;
  background: var(--ex-surface-soft);
}

.executive-period-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 31px;
  padding: 0 12px;

  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;

  color: var(--ex-text-soft);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;

  transition:
    color var(--ex-transition-fast),
    border-color var(--ex-transition-fast),
    background var(--ex-transition-fast),
    transform var(--ex-transition-fast);
}

.executive-period-button:hover {
  background: var(--ex-surface-hover);
  color: var(--ex-text-strong);
}

.executive-period-button.is-active {
  border-color: var(--ex-border-strong);
  background: var(--ex-surface);
  color: var(--ex-text-strong);
}

.executive-date-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  min-height: 39px;
  padding: 0 11px;

  border: 1px solid var(--ex-border);
  border-radius: 8px;
  background: var(--ex-surface);
  color: var(--ex-text-strong);
}

.executive-date-control .icon {
  width: 14px;
  height: 14px;
}

.executive-date-control input {
  width: 124px;
  max-width: 100%;
  min-width: 0;

  border: none;
  outline: none;
  background: transparent;
  color: var(--ex-text-strong);

  font-size: 11px;
  font-weight: 750;
  color-scheme: light;
}

html[data-theme="dark"]
.executive-date-control input,
body[data-theme="dark"]
.executive-date-control input,
body.dark
.executive-date-control input {
  color-scheme: dark;
}

.executive-header__clock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;

  padding: 0 11px;
  border: 1px solid var(--ex-border);
  border-radius: 8px;
  background: var(--ex-surface-soft);
  color: var(--ex-text-strong);
}

.executive-header__clock .icon {
  width: 14px;
  height: 14px;
  color: var(--ex-text-muted);
}

.executive-header__clock strong {
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.executive-header__update {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  color: var(--ex-text-muted);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.executive-header__update .icon {
  width: 13px;
  height: 13px;
}

.executive-refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  min-height: 39px;
  padding: 0 14px;

  border: 1px solid var(--ex-text-strong);
  border-radius: 8px;
  background: var(--ex-text-strong);
  color: var(--ex-surface);

  font-size: 10px;
  font-weight: 800;

  transition:
    opacity var(--ex-transition-fast),
    transform var(--ex-transition-fast);
}

.executive-refresh-button:hover:not(:disabled) {
  opacity: 0.85;
  transform: translateY(-1px);
}

.executive-refresh-button:active:not(:disabled) {
  transform: translateY(0);
}

.executive-refresh-button .icon {
  width: 14px;
  height: 14px;
}


/* =========================================================
   09 · SECCIONES
   ========================================================= */

.executive-section {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;

  border: 1px solid var(--ex-border);
  border-radius: var(--ex-radius-lg);
  background: var(--ex-surface);

  overflow: hidden;
}

.executive-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;

  min-width: 0;
  min-height: 73px;
  padding: 14px 17px;

  border-bottom: 1px solid var(--ex-border);
}

.executive-section__identity {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.executive-section__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;

  width: 38px;
  height: 38px;

  border: 1px solid var(--ex-border);
  border-radius: 9px;
  background: var(--ex-surface-soft);
  color: var(--ex-text-strong);
}

.executive-section__icon .icon {
  width: 17px;
  height: 17px;
}

.executive-section__titles {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.executive-section__titles h2 {
  color: var(--ex-text-strong);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.executive-section__titles p {
  color: var(--ex-text-muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
}

.executive-section__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.executive-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  min-height: 32px;
  padding: 0 10px;

  border: 1px solid var(--ex-border);
  border-radius: 7px;
  background: var(--ex-surface-soft);
  color: var(--ex-text-strong);

  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;

  transition:
    background var(--ex-transition-fast),
    border-color var(--ex-transition-fast),
    transform var(--ex-transition-fast);
}

.executive-link-button:hover {
  border-color: var(--ex-border-strong);
  background: var(--ex-surface-hover);
  transform: translateY(-1px);
}

.executive-link-button .icon {
  width: 13px;
  height: 13px;
}


/* =========================================================
   10 · KPI PRINCIPALES
   ========================================================= */

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

  width: 100%;
  min-width: 0;
}

.executive-kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;

  min-width: 0;
  min-height: 204px;
  padding: 16px 17px 0;

  border: 1px solid var(--ex-border);
  border-radius: var(--ex-radius-lg);
  background: var(--ex-surface);
  color: var(--ex-text);

  text-align: left;
  overflow: hidden;

  animation:
    executive-enter
    650ms
    var(--ex-ease)
    both;

  animation-delay:
    calc(var(--executive-index, 0) * 65ms);

  transition:
    border-color var(--ex-transition),
    background var(--ex-transition),
    transform var(--ex-transition);
}

.executive-kpi.is-clickable:hover {
  border-color: var(--ex-border-strong);
  background: var(--ex-surface-hover);
  transform: translateY(-3px);
}

.executive-kpi::before {
  content: "";
  position: absolute;
  top: 0;
  left: 17px;
  right: 17px;
  height: 2px;
  border-radius: 999px;
  background: var(--ex-primary);
}

.executive-kpi--success::before {
  background: var(--ex-success);
}

.executive-kpi--danger::before {
  background: var(--ex-danger);
}

.executive-kpi--info::before {
  background: var(--ex-info);
}

.executive-kpi--neutral::before {
  background: var(--ex-border-strong);
}

.executive-kpi__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.executive-kpi__icon {
  display: grid;
  place-items: center;

  width: 38px;
  height: 38px;

  border: 1px solid var(--ex-border);
  border-radius: 9px;
  background: var(--ex-surface-soft);
  color: var(--ex-text-strong);
}

.executive-kpi__icon .icon {
  width: 17px;
  height: 17px;
}

.executive-kpi--success .executive-kpi__icon {
  color: var(--ex-success);
  border-color: var(--ex-success-border);
  background: var(--ex-success-soft);
}

.executive-kpi--danger .executive-kpi__icon {
  color: var(--ex-danger);
  border-color: var(--ex-danger-border);
  background: var(--ex-danger-soft);
}

.executive-kpi--info .executive-kpi__icon {
  color: var(--ex-info);
  border-color: var(--ex-info-border);
  background: var(--ex-info-soft);
}

.executive-kpi__arrow {
  width: 14px !important;
  height: 14px !important;
  color: var(--ex-text-muted);

  transition:
    transform var(--ex-transition);
}

.executive-kpi:hover .executive-kpi__arrow {
  transform: translate(2px, -2px);
}

.executive-kpi__content {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding: 16px 0 18px;
}

.executive-kpi__eyebrow {
  color: var(--ex-text-muted);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: 0.07em;
}

.executive-kpi__label {
  color: var(--ex-text-soft);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
}

.executive-kpi__value {
  display: block;
  min-width: 0;
  margin-top: 5px;

  color: var(--ex-text-strong);
  font-size: clamp(20px, 2.1vw, 32px);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;

  overflow-wrap: anywhere;
}

.executive-kpi__detail {
  color: var(--ex-text-muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}

.executive-kpi__footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;

  min-height: 37px;
  margin: auto -17px 0;
  padding: 8px 17px;

  border-top: 1px solid var(--ex-border-soft);

  color: var(--ex-text-muted);
  font-size: 10px;
  font-weight: 700;
}

.executive-kpi__partial {
  display: inline-flex;
  align-items: center;
  gap: 5px;

  color: var(--ex-warning);
  font-size: 10px;
  font-weight: 800;
}

.executive-kpi__partial .icon {
  width: 12px;
  height: 12px;
}


/* =========================================================
   11 · KPI SECUNDARIOS
   ========================================================= */

.executive-mini-metrics-grid {
  display: grid;
  grid-template-columns:
    repeat(6, minmax(0, 1fr));
  gap: 10px;

  width: 100%;
  min-width: 0;
}

.executive-mini-metric {
  display: flex;
  align-items: center;
  gap: 10px;

  min-width: 0;
  min-height: 91px;
  padding: 12px;

  border: 1px solid var(--ex-border);
  border-radius: var(--ex-radius);
  background: var(--ex-surface);

  animation:
    executive-enter
    650ms
    var(--ex-ease)
    both;

  animation-delay:
    calc(var(--executive-index, 0) * 45ms);
}

.executive-mini-metric__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;

  width: 34px;
  height: 34px;

  border: 1px solid var(--ex-border);
  border-radius: 8px;
  background: var(--ex-surface-soft);
  color: var(--ex-text-strong);
}

.executive-mini-metric__icon .icon {
  width: 15px;
  height: 15px;
}

.executive-mini-metric--warning
.executive-mini-metric__icon {
  color: var(--ex-warning);
  border-color: var(--ex-warning-border);
  background: var(--ex-warning-soft);
}

.executive-mini-metric--success
.executive-mini-metric__icon {
  color: var(--ex-success);
  border-color: var(--ex-success-border);
  background: var(--ex-success-soft);
}

.executive-mini-metric--info
.executive-mini-metric__icon {
  color: var(--ex-info);
  border-color: var(--ex-info-border);
  background: var(--ex-info-soft);
}

.executive-mini-metric__body {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
}

.executive-mini-metric__body small {
  color: var(--ex-text-muted);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.25;
}

.executive-mini-metric__body strong {
  color: var(--ex-text-strong);
  font-size: clamp(13px, 1.15vw, 18px);
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.executive-mini-metric__body > span {
  color: var(--ex-text-muted);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.35;
}


/* =========================================================
   12 · SKELETON
   ========================================================= */

.executive-skeleton {
  display: block;

  border-radius: 5px;

  background:
    linear-gradient(
      90deg,
      var(--ex-surface-soft) 0%,
      var(--ex-surface-hover) 45%,
      var(--ex-surface-soft) 100%
    );

  background-size: 220% 100%;

  animation:
    executive-skeleton
    1600ms
    linear
    infinite;
}

.executive-skeleton--number {
  width: 74%;
  max-width: 190px;
  height: 28px;
  margin-top: 7px;
}


/* =========================================================
   13 · ESTADOS GENERALES
   ========================================================= */

.executive-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 150px;
  padding: 24px;

  color: var(--ex-text-muted);
  text-align: center;
}

.executive-empty-state__icon {
  display: grid;
  place-items: center;

  width: 43px;
  height: 43px;

  border: 1px solid var(--ex-border);
  border-radius: 10px;
  background: var(--ex-surface-soft);
  color: var(--ex-text-muted);
}

.executive-empty-state__icon .icon {
  width: 19px;
  height: 19px;
}

.executive-empty-state strong {
  color: var(--ex-text-strong);
  font-size: 12px;
  font-weight: 800;
}

.executive-empty-state > span:last-child {
  max-width: 340px;

  color: var(--ex-text-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}

.executive-empty-state.is-error
.executive-empty-state__icon {
  color: var(--ex-danger);
  border-color: var(--ex-danger-border);
  background: var(--ex-danger-soft);
}

.executive-empty-state.is-loading
.executive-empty-state__icon {
  color: var(--ex-info);
  border-color: var(--ex-info-border);
  background: var(--ex-info-soft);
}


/* =========================================================
   14 · ESTADO DE RENTABILIDAD
   ========================================================= */

.executive-profit-status {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;

  min-width: 0;
  padding: 5px 8px;

  border: 1px solid var(--ex-border);
  border-radius: 6px;

  font-size: 9px;
  font-weight: 800;
  line-height: 1.4;
}

.executive-profit-status .icon {
  width: 12px;
  height: 12px;
}

.executive-profit-status.is-complete {
  color: var(--ex-success);
  border-color: var(--ex-success-border);
  background: var(--ex-success-soft);
}

.executive-profit-status.is-partial {
  color: var(--ex-warning);
  border-color: var(--ex-warning-border);
  background: var(--ex-warning-soft);
}


/* =========================================================
   FIN · PARTE 1 DE 3

   SIGUE PARTE 2:
   - Gráficos SVG.
   - Barras animadas.
   - Participación por canal.
   - Cards de canales.
   - Facturación y clientes.
   ========================================================= *//* =========================================================
   WIRTZ HUB · DIRECCIÓN EJECUTIVA
   DASHBOARD EJECUTIVO

   PARTE 2 DE 3

   UBICACIÓN:
   frontend/src/pages/dashboard-ejecutivo/dashboard-ejecutivo.css

   CONTINÚA DIRECTAMENTE DESPUÉS DE LA PARTE 1.
   ========================================================= */


/* =========================================================
   15 · GRÁFICOS COMERCIALES
   ========================================================= */

.executive-section--sales-charts {
  min-width: 0;
}

.executive-sales-charts-layout {
  display: grid;
  grid-template-columns:
    minmax(0, 1.65fr)
    minmax(260px, 0.7fr);
  align-items: stretch;
  min-width: 0;
}

.executive-sales-charts-layout__main {
  display: grid;
  align-items: center;
  min-width: 0;
  min-height: 340px;
  padding: 18px 17px;
}

.executive-sales-charts-layout__side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;

  border-left: 1px solid var(--ex-border);
  background: var(--ex-surface);
}


/* =========================================================
   16 · CONTROLES DEL GRÁFICO
   ========================================================= */

.executive-chart-controls {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;

  border: 1px solid var(--ex-border);
  border-radius: 8px;
  background: var(--ex-surface-soft);
}

.executive-chart-controls__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;

  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ex-text-soft);

  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;

  transition:
    color var(--ex-transition-fast),
    background var(--ex-transition-fast),
    border-color var(--ex-transition-fast);
}

.executive-chart-controls__button:hover {
  color: var(--ex-text-strong);
  background: var(--ex-surface-hover);
}

.executive-chart-controls__button.is-active {
  border-color: var(--ex-border-strong);
  background: var(--ex-surface);
  color: var(--ex-text-strong);
}


/* =========================================================
   17 · GRÁFICO SVG
   ========================================================= */

.executive-chart {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.executive-chart__svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  overflow: visible;
}

.executive-chart__grid-line {
  stroke: var(--ex-border-soft);
  stroke-width: 1;
  stroke-dasharray: 3 5;
  vector-effect: non-scaling-stroke;
}

.executive-chart__zero-line {
  stroke: var(--ex-border-strong);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.executive-chart__axis-label {
  fill: var(--ex-text-muted);
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.executive-chart__label {
  fill: var(--ex-text-strong);
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.executive-chart__value-label {
  fill: var(--ex-text-strong);
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.executive-chart__bar-group {
  outline: none;
}

.executive-chart__bar {
  fill: var(--ex-primary);
  stroke: none;

  transition:
    opacity var(--ex-transition-fast),
    filter var(--ex-transition-fast);
}

.executive-chart__bar-group--mayorista
.executive-chart__bar {
  fill: var(--ex-mayorista);
}

.executive-chart__bar-group--mercado-libre
.executive-chart__bar {
  fill: var(--ex-mercado-libre);
}

.executive-chart__bar-group--full
.executive-chart__bar {
  fill: var(--ex-full);
}

.executive-chart__bar-group--shopify
.executive-chart__bar {
  fill: var(--ex-shopify);
}

.executive-chart__bar.is-negative {
  fill: var(--ex-danger);
}

.executive-chart__bar-group:hover
.executive-chart__bar,
.executive-chart__bar-group:focus-visible
.executive-chart__bar {
  opacity: 0.76;
}

.executive-chart__bar-group:focus-visible
.executive-chart__bar {
  stroke: var(--ex-text-strong);
  stroke-width: 2;
}

.executive-chart__hit-area {
  cursor: crosshair;
}

.executive-chart-tooltip {
  display: grid;
  gap: 5px;
  min-width: 120px;
  max-width: 260px;
  padding: 11px 13px;

  border: 1px solid var(--ex-border-strong);
  border-radius: 9px;
  background: var(--ex-surface);
  color: var(--ex-text-strong);

  box-shadow: none;
  pointer-events: none;
}

.executive-chart-tooltip > strong {
  font-size: 11px;
  font-weight: 800;
}

.executive-chart-tooltip__value {
  font-size: 15px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.executive-chart-tooltip__secondary {
  color: var(--ex-text-muted);
  font-size: 10px;
  font-weight: 650;
}


/* =========================================================
   18 · SUBSECCIÓN DE PARTICIPACIÓN
   ========================================================= */

.executive-subsection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 66px;
  padding: 13px 16px;

  border-bottom: 1px solid var(--ex-border);
}

.executive-subsection-header > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.executive-subsection-header h3 {
  color: var(--ex-text-strong);
  font-size: 13px;
  font-weight: 850;
}

.executive-subsection-header > .icon {
  width: 17px;
  height: 17px;
  color: var(--ex-text-muted);
}


/* =========================================================
   19 · DISTRIBUCIÓN POR CANAL
   ========================================================= */

.executive-distribution {
  display: grid;
  align-content: start;
  gap: 0;
  min-width: 0;
}

.executive-distribution__item {
  --ex-channel: var(--ex-primary);

  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 15px 16px;

  border-bottom: 1px solid var(--ex-border-soft);

  animation:
    executive-enter
    500ms
    var(--ex-ease)
    both;

  animation-delay:
    calc(var(--executive-index, 0) * 70ms);
}

.executive-distribution__item:last-child {
  border-bottom: none;
}

.executive-distribution__item--mayorista {
  --ex-channel: var(--ex-mayorista);
}

.executive-distribution__item--mercado-libre {
  --ex-channel: var(--ex-mercado-libre);
}

.executive-distribution__item--full {
  --ex-channel: var(--ex-full);
}

.executive-distribution__item--shopify {
  --ex-channel: var(--ex-shopify);
}

.executive-distribution__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.executive-distribution__top > span {
  min-width: 0;
  color: var(--ex-text-strong);
  font-size: 11px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.executive-distribution__top > strong {
  color: var(--ex-text-strong);
  font-size: 12px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.executive-distribution__track {
  display: block;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--ex-surface-active);
  overflow: hidden;
}

.executive-distribution__fill {
  display: block;
  width: 0;
  height: 100%;

  border-radius: inherit;
  background: var(--ex-channel);

  transition:
    width 1000ms var(--ex-ease);
}

.executive-distribution__value {
  color: var(--ex-text-soft);
  font-size: 11px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}


/* =========================================================
   20 · CARDS DE CANALES
   ========================================================= */

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

  width: 100%;
  min-width: 0;
  background: var(--ex-border);
}

.executive-channel-card {
  --ex-channel: var(--ex-primary);

  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;

  background: var(--ex-surface);
  color: var(--ex-text);
  overflow: hidden;

  animation:
    executive-enter
    600ms
    var(--ex-ease)
    both;

  animation-delay:
    calc(var(--executive-index, 0) * 75ms);

  transition:
    background var(--ex-transition);
}

.executive-channel-card:hover {
  background: var(--ex-surface-hover);
}

.executive-channel-card--mayorista {
  --ex-channel: var(--ex-mayorista);
}

.executive-channel-card--mercado-libre {
  --ex-channel: var(--ex-mercado-libre);
}

.executive-channel-card--full {
  --ex-channel: var(--ex-full);
}

.executive-channel-card--shopify {
  --ex-channel: var(--ex-shopify);
}

.executive-channel-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ex-channel);
}


/* =========================================================
   21 · CANAL · HEADER
   ========================================================= */

.executive-channel-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 75px;
  padding: 17px 14px 12px;
  border-bottom: 1px solid var(--ex-border-soft);
}

.executive-channel-card__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;

  width: 38px;
  height: 38px;

  border: 1px solid var(--ex-border);
  border-radius: 9px;
  background: var(--ex-surface-soft);
  color: var(--ex-channel);
}

.executive-channel-card__icon .icon {
  width: 17px;
  height: 17px;
}

.executive-channel-card__identity {
  display: grid;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.executive-channel-card__identity small {
  color: var(--ex-text-muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.3;
}

.executive-channel-card__identity strong {
  color: var(--ex-text-strong);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.executive-channel-card__margin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;

  min-height: 29px;
  padding: 0 8px;

  border: 1px solid var(--ex-success-border);
  border-radius: 6px;
  background: var(--ex-success-soft);
  color: var(--ex-success);

  font-size: 11px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.executive-channel-card__margin.is-negative {
  border-color: var(--ex-danger-border);
  background: var(--ex-danger-soft);
  color: var(--ex-danger);
}


/* =========================================================
   22 · CANAL · FACTURACIÓN
   ========================================================= */

.executive-channel-card__hero {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 110px;
  padding: 15px 16px;
}

.executive-channel-card__hero > span {
  color: var(--ex-text-muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.executive-channel-card__hero > strong {
  color: var(--ex-text-strong);
  font-size: clamp(18px, 1.75vw, 27px);
  font-weight: 850;
  line-height: 1.18;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}


/* =========================================================
   23 · CANAL · MÉTRICAS
   ========================================================= */

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

  min-width: 0;
  background: var(--ex-border-soft);
  border-top: 1px solid var(--ex-border-soft);
}

.executive-channel-card__metrics > div {
  display: grid;
  align-content: center;
  gap: 5px;

  min-width: 0;
  min-height: 75px;
  padding: 12px;

  background: var(--ex-surface);
}

.executive-channel-card__metrics > div > span {
  color: var(--ex-text-muted);
  font-size: 10px;
  font-weight: 750;
}

.executive-channel-card__metrics > div > strong {
  color: var(--ex-text-strong);
  font-size: clamp(12px, 1.1vw, 17px);
  font-weight: 850;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.executive-channel-card__metrics
> div > strong.is-negative {
  color: var(--ex-danger);
}


/* =========================================================
   24 · CANAL · FOOTER
   ========================================================= */

.executive-channel-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;

  min-width: 0;
  min-height: 55px;
  margin-top: auto;
  padding: 10px 13px;

  border-top: 1px solid var(--ex-border);
}

.executive-channel-card__profit-label {
  color: var(--ex-text-muted);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}


/* =========================================================
   25 · FACTURAS
   ========================================================= */

.executive-section--invoices {
  min-width: 0;
}

.executive-invoices {
  display: grid;
  width: 100%;
  min-width: 0;
}

.executive-invoices__head,
.executive-invoice-row {
  display: grid;
  grid-template-columns:
    minmax(130px, 1.05fr)
    minmax(120px, 1.4fr)
    minmax(75px, 0.65fr)
    minmax(100px, 0.85fr)
    76px;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.executive-invoices__head {
  min-height: 39px;
  padding: 9px 13px;

  border-bottom: 1px solid var(--ex-border);
  background: var(--ex-surface-soft);
}

.executive-invoices__head > span {
  color: var(--ex-text-muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.executive-invoice-row {
  min-height: 66px;
  padding: 10px 13px;

  border-bottom: 1px solid var(--ex-border-soft);
  background: var(--ex-surface);

  animation:
    executive-enter
    500ms var(--ex-ease) both;

  animation-delay:
    calc(var(--executive-index, 0) * 35ms);

  transition:
    background var(--ex-transition-fast);
}

.executive-invoice-row:hover {
  background: var(--ex-surface-hover);
}

.executive-invoice-row:last-child {
  border-bottom: none;
}

.executive-invoice-row__document {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.executive-invoice-row__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;

  width: 32px;
  height: 32px;

  border: 1px solid var(--ex-border);
  border-radius: 7px;
  background: var(--ex-surface-soft);
  color: var(--ex-text-strong);
}

.executive-invoice-row__icon .icon {
  width: 14px;
  height: 14px;
}

.executive-invoice-row__document-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.executive-invoice-row__document-info > strong {
  overflow: hidden;
  color: var(--ex-text-strong);
  font-size: 10px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.executive-invoice-row__document-info > small {
  color: var(--ex-text-muted);
  font-size: 9px;
  font-weight: 650;
}

.executive-invoice-row__client {
  min-width: 0;
  overflow: hidden;
  color: var(--ex-text-strong);
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.executive-invoice-row__date {
  color: var(--ex-text-soft);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.executive-invoice-row__total {
  color: var(--ex-text-strong);
  font-size: 11px;
  font-weight: 850;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.executive-invoice-row__state {
  justify-self: end;
  padding: 5px 8px;

  border: 1px solid var(--ex-success-border);
  border-radius: 6px;
  background: var(--ex-success-soft);
  color: var(--ex-success);

  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.executive-invoices__footer {
  display: flex;
  justify-content: center;
  padding: 12px;
  border-top: 1px solid var(--ex-border);
}


/* =========================================================
   26 · TOP CLIENTES
   ========================================================= */

.executive-top-clients {
  display: grid;
  align-content: start;
  min-width: 0;
}

.executive-top-clients__row {
  display: grid;
  grid-template-columns:
    30px
    minmax(100px, 1fr)
    minmax(50px, 0.8fr)
    minmax(85px, auto);
  align-items: center;
  gap: 11px;

  min-width: 0;
  min-height: 59px;
  padding: 10px 15px;

  border-bottom: 1px solid var(--ex-border-soft);

  animation:
    executive-enter
    500ms var(--ex-ease) both;

  animation-delay:
    calc(var(--executive-index, 0) * 50ms);
}

.executive-top-clients__row:last-child {
  border-bottom: none;
}

.executive-top-clients__rank {
  display: grid;
  place-items: center;

  width: 27px;
  height: 27px;

  border: 1px solid var(--ex-border);
  border-radius: 6px;
  background: var(--ex-surface-soft);
  color: var(--ex-text-muted);

  font-size: 10px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.executive-top-clients__name {
  min-width: 0;
  overflow: hidden;
  color: var(--ex-text-strong);

  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.executive-top-clients__track {
  height: 6px;
  border-radius: 999px;
  background: var(--ex-surface-active);
  overflow: hidden;
}

.executive-top-clients__track > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--ex-text-strong);

  transition:
    width 1000ms var(--ex-ease);
}

.executive-top-clients__row > strong {
  color: var(--ex-text-strong);
  font-size: 11px;
  font-weight: 850;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}


/* =========================================================
   FIN · PARTE 2 DE 3

   SIGUE PARTE 3:
   - Productos sin costo.
   - Stock valorizado.
   - Cards en construcción.
   - Responsive completo.
   - Ajustes de modo oscuro.
   - Accesibilidad.
   - Reducción de movimiento.
   ========================================================= *//* =========================================================
   WIRTZ HUB · DIRECCIÓN EJECUTIVA
   DASHBOARD EJECUTIVO

   PARTE 3 DE 3

   UBICACIÓN:
   frontend/src/pages/dashboard-ejecutivo/dashboard-ejecutivo.css

   CONTINÚA DIRECTAMENTE DESPUÉS DE LA PARTE 2.
   ========================================================= */


/* =========================================================
   27 · PRODUCTOS SIN COSTO
   ========================================================= */

.executive-section--missing-costs {
  min-width: 0;
}

.executive-missing-costs__summary {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 1px;
  background: var(--ex-border);
  border-bottom: 1px solid var(--ex-border);
}

.executive-missing-costs__summary > div {
  display: grid;
  align-content: center;
  gap: 6px;

  min-width: 0;
  min-height: 88px;
  padding: 15px 18px;

  background: var(--ex-surface);
}

.executive-missing-costs__summary > div > span {
  color: var(--ex-text-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.025em;
}

.executive-missing-costs__summary > div > strong {
  color: var(--ex-text-strong);
  font-size: clamp(18px, 1.7vw, 25px);
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.executive-missing-costs__summary > div:first-child > strong {
  color: var(--ex-warning);
}


/* =========================================================
   28 · LISTADO SIN COSTO
   ========================================================= */

.executive-missing-costs__list {
  display: grid;
  width: 100%;
  min-width: 0;
}

.executive-missing-cost-row {
  display: grid;
  grid-template-columns:
    34px
    minmax(0, 1fr)
    minmax(45px, auto)
    auto;

  align-items: center;
  gap: 11px;

  min-width: 0;
  min-height: 64px;
  padding: 11px 15px;

  border-bottom: 1px solid var(--ex-border-soft);
  background: var(--ex-surface);

  animation:
    executive-enter
    500ms var(--ex-ease) both;

  animation-delay:
    calc(var(--executive-index, 0) * 45ms);

  transition:
    background var(--ex-transition-fast);
}

.executive-missing-cost-row:last-child {
  border-bottom: none;
}

.executive-missing-cost-row:hover {
  background: var(--ex-surface-hover);
}

.executive-missing-cost-row__icon {
  display: grid;
  place-items: center;

  width: 34px;
  height: 34px;
  flex: 0 0 auto;

  border: 1px solid var(--ex-warning-border);
  border-radius: 8px;
  background: var(--ex-warning-soft);
  color: var(--ex-warning);
}

.executive-missing-cost-row__icon .icon {
  width: 15px;
  height: 15px;
}

.executive-missing-cost-row__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.executive-missing-cost-row__body strong {
  display: block;
  min-width: 0;
  overflow: hidden;

  color: var(--ex-text-strong);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.executive-missing-cost-row__body small {
  display: block;
  min-width: 0;
  overflow: hidden;

  color: var(--ex-text-muted);
  font-size: 9px;
  font-weight: 650;
  line-height: 1.3;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.executive-missing-cost-row__stock {
  color: var(--ex-text-soft);
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.executive-missing-cost-row__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 25px;
  padding: 0 8px;

  border: 1px solid var(--ex-warning-border);
  border-radius: 6px;
  background: var(--ex-warning-soft);
  color: var(--ex-warning);

  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.executive-missing-costs__footer {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 49px;
  padding: 9px 13px;

  border-top: 1px solid var(--ex-border);
}


/* =========================================================
   29 · STOCK VALORIZADO
   ========================================================= */

.executive-section--stock {
  min-width: 0;
}

.executive-stock-summary {
  display: grid;
  align-content: center;
  gap: 7px;

  min-width: 0;
  min-height: 145px;
  padding: 23px 20px;

  border-bottom: 1px solid var(--ex-border);
  background: var(--ex-surface);
}

.executive-stock-summary > span {
  color: var(--ex-text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.025em;
}

.executive-stock-summary > strong {
  color: var(--ex-text-strong);
  font-size: clamp(24px, 2.5vw, 39px);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.executive-stock-summary > small {
  color: var(--ex-text-muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}


/* =========================================================
   30 · DISTRIBUCIÓN DE STOCK
   ========================================================= */

.executive-stock-distribution {
  display: grid;
  align-content: start;
  gap: 0;

  width: 100%;
  min-width: 0;
}

.executive-stock-distribution__row {
  display: grid;
  grid-template-columns:
    minmax(90px, 0.85fr)
    minmax(50px, 1.2fr)
    minmax(95px, auto);

  align-items: center;
  gap: 12px;

  min-width: 0;
  min-height: 54px;
  padding: 10px 16px;

  border-bottom: 1px solid var(--ex-border-soft);

  animation:
    executive-enter
    500ms var(--ex-ease) both;

  animation-delay:
    calc(var(--executive-index, 0) * 45ms);
}

.executive-stock-distribution__row:last-child {
  border-bottom: none;
}

.executive-stock-distribution__label {
  display: block;
  min-width: 0;
  overflow: hidden;

  color: var(--ex-text-strong);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.3;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.executive-stock-distribution__track {
  display: block;
  width: 100%;
  height: 7px;

  border-radius: 999px;
  background: var(--ex-surface-active);
  overflow: hidden;
}

.executive-stock-distribution__fill {
  display: block;
  width: 0;
  height: 100%;

  border-radius: inherit;
  background: var(--ex-info);

  transition:
    width 1100ms var(--ex-ease);
}

.executive-stock-distribution__row:nth-child(4n + 2)
.executive-stock-distribution__fill {
  background: var(--ex-mayorista);
}

.executive-stock-distribution__row:nth-child(4n + 3)
.executive-stock-distribution__fill {
  background: var(--ex-shopify);
}

.executive-stock-distribution__row:nth-child(4n + 4)
.executive-stock-distribution__fill {
  background: var(--ex-full);
}

.executive-stock-distribution__row > strong {
  color: var(--ex-text-strong);
  font-size: 11px;
  font-weight: 850;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}


/* =========================================================
   31 · CARDS EN CONSTRUCCIÓN
   ========================================================= */

.executive-section--construction {
  min-width: 0;
}

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

  width: 100%;
  min-width: 0;
  background: var(--ex-border);
}

.executive-construction-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;

  min-width: 0;
  min-height: 204px;

  background: var(--ex-surface);
  color: var(--ex-text);

  animation:
    executive-enter
    600ms var(--ex-ease) both;

  animation-delay:
    calc(var(--executive-index, 0) * 60ms);

  transition:
    background var(--ex-transition);
}

.executive-construction-card:hover {
  background: var(--ex-surface-hover);
}

.executive-construction-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  min-width: 0;
  padding: 17px 16px 12px;
}

.executive-construction-card__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;

  width: 40px;
  height: 40px;

  border: 1px solid var(--ex-border);
  border-radius: 9px;
  background: var(--ex-surface-soft);
  color: var(--ex-text-strong);
}

.executive-construction-card__icon .icon {
  width: 18px;
  height: 18px;
}

.executive-construction-card__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;

  min-height: 27px;
  padding: 0 9px;

  border: 1px solid var(--ex-border);
  border-radius: 999px;
  background: var(--ex-surface-soft);
  color: var(--ex-text-muted);

  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.executive-construction-card__status .icon {
  width: 12px;
  height: 12px;
}

.executive-construction-card__body {
  display: grid;
  align-content: start;
  gap: 9px;

  flex: 1;
  min-width: 0;
  padding: 12px 16px 18px;
}

.executive-construction-card__body h3 {
  color: var(--ex-text-strong);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.executive-construction-card__body p {
  color: var(--ex-text-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.55;
}

.executive-construction-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  min-height: 44px;
  padding: 10px 16px;

  border-top: 1px solid var(--ex-border-soft);

  color: var(--ex-text-muted);
  font-size: 10px;
  font-weight: 750;
}

.executive-construction-card__footer .icon {
  width: 13px;
  height: 13px;
}


/* =========================================================
   32 · COMPATIBILIDAD CON APP SHELL
   ========================================================= */

.app-content:has(> .executive-dashboard) {
  min-width: 0;
  max-width: 100%;
}

.app-main:has(.executive-dashboard) {
  min-width: 0;
}

.app-shell:has(.executive-dashboard) {
  min-width: 0;
}

.executive-dashboard,
.executive-dashboard__mount,
.executive-section,
.executive-kpi-grid,
.executive-mini-metrics-grid,
.executive-channel-grid,
.executive-construction-grid {
  max-width: 100%;
  min-width: 0;
}

.executive-dashboard img,
.executive-dashboard svg {
  max-width: 100%;
}


/* =========================================================
   33 · RESPONSIVE · DESKTOP MEDIANO
   ========================================================= */

@media (max-width: 1600px) {

  .executive-dashboard {
    gap: 13px;
  }

  .executive-header {
    padding: 17px 18px;
  }

  .executive-kpi-grid {
    gap: 11px;
  }

  .executive-mini-metrics-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .executive-sales-charts-layout {
    grid-template-columns:
      minmax(0, 1.45fr)
      minmax(230px, 0.75fr);
  }

  .executive-channel-card__header {
    gap: 8px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .executive-channel-card__metrics > div {
    padding: 10px;
  }
}


/* =========================================================
   34 · RESPONSIVE · NOTEBOOK
   ========================================================= */

@media (max-width: 1280px) {

  .executive-header {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }

  .executive-header__controls {
    justify-content: flex-start;
  }

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

  .executive-mini-metrics-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

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

  .executive-sales-charts-layout {
    grid-template-columns:
      minmax(0, 1fr);
  }

  .executive-sales-charts-layout__side {
    border-left: none;
    border-top: 1px solid var(--ex-border);
  }

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

  .executive-distribution__item:nth-child(odd) {
    border-right: 1px solid var(--ex-border-soft);
  }

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

  .executive-invoices__head,
  .executive-invoice-row {
    grid-template-columns:
      minmax(115px, 1fr)
      minmax(100px, 1.2fr)
      70px
      minmax(90px, auto)
      65px;

    gap: 7px;
  }
}


/* =========================================================
   35 · RESPONSIVE · TABLET
   ========================================================= */

@media (max-width: 1024px) {

  .executive-dashboard {
    gap: 12px;
    padding-bottom: 18px;
  }

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

  .executive-header {
    min-height: 0;
    padding: 16px;
  }

  .executive-header__titles h1 {
    font-size: 25px;
  }

  .executive-section__header {
    padding: 13px 15px;
  }

  .executive-sales-charts-layout__main {
    min-height: 290px;
    padding: 15px;
  }

  .executive-mini-metrics-grid {
    gap: 9px;
  }

  .executive-kpi {
    min-height: 182px;
  }

  .executive-kpi__value {
    font-size: clamp(20px, 3vw, 29px);
  }
}


/* =========================================================
   36 · RESPONSIVE · MÓVIL GRANDE
   ========================================================= */

@media (max-width: 768px) {

  .executive-dashboard {
    gap: 11px;
    padding-bottom: 16px;
  }

  .executive-header {
    gap: 14px;
    padding: 15px;
    border-radius: 11px;
  }

  .executive-header__identity {
    gap: 11px;
  }

  .executive-header__mark {
    width: 41px;
    height: 41px;
  }

  .executive-header__mark .icon {
    width: 19px;
    height: 19px;
  }

  .executive-header__titles h1 {
    font-size: 23px;
  }

  .executive-header__titles p {
    font-size: 10px;
  }

  .executive-header__controls {
    display: grid;
    grid-template-columns:
      minmax(0, 1fr) auto;
    align-items: center;
    justify-content: stretch;
    gap: 8px;
  }

  .executive-header__periods {
    justify-self: start;
    max-width: 100%;
  }

  .executive-date-control {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .executive-header__clock {
    display: none;
  }

  .executive-header__update {
    grid-column: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .executive-refresh-button {
    grid-column: 2;
    grid-row: 2;
    min-height: 36px;
  }

  .executive-kpi-grid {
    gap: 9px;
  }

  .executive-kpi {
    min-height: 172px;
    padding: 13px 13px 0;
    border-radius: 11px;
  }

  .executive-kpi__content {
    padding: 13px 0;
  }

  .executive-kpi__footer {
    margin-right: -13px;
    margin-left: -13px;
    padding-right: 13px;
    padding-left: 13px;
  }

  .executive-kpi__value {
    font-size: clamp(17px, 3.5vw, 25px);
  }

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

  .executive-section__header {
    align-items: flex-start;
    gap: 11px;
  }

  .executive-section__actions {
    justify-content: flex-start;
  }

  .executive-section__titles h2 {
    font-size: 14px;
  }

  .executive-chart-controls {
    max-width: 100%;
  }

  .executive-chart-controls__button {
    padding: 0 9px;
    font-size: 9px;
  }

  .executive-sales-charts-layout__main {
    min-height: 220px;
    padding: 12px;
  }

  .executive-chart__svg {
    min-height: 175px;
  }

  .executive-channel-card__hero {
    min-height: 95px;
  }

  .executive-channel-card__hero > strong {
    font-size: clamp(17px, 3.3vw, 24px);
  }

  .executive-invoices__head {
    display: none;
  }

  .executive-invoice-row {
    grid-template-columns:
      minmax(0, 1fr)
      auto;
    gap: 8px 12px;
    min-height: 91px;
    padding: 12px;
  }

  .executive-invoice-row__document {
    grid-column: 1;
    grid-row: 1;
  }

  .executive-invoice-row__total {
    grid-column: 2;
    grid-row: 1;
  }

  .executive-invoice-row__client {
    grid-column: 1;
    grid-row: 2;
  }

  .executive-invoice-row__date {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
  }

  .executive-invoice-row__state {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .executive-stock-summary {
    min-height: 125px;
    padding: 19px;
  }

  .executive-stock-summary > strong {
    font-size: clamp(23px, 4.5vw, 34px);
  }
}


/* =========================================================
   37 · RESPONSIVE · MÓVIL
   ========================================================= */

@media (max-width: 520px) {

  .executive-dashboard {
    gap: 10px;
    font-size: 12px;
  }

  .executive-header {
    padding: 13px;
  }

  .executive-header__titles h1 {
    font-size: 21px;
  }

  .executive-header__titles p {
    max-width: 250px;
    font-size: 10px;
  }

  .executive-eyebrow {
    font-size: 8px;
  }

  .executive-header__controls {
    grid-template-columns:
      minmax(0, 1fr) auto;
  }

  .executive-period-button {
    min-height: 30px;
    padding: 0 9px;
    font-size: 9px;
  }

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

  .executive-kpi {
    min-height: 164px;
    padding: 11px 11px 0;
  }

  .executive-kpi__icon {
    width: 32px;
    height: 32px;
  }

  .executive-kpi__icon .icon {
    width: 15px;
    height: 15px;
  }

  .executive-kpi__label {
    font-size: 10px;
  }

  .executive-kpi__value {
    font-size: clamp(15px, 4vw, 21px);
  }

  .executive-kpi__detail {
    font-size: 9px;
  }

  .executive-kpi__footer {
    margin-right: -11px;
    margin-left: -11px;
    padding: 7px 11px;
  }

  .executive-kpi__partial {
    font-size: 9px;
  }

  .executive-mini-metrics-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .executive-mini-metric {
    gap: 8px;
    min-height: 78px;
    padding: 9px;
  }

  .executive-mini-metric__icon {
    width: 29px;
    height: 29px;
  }

  .executive-mini-metric__icon .icon {
    width: 13px;
    height: 13px;
  }

  .executive-mini-metric__body small {
    font-size: 8px;
  }

  .executive-mini-metric__body strong {
    font-size: 13px;
  }

  .executive-mini-metric__body > span {
    font-size: 8px;
  }

  .executive-section {
    border-radius: 10px;
  }

  .executive-section__header {
    padding: 12px;
  }

  .executive-section__icon {
    width: 32px;
    height: 32px;
  }

  .executive-section__icon .icon {
    width: 15px;
    height: 15px;
  }

  .executive-section__titles h2 {
    font-size: 13px;
  }

  .executive-section__titles p {
    font-size: 9px;
  }

  .executive-sales-charts-layout__main {
    padding: 7px;
  }

  .executive-chart__svg {
    min-height: 150px;
  }

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

  .executive-distribution__item {
    gap: 7px;
    padding: 12px;
    border-right: none !important;
  }

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

  .executive-channel-card__header {
    min-height: 65px;
    padding: 13px;
  }

  .executive-channel-card__hero {
    min-height: 85px;
    padding: 12px 13px;
  }

  .executive-channel-card__hero > strong {
    font-size: 24px;
  }

  .executive-channel-card__metrics > div {
    min-height: 67px;
    padding: 10px 13px;
  }

  .executive-channel-card__metrics > div > strong {
    font-size: 15px;
  }

  .executive-missing-cost-row {
    grid-template-columns:
      32px
      minmax(0, 1fr)
      auto;
    gap: 8px;
    padding: 10px;
  }

  .executive-missing-cost-row__icon {
    width: 32px;
    height: 32px;
  }

  .executive-missing-cost-row__stock {
    grid-column: 3;
    grid-row: 1;
  }

  .executive-missing-cost-row__status {
    grid-column: 2 / -1;
    grid-row: 2;
    justify-self: start;
  }

  .executive-stock-distribution__row {
    grid-template-columns:
      minmax(75px, 1fr)
      minmax(38px, 0.65fr)
      minmax(70px, auto);
    gap: 7px;
    padding: 10px;
  }

  .executive-stock-distribution__label {
    font-size: 9px;
  }

  .executive-stock-distribution__row > strong {
    font-size: 9px;
  }

  .executive-top-clients__row {
    grid-template-columns:
      26px
      minmax(0, 1fr)
      minmax(65px, auto);
    gap: 8px;
    padding: 10px;
  }

  .executive-top-clients__track {
    display: none;
  }

  .executive-top-clients__row > strong {
    font-size: 10px;
  }

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

  .executive-construction-card {
    min-height: 174px;
  }
}


/* =========================================================
   38 · RESPONSIVE · MÓVIL PEQUEÑO
   ========================================================= */

@media (max-width: 380px) {

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

  .executive-kpi {
    min-height: 145px;
  }

  .executive-kpi__value {
    font-size: 25px;
  }

  .executive-mini-metrics-grid {
    grid-template-columns:
      minmax(0, 1fr);
  }

  .executive-period-button {
    padding: 0 7px;
    font-size: 8px;
  }

  .executive-header__update {
    font-size: 9px;
  }

  .executive-refresh-button {
    padding: 0 10px;
    font-size: 9px;
  }

  .executive-missing-costs__summary > div {
    padding: 12px;
  }
}


/* =========================================================
   39 · CONTENEDORES ANGOSTOS
   ========================================================= */

@container (max-width: 850px) {

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

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

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

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

  .executive-sales-charts-layout {
    grid-template-columns:
      minmax(0, 1fr);
  }

  .executive-sales-charts-layout__side {
    border-left: 0;
    border-top: 1px solid var(--ex-border);
  }
}


/* =========================================================
   40 · ACCESIBILIDAD
   ========================================================= */

.executive-dashboard button,
.executive-dashboard input {
  touch-action: manipulation;
}

.executive-dashboard button:focus-visible,
.executive-dashboard [tabindex]:focus-visible {
  position: relative;
  z-index: 2;
}

.executive-dashboard .executive-chart__bar-group:focus-visible {
  outline: none;
}

.executive-dashboard ::selection {
  background: var(--ex-info-soft);
  color: var(--ex-text-strong);
}


/* =========================================================
   41 · MOVIMIENTO REDUCIDO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .executive-dashboard *,
  .executive-dashboard *::before,
  .executive-dashboard *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .executive-dashboard__mount,
  .executive-kpi,
  .executive-mini-metric,
  .executive-channel-card,
  .executive-distribution__item,
  .executive-invoice-row,
  .executive-missing-cost-row,
  .executive-stock-distribution__row,
  .executive-top-clients__row,
  .executive-construction-card {
    opacity: 1;
    transform: none;
  }
}


/* =========================================================
   42 · AJUSTES FINALES DE LAYOUT
   ========================================================= */

.executive-dashboard {
  container-type: inline-size;
}

.executive-dashboard__mount,
.executive-dashboard__two-columns,
.executive-section,
.executive-kpi,
.executive-mini-metric,
.executive-channel-card,
.executive-invoices,
.executive-invoice-row,
.executive-missing-costs__list,
.executive-stock-distribution,
.executive-top-clients {
  min-width: 0;
}

.executive-dashboard__two-columns > *,
.executive-sales-charts-layout > *,
.executive-channel-grid > *,
.executive-construction-grid > * {
  min-width: 0;
}

.executive-dashboard
.executive-section__header,
.executive-dashboard
.executive-invoices__head,
.executive-dashboard
.executive-channel-card__footer {
  border-color: var(--ex-border);
}

.executive-dashboard
.executive-kpi,
.executive-dashboard
.executive-mini-metric,
.executive-dashboard
.executive-section {
  box-shadow: none;
}

.executive-dashboard
.executive-chart-tooltip {
  box-shadow: none;
}

.executive-dashboard
.executive-kpi__value,
.executive-dashboard
.executive-channel-card__hero > strong,
.executive-dashboard
.executive-stock-summary > strong {
  text-shadow: none;
}

.executive-dashboard
.executive-section__titles h2,
.executive-dashboard
.executive-channel-card__identity strong,
.executive-dashboard
.executive-construction-card__body h3 {
  text-wrap: balance;
}


/* =========================================================
   43 · IMPRESIÓN
   ========================================================= */

@media print {

  .executive-dashboard {
    display: block;
    background: #ffffff;
    color: #000000;
    padding: 0;
  }

  .executive-header__controls,
  .executive-link-button,
  .executive-refresh-button,
  .executive-chart-controls {
    display: none !important;
  }

  .executive-dashboard__mount,
  .executive-kpi,
  .executive-mini-metric,
  .executive-channel-card,
  .executive-section,
  .executive-construction-card {
    break-inside: avoid;
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }

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

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

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


/* =========================================================
   FIN · PARTE 3 DE 3

   WIRTZ HUB · DIRECCIÓN EJECUTIVA
   DASHBOARD EJECUTIVO

   ARCHIVO:
   frontend/src/pages/dashboard-ejecutivo/dashboard-ejecutivo.css

   FIN DEL ARCHIVO.
   ========================================================= */