/* Configuración: menú lateral y paneles (config-hub.js, email-texts-panel.js). Solo usa tokens de design-system.css. */
.cfg-hub { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.cfg-hub-nav { position: sticky; top: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-base); max-height: calc(100vh - 2 * var(--sp-4)); overflow-y: auto; }
.cfg-hub-group { display: flex; flex-direction: column; gap: 2px; }
.cfg-hub-title { padding: 0 var(--sp-3) var(--sp-1); font-size: var(--fs-meta); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.cfg-hub-item { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); width: 100%; padding: 7px var(--sp-3); border: 0; border-radius: var(--radius-sm, 6px); background: transparent; color: var(--text-secondary); font: inherit; font-size: var(--fs-body); text-align: left; cursor: pointer; }
.cfg-hub-item:hover { background: var(--wash); color: var(--text-primary); }
.cfg-hub-item:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.cfg-hub-item[aria-current="page"] { background: var(--wash-2); color: var(--text-primary); font-weight: 600; }
.cfg-hub-item .ds-badge { flex: none; }
.cfg-hub-body { min-width: 0; }
.cfg-hub-pane { display: flex; flex-direction: column; gap: var(--sp-4); }
.cfg-hub-pane[hidden] { display: none; }
.cfg-hub-select { display: none; }
@media (max-width: 900px) {
  .cfg-hub { grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
  .cfg-hub-nav { display: none; }
  .cfg-hub-select { display: block; }
}

/* Textos de correo */
.et-taglist { list-style: none; margin: 0; padding: var(--sp-3) var(--sp-4) var(--sp-4); display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--sp-3) var(--sp-5); }
.et-taglist li { display: flex; flex-direction: column; gap: 2px; }
.et-search { width: 300px; }
.et-preview { max-width: 420px; color: var(--text-secondary); }
.et-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.et-fields { display: flex; flex-direction: column; gap: var(--sp-3); }
.et-side { display: flex; flex-direction: column; gap: var(--sp-2); position: sticky; top: 0; }
.et-insert { flex-wrap: wrap; }
.et-mail { min-height: 220px; max-height: 420px; overflow: auto; padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; color: #1b1b1a; font: 14px/1.5 system-ui, sans-serif; overflow-wrap: anywhere; }
.et-mail a { color: #0b66c3; }
@media (max-width: 900px) {
  .et-form { grid-template-columns: minmax(0, 1fr); }
  .et-side { position: static; }
  .et-search { width: 100%; }
}

/* Pestaña «Configuración» de la barra superior */
.nav-tab--config { display: inline-flex; align-items: center; gap: 6px; }
.nav-tab--config .ds-icon { width: 14px; height: 14px; }

/* Dentro de Configuración los ajustes ocupan el ancho útil, alineados a la izquierda como el resto de pantallas */
.cfg-hub-body #config-root { max-width: none; margin: 0; }

/* Registro de correos */
.ml-delivery { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-3) var(--sp-4); }
.ml-delivery ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.ml-delivery li { display: flex; align-items: center; gap: var(--sp-2); }
.ml-tools { flex-wrap: wrap; row-gap: var(--sp-2); }
.ml-search { width: 300px; }
.ml-select { width: auto; max-width: 200px; }
.ml-to, .ml-subject { overflow-wrap: anywhere; }
.ml-subject { max-width: 460px; }
.ml-error { margin-top: 2px; color: var(--spot-red-text); font-size: var(--fs-meta); overflow-wrap: anywhere; }
.ml-detail { display: flex; flex-direction: column; gap: var(--sp-3); }
.ml-frame { width: 100%; height: 52vh; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.ml-code { max-height: 52vh; overflow: auto; margin: 0; padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--wash); font-family: var(--font-mono, ui-monospace, monospace); font-size: var(--fs-meta); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .ml-delivery { flex-direction: column; align-items: flex-start; }
  .ml-search, .ml-select { width: 100%; max-width: none; }
}

/* Material de gimnasio: las columnas de texto reparten el ancho para que los nombres largos no se corten */
.ge-table { table-layout: fixed; min-width: 760px; }
.ge-table .ds-input { width: 100%; }
.ge-name { width: 34%; }
.ge-cat { width: 19%; }
.ge-flag { width: 11%; }
.ge-prompt { width: 22%; }
.ge-use { width: 10%; }
.ge-act { width: 4%; }
