:root {
  --orquidea: #E9E3F5;
  --perla: #FBF9FE;
  --ciruela: #2A1740;
  --lila: #6B5F80;
  --linea: #D5CBE6;
  --fucsia: #D61F7A;
  --fucsia-osc: #B3175F;
  --error: #B3261E;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font: 400 1rem/1.5 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ciruela);
  background: var(--perla);
}

h1, .marca {
  font-family: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  letter-spacing: -0.02em;
}

:focus-visible { outline: 3px solid var(--fucsia); outline-offset: 2px; }

/* ---------- Ingreso ---------- */
.ingreso {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  min-height: 100vh;
}

.lado-marca {
  background: var(--ciruela);
  color: var(--perla);
  padding: 3rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.marca {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
  font-weight: 700;
  margin: 0;
}

.lema { color: #CBBFE0; max-width: 26ch; margin: 0.75rem 0 0; }

/* Carta de colores: uñas de muestra, lo más característico de la tienda */
.carta { display: flex; gap: 0.6rem; align-items: flex-end; }
.carta span {
  width: 2.6rem;
  height: 4.4rem;
  border-radius: 999px 999px 0.7rem 0.7rem;
  box-shadow: inset 0 0.5rem 0 rgba(255, 255, 255, 0.22);
}
.carta span:nth-child(1) { background: #D61F7A; height: 5.2rem; }
.carta span:nth-child(2) { background: #F0795E; height: 4rem; }
.carta span:nth-child(3) { background: #E8C4B8; height: 4.8rem; }
.carta span:nth-child(4) { background: #9B7FD4; height: 3.6rem; }
.carta span:nth-child(5) { background: #8E2149; height: 5rem; }
.carta span:nth-child(6) { background: #FBF9FE; height: 4.2rem; }

.lado-form { display: grid; place-items: center; padding: 2rem 1.25rem; }
.caja { width: min(100%, 24rem); }

h1 { font-size: 1.9rem; line-height: 1.15; margin: 0 0 0.5rem; }
.bajada { color: var(--lila); margin: 0 0 1.5rem; }

/* ---------- Formularios ---------- */
label { display: block; font-weight: 500; margin: 1rem 0 0.35rem; }

input[type=text], input[type=password], input[type=tel] {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--linea);
  border-radius: 10px;
  background: #fff;
  color: var(--ciruela);
}
input[type=text]:focus, input[type=password]:focus, input[type=tel]:focus {
  border-color: var(--fucsia);
  outline: none;
  box-shadow: 0 0 0 3px rgba(214, 31, 122, 0.2);
}

.ayuda { color: var(--lila); font-size: 0.9rem; margin: 0.3rem 0 0; }

.boton {
  display: inline-block;
  width: 100%;
  margin-top: 1.5rem;
  font: 600 1rem 'Instrument Sans', system-ui, sans-serif;
  padding: 0.8rem 1rem;
  border: 0;
  border-radius: 10px;
  background: var(--fucsia);
  color: #fff;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.boton:hover { background: var(--fucsia-osc); }
.boton.suave {
  background: transparent;
  color: var(--ciruela);
  border: 1.5px solid var(--linea);
}
.boton.suave:hover { background: var(--orquidea); }

.error {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--error);
  border-radius: 8px;
  background: #FDECEA;
  color: #7A1B15;
}
.aviso {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--lila);
  border-radius: 8px;
  background: var(--orquidea);
}

hr.separador { border: 0; border-top: 1px solid var(--linea); margin: 1.75rem 0 0.5rem; }
h2.seccion { font-size: 1.05rem; margin: 1.25rem 0 0; }

/* ---------- Lista de personas (cambio rápido por PIN) ---------- */
.personas { display: grid; gap: 0.5rem; margin: 0 0 0.5rem; padding: 0; border: 0; }
.personas legend { font-weight: 500; margin-bottom: 0.5rem; padding: 0; }
.persona {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--linea);
  border-radius: 10px;
  background: #fff;
  font-weight: 500;
  cursor: pointer;
}
.persona:has(input:checked) { border-color: var(--fucsia); background: #FDF1F7; }
.persona input { accent-color: var(--fucsia); width: 1.1rem; height: 1.1rem; }

input.pin { letter-spacing: 0.5em; text-align: center; font-size: 1.4rem; }

/* ---------- Panel provisorio ---------- */
.panel main { max-width: 40rem; margin: 0 auto; padding: 2.5rem 1.25rem; }
.panel .marca { font-size: 1.4rem; margin: 0 0 2rem; }
.panel h1 { margin-bottom: 0.25rem; }
.panel .meta { color: var(--lila); margin: 0 0 2rem; }
.panel .acciones { display: grid; gap: 0.6rem; max-width: 20rem; }
.panel .acciones .boton { margin-top: 0; }
.panel form { margin: 0; }

/* ---------- Pantallas chicas ---------- */
@media (max-width: 760px) {
  .ingreso { grid-template-columns: 1fr; min-height: 0; }
  .lado-marca { flex-direction: row; align-items: center; padding: 1.25rem 1.5rem; }
  .marca { font-size: 1.7rem; }
  .lema { display: none; }
  .carta { gap: 0.3rem; }
  .carta span { width: 1.1rem; height: 2rem !important; }
  .lado-form { padding: 1.5rem 1.25rem 2.5rem; align-items: start; }
}

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