/* Pestaña «Ajustes» */
.aj { display: grid; gap: 12px; max-width: 980px; }
.aj .bloque { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 10px; min-width: 0; }
.aj .bloque h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.aj .bloque p { margin: 0; }
.aj-banner:empty { display: none; }
.aj-banner .nota { margin: 0; }
.aj-pie { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* el combo de administradores */
.aj-combo { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.aj-combo > summary { list-style: none; cursor: pointer; padding: 10px 14px; min-height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-radius: 12px; font-weight: 500; }
.aj-combo > summary::-webkit-details-marker { display: none; }
.aj-combo > summary::after { content: '▾'; color: var(--muted); }
.aj-combo[open] > summary::after { content: '▴'; }
.aj-combo > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.aj-combo-lista { display: grid; border-top: 1px solid var(--line); }
.aj-opcion { display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 24px; cursor: pointer; border-top: 1px solid var(--line); }
.aj-opcion:first-child { border-top: 0; }
.aj-opcion:hover { background: var(--surface-2); }
.aj-opcion.apagada { cursor: not-allowed; opacity: .75; }
.aj-opcion input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.aj-opcion-txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.aj-tel { font-variant-numeric: tabular-nums; white-space: nowrap; }
.aj-fila { display: flex; gap: 8px; flex-wrap: wrap; }
.aj-fila input, .aj-celda input { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--bg); font: inherit; color: inherit; box-sizing: border-box; min-width: 0; }
.aj-fila input { flex: 1 1 200px; }
.aj-fila input:focus, .aj-celda input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.aj-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.aj-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.aj-chip-x { border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: var(--muted); border-radius: 50%; width: 26px; height: 26px; }
.aj-chip-x:hover { background: var(--line); color: inherit; }

/* los locales */
.aj-tabla td { vertical-align: middle; }
.aj-celda { display: flex; gap: 6px; align-items: center; }
.aj-celda input { width: 100%; min-width: 150px; }
.aj-pequeno { padding: 4px 10px; font-size: 12px; white-space: nowrap; }
.aj-apagado td { opacity: .7; }
.aj-interruptor { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.aj-interruptor input { width: 18px; height: 18px; accent-color: var(--accent); }

/* envío de verdad o en prueba */
.aj-envio { display: grid; gap: 4px; }
.aj-envio-fila { padding: 8px 0; border-top: 1px solid var(--line); }
.aj-envio-fila:first-child { border-top: 0; }
.aj-confirma { border: 1px solid var(--accent); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; background: var(--surface-2); }
.aj-reglas { padding: 12px 16px; }
.aj-reglas > summary { cursor: pointer; font-weight: 600; }
.aj-reglas p { margin: 8px 0; }

@media (max-width: 640px) {
  .aj-tabla thead { display: none; }
  .aj-tabla, .aj-tabla tbody, .aj-tabla tr, .aj-tabla td { display: block; width: 100%; box-sizing: border-box; }
  .aj-tabla tr { border-top: 1px solid var(--line); padding: 8px 0; }
  .aj-tabla td { padding: 3px 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) { .aj * { transition: none !important; } }
