/* Launchear · circuito de clientes
   Diseño visual de la página del cliente, el panel y los estados. Sin lógica.
   Tema "noche" para el cliente (es la cara pública, como el formulario) y
   tema "hueso" para el panel de Matías (herramienta de trabajo, se lee mejor).
   Fuente de los tokens: sistema de diseño de Launchear (Claude Design). */

@font-face {
  font-family: "Manrope";
  src: url("fuentes/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --surface: #080e13;
  --surface-raised: #111b20;
  --surface-field: #0c151a;
  --text: #f6f7f7;
  --text-lead: #c4cdd0;
  --text-muted: #abb7bc;
  --line: #354047;
  --control-line: #718087;
  --accent: #c8f135;
  --accent-hover: #d4f75a;
  --on-accent: #080e13;
  --accent-text: #c8f135;
  --focus: #c8f135;
  --error: #ffb4ac;
  --error-bg: #2a1614;
  --ok-bg: #1a2412;
  --hueso: #f6f4ee;
  --noche: #080e13;
  --radio-control: 12px;
  --radio-panel: 16px;
  --radio-card: 24px;
  --sombra: 0 18px 38px -16px #00000088;
}

.tema-hueso {
  --surface: #f6f4ee;
  --surface-raised: #ffffff;
  --surface-field: #ffffff;
  --text: #111a2c;
  --text-lead: #3d4556;
  --text-muted: #565e6e;
  --line: #dcd9d0;
  --control-line: #565e6e;
  --accent-text: #4d6b00;
  --focus: #4d6b00;
  --error: #a32924;
  --error-bg: #fbeceb;
  --ok-bg: #eef5dc;
  --sombra: 0 12px 32px rgba(8, 14, 19, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 400 16px/1.6 Manrope, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--on-accent); }

a { color: var(--accent-text); text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 6px;
}

/* ---------- Encabezado ---------- */
.encabezado {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.encabezado img { width: 140px; height: auto; display: block; }
.tema-hueso .encabezado { background: var(--noche); border-bottom: 0; }
.encabezado .etiqueta { font-size: 13px; color: #abb7bc; text-align: right; }
.encabezado .prueba {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 12px;
  margin-left: 8px;
}

/* ---------- Contenedores ---------- */
.contenedor { max-width: 720px; margin: 0 auto; padding: 32px 16px 72px; }
.contenedor--ancho { max-width: 1120px; }

/* ---------- Títulos ---------- */
.titulo {
  margin: 0;
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1.04;
  font-weight: 400;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.subtitulo { margin: 8px 0 0; color: var(--text-lead); font-size: 18px; }
h2 { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 12px; }
h3 { font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.nota { color: var(--text-muted); font-size: 14px; line-height: 1.5; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-lead);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Progreso del pedido ---------- */
.progreso { margin: 28px 0 8px; }
.progreso__texto { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-muted); margin-bottom: 10px; }
.progreso__texto b { color: var(--text); font-weight: 600; }
.progreso__barra { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; list-style: none; margin: 0; padding: 0; }
.progreso__barra li { height: 6px; border-radius: 999px; background: var(--line); }
.progreso__barra li.hecho { background: var(--text-muted); }
.progreso__barra li.actual { background: var(--accent); }
.tema-hueso .progreso__barra li.actual { background: var(--accent-text); }
.progreso__nombres { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; list-style: none; margin: 8px 0 0; padding: 0; font-size: 12px; color: var(--text-muted); }
.progreso__nombres li.actual { color: var(--text); font-weight: 600; }
@media (max-width: 560px) { .progreso__nombres { display: none; } }

/* ---------- Mensajes: Launchear y Vos ---------- */
.mensaje { margin: 28px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.quien {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--hueso);
  color: var(--noche);
  font-size: 14px;
  font-weight: 600;
}
.quien svg { width: 14px; height: 16px; }
.quien--vos { background: var(--accent); }
.burbuja {
  max-width: 560px;
  padding: 18px 22px;
  border: 2px solid var(--hueso);
  border-radius: 6px 24px 24px 24px;
  background: var(--surface-raised);
  font-size: 18px;
  line-height: 1.5;
}
.tema-hueso .burbuja { border-color: var(--text); }
.burbuja p { margin: 0; }
.burbuja p + p { margin-top: 8px; }
.mensaje--vos { align-items: flex-end; }
.mensaje--vos .burbuja { background: var(--hueso); color: var(--noche); border-color: var(--hueso); border-radius: 24px 6px 24px 24px; }

/* ---------- Tarjetas ---------- */
.tarjeta {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radio-panel);
  padding: 24px;
  margin: 20px 0;
}
.tarjeta > :last-child { margin-bottom: 0; }
.monto { font-size: 32px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 400; margin: 4px 0 0; }
.dos-columnas { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------- Avisos ---------- */
.aviso { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radio-panel); margin: 20px 0; background: var(--ok-bg); border: 1px solid var(--line); }
.aviso::before { content: ""; flex: 0 0 10px; height: 10px; margin-top: 8px; border-radius: 999px; background: var(--accent); }
.tema-hueso .aviso::before { background: var(--accent-text); }
.aviso--error { background: var(--error-bg); color: var(--error); border-color: var(--error); }
.aviso--error::before { background: var(--error); }
.aviso p { margin: 0; }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 16px/1.2 Manrope, Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms cubic-bezier(.23, 1, .32, 1);
}
.boton:hover { background: var(--accent-hover); }
.boton:active { transform: scale(0.97); }
.boton:focus-visible { outline-color: var(--text); }
.boton--contorno { background: transparent; color: var(--text); border: 1px solid var(--control-line); }
.boton--contorno:hover { background: var(--surface-field); }
.boton--oscuro { background: var(--noche); color: var(--hueso); }
.boton--oscuro:hover { background: #1b262c; }
.boton svg { width: 18px; height: 18px; }
.acciones { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 20px; }

/* ---------- Formularios ---------- */
.campo { margin: 18px 0; }
.campo label, .grupo-titulo { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.campo input[type="text"], .campo input[type="email"], .campo input[type="tel"], .campo input[type="url"], .campo input[type="date"], .campo textarea, .campo select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--control-line);
  border-radius: var(--radio-control);
  background: var(--surface-field);
  color: var(--text);
  font: 400 16px/1.5 Manrope, Arial, sans-serif;
}
.campo textarea { min-height: 96px; resize: vertical; }
.campo .ayuda { margin: 6px 0 0; font-size: 14px; color: var(--text-muted); }

.eleccion { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--control-line); border-radius: var(--radio-control); margin: 10px 0; cursor: pointer; }
.eleccion input { margin: 4px 0 0; width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.tema-hueso .eleccion input { accent-color: var(--accent-text); }
.eleccion:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.eleccion b { font-weight: 600; }
.eleccion span { display: block; }
.eleccion small { display: block; margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.opcional { font-weight: 400; color: var(--text-muted); }

/* "Ninguno me convence": se ve solo si lo eligen, y entonces se esconden ajustes y dominio */
.ninguno { display: none; }
form:has(input[name="opcion"][value="ninguno"]:checked) .ninguno { display: block; }
form:has(input[name="opcion"][value="ninguno"]:checked) .solo-con-estilo { display: none; }
.refs { border: 0; margin: 0; padding: 0; min-width: 0; }
.refs > legend { padding: 0; }

/* ---------- Los 3 estilos ---------- */
.estilos { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 20px 0; }
.estilo { position: relative; border: 1px solid var(--line); border-radius: var(--radio-card); background: var(--surface-raised); overflow: hidden; display: flex; flex-direction: column; }
.estilo:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.estilo img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; border-bottom: 1px solid var(--line); }
.estilo__cuerpo { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.estilo__cuerpo h3 { margin: 0; }
.estilo .eleccion { margin: 0; }
.estilo a { font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Ajustes por sección ---------- */
.ajustes { border: 1px solid var(--line); border-radius: var(--radio-panel); margin: 16px 0; }
.ajustes > summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; }
.ajustes > summary::-webkit-details-marker { display: none; }
.ajustes > summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--text-muted); }
.ajustes[open] > summary::after { content: "−"; }
.ajustes__secciones { padding: 0 18px 8px; border-top: 1px solid var(--line); }

/* ---------- Pie legal ---------- */
.pie { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--text-muted); }
.pie a { color: var(--text-lead); display: inline-flex; align-items: center; min-height: 44px; }
.pie span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Panel ---------- */
.panel-cabeza { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.cifras { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 24px 0; }
.cifra { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radio-panel); padding: 16px 18px; }
.cifra b { display: block; font-size: 30px; font-weight: 400; letter-spacing: -0.03em; line-height: 1.1; }
.cifra span { font-size: 14px; color: var(--text-muted); }

