:root {
  --fondo: #f6f5f1;
  --texto: #1f2328;
  --suave: #5c6370;
  --acento: #2f5d8a;
  --borde: #c9c6bd;
  --error: #b42318;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #16181c;
    --texto: #e6e6e3;
    --suave: #9aa0a8;
    --acento: #7fb0de;
    --borde: #3a3f47;
    --error: #ff8a80;
  }
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 1.05rem/1.5 system-ui, sans-serif;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

form, section {
  display: grid;
  gap: 0.75rem;
}

[hidden] {
  display: none;
}

label {
  display: grid;
  gap: 0.25rem;
}

input, textarea {
  font: inherit;
  padding: 0.5rem;
  border: 1px solid var(--borde);
  border-radius: 6px;
  background: transparent;
  color: inherit;
}

button {
  font: inherit;
  padding: 0.5rem 1rem;
  border: 1px solid var(--acento);
  border-radius: 6px;
  background: var(--acento);
  color: var(--fondo);
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

.usuarios {
  display: flex;
  gap: 0.5rem;
}

button.usuario, button.secundario {
  background: transparent;
  color: var(--acento);
}

button.usuario[aria-pressed="true"] {
  background: var(--acento);
  color: var(--fondo);
}

.error {
  color: var(--error);
  min-height: 1.5em;
}

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