/* automático · semillero.cloud — estilos sin compilación */
:root {
  /* Paleta tomada del favicon: ciruela, lima, crema + violeta de la mascota */
  --ciruela-900: #1a1124;
  --ciruela-800: #2c1d3d;
  --ciruela-700: #37254b;
  --ciruela-500: #84669e;
  --violeta: #763ff3;
  --lima: #b8fa27;
  --crema: #f8f4ea;

  --fondo: #f6f2ea;
  --papel: #fffdf8;
  --tinta: #2c1d3d;
  --tenue: #6e6280;
  --linea: #e6dfd2;
  --acento: #5b34c9;
  --boton: #37254b;
  --boton-tinta: #b8fa27;
  --barra: #2c1d3d;
  --barra-tinta: #f8f4ea;
  --verde: #b8fa27;
  --banda: color-mix(in srgb, #763ff3 55%, transparent);
  --anillo: rgba(44,29,61,.35);
  --amarillo: #f0a417;
  --rojo: #e0483e;
  --gris: #b3a9c0;
  --azul: #763ff3;
  --sombra: 0 1px 2px rgba(44,29,61,.05), 0 6px 18px rgba(44,29,61,.07);
  --radio: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #1a1124;
    --papel: #2c1d3d;
    --tinta: #f8f4ea;
    --tenue: #b3a6c4;
    --linea: #44325c;
    --acento: #b8fa27;
    --boton: #b8fa27;
    --boton-tinta: #2c1d3d;
    --barra: #140c1d;
    --anillo: rgba(0,0,0,.4);
    --gris: #6f6282;
    --banda: color-mix(in srgb, #b8fa27 60%, transparent);
    --azul: #9b78ff;
    --sombra: 0 1px 2px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--fondo);
  color: var(--tinta);
}
a { color: var(--acento); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; }
.tenue { color: var(--tenue); }
.chico { font-size: .85rem; }

/* Barra superior: siempre ciruela, porque el "semillero" del logo es crema */
.barra {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .55rem 1.25rem; background: var(--barra); color: var(--barra-tinta);
  border-bottom: 3px solid var(--lima);
}
.marca { display: flex; align-items: center; text-decoration: none; }
.marca img { height: 60px; width: auto; display: block; }
.barra .usuario { color: color-mix(in srgb, var(--barra-tinta) 70%, transparent); }
.barra .boton.secundario { color: var(--lima); border-color: color-mix(in srgb, var(--lima) 60%, transparent); }
@media (prefers-reduced-motion: reduce) { .foco.verde::after { animation: none !important; } }
.barra form { margin: 0; }

/* Placa atornillada (como la del logo) */
.placa {
  position: relative; display: inline-block; margin: 0 0 .6rem;
  padding: .22rem 1.6rem; border-radius: 8px; transform: rotate(-1.5deg);
  background: linear-gradient(180deg, #44305c, var(--ciruela-800));
  color: var(--lima); font-weight: 800; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 2px 0 var(--ciruela-900);
}
.placa::before, .placa::after {
  content: ""; position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e6e0ee, #8d84a0);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}
.placa::before { left: .45rem; }
.placa::after { right: .45rem; }

/* Mascotas */
.mascota { display: block; width: auto; height: 120px; user-select: none; pointer-events: none; }
.mascota.chica { height: 84px; }
.mascota.grande { height: 170px; }
.encabezado .con-mascota { display: flex; align-items: flex-end; gap: 1rem; }
.flota { animation: flotar 3.2s ease-in-out infinite; }
@keyframes flotar { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .flota { animation: none; } }

.contenido { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.encabezado { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }

/* Tarjetas */
.tarjeta { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: var(--sombra); padding: 1.1rem 1.2rem; }
.rejilla { display: grid; gap: 1rem; }
.rejilla.dos { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.rejilla.cuatro { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.seccion { margin-top: 1.75rem; }

/* Contadores */
.contador .num { font-size: 2rem; font-weight: 700; line-height: 1; }
.contador .etq { color: var(--tenue); font-size: .85rem; margin-top: .35rem; }

/* Líneas de producción */
.lineas { display: grid; gap: .75rem; }
.linea { display: flex; gap: 1rem; align-items: center; }
.linea .info { flex: 1; min-width: 0; }
.linea .nombre { font-weight: 600; }
.linea .estado { font-size: .85rem; white-space: nowrap; }

.foco { position: relative; width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--gris); box-shadow: inset 0 0 0 1.5px var(--anillo); }
.foco.verde { background: var(--verde); }
.foco.amarillo { background: var(--amarillo); }
.foco.rojo { background: var(--rojo); }
.foco.verde::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--verde); opacity: 0; animation: latido 2.4s ease-out infinite;
}
@keyframes latido { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.4); opacity: 0; } }

/* Banda transportadora decorativa bajo cada línea activa */
.banda { height: 4px; border-radius: 2px; margin-top: .5rem; background: repeating-linear-gradient(90deg, var(--linea) 0 10px, transparent 10px 20px); }
.linea.activa .banda { background: repeating-linear-gradient(90deg, var(--banda) 0 10px, transparent 10px 20px); background-size: 20px 4px; animation: avanzar 1s linear infinite; }
@keyframes avanzar { to { background-position: 20px 0; } }
@media (prefers-reduced-motion: reduce) { .linea.activa .banda { animation: none; } }

/* Bitácora */
.bitacora { list-style: none; margin: 0; padding: 0; }
.bitacora li { display: grid; grid-template-columns: 78px 18px 1fr; gap: .5rem; padding: .55rem 0; border-top: 1px solid var(--linea); align-items: start; }
.bitacora li:first-child { border-top: 0; }
.bitacora .hora { color: var(--tenue); font-size: .8rem; font-variant-numeric: tabular-nums; padding-top: .1rem; }
.bitacora .marca-nivel { width: 10px; height: 10px; border-radius: 50%; margin-top: .4rem; background: var(--gris); }
.bitacora .ok .marca-nivel { background: var(--verde); }
.bitacora .aviso .marca-nivel { background: var(--amarillo); }
.bitacora .error .marca-nivel { background: var(--rojo); }
.bitacora .info .marca-nivel { background: var(--azul); }
.bitacora .sub { color: var(--tenue); font-size: .8rem; }
.bitacora li.nuevo { animation: entrar .6s ease-out; }
@keyframes entrar { from { background: color-mix(in srgb, var(--verde) 15%, transparent); } }
.etiqueta { display: inline-block; font-size: .7rem; padding: .05rem .45rem; border-radius: 99px; border: 1px solid var(--linea); color: var(--tenue); margin-left: .35rem; }

/* Formularios */
label { display: block; font-size: .85rem; font-weight: 600; margin: .7rem 0 .25rem; }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: .6rem .7rem; border-radius: 10px; border: 1px solid var(--linea);
  background: var(--fondo); color: var(--tinta); font: inherit;
}
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--acento); outline-offset: 1px; }
.casilla { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem 1rem; border-radius: 12px; border: 1px solid var(--boton);
  background: var(--boton); color: var(--boton-tinta); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
}
.boton.secundario { background: transparent; color: var(--acento); }
.boton.mini { padding: .25rem .6rem; font-size: .8rem; border-radius: 8px; }
.acciones { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.en-linea { display: inline; }

.aviso-ok { background: color-mix(in srgb, var(--verde) 14%, var(--papel)); border: 1px solid color-mix(in srgb, var(--verde) 40%, transparent); padding: .6rem .9rem; border-radius: 10px; margin-bottom: 1rem; }
.errores { background: color-mix(in srgb, var(--rojo) 12%, var(--papel)); border: 1px solid color-mix(in srgb, var(--rojo) 40%, transparent); padding: .6rem .9rem; border-radius: 10px; margin-bottom: 1rem; }
.errores ul { margin: 0; padding-left: 1.1rem; }
.cinta-previa { background: var(--amarillo); color: #1d1f1e; text-align: center; padding: .4rem; font-size: .85rem; font-weight: 600; }

/* Tablas */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .55rem .4rem; border-top: 1px solid var(--linea); vertical-align: middle; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tenue); border-top: 0; }
.tabla-desliza { overflow-x: auto; }

