/* Página del módulo Tablero (/modulos/tablero/). Todo bajo .dash-page y con
   los tokens de styles.css, así funciona igual en modo oscuro. */

.dash-page {
  --dash-accent: var(--green, #2563eb);
  --dash-tint: color-mix(in srgb, var(--dash-accent) 4%, var(--paper));
  --dash-line: var(--line);
  font-size: 18px;
  color: var(--ink);
}

.dash-page h1,
.dash-page h2 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.dash-page p {
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
}

.dash-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.dash-section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.dash-section--tint {
  background: var(--dash-tint);
}

/* Botón principal: el único color sólido de la página. */
.dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 8px;
  background: var(--dash-accent);
  color: var(--button-on-accent);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.dash-btn:hover {
  background: var(--green-dark);
  color: var(--button-on-accent);
  transform: translateY(-1px);
}

.dash-btn:focus-visible,
.dash-more a:focus-visible {
  outline: 2px solid var(--dash-accent);
  outline-offset: 3px;
}

/* 1. Encabezado */

.dash-hero {
  padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 6vw, 72px);
}

.dash-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.dash-eyebrow {
  display: block;
  margin-bottom: 14px;
  color: var(--dash-accent);
  font-size: 15px;
  font-weight: 600;
}

.dash-hero h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.08;
}

.dash-hero p {
  margin: 18px 0 28px;
  font-size: 19px;
}

/* Capturas: en marco de navegador, a todo lo ancho o como tarjeta. */
.dash-shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--dash-line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--soft-shadow);
}

.dash-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.dash-shot__bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--dash-line);
  background: var(--sage);
}

.dash-shot__bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.dash-shot--wide {
  margin-top: clamp(32px, 4vw, 48px);
}

.dash-shot--card {
  max-width: 428px;
  justify-self: center;
}

/* 2. Dos beneficios lado a lado */

.dash-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}

.dash-pair h2,
.dash-split h2,
.dash-head h2 {
  font-size: clamp(26px, 2.8vw, 36px);
  line-height: 1.15;
}

.dash-pair p,
.dash-split p,
.dash-head p {
  margin-top: 12px;
}

/* 3, 5 y 7. Texto e imagen (o lista) en dos columnas */

.dash-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.dash-page .dash-muted {
  margin-top: 16px;
}

.dash-head {
  max-width: 680px;
  margin-bottom: clamp(28px, 4vw, 40px);
}

.dash-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--mint);
  color: var(--dash-accent);
}

.dash-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 4. Quién ve qué */

.dash-roles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dash-role {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
  border: 1px solid var(--dash-line);
  border-radius: 12px;
  background: var(--paper);
}

.dash-role .dash-icon {
  margin-bottom: 10px;
}

.dash-role__who {
  font-size: 17px;
  font-weight: 700;
}

.dash-role__sees {
  color: var(--muted);
  font-size: 16px;
}

/* 5. Avisos */

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

.dash-alert {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--dash-line);
  border-radius: 12px;
  background: var(--paper);
  font-size: 17px;
  font-weight: 600;
}

/* 6. Flujo hacia el tablero */

.dash-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
}

.dash-flow__sources {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dash-flow__sources li {
  padding: 16px;
  border: 1px solid var(--dash-line);
  border-radius: 10px;
  background: var(--paper);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.dash-flow__arrow svg {
  display: block;
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--dash-accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-flow__target {
  padding: 18px 28px;
  border-radius: 10px;
  background: var(--dash-accent);
  color: var(--button-on-accent);
  font-size: 18px;
  font-weight: 700;
}

/* 7. Preguntas de ejemplo al asistente */

.dash-chat {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.dash-page .dash-bubble {
  max-width: 420px;
  padding: 14px 18px;
  border-radius: 16px 16px 4px 16px;
  background: var(--dash-accent);
  color: var(--button-on-accent);
  font-size: 17px;
  line-height: 1.45;
}

/* 8. Cierre */

.dash-final {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid color-mix(in srgb, var(--dash-accent) 24%, var(--dash-line));
  border-radius: 16px;
  background: var(--dash-tint);
}

.dash-final h2 {
  max-width: 640px;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.2;
}

.dash-more {
  margin-top: clamp(40px, 6vw, 64px);
}

.dash-more h2 {
  margin-bottom: 16px;
  font-size: 20px;
}

.dash-more ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dash-more a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--dash-line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.dash-more a:hover {
  border-color: var(--dash-accent);
  color: var(--dash-accent);
}

/* Aparición suave al entrar en pantalla, igual que el piloto de inventarios.
   El JS marca solo lo que está debajo del pliegue. */
@media (prefers-reduced-motion: no-preference) {
  .dash-reveal {
    transition: opacity 0.4s ease calc(var(--i, 0) * 70ms), transform 0.4s ease calc(var(--i, 0) * 70ms);
  }

  .dash-reveal.is-pending {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* Tableta: los bloques de cuatro pasan a dos columnas. */
@media (max-width: 1024px) {
  .dash-roles,
  .dash-flow__sources {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Celular y tableta vertical: todo se apila, texto primero. */
@media (max-width: 860px) {
  .dash-hero__grid,
  .dash-pair,
  .dash-split {
    grid-template-columns: 1fr;
  }

  .dash-split .dash-shot--card {
    order: 2;
  }

  .dash-flow {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .dash-flow__sources {
    width: 100%;
  }

  .dash-flow__arrow {
    transform: rotate(90deg);
  }

  .dash-chat {
    justify-items: stretch;
  }
}

@media (max-width: 520px) {
  .dash-roles {
    grid-template-columns: 1fr;
  }

  .dash-btn {
    width: 100%;
  }
}
