/* Pide YaNomas — estilos base. Botones grandes, poco texto, se ve bien en celular. */

:root {
  --fondo: #fff7f0;
  --tarjeta: #ffffff;
  --texto: #1f1b16;
  --suave: #6b625a;
  --borde: #e2d6ca;
  --boton: #c2410c;
  --boton-fuerte: #9a3412;
  --boton-texto: #ffffff;
  --error: #b42318;
  --error-fondo: #fee4e2;
  --enfoque: #1d4ed8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #14110f;
    --tarjeta: #201b17;
    --texto: #f5efe9;
    --suave: #b5aaa0;
    --borde: #3a322b;
    --boton: #f97316;
    --boton-fuerte: #fb923c;
    --boton-texto: #1f1b16;
    --error: #fda29b;
    --error-fondo: #3b1512;
    --enfoque: #93c5fd;
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
           max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--fondo);
  color: var(--texto);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.4;
}

.tarjeta {
  width: 100%;
  max-width: 28rem;
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  border-radius: 20px;
  padding: 24px 20px;
}

.marca {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.marca img { flex: none; }

/* El logo grande de la entrada. En modo oscuro va sobre una cajita blanca para que se lea el "pide" verde oscuro. */
.marca-grande { justify-content: center; }
.marca-grande img { width: min(240px, 100%); height: auto; }
@media (prefers-color-scheme: dark) {
  .marca-grande img { padding: 10px 14px; border-radius: 16px; background: #ffffff; }
}

/* Texto solo para lectores de pantalla (el logo ya dice el nombre) */
.solo-lector {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

h1 { margin: 0; font-size: 1.5rem; line-height: 1.2; }
h2 { margin: 0 0 12px; font-size: 1.25rem; }

label {
  display: block;
  margin: 16px 0 6px;
  font-weight: 600;
}

input {
  width: 100%;
  min-height: 56px;
  padding: 0 14px;
  border: 2px solid var(--borde);
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
}

input:focus-visible,
.boton:focus-visible {
  outline: 3px solid var(--enfoque);
  outline-offset: 2px;
}

.campo-clave { display: flex; gap: 8px; }
.campo-clave input { flex: 1; min-width: 0; }

.boton {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--boton);
  color: var(--boton-texto);
  font: inherit;
  font-weight: 700;
  font-size: 1.15rem;
  cursor: pointer;
}

.boton:hover { background: var(--boton-fuerte); }
.boton:disabled { opacity: 0.6; cursor: wait; }

.boton-suave,
.boton-secundario {
  background: transparent;
  color: var(--texto);
  border: 2px solid var(--borde);
}

.boton-suave:hover,
.boton-secundario:hover { background: var(--fondo); }

.campo-clave .boton-suave { width: auto; flex: none; min-width: 84px; }

#boton-entrar { margin-top: 20px; }

.error {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--error-fondo);
  color: var(--error);
  font-weight: 600;
}

.suave { color: var(--suave); }

.saludo { margin: 0 0 4px; font-size: 1.35rem; }

.rol {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 12px;
  border: 2px solid var(--borde);
  border-radius: 999px;
  font-weight: 700;
}

#boton-salir { margin-top: 16px; }

/* Enlaces dentro del texto y texto centrado (inicio y cuenta del cliente) */
.centrado { text-align: center; }
.enlace,
.suave a { color: var(--boton); font-weight: 700; }

/* Enlaces chicos de privacidad y condiciones al pie de la entrada */
.pie-legal { margin: 20px 0 0; font-size: 0.95rem; }
