:root {
  --fondo: #faf7f2;
  --tarjeta: #ffffff;
  --tinta: #1d1b22;
  --suave: #6b6773;
  --borde: #e7e1d8;
  --acento: #ff4d2e;
  --acento-oscuro: #d93a1e;
  --exito: #1f8a4c;
  --error: #c62828;
  --radio: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--fondo); color: var(--tinta);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--acento-oscuro); }
h1 { font-size: 1.7rem; margin: .2rem 0 .4rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin: 0 0 .6rem; }
h3 { font-size: 1rem; }
code { background: #f1ece4; padding: 1px 6px; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--borde); margin: 1.2rem 0; }

.barra {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1.2rem; background: var(--tinta); color: #fff; flex-wrap: wrap;
}
.marca { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.2rem; display: flex; gap: .5rem; align-items: center; }
.barra nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.barra nav a, .barra nav .enlace { color: #f3efe9; text-decoration: none; font-size: .95rem; }
.barra nav a:hover { color: #fff; text-decoration: underline; }

.contenido { width: 100%; max-width: 980px; margin: 0 auto; padding: 1.5rem 16px 3rem; flex: 1; }
.estrecho { max-width: 460px; }
.pie { text-align: center; color: var(--suave); font-size: .85rem; padding: 1rem; }

.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.3rem; margin-bottom: 1.2rem; }
.suave { color: var(--suave); }
.pequeno { font-size: .87rem; }
.vacio { text-align: center; color: var(--suave); padding: 2.5rem 1rem; border: 2px dashed var(--borde); border-radius: var(--radio); }

.boton {
  display: inline-block; background: var(--acento); color: #fff; border: 0; border-radius: 10px;
  padding: .7rem 1.2rem; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
}
.boton:hover { background: var(--acento-oscuro); }
.boton:disabled { opacity: .55; cursor: not-allowed; }
.boton.secundario { background: #fff; color: var(--tinta); border: 1px solid var(--borde); }
.boton.secundario:hover { background: #f4f0ea; }
.boton.grande { width: 100%; padding: .95rem; font-size: 1.05rem; }
.enlace { background: none; border: 0; padding: 0; color: var(--acento-oscuro); font: inherit; cursor: pointer; text-decoration: underline; }
.peligro { color: var(--error) !important; }
.en-linea { display: inline; margin: 0; }

.formulario label { display: block; font-weight: 600; margin-bottom: .9rem; }
input, textarea, select {
  display: block; width: 100%; margin-top: .3rem; padding: .65rem .75rem; font: inherit; font-weight: 400;
  border: 1px solid var(--borde); border-radius: 10px; background: #fff; color: var(--tinta);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--acento); outline-offset: 1px; border-color: transparent; }
input[readonly], textarea[readonly] { background: #f7f4ef; }
textarea { resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0 0 1.2rem; }
legend { font-weight: 800; font-size: 1.05rem; margin-bottom: .7rem; }
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.aviso { padding: .8rem 1rem; border-radius: 10px; background: #fff6e5; border: 1px solid #f5d9a8; margin: 0 0 1rem; }
.aviso.error { background: #fdecec; border-color: #f4c2c2; color: #8e1c1c; }
.aviso.exito { background: #e9f6ee; border-color: #b9e0c7; color: #165d35; }
.aviso ul { margin: 0; padding-left: 1.2rem; }

.cabecera { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.lista { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.lista a {
  display: flex; gap: 1rem; align-items: center; padding: 1rem 1.2rem; background: var(--tarjeta);
  border: 1px solid var(--borde); border-radius: var(--radio); color: var(--tinta); text-decoration: none;
}
.lista a:hover { border-color: var(--acento); }
.lista strong { flex: 1; }
.estado { font-size: .8rem; padding: 2px 10px; border-radius: 99px; background: #f1ece4; white-space: nowrap; }
.estado-error { background: #fdecec; color: var(--error); }
.estado-listo { background: #e9f6ee; color: var(--exito); }
.etiqueta { font-size: .75rem; background: #fff0eb; color: var(--acento-oscuro); padding: 1px 8px; border-radius: 99px; font-weight: 600; }

.guia { border-color: #ffd0c4; background: #fffaf8; }
.guia-cab { display: flex; justify-content: space-between; align-items: baseline; }
.pasos { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.pasos li { display: flex; gap: .7rem; align-items: center; }
.check {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: #fff; border: 2px solid var(--acento); color: var(--acento); font-weight: 800; font-size: .85rem;
}
.pasos .hecho .check { background: var(--exito); border-color: var(--exito); color: #fff; }
.pasos .hecho span:last-child { color: var(--suave); text-decoration: line-through; }
.video-ayuda { margin-top: 1rem; }
.video-ayuda summary { cursor: pointer; font-weight: 600; color: var(--acento-oscuro); }
.video { position: relative; aspect-ratio: 16 / 9; margin: .8rem 0; border-radius: 12px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pie-guia { text-align: center; margin-top: 2rem; }

.dos-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
.numerada li { margin-bottom: .5rem; }
.saldo { font-size: 1.3rem; }
.acciones { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.acciones form { margin: 0; }

.miniaturas { display: flex; gap: .4rem; }
.miniaturas img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--borde); }
.variante header { display: flex; gap: .8rem; align-items: center; margin-bottom: .8rem; }
.variante .angulo { font-weight: 800; font-size: 1.05rem; margin: 0; flex: 1; }
.variante label { display: block; font-weight: 600; margin-bottom: .8rem; }
.incluir { display: flex !important; gap: .4rem; align-items: center; margin: 0 !important; white-space: nowrap; font-weight: 600; }
.incluir input { width: auto; margin: 0; }
.coste { font-weight: 700; color: var(--acento-oscuro); white-space: nowrap; }
.variante details summary { cursor: pointer; color: var(--suave); margin-bottom: .6rem; }
.barra-accion {
  position: sticky; bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  flex-wrap: wrap; box-shadow: 0 8px 30px rgba(29, 27, 34, .12); border-color: #ffd0c4;
}
.pie-proyecto { justify-content: space-between; margin-top: 1rem; }

.copiar { display: flex; gap: .5rem; }
.copiar input { margin: 0; }
.tabla-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--borde); vertical-align: middle; }
th { color: var(--suave); font-weight: 600; }
tr.inactivo { opacity: .55; }

.boton-google {
  display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%;
  padding: .75rem 1rem; border: 1px solid var(--borde); border-radius: 10px; background: #fff;
  color: var(--tinta); font-weight: 700; text-decoration: none; margin: .4rem 0 1rem;
}
.boton-google:hover { background: #f7f4ef; border-color: #d8d1c6; }
.separador { display: flex; align-items: center; gap: .8rem; color: var(--suave); font-size: .85rem; margin: 0 0 1rem; }
.separador::before, .separador::after { content: ""; flex: 1; border-top: 1px solid var(--borde); }

.progreso { border-color: #ffd0c4; }
.progreso .cabecera { margin-bottom: .6rem; }
.barra-progreso { width: 100%; height: 12px; appearance: none; border: 0; border-radius: 99px; background: #f1ece4; overflow: hidden; }
.barra-progreso::-webkit-progress-bar { background: #f1ece4; border-radius: 99px; }
.barra-progreso::-webkit-progress-value { background: var(--acento); border-radius: 99px; transition: width .4s; }
.barra-progreso::-moz-progress-bar { background: var(--acento); border-radius: 99px; }
.rejilla-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.video-item { margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.video-item h3 { margin: .3rem 0 0; text-transform: capitalize; }
.video-item p { margin: 0; }
.video-item video, .video-hueco { width: 100%; aspect-ratio: 9 / 16; border-radius: 10px; background: #111; object-fit: cover; }
.video-hueco { display: grid; place-items: center; font-size: 2.2rem; background: linear-gradient(160deg, #2b2932, #1d1b22); color: #fff; }
.girando { width: 42px; height: 42px; border-radius: 50%; border: 4px solid rgba(255,255,255,.25); border-top-color: var(--acento); animation: girar 1s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.etapa { color: var(--acento-oscuro); font-weight: 600; }
.estado-v-error { border-color: #f4c2c2; }

@media (max-width: 720px) {
  .dos-columnas, .fila { grid-template-columns: 1fr; }
  .variante header { flex-wrap: wrap; }
  h1 { font-size: 1.4rem; }
}
