/* Estudio YouTube — diseño de la sección 11.
   CSS sencillo (sin variables ni funciones recientes) para que funcione
   en navegadores antiguos. Colores:
   fondo #F8F7F4 · tarjetas #FFFFFF · texto #2D2A32 / #6B6670
   coral #FF7E67 · turquesa #3CC4B0 · lavanda #9B87F5
   amarillo #F6C85F · rosa #F27A8A · menta #5BC08A
   Los botones de color llevan texto gris oscuro (#2D2A32) para superar
   el contraste 4,5:1. */

@font-face { font-family: "Nunito"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/nunito-latin-400-normal.woff2") format("woff2"), url("../fonts/nunito-latin-400-normal.woff") format("woff"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/nunito-latin-700-normal.woff2") format("woff2"), url("../fonts/nunito-latin-700-normal.woff") format("woff"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-style: normal; font-display: swap;
  src: url("../fonts/nunito-latin-800-normal.woff2") format("woff2"), url("../fonts/nunito-latin-800-normal.woff") format("woff"); }

* { -webkit-box-sizing: border-box; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #F8F7F4; color: #2D2A32;
  font-family: "Nunito", "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.55;
}
h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; font-weight: 800; }
h1 { font-size: 26px; } h2 { font-size: 21px; } h3 { font-size: 17px; }
p { margin: 0 0 12px; }
a { color: #5B45C9; }           /* lavanda intensa: contraste 6,7:1 sobre blanco */
a:hover { color: #3F2C9E; }
code { background: #F1EEF9; padding: 1px 6px; border-radius: 6px; font-size: 15px; word-break: break-all; }
ul, ol { padding-left: 22px; }

.oculto-accesible { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.texto-secundario, .ayuda { color: #6B6670; font-size: 15px; }
.ayuda { margin: 4px 0 0; }
.en-linea { display: inline; margin: 0; }
.icono { vertical-align: -3px; display: inline-block; }

/* ---------- Cabecera ---------- */
.cabecera {
  background: #FFFFFF; border-bottom: 1px solid #ECE9E3;
  padding: 10px 20px; display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  box-shadow: 0 2px 8px rgba(45, 42, 50, 0.04);
}
.cabecera-izq { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -ms-flex-wrap: wrap; flex-wrap: wrap; }
.marca { font-weight: 800; font-size: 18px; color: #2D2A32; text-decoration: none; margin-right: 16px; }
.marca .icono { color: #FF7E67; }
.selector-canal { margin: 0; }
.selector-canal select { min-width: 180px; padding: 8px 12px; font-weight: 700; }
.menu { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
.menu a, .enlace-boton {
  color: #2D2A32; text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 12px; margin: 2px;
}
.menu a:hover, .enlace-boton:hover { background: #F1EEF9; }
.menu a.activo { background: #F1EEF9; color: #4A36B8; }
.menu .boton { margin: 2px 6px; }
.enlace-boton { background: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- Estructura ---------- */
.contenedor { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; max-width: 1280px; margin: 0 auto; padding: 20px; }
.principal { -webkit-box-flex: 1; -ms-flex: 1 1 auto; flex: 1 1 auto; min-width: 0; }

.tarjeta {
  background: #FFFFFF; border-radius: 12px; padding: 22px; margin: 0 0 20px;
  box-shadow: 0 4px 18px rgba(45, 42, 50, 0.06); border: 1px solid #F0EDE7;
}
fieldset.tarjeta { min-width: 0; }
legend { font-weight: 800; font-size: 19px; padding: 0 6px; }
.tarjeta-interior { border: 1px solid #ECE9E3; border-radius: 12px; padding: 16px; margin: 0 0 14px; background: #FFFFFF; }
.caja-centrada { max-width: 440px; margin: 40px auto; }
.fila-titulo { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; margin-bottom: 8px; }
.fila-titulo h1, .fila-titulo h2, .fila-titulo h3 { margin-right: 12px; }
.indice { margin: 0 0 16px; color: #6B6670; }

/* ---------- Asistente (panel lateral) ---------- */
.asistente {
  width: 300px; margin-left: 20px; background: #FFFFFF; border-radius: 12px;
  border: 2px solid #E4DEFC; box-shadow: 0 4px 18px rgba(155, 135, 245, 0.12);
  -ms-flex-negative: 0; flex-shrink: 0; position: -webkit-sticky; position: sticky; top: 20px;
}
.asistente-cabecera { background: #F1EEF9; padding: 12px 16px; border-radius: 10px 10px 0 0; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
.asistente-cuerpo { padding: 16px; }
.cerrar-asistente { display: none; cursor: pointer; padding: 4px; }

/* ---------- Botones ---------- */
.boton {
  display: inline-block; border: 0; border-radius: 12px; padding: 11px 20px; margin: 4px 6px 4px 0;
  font: inherit; font-weight: 800; font-size: 16px; line-height: 1.2; text-decoration: none; cursor: pointer;
  color: #2D2A32; background: #FFFFFF; box-shadow: 0 2px 6px rgba(45, 42, 50, 0.10);
  -webkit-transition: -webkit-transform .1s, box-shadow .1s; transition: transform .1s, box-shadow .1s;
}
.boton:hover { box-shadow: 0 4px 12px rgba(45, 42, 50, 0.16); color: #2D2A32; }
.boton:active { -webkit-transform: translateY(1px); transform: translateY(1px); }
.boton:focus, a:focus, input:focus, select:focus, textarea:focus, .enlace-boton:focus { outline: 3px solid #9B87F5; outline-offset: 2px; }
.boton[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.boton-coral { background: #FF7E67; }      /* texto #2D2A32: 5,7:1 */
.boton-turquesa { background: #3CC4B0; }   /* 6,5:1 */
.boton-lavanda { background: #9B87F5; }    /* 4,9:1 */
.boton-rosa { background: #F27A8A; }       /* 5,3:1 */
.boton-blanco { background: #FFFFFF; border: 1px solid #DCD7CF; }
.boton-pequeno { padding: 8px 14px; font-size: 15px; }
.boton-ancho { width: 100%; margin-top: 12px; }
.acciones { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
.barra-guardar { position: -webkit-sticky; position: sticky; bottom: 0; background: #F8F7F4; padding: 12px 0; margin-bottom: 20px; border-top: 1px solid #ECE9E3; }

.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline; }

/* ---------- Formularios ---------- */
.formulario label, .etiqueta { display: block; font-weight: 700; margin: 0 0 4px; }
.campo { margin: 0 0 16px; }
.campo-check label, .opcion { font-weight: 400; }
input[type=text], input[type=password], input[type=email], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: #2D2A32; background: #FFFFFF;
  border: 1.5px solid #D9D4CC; border-radius: 12px; padding: 10px 12px;
}
textarea { resize: vertical; }
input[type=color] { width: 70px; height: 42px; border: 1.5px solid #D9D4CC; border-radius: 12px; padding: 3px; background: #FFFFFF; }
input[type=checkbox] { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
.opciones { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; }
.opcion { width: 50%; padding: 4px 8px 4px 0; }
.dos-columnas, .tres-columnas { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; margin: 0 -8px; }
.dos-columnas > .campo { width: 50%; padding: 0 8px; }
.tres-columnas > .campo { width: 33.33%; padding: 0 8px; }

/* ---------- Avisos y estados ---------- */
.alerta { border-radius: 12px; padding: 12px 16px; margin: 0 0 14px; border-left: 6px solid; }
.alerta ul { margin: 6px 0 0; }
.alerta-ok { background: #E9F7EF; border-color: #5BC08A; }
.alerta-aviso { background: #FDF5DF; border-color: #F6C85F; }
.alerta-error { background: #FDECEE; border-color: #F27A8A; }

.chip { display: inline-block; border-radius: 999px; padding: 2px 12px; font-size: 14px; font-weight: 800; color: #2D2A32; margin: 2px 0; }
.chip .icono { width: 14px; height: 14px; }
.chip-produccion { background: #E4DEFC; }  /* lavanda: en producción */
.chip-pendiente { background: #FBE7B5; }   /* amarillo: pendiente */
.chip-aprobado { background: #CFEEDC; }    /* verde: aprobado */
.chip-rechazado { background: #FBD3D9; }   /* rosa: rechazado */
.chip-neutro { background: #EFECE6; }

/* ---------- Listas ---------- */
.datos, .lista-estado, .lista-canales, .fases { list-style: none; padding: 0; margin: 0; }
.datos li, .lista-estado li { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; -webkit-box-align: center; -ms-flex-align: center; align-items: center; padding: 9px 0; border-bottom: 1px solid #F0EDE7; }
.datos li span { color: #6B6670; }
.lista-canales li { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
.fases li { padding: 10px 0 10px 14px; border-left: 4px solid #ECE9E3; margin-bottom: 8px; }
.fases li.hecha { border-left-color: #5BC08A; }
.bienvenida { border-top: 6px solid #FF7E67; }
.zona-peligro { border-top: 4px solid #F27A8A; }

/* ---------- Móvil ---------- */
@media (max-width: 900px) {
  .contenedor { display: block; padding: 12px; }
  .asistente {
    display: none; position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 380px;
    margin: 0; border-radius: 0; z-index: 50; overflow-y: auto;
  }
  #abrir-asistente:checked ~ .contenedor .asistente { display: block; }
  .cerrar-asistente { display: inline-block; }
}
@media (max-width: 640px) {
  .cabecera { padding: 8px 12px; }
  .selector-canal select { min-width: 0; max-width: 60vw; }
  .menu { width: 100%; margin-top: 6px; }
  .menu a, .enlace-boton { padding: 6px 8px; }
  .tarjeta { padding: 16px; }
  .dos-columnas > .campo, .tres-columnas > .campo, .opcion { width: 100%; }
  h1 { font-size: 23px; }
}
