/* Portal del trabajador (S1).
   Sin framework: son cuatro pantallas y la mayoria se abriran desde el movil.
   Tipos grandes y campos altos porque se usa de pie, en el salon. */

:root {
  --azul: #1565c0;
  --texto: #1f2937;
  --gris: #6b7280;
  --borde: #d1d5db;
  --fondo: #f3f4f6;
  --rojo: #b91c1c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: var(--fondo);
  color: var(--texto);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

.caja {
  width: 100%;
  max-width: 26rem;
  background: #fff;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

h1 {
  margin: 0 0 .25rem;
  font-size: 1.4rem;
}

.sub {
  margin: 0 0 1.5rem;
  color: var(--gris);
  font-size: .9rem;
}

label {
  display: block;
  margin: 1rem 0 .35rem;
  font-size: .9rem;
  font-weight: 500;
}

input {
  width: 100%;
  padding: .7rem .75rem;
  border: 1px solid var(--borde);
  border-radius: 8px;
  font-size: 1rem;      /* 16px o mas: por debajo, iOS hace zoom al enfocar */
}

input:focus {
  outline: 2px solid var(--azul);
  outline-offset: 1px;
  border-color: var(--azul);
}

button {
  width: 100%;
  margin-top: 1.5rem;
  padding: .8rem;
  border: 0;
  border-radius: 8px;
  background: var(--azul);
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
}

button:hover { background: #0f4e9c; }

.error {
  margin: 0 0 1rem;
  padding: .7rem .8rem;
  border-radius: 8px;
  background: #fee2e2;
  color: var(--rojo);
  font-size: .9rem;
}

.aviso {
  margin: 0 0 1rem;
  padding: .7rem .8rem;
  border-radius: 8px;
  background: #fef3c7;
  color: #92400e;
  font-size: .9rem;
}

.ayuda {
  margin-top: 1.25rem;
  color: var(--gris);
  font-size: .85rem;
}

.pendiente {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px dashed var(--borde);
  border-radius: 8px;
  text-align: center;
}

.pendiente p { margin: .25rem 0; }

.secundario { margin-top: 1.5rem; }

.enlace {
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  color: var(--gris);
  font-size: .9rem;
  text-decoration: underline;
}

.enlace:hover { background: none; color: var(--texto); }

.pie {
  margin-top: 1.5rem;
  color: var(--gris);
  font-size: .8rem;
}

/* --- Documentos (S2) --- */

.tarjeta {
  display: block;
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--borde);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

.tarjeta:hover { border-color: var(--azul); background: #f8fafc; }

.tarjeta-titulo {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--azul);
}

.tarjeta-sub {
  display: block;
  margin-top: .15rem;
  color: var(--gris);
  font-size: .85rem;
}

/* Grupo plegable por ano. El mas reciente viene abierto; los anteriores no
   estorban aunque haya cinco anos de documentos. */
.anio-grupo {
  border: 1px solid var(--borde);
  border-radius: 8px;
  margin-bottom: .6rem;
}

.anio-grupo > summary {
  cursor: pointer;
  padding: .7rem .9rem;
  font-weight: 600;
  color: var(--texto);
  list-style: none;
}

.anio-grupo > summary::-webkit-details-marker { display: none; }
.anio-grupo > summary::before { content: "B8 "; color: var(--gris); }
.anio-grupo[open] > summary::before { content: "BE "; }

.cuantos {
  float: right;
  color: var(--gris);
  font-weight: 400;
  font-size: .85rem;
}

.anio-grupo .documentos { padding: 0 .9rem .5rem; }

.documentos { list-style: none; margin: 0; padding: 0; }

.documentos li {
  padding: .7rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.documentos a {
  display: block;
  color: var(--azul);
  font-size: 1rem;
  text-decoration: none;
}

.documentos a:hover { text-decoration: underline; }

/* La fecha de publicacion es la puesta a disposicion: se muestra siempre. */
.fecha {
  display: block;
  margin-top: .15rem;
  color: var(--gris);
  font-size: .8rem;
}