.tabla-envase { overflow-x: auto; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radio-panel); }
table.tabla { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 640px; }
.tabla th { text-align: left; font-size: 13px; font-weight: 600; color: var(--text-muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.tabla td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla td a { color: var(--text); font-weight: 600; }

.estado { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--surface); border: 1px solid var(--line); color: var(--text-lead); }
.estado::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--text-muted); }
.estado--accion { background: var(--noche); color: var(--hueso); border-color: var(--noche); }
.estado--accion::before { background: var(--accent); }
.estado--listo::before { background: var(--accent-text); }
.etiqueta-prueba { font-size: 12px; font-weight: 600; color: var(--text-muted); border: 1px dashed var(--control-line); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }

.para-hacer { list-style: none; margin: 0; padding: 0; }
.para-hacer li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.para-hacer li:last-child { border-bottom: 0; }

.ficha-datos { display: grid; gap: 4px 24px; grid-template-columns: max-content 1fr; margin: 0; font-size: 15px; }
.ficha-datos dt { color: var(--text-muted); }
.ficha-datos dd { margin: 0; font-weight: 600; }

/* Línea de tiempo: cada interacción, la más nueva arriba */
.linea { list-style: none; margin: 0; padding: 0; position: relative; }
.linea::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.linea li { position: relative; padding: 0 0 22px 34px; }
.linea li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 999px; background: var(--surface-raised); border: 2px solid var(--control-line); }
.linea li.de-cliente::before { background: var(--accent); border-color: var(--noche); }
.linea li.de-launchear::before { background: var(--noche); border-color: var(--noche); }
.linea li.pago::before { background: var(--accent-text); border-color: var(--accent-text); }
.linea li.falla::before { background: var(--error); border-color: var(--error); }
.linea time { display: block; font-size: 13px; color: var(--text-muted); }
.linea b { font-weight: 600; }
.linea p { margin: 2px 0 0; }
.linea .simulado { font-size: 12px; color: var(--text-muted); border: 1px dashed var(--control-line); border-radius: 999px; padding: 0 8px; margin-left: 6px; }

.grilla-panel { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .grilla-panel { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
