:root {
  --fondo: #f6f7fb;
  --tarjeta: #ffffff;
  --texto: #1c2430;
  --texto-suave: #5b6676;
  --borde: #e2e6ed;
  --azul: #2756d6;
  --azul-suave: #eaf0ff;
  --verde: #1f9d55;
  --rojo: #d6392b;
  --ambar: #c87f0a;
  --radio: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #12161f;
    --tarjeta: #1a2029;
    --texto: #e7ebf3;
    --texto-suave: #9aa5b5;
    --borde: #2a313d;
    --azul-suave: #1b2740;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--fondo);
  color: var(--texto);
}

a { color: var(--azul); text-decoration: none; }
a:hover { text-decoration: underline; }

.barra {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--tarjeta);
  border-bottom: 1px solid var(--borde);
  flex-wrap: wrap;
}

.barra .marca { font-weight: 700; margin-right: 1rem; }
.barra nav { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.92rem; }
.barra .usuario { margin-left: auto; font-size: 0.9rem; color: var(--texto-suave); }

.contenido { padding: 1.25rem; max-width: 1200px; margin: 0 auto; }

.tarjeta {
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.cuadricula { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }

h1, h2, h3 { margin-top: 0; }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--borde); }
th { color: var(--texto-suave); font-weight: 600; }

.etiqueta { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.etiqueta.pendiente { background: var(--azul-suave); color: var(--azul); }
.etiqueta.aplicado { background: #e6f6ec; color: var(--verde); }
.etiqueta.rechazado { background: #fbe9e7; color: var(--rojo); }
.etiqueta.alerta { background: #fdf0da; color: var(--ambar); }

form.simple { display: flex; flex-direction: column; gap: 0.6rem; max-width: 420px; }
form.simple label { font-size: 0.85rem; color: var(--texto-suave); }
form.simple input, form.simple select, form.simple textarea {
  padding: 0.5rem 0.6rem; border: 1px solid var(--borde); border-radius: 6px; background: var(--fondo); color: var(--texto);
}

.boton {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  background: var(--azul);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}
.boton.secundario { background: var(--azul-suave); color: var(--azul); }
.boton.peligro { background: var(--rojo); }

.mensajes { list-style: none; padding: 0; margin: 0 0 1rem; }
.mensajes li { padding: 0.5rem 0.75rem; border-radius: 6px; background: var(--azul-suave); margin-bottom: 0.4rem; }

.errorlist { color: var(--rojo); font-size: 0.85rem; list-style: none; padding: 0; }
.vacio { color: var(--texto-suave); font-style: italic; }
