:root {
  --fondo: #f6f7f9; --tarjeta: #fff; --borde: #e2e5ea; --texto: #1f2933; --suave: #667085;
  --acento: #0f766e; --acento-osc: #115e59; --peligro: #b42318; --ok-fondo: #ecfdf3; --ok: #067647;
  --error-fondo: #fef3f2; --info-fondo: #eff8ff; --info: #175cd3; --radio: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #14181d; --tarjeta: #1c2229; --borde: #2b343d; --texto: #e6e9ee; --suave: #9aa5b1;
    --acento: #2dd4bf; --acento-osc: #5eead4; --peligro: #f97066; --ok-fondo: #0c2a1c; --ok: #6ce9a6;
    --error-fondo: #2e1513; --info-fondo: #10243b; --info: #84caff;
  }
  .boton, button.boton { color: #062925; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--fondo); color: var(--texto); }
a { color: var(--acento); }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 0 0 .25rem; }
.suave { color: var(--suave); } .pequeno { font-size: .85rem; }
.contenedor { max-width: 960px; margin: 0 auto; padding: 1.25rem 16px 3rem; }

.barra { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; padding: .6rem 16px; background: var(--tarjeta); border-bottom: 1px solid var(--borde); }
.marca { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--texto); }
.menu { display: flex; gap: .25rem; flex: 1; }
.menu a { padding: .35rem .8rem; border-radius: 999px; text-decoration: none; color: var(--suave); }
.menu a:hover { color: var(--texto); }
.menu a.activo { background: var(--acento); color: #fff; }
@media (prefers-color-scheme: dark) { .menu a.activo { color: #062925; } }
.yo { display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.yo a { color: var(--texto); text-decoration: none; }
.yo form { margin: 0; }
.rol { font-size: .72rem; padding: .1rem .5rem; border-radius: 999px; border: 1px solid var(--borde); color: var(--suave); }
.rol-admin { border-color: var(--acento); color: var(--acento); }

.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem 1.1rem; margin: 1rem 0; }
.centrada { text-align: center; max-width: 480px; margin: 3rem auto; }
.login { max-width: 380px; margin: 4rem auto; }
.estrecha { max-width: 440px; }

.formulario { display: flex; flex-direction: column; gap: .8rem; }
.formulario label { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; font-weight: 600; }
.formulario label .suave { font-weight: 400; }
input, textarea, select { font: inherit; padding: .5rem .65rem; border: 1px solid var(--borde); border-radius: 8px; background: var(--fondo); color: var(--texto); width: 100%; }
input:focus, textarea:focus, select:focus, summary:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--acento); outline-offset: 1px; }
textarea { resize: vertical; }
.solo-lectura-pantalla { position: absolute; left: -9999px; }

.boton, button.boton { display: inline-block; background: var(--acento); color: #fff; border: 0; border-radius: 8px; padding: .5rem 1rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; width: fit-content; list-style: none; }
.boton:hover { background: var(--acento-osc); }
.pequeno-boton { padding: .35rem .75rem; font-size: .9rem; }
button.enlace, summary.enlace { background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; color: var(--acento); cursor: pointer; text-decoration: underline; }
.peligro { color: var(--peligro) !important; }
details.desplegable > summary { cursor: pointer; }
details.desplegable[open] > summary { margin-bottom: 1rem; }
details.desplegable > summary::-webkit-details-marker, summary.boton::-webkit-details-marker { display: none; }

.aviso { padding: .65rem .9rem; border-radius: 8px; margin: 1rem 0; border: 1px solid var(--borde); }
.aviso-ok { background: var(--ok-fondo); color: var(--ok); }
.aviso-error { background: var(--error-fondo); color: var(--peligro); }
.aviso-info { background: var(--info-fondo); color: var(--info); }
.vacio { color: var(--suave); text-align: center; padding: 2rem 0; }

ul.rejilla, ul.lista { list-style: none; padding: 0; margin: 0; }
ul.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
ul.rejilla .tarjeta { margin: 0; display: flex; flex-direction: column; }
.enlace h2 a { text-decoration: none; word-break: break-word; }
.enlace h2 a:hover { text-decoration: underline; }
.dominio { margin: 0 0 .5rem; color: var(--suave); font-size: .85rem; word-break: break-all; }
.nota { margin: 0 0 .75rem; overflow-wrap: anywhere; }
.pie { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem .8rem; margin-top: auto; padding-top: .5rem; }
.pie form, .acciones form { margin: 0; display: inline; }
.acciones { display: flex; gap: .9rem; }

.nota-tablon .texto { margin: 0 0 .5rem; overflow-wrap: anywhere; }
.nota-tablon.fijada { border-color: var(--acento); }
.etiqueta { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--acento); margin-bottom: .25rem; }

.roles-ayuda { color: var(--suave); font-size: .9rem; padding-left: 1.2rem; }
.cabecera-usuario { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem; }
.acciones-usuario { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .6rem 1.5rem; margin-top: .6rem; }
.acciones-usuario form { margin: 0; }
.en-linea { display: flex; gap: .5rem; align-items: center; margin-top: .4rem; }
.en-linea select, .en-linea input { width: auto; min-width: 0; }
.cabecera-usuario .en-linea { margin-top: 0; }
@media (max-width: 560px) {
  .yo { width: 100%; justify-content: space-between; }
  .menu { order: 3; width: 100%; }
}
