/* ==========================================================================
   Cartonews Roadmap — estilos públicos
   ========================================================================== */

.cnr-roadmap {
  max-width: 1100px;
  margin: 0 auto;
  font-family: inherit;
  color: inherit;
}

.cnr-roadmap__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 2rem;
  align-items: start;
}

.cnr-roadmap__main {
  min-width: 0;
}

/* Filtros
   ========================================================================== */
.cnr-filtros {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.cnr-filtros__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
}

.cnr-filtros__select {
  padding: 0.35rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
  cursor: pointer;
}

.cnr-filtros__reset {
  margin-left: auto;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  color: #555;
  transition: background 0.15s;
}

.cnr-filtros__reset:hover {
  background: #eee;
}

/* Pestañas
   ========================================================================== */
.cnr-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 1.5rem;
}

.cnr-tab {
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  background: none;
  cursor: pointer;
  color: #777;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.cnr-tab:hover {
  color: #333;
}

.cnr-tab--active {
  color: #111;
  border-bottom-color: #111;
}

/* Grupos de estado
   ========================================================================== */
.cnr-grupo {
  margin-bottom: 2rem;
}

.cnr-grupo__titulo {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
}

/* Badges de estado
   ========================================================================== */
.cnr-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cnr-badge--desarrollo {
  background: #e8f5e9;
  color: #2e7d32;
}

.cnr-badge--proximamente {
  background: #e3f2fd;
  color: #1565c0;
}

.cnr-badge--pausa {
  background: #fafafa;
  color: #757575;
  border: 1px solid #e0e0e0;
}

/* Lista de ítems
   ========================================================================== */
.cnr-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cnr-item {
  padding: 1rem 1.25rem;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  background: #fff;
  transition: box-shadow 0.15s;
}

.cnr-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.cnr-item--descartado {
  opacity: 0.8;
  background: #fafafa;
}

.cnr-item__cabecera {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.cnr-item__codigo {
  font-size: 0.72rem;
  font-weight: 700;
  color: #aaa;
  font-family: monospace;
  flex-shrink: 0;
}

.cnr-item__titulo {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  flex: 1;
}

.cnr-item__fecha-lanzamiento {
  margin-left: auto;
  font-size: 0.8rem;
  color: #888;
  flex-shrink: 0;
}

.cnr-item__motivo {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #666;
  line-height: 1.45;
}

.cnr-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.cnr-item__fecha {
  margin-left: auto;
  font-size: 0.78rem;
  color: #aaa;
}

/* Tags
   ========================================================================== */
.cnr-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.cnr-tag--categoria {
  background: #f3e5f5;
  color: #6a1b9a;
}

.cnr-tag--area {
  background: #e8eaf6;
  color: #283593;
}

.cnr-tag--solicitado {
  background: #fff8e1;
  color: #e65100;
}

/* Descartados (toggle)
   ========================================================================== */
.cnr-descartado-toggle {
  margin-top: 2.5rem;
  text-align: center;
}

.cnr-descartado-toggle__btn {
  background: none;
  border: none;
  font-size: 0.85rem;
  color: #aaa;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.cnr-descartado-toggle__btn:hover {
  color: #666;
}

.cnr-panel--descartado {
  margin-top: 1rem;
  padding: 1rem;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #eee;
}

.cnr-descartado-intro {
  font-size: 0.85rem;
  color: #888;
  margin: 0 0 1rem;
  font-style: italic;
}

/* Estados vacíos y errores
   ========================================================================== */
.cnr-vacio,
.cnr-sin-resultados {
  color: #aaa;
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem 0;
}

.cnr-error {
  color: #c62828;
  font-size: 0.9rem;
  padding: 1rem;
  background: #ffebee;
  border-radius: 6px;
}

/* Estadísticas (sidebar)
   ========================================================================== */
.cnr-stats {
  position: sticky;
  top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cnr-stats__bloque {
  padding: 1rem 1.1rem;
  background: #f8f9fa;
  border: 1px solid #ececec;
  border-radius: 10px;
}

.cnr-stats__titulo {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
}

.cnr-stats__lista {
  margin: 0;
}

.cnr-stats__fila {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #ececec;
}

.cnr-stats__fila:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cnr-stats__fila dt {
  margin: 0;
  font-size: 0.85rem;
  color: #555;
}

.cnr-stats__fila dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
}

.cnr-stats__chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cnr-stats__chip {
  margin: 0;
}

.cnr-stats__chip-btn,
.cnr-stats__chip:not(:has(.cnr-stats__chip-btn)) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  font: inherit;
  text-align: left;
  color: inherit;
}

.cnr-stats__chip-btn {
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.cnr-stats__chip-btn:hover,
.cnr-stats__chip-btn:focus-visible {
  border-color: #ccc;
  background: #fafafa;
  outline: none;
}

.cnr-stats__chip-btn.is-active {
  border-color: #6a1b9a;
  background: #f3e5f5;
}

.cnr-stats__chip-label {
  font-size: 0.82rem;
  color: #333;
}

.cnr-stats__chip-count {
  flex-shrink: 0;
  min-width: 1.5rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #ececec;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  color: #444;
}

.cnr-stats__chip-btn.is-active .cnr-stats__chip-count {
  background: #e1bee7;
  color: #4a148c;
}

/* Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .cnr-roadmap__layout {
    grid-template-columns: 1fr;
  }

  .cnr-stats {
    position: static;
    order: -1;
  }
}

@media (max-width: 600px) {
  .cnr-filtros {
    flex-direction: column;
    align-items: stretch;
  }

  .cnr-filtros__reset {
    margin-left: 0;
  }

  .cnr-item__fecha {
    margin-left: 0;
    display: block;
    width: 100%;
  }

  .cnr-item__fecha-lanzamiento {
    margin-left: 0;
    display: block;
    width: 100%;
  }
}
