/* Puerta de la app instalable. La misma estética que la gestión (banda roja con el logo, mosaico de muestras con
   cartel negro, radio de 4 px) y el tamaño de la app de obra: se usa parado, con una mano, a veces con guantes. */
@font-face { font-family: "Roboto"; src: url("/fuentes/roboto-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
:root {
  --rojo: #b22121;
  --rojo-osc: #960b0b;
  --rojo-tenue: #f7e7e7;
  --fondo: #f4f4f4;
  --papel: #ffffff;
  --linea: #e1e1e1;
  --linea-fuerte: #c9c9c9;
  --texto: #2b3640;
  --tenue: #5f6b77;
  --radio: 4px;
  --sombra: 0 1px 2px rgba(52, 73, 94, .08), 0 4px 14px rgba(52, 73, 94, .06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--fondo); color: var(--texto);
  font: 17px/1.45 "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom);
}
h1, p { margin: 0; }
button, input { font: inherit; }

.banda {
  background: var(--rojo); padding: env(safe-area-inset-top) 18px 0;
  display: flex; align-items: center; justify-content: center; min-height: 68px;
}
.banda img { display: block; height: 42px; width: auto; }

.mosaico {
  background: #2a2a2a url("/marca/mosaico.jpg") repeat-x center top / auto 100%;
  border-bottom: 10px solid var(--rojo-osc); padding: 22px 16px;
}
.cartel { max-width: 560px; margin: 0 auto; background: rgba(14, 14, 14, .93); color: #fff; padding: 20px 22px; }
.cartel h1 { font-size: 28px; font-weight: 300; line-height: 1.15; }
.quien { color: #c9c9c9; margin-top: 6px; font-size: 15.5px; }

main { max-width: 560px; margin: 0 auto; padding: 18px 16px 40px; display: grid; gap: 14px; }

.accesos { display: grid; gap: 12px; }
.acceso {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 14px;
  min-height: 92px; padding: 16px 16px 16px 14px; background: var(--papel); color: var(--texto); text-decoration: none;
  border: 1px solid var(--linea); border-left: 5px solid var(--rojo); border-radius: var(--radio); box-shadow: var(--sombra);
  transition: transform .1s ease-out, background-color .15s ease;
}
.acceso:active { transform: scale(.985); background: var(--rojo-tenue); }
.acceso:focus-visible, .atajo:focus-visible, .btn:focus-visible, .link:focus-visible { outline: 3px solid var(--rojo-osc); outline-offset: 2px; }
.icono {
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: var(--radio);
  background: var(--rojo); color: #fff;
}
.icono svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.texto b { display: block; font-size: 20px; font-weight: 500; line-height: 1.2; }
.texto small { display: block; color: var(--tenue); font-size: 15px; margin-top: 3px; }
.flecha { color: var(--rojo); font-size: 34px; line-height: 1; padding-left: 4px; }

.atajos { display: flex; flex-wrap: wrap; gap: 8px; }
.atajos[hidden] { display: none; }
.atajo {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--papel); border: 1px solid var(--linea-fuerte); color: var(--texto); text-decoration: none; font-size: 15.5px; font-weight: 500;
}
.atajo:active { background: var(--rojo-tenue); }

.tarjeta { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 16px; box-shadow: var(--sombra); }
.tarjeta[hidden], .salir[hidden] { display: none; }
.tarjeta p { color: var(--tenue); font-size: 15.5px; margin-top: 4px; }
.tarjeta b { color: var(--texto); }

.pin label { display: block; font-weight: 500; margin-bottom: 6px; }
.pin .fila { display: flex; gap: 8px; }
.pin input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 12px; font-size: 20px; letter-spacing: .15em;
  border: 1px solid var(--linea-fuerte); border-radius: var(--radio); background: #fff; color: var(--texto);
}
.pin input:focus { outline: 2px solid var(--rojo); outline-offset: 0; border-color: var(--rojo); }
.pin .ayuda { font-size: 14px; }
.pin .error { color: var(--rojo-osc); font-weight: 500; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; flex: none;
  border: 1px solid var(--linea-fuerte); border-radius: var(--radio); background: var(--papel); color: var(--texto);
  font-weight: 500; cursor: pointer; transition: transform .08s ease-out;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; }
.btn.primario { background: var(--rojo); border-color: var(--rojo); color: #fff; }

.instalar { display: flex; align-items: center; gap: 14px; justify-content: space-between; border-left: 5px solid #34495e; }
.instalar[hidden] { display: none; }

.avisos { border-left: 5px solid var(--rojo); }
.avisos[hidden] { display: none; }
.avisos .botones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.avisos label { display: block; font-weight: 500; margin-top: 12px; margin-bottom: 6px; }
.avisos select {
  width: 100%; min-height: 48px; padding: 0 10px; font-size: 16px; color: var(--texto); background: #fff;
  border: 1px solid var(--linea-fuerte); border-radius: var(--radio);
}
.avisos .ok { color: #1e6b3a; font-weight: 500; }
.avisos .error { color: var(--rojo-osc); font-weight: 500; }

.salir { text-align: center; }
.link { background: none; border: 0; color: var(--tenue); text-decoration: underline; cursor: pointer; min-height: 44px; padding: 0 8px; font-size: 15px; }

@media (min-width: 700px) {
  .cartel h1 { font-size: 32px; }
  main { padding-top: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .acceso, .btn { transition: none; }
}