/* Acceso */
.acceso { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 1.25rem; padding: 1.5rem 1rem; background: radial-gradient(ellipse at 50% 0%, #3d2a55, var(--ciruela-900) 70%); }
.acceso .tarjeta { width: 100%; max-width: 380px; padding: 1.75rem; }
.acceso .boton { width: 100%; margin-top: 1.25rem; }

.vacio { color: var(--tenue); text-align: center; padding: 1.5rem .5rem; }

@media (max-width: 560px) {
  .linea { flex-wrap: wrap; }
  .bitacora li { grid-template-columns: 64px 14px 1fr; }
}

/* Acceso: logo + mascota sobre ciruela */
.acceso .logo { width: min(340px, 80vw); height: auto; display: block; }
.acceso .escena { display: flex; align-items: flex-end; gap: .5rem; }
.acceso .escena .mascota { height: 150px; margin-bottom: -10px; }
@media (max-width: 560px) { .acceso .escena .mascota { display: none; } }
.bitacora .ok .marca-nivel { box-shadow: inset 0 0 0 1.5px var(--anillo); }
.contador { border-top: 3px solid var(--violeta); }
/* Brazos y piernas de la mascota son ciruela: sobre fondo oscuro se les da un contorno crema suave */
.acceso .mascota { filter: drop-shadow(0 0 1.5px rgba(248,244,234,.55)); }
@media (prefers-color-scheme: dark) { .mascota { filter: drop-shadow(0 0 1.5px rgba(248,244,234,.55)); } }

/* Navegación del cliente */
.menu { display: flex; gap: .25rem; }
.menu a { color: var(--barra-tinta); text-decoration: none; padding: .4rem .75rem; border-radius: 10px; font-weight: 600; font-size: .9rem; opacity: .8; }
.menu a:hover { opacity: 1; background: rgba(255,255,255,.06); }
.menu a.activo { opacity: 1; color: var(--lima); background: rgba(184,250,39,.1); }
@media (max-width: 640px) { .barra { flex-wrap: wrap; } .menu { order: 3; width: 100%; } .barra .usuario { display: none; } }

/* Esquelas */
.editor-esquela { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 860px) { .editor-esquela { grid-template-columns: 1fr; } }
.vista-esquela { position: sticky; top: 1rem; }
.vista-esquela canvas { width: 100%; height: auto; display: block; border-radius: 10px; box-shadow: var(--sombra); background: #fff; border: 1px solid var(--linea); }
fieldset.encuadre { border: 1px solid var(--linea); border-radius: 12px; margin: 1rem 0 0; padding: .25rem .9rem .8rem; }
fieldset.encuadre legend { font-size: .85rem; font-weight: 700; padding: 0 .3rem; }
input[type=range] { width: 100%; accent-color: var(--violeta); }
input[type=file], input[type=date] { font: inherit; color: var(--tinta); }
input[type=date] { width: 100%; padding: .6rem .7rem; border-radius: 10px; border: 1px solid var(--linea); background: var(--fondo); }
details { margin-top: 1rem; }
summary { cursor: pointer; font-weight: 600; color: var(--acento); }
.filtros { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.filtros input { flex: 1 1 220px; width: auto; }
.filtros select { flex: 0 1 220px; width: auto; }
.acciones-fila { display: flex; gap: .4rem; justify-content: flex-end; flex-wrap: wrap; }
.pastilla { display: inline-block; font-size: .75rem; font-weight: 700; padding: .12rem .55rem; border-radius: 99px; background: var(--linea); color: var(--tinta); }
.pastilla.lista, .pastilla.publicada { background: color-mix(in srgb, var(--lima) 45%, var(--papel)); color: #2c1d3d; }
.boton[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.boton.peligro { color: var(--rojo); border-color: color-mix(in srgb, var(--rojo) 50%, transparent); }
.paginacion { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.pronto { display: flex; gap: 1.25rem; align-items: center; }
.pronto .mascota { height: 96px; flex: none; }
.pronto > div { flex: 1; }
@media (max-width: 560px) { .pronto { flex-direction: column; text-align: center; } }

/* Conexiones de Facebook */
.pagina-fb { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--linea); }
.pagina-fb:first-of-type { border-top: 0; }
.pagina-fb img, .pagina-fb-letra { width: 44px; height: 44px; border-radius: 50%; flex: none; object-fit: cover; }
.pagina-fb-letra { display: grid; place-items: center; background: var(--violeta); color: #fff; font-weight: 800; }
.pagina-fb .info { flex: 1; min-width: 0; }
.pagina-fb.elegible { cursor: pointer; font-weight: 400; margin: 0; }
.pagina-fb.elegible input { width: 20px; height: 20px; accent-color: var(--violeta); }
.pagina-fb.deshabilitada { opacity: .55; cursor: not-allowed; }
.boton-fb { background: #1877f2; border-color: #1877f2; color: #fff; }
.boton-fb:disabled { opacity: .5; cursor: not-allowed; }
ol.pasos { padding-left: 1.2rem; margin: 0 0 1rem; }
ol.pasos li { margin-bottom: .5rem; }
.legal article { max-width: 760px; margin: 0 auto; line-height: 1.65; }
.legal h2 { margin-top: 1.4rem; }
