/*
 * UALactiva visual system layer.
 *
 * This file is loaded after the legacy stylesheet and should be used for
 * reusable UI hierarchy, spacing and readability improvements. Prefer adding
 * patterns here before creating page-specific CSS in ualactiva.css.
 */

:root {
    --ds-space-1: 4px;
    --ds-space-2: 8px;
    --ds-space-3: 12px;
    --ds-space-4: 16px;
    --ds-space-5: 24px;
    --ds-space-6: 32px;
    --ds-page-gap: var(--ds-space-4);
    --ds-section-gap: var(--ds-space-3);
    --ds-panel-radius: 10px;
    --ds-panel-shadow: 0 6px 18px rgba(24, 36, 36, 0.045);
    --ds-panel-shadow-strong: 0 14px 34px rgba(24, 36, 36, 0.07);
    --ds-border-soft: #e6eeee;
    --ds-row-hover: #f7fbfa;
    --ds-focus-ring: 0 0 0 3px rgba(14, 123, 100, 0.22);
    --ds-control-height: 44px;
    --ds-text-xs: 12px;
    --ds-text-sm: 14px;
    --ds-text-md: 16px;
    --ds-text-lg: 20px;
    --ds-text-xl: 28px;
    --ds-weight-regular: 400;
    --ds-weight-medium: 500;
    --ds-weight-label: 650;
    --ds-weight-heading: 750;
}

/* Enlace de salto: oculto hasta recibir el foco por teclado (WCAG 2.4.1) */
.skip-link {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    min-height: var(--ds-control-height);
    padding: 0 var(--ds-space-4);
    background: var(--accent-strong);
    color: #ffffff;
    font-size: var(--ds-text-sm);
    font-weight: var(--ds-weight-label);
    text-decoration: none;
    border-bottom-right-radius: var(--ds-panel-radius);
    transform: translateY(-100%);
}

.skip-link:focus-visible,
.skip-link:focus {
    transform: translateY(0);
    outline: none;
    box-shadow: var(--ds-focus-ring);
}

/* Requisitos de contrasena marcados en vivo.
   El estado se distingue por simbolo ademas de por color, para no depender
   unicamente del color (WCAG 1.4.1). */
.password-requirements {
    display: grid;
    gap: var(--ds-space-1);
    margin: var(--ds-space-2) 0 0;
    padding: 0;
    list-style: none;
}

.password-requirements li {
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
    color: var(--muted);
    font-size: var(--ds-text-xs);
    font-weight: var(--ds-weight-regular);
}

.password-requirements li::before {
    content: '\25CB';
    flex: 0 0 auto;
    width: 1em;
    text-align: center;
    font-weight: var(--ds-weight-heading);
}

.password-requirements li.is-met {
    color: var(--accent-strong);
}

.password-requirements li.is-met::before {
    content: '\2713';
}

/* Intervencion configurada que aun no ha empezado */
.tree-badge {
    margin-left: auto;
    padding: 2px var(--ds-space-2);
    border-radius: 999px;
    background: var(--intervention-soft);
    color: var(--intervention);
    font-size: var(--ds-text-xs);
    font-weight: var(--ds-weight-label);
    white-space: nowrap;
}

/* Shared operational filter pattern */
.filter-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    padding: 14px 16px;
    background: var(--surface-soft);
}

.filter-toolbar.is-panel-section {
    border-bottom: 1px solid var(--ds-border-soft);
}

/*
 * Filtros arriba y buscador debajo, **en una sola columna**.
 *
 * Eran dos: `minmax(0, 1fr)` para los filtros y `minmax(300px, 440px)` para el
 * buscador. El problema es que la barra no ocupa la ventana, sino lo que deja el
 * navegador lateral: a 1027 px de ventana mide 698 px, asi que el buscador se llevaba
 * 440 px fijos y a los filtros les quedaban 244. Con ese ancho los chips se apilaban y
 * la columna crecia hasta 519 px, mientras el buscador ocupaba 66: quedaban
 * 440 x 453 px de vacio al lado.
 *
 * El corte estaba en `max-width: 980px`, medido contra la **ventana** y no contra la
 * barra, asi que llegaba tarde: el contenedor ya estaba en 698 px.
 *
 * Medido en las dos pantallas que la usan, a ancho completo los filtros dejan de
 * apilarse y la barra encoge: personas de 519 a 299 px, grupos de 164 a 145.
 * Una columna no es solo mas limpia, es mas corta.
 */
.filter-toolbar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 14px;
}

.filter-stack,
.filter-group {
    display: grid;
    min-width: 0;
}

.filter-stack {
    gap: 10px;
}

.filter-paired-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
    padding-top: 9px;
    border-top: 1px solid var(--ds-border-soft);
}

.filter-paired-groups > .filter-group + .filter-group {
    padding-top: 0;
    border-top: 0;
}

.filter-inline-groups {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    min-width: 0;
}

.filter-inline-groups > .filter-group {
    flex: 0 1 auto;
}

.filter-inline-groups > .filter-group + .filter-group {
    padding-top: 0;
    padding-left: 16px;
    border-top: 0;
    border-left: 1px solid var(--ds-border-soft);
}

.filter-inline-groups > .filter-actions {
    align-self: center;
    margin-left: auto;
}

.filter-group {
    gap: 6px;
}

.filter-group + .filter-group {
    padding-top: 9px;
    border-top: 1px solid var(--ds-border-soft);
}

.filter-group-label,
.filter-autocomplete-field > .filter-group-label {
    color: var(--text);
    font-size: 12px;
    font-weight: var(--ds-weight-label);
    line-height: 1.2;
}

.filter-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: var(--ds-control-height);
    padding: 6px 11px;
    border: 1px solid var(--ds-border-soft);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 12px;
    font-weight: var(--ds-weight-label);
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.filter-chip:hover {
    color: var(--accent-strong);
    border-color: rgba(14, 123, 100, 0.28);
    background: var(--accent-soft);
}

.filter-chip:focus-visible {
    outline: 0;
    box-shadow: var(--ds-focus-ring);
}

.filter-chip.is-active {
    color: #ffffff;
    border-color: var(--accent);
    background: var(--accent);
}

.filter-chip-count {
    display: inline-grid;
    min-width: 20px;
    min-height: 20px;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    color: var(--accent-strong);
    background: var(--accent-soft);
    font-size: 10px;
    font-weight: 800;
}

.filter-chip.is-active .filter-chip-count {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.filter-search-form,
.filter-search-row {
    display: flex;
    align-items: end;
    gap: 8px;
    min-width: 0;
}

.filter-autocomplete-field {
    display: grid;
    flex: 1 1 auto;
    gap: 6px;
    min-width: 0;
}

.filter-autocomplete-control {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: var(--ds-control-height);
    padding: 0 11px;
    border: 1px solid var(--ds-border-soft);
    border-radius: var(--ds-panel-radius);
    background: var(--surface);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.filter-autocomplete-control:focus-within {
    border-color: var(--accent);
    box-shadow: var(--ds-focus-ring);
}

.filter-autocomplete-control svg {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--muted);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.filter-autocomplete-control input {
    width: 100%;
    min-width: 0;
    min-height: calc(var(--ds-control-height) - 2px);
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.filter-autocomplete-field.is-selected .filter-autocomplete-control {
    border-color: rgba(15, 138, 112, 0.32);
    background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface));
}

.filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.filter-clear {
    color: var(--muted);
    font-size: 12px;
    font-weight: var(--ds-weight-label);
    text-decoration: none;
}

.filter-clear:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}

@media (max-width: 980px) {
    /* La barra ya es de una columna a cualquier ancho: aqui no queda nada que
       colapsar. */
    .filter-inline-groups {
        flex-wrap: wrap;
    }
}

@media (max-width: 680px) {
    .filter-toolbar {
        padding: 12px;
    }

    .filter-inline-groups {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .filter-inline-groups > .filter-group + .filter-group {
        padding-top: 9px;
        padding-left: 0;
        border-top: 1px solid var(--ds-border-soft);
        border-left: 0;
    }

    .filter-inline-groups > .filter-actions {
        margin-left: 0;
    }

    .filter-search-form,
    .filter-search-row {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-search-form .button,
    .filter-search-row .button {
        width: 100%;
    }

    .filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-clear {
        padding: 6px 0;
        text-align: center;
    }
}

body {
    font-size: var(--ds-text-md);
    line-height: 1.5;
}

.workspace :where(p, small) {
    font-weight: var(--ds-weight-regular);
}

.workspace :where(h1, h2, h3, h4, strong) {
    text-wrap: pretty;
}

.workspace :where(h2, h3, h4) {
    font-weight: var(--ds-weight-heading);
}

.workspace :where(.context-label, .entity-kicker, .metric-label, th) {
    font-weight: var(--ds-weight-label);
}

.workspace :where(p, .empty-text, .empty-cell) {
    max-width: 75ch;
}

.button,
.icon-button,
summary.button {
    min-height: var(--ds-control-height);
}

.button {
    padding: 10px 14px;
    font-weight: var(--ds-weight-label);
    line-height: 1.2;
}

.app-shell .workspace .button {
    min-height: var(--ds-control-height);
}

.button.compact {
    min-height: var(--ds-control-height);
    padding-block: 9px;
}

.icon-button,
.nav-restore-button {
    width: var(--ds-control-height);
    min-width: var(--ds-control-height);
    min-height: var(--ds-control-height);
}

.nav-link {
    min-height: var(--ds-control-height);
    font-weight: var(--ds-weight-medium);
}

.side-nav {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.side-nav-header {
    flex: 0 0 auto;
}

.side-nav .nav-links {
    flex: 1 1 auto;
    align-content: start;
    min-height: 0;
    padding-right: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.side-nav summary,
.program-mini-card > summary {
    min-height: var(--ds-control-height);
}

.app-shell .side-nav .tree-link,
.app-shell .side-nav .tree-link.small {
    display: flex;
    align-items: center;
    min-height: var(--ds-control-height);
    padding-block: 8px;
}

.other-centers-disclosure {
    margin-top: var(--ds-space-3);
    padding-top: var(--ds-space-3);
    border-top: 1px solid var(--ds-border-soft);
}

.other-centers-disclosure > summary {
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
    min-height: var(--ds-control-height);
    padding: 8px 12px;
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 13px;
    font-weight: var(--ds-weight-label);
    cursor: pointer;
    list-style: none;
}

.other-centers-disclosure > summary::-webkit-details-marker {
    display: none;
}

.other-centers-disclosure > summary::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.16s ease;
}

.other-centers-disclosure[open] > summary::before {
    transform: rotate(45deg);
}

.other-centers-disclosure > summary:hover {
    color: var(--text);
    background: var(--surface-soft);
}

.other-centers-disclosure > summary small {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    min-height: 24px;
    margin-left: auto;
    padding-inline: 7px;
    border-radius: 999px;
    color: var(--accent-strong);
    background: var(--accent-soft);
    font-size: 11px;
}

.other-centers-list {
    display: grid;
    gap: 2px;
    padding: 4px 0 0 18px;
}

.other-centers-list a {
    min-width: 0;
    padding: 9px 12px;
    overflow: hidden;
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 13px;
    font-weight: var(--ds-weight-medium);
    text-overflow: ellipsis;
    text-decoration: none;
    white-space: nowrap;
}

.other-centers-list a:hover {
    color: var(--text);
    background: var(--surface-soft);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
    width: 100%;
    max-width: 100%;
    min-height: var(--ds-control-height);
}

input[type="file"] {
    overflow: hidden;
}

.field > span,
label > span {
    font-weight: var(--ds-weight-label);
}

.nav-scrim {
    display: none;
    border: 0;
    background: rgba(24, 36, 36, 0.42);
}

.topbar-copy {
    min-width: 0;
}

.topbar-page-actions {
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
    min-width: 0;
}

.app-shell .topbar-actions .topbar-page-actions > .button,
.app-shell .topbar-actions .topbar-page-actions > .button.compact {
    min-height: var(--ds-control-height);
    padding: 9px 14px;
}

.app-shell .button.compact,
.app-shell .section-title-row .button.secondary,
.app-shell .panel-heading .button.secondary,
.app-shell .workspace-hero-actions .button.secondary,
.app-shell .context-disclosure > summary .button.secondary {
    min-height: var(--ds-control-height);
    padding: 9px 14px;
}

.topbar-page-actions:empty {
    display: none;
}

.workspace {
    display: grid;
    align-content: start;
    gap: var(--ds-page-gap);
}

.workspace > * {
    min-width: 0;
}

.workspace > .panel,
.workspace > .metric-grid,
.workspace > .workspace-section-grid,
.workspace > .detail-grid,
.workspace > .center-card-grid,
.workspace > .intervention-command-center {
    margin-bottom: 0;
}

.topbar {
    margin-bottom: 0;
}

.context-label {
    letter-spacing: 0.035em;
}

.panel,
.metric,
.context-strip > div,
.center-card,
.modal-card {
    border-color: var(--ds-border-soft);
    box-shadow: var(--ds-panel-shadow);
}

.panel {
    border-radius: var(--ds-panel-radius);
}

.panel-heading {
    min-height: 68px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfd 100%);
}

.panel-heading h2 {
    font-size: 19px;
    font-weight: var(--ds-weight-heading);
    letter-spacing: -0.01em;
}

.panel-heading p {
    max-width: 760px;
    font-weight: var(--ds-weight-regular);
    line-height: 1.35;
}

.workspace-hero {
    min-height: 132px;
    box-shadow: var(--ds-panel-shadow-strong);
}

.workspace-hero h2 {
    font-size: 24px;
    font-weight: var(--ds-weight-heading);
    letter-spacing: -0.02em;
}

.workspace-hero p {
    max-width: 820px;
    font-weight: var(--ds-weight-medium);
    line-height: 1.4;
}

.workspace-hero-actions {
    align-items: center;
}

.entity-band::before {
    width: 4px;
}

.metric-grid {
    gap: 12px;
}

.metric {
    display: grid;
    align-content: center;
    min-height: 104px;
    padding: 15px 16px;
    border-radius: var(--ds-panel-radius);
}

.metric strong {
    margin: 7px 0 5px;
    font-weight: var(--ds-weight-heading);
    letter-spacing: -0.02em;
}

.metric small {
    color: var(--muted);
    font-size: var(--ds-text-sm);
    font-weight: var(--ds-weight-regular);
    line-height: 1.35;
}

.metric-label,
.entity-summary-list h3,
.panel-heading small,
th {
    letter-spacing: 0.025em;
}

.workspace-section-grid,
.detail-grid,
.context-strip,
.center-card-grid {
    gap: var(--ds-section-gap);
}

.entity-summary-list {
    gap: 12px;
}

.summary-row,
.context-disclosure,
.program-mini-card,
.form-subsection,
.rule-modal-section {
    border-color: var(--ds-border-soft);
}

.summary-row {
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

/*
 * Lista reutilizable de tarjetas operativas.
 *
 * Vive en el sistema visual porque alertas, evaluaciones y los resúmenes de
 * intervención comparten la misma pieza. El panel dibuja el borde exterior; esta
 * lista aporta el espacio interior para que ninguna tarjeta quede pegada a él.
 * Una sola columna es deliberado: el intento de partir las filas de alertas en dos
 * columnas estrechó títulos hasta hacerlos ilegibles. La densidad nace del contenido
 * de la tarjeta, no de duplicar columnas.
 */
.operation-list-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--ds-space-2);
    min-width: 0;
    padding: var(--ds-space-3) var(--ds-space-4) var(--ds-space-4);
}

.operation-list-section > .summary-row {
    margin-top: 0;
}

a.summary-row:hover,
button.summary-row:hover,
.summary-row.editable-row:hover {
    border-color: #bed6d1;
    background: var(--ds-row-hover);
    box-shadow: 0 8px 20px rgba(24, 36, 36, 0.045);
}

.summary-row.facility-colored-row {
    border-color: var(--facility-border);
    border-left-color: var(--facility-accent);
    background: var(--facility-surface);
}

.summary-row.facility-colored-row strong {
    color: var(--facility-ink);
}

button.summary-row.facility-colored-row:hover,
.summary-row.facility-colored-row.editable-row:hover {
    border-color: var(--facility-accent);
    background: color-mix(in srgb, var(--facility-surface) 82%, #ffffff);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--facility-accent) 14%, transparent);
}

.context-disclosure > summary {
    background: #ffffff;
}

.context-disclosure[open] > summary {
    background: #f8fbfb;
}

.context-disclosure > summary span:first-child {
    color: var(--text);
}

.summary-row-actions a,
.button.secondary,
.icon-button {
    box-shadow: 0 4px 12px rgba(24, 36, 36, 0.035);
}

.button.primary {
    box-shadow: 0 8px 18px rgba(15, 138, 112, 0.16);
}

.button:focus-visible,
.icon-button:focus-visible,
.summary-row:focus-visible,
.tree-link:focus-visible,
.nav-link:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 0;
    box-shadow: var(--ds-focus-ring);
}

.coordination-filters,
.request-inbox-filters,
.search-form,
.inline-form,
.bulk-slot-form,
.bulk-holiday-form {
    align-items: end;
}

.coordination-filters label,
.request-inbox-filters label,
.inline-filter label,
.field {
    min-width: 0;
}

.coordination-filters label,
.request-inbox-filters label {
    display: grid;
    gap: 6px;
}

.coordination-filters label > span,
.request-inbox-filters label > span,
.inline-filter span,
.field > span {
    color: var(--text);
    font-size: 13px;
    font-weight: var(--ds-weight-label);
    line-height: 1.2;
}

.responsive-table {
    background: var(--surface);
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: #f8fbfb;
    color: var(--muted);
    font-size: 12px;
}

td {
    background: #ffffff;
}

tbody tr {
    transition: background 0.16s ease;
}

tbody tr:hover td {
    background: var(--ds-row-hover);
}

.table-link {
    display: inline-flex;
    align-items: center;
    min-height: var(--ds-control-height);
    color: var(--text);
    font-weight: var(--ds-weight-label);
    text-decoration: none;
}

.table-link:hover {
    color: var(--accent-strong);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pager a,
.pager-disabled {
    display: inline-flex;
    align-items: center;
    min-height: var(--ds-control-height);
    padding: 8px 12px;
}

td small,
.stack-row span,
.empty-text,
.empty-cell {
    line-height: 1.35;
}

.role-chip,
.attendance-count-pill,
.operation-pill,
.operation-status,
.operation-role {
    border: 1px solid rgba(15, 138, 112, 0.12);
}

.data-list div,
.stack-row,
.edit-stack {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfd 100%);
}

.form-grid,
.padded-form,
.edit-stack,
.trainer-report-table-wrap,
.group-list,
.coordination-board-wrap {
    padding: 16px;
}

.search-box,
.field input,
.field select,
.field textarea,
.coordination-filters input,
.coordination-filters select,
.request-inbox-filters input:not([data-filter-autocomplete]),
.request-inbox-filters select {
    border-color: var(--ds-border-soft);
}

.search-box:focus-within,
.field input:focus,
.field select:focus,
.field textarea:focus,
.coordination-filters input:focus,
.coordination-filters select:focus,
.request-inbox-filters input:not([data-filter-autocomplete]):focus,
.request-inbox-filters select:focus {
    border-color: var(--accent);
    box-shadow: var(--ds-focus-ring);
}

.people-list-toolbar {
    align-items: center;
    gap: var(--ds-space-4);
}

.people-list-workspace {
    display: grid;
    gap: var(--ds-space-4);
    min-width: 0;
}

.people-results-panel {
    min-width: 0;
    overflow: hidden;
}

.people-list-filter-block {
    display: grid;
    gap: var(--ds-space-2);
    min-width: 0;
}

.people-role-filter.is-active {
    color: #ffffff;
    border-color: var(--accent);
    background: var(--accent);
}

.people-role-filter.is-active .people-filter-count {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.people-search-form {
    flex: 0 1 480px;
    min-width: min(100%, 360px);
}

.people-search-form[data-live-search-ready="true"] .button[type="submit"] {
    display: none;
}

.live-search-status {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 11px;
    font-weight: var(--ds-weight-label);
    white-space: nowrap;
}

.people-search-form.is-loading .search-box {
    border-color: rgba(14, 123, 100, 0.28);
    background: var(--accent-soft);
}

.people-table {
    min-width: 1040px;
}

.people-email-cell {
    min-width: 180px;
}

.people-phone-cell {
    min-width: 120px;
}

.people-contact-value,
.people-contact-missing {
    overflow-wrap: anywhere;
}

/* Estado y tipo de la cita mas reciente, y unidad familiar. El tipo va apagado y
   detras del estado: lo que se busca de un vistazo es el estado. */
.people-evaluation-cell {
    min-width: 150px;
}

.people-evaluation-cell .people-evaluation-type {
    margin-left: 6px;
    color: var(--muted);
    font-size: 12px;
}

.people-household-cell {
    min-width: 130px;
}

.people-contact-missing {
    color: var(--muted);
}

.group-name-launcher {
    display: inline-flex;
    align-items: center;
    min-height: var(--ds-control-height);
    padding: 0;
    border: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
    font-weight: var(--ds-weight-label);
    text-align: left;
    cursor: pointer;
}

.group-name-launcher:hover,
.people-group-link:hover {
    color: var(--accent-strong);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.group-name-launcher:focus-visible,
.people-group-link:focus-visible {
    outline: 0;
    border-radius: 3px;
    box-shadow: var(--ds-focus-ring);
}

/* Enlaces dentro de celdas de tabla: se les da altura suficiente para
   alcanzar el minimo AA de 24 px (WCAG 2.5.8) sin inflar la fila. Llegar a
   los 44 px del estandar propio exige el patron movil de tabla pendiente. */
.people-group-link {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0;
    border: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
    font-weight: var(--ds-weight-label);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.people-assignment-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: var(--ds-weight-label);
    line-height: 1;
}

.people-assignment-status.is-active {
    color: #047857;
    background: #dcfce7;
}

.people-assignment-status.is-ended {
    color: #a33a2b;
    background: #fff0ed;
}

.people-assignment-status.is-pending {
    color: var(--muted);
    background: #eef3f2;
}

.people-attendance-badge {
    display: inline-flex;
    min-width: 64px;
    min-height: 28px;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: var(--ds-weight-label);
    line-height: 1;
    white-space: nowrap;
}

/* DEC-179: el denominador acompana siempre al porcentaje, atenuado pero legible. */
.people-attendance-sessions {
    font-size: 11px;
    font-weight: var(--ds-weight-medium);
    opacity: 0.75;
}

@media (max-width: 640px) {
    .people-attendance-badge {
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 5px 9px;
        border-radius: 12px;
    }
}

.people-attendance-badge.is-high {
    color: #047857;
    background: #dcfce7;
}

.people-attendance-badge.is-medium {
    color: #854d0e;
    background: #fef9c3;
}

.people-attendance-badge.is-low {
    color: #c2410c;
    background: #ffedd5;
}

.people-attendance-badge.is-critical {
    color: #b91c1c;
    background: #fee2e2;
}

.people-attendance-badge.is-empty {
    color: var(--muted);
    background: #eef3f2;
}

.request-inbox-filters {
    padding: 14px;
}

.request-inbox-filters input:not([data-filter-autocomplete]),
.request-inbox-filters select,
.coordination-filters input,
.coordination-filters select {
    min-height: var(--ds-control-height);
    width: 100%;
    border: 1px solid var(--ds-border-soft);
    border-radius: var(--ds-panel-radius);
    background: var(--surface);
    color: var(--text);
    padding: 8px 10px;
}

.form-button-field {
    align-self: end;
}

.form-button-field .button,
.modal-actions .button {
    justify-content: center;
}

.account-layout .form-grid.compact {
    grid-template-columns: 1fr;
}

.account-layout .form-grid.compact .field-wide {
    grid-column: auto;
}

.account-layout .form-button-field {
    justify-content: start;
}

.participant-priority {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ds-space-4);
    padding: var(--ds-space-4);
    border-left: 4px solid var(--accent);
}

.participant-priority-copy {
    display: grid;
    gap: var(--ds-space-1);
    min-width: 0;
}

.participant-priority h2,
.participant-priority p {
    margin: 0;
}

.participant-priority h2 {
    font-size: var(--ds-text-lg);
    font-weight: var(--ds-weight-heading);
}

.participant-priority p {
    color: var(--muted);
    font-size: var(--ds-text-sm);
}

.participant-priority-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ds-space-2);
}

.participant-summary-disclosure,
.trainer-session-disclosure,
.participant-history-disclosure,
.summary-disclosure {
    overflow: hidden;
}

.participant-summary-disclosure > summary,
.trainer-session-disclosure > summary,
.participant-history-disclosure > summary,
.summary-disclosure > summary {
    cursor: pointer;
    list-style: none;
}

.participant-summary-disclosure > summary::-webkit-details-marker,
.trainer-session-disclosure > summary::-webkit-details-marker,
.participant-history-disclosure > summary::-webkit-details-marker,
.summary-disclosure > summary::-webkit-details-marker,
.coordination-day > summary::-webkit-details-marker {
    display: none;
}

.participant-summary-disclosure > summary,
.summary-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ds-space-3);
    min-height: 64px;
    padding: var(--ds-space-3) var(--ds-space-4);
}

.participant-summary-disclosure > summary > div,
.summary-disclosure > summary > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.participant-summary-disclosure > summary strong,
.summary-disclosure > summary strong {
    font-size: 16px;
    font-weight: var(--ds-weight-heading);
}

.participant-summary-disclosure > summary span,
.summary-disclosure > summary span {
    color: var(--muted);
    font-size: var(--ds-text-sm);
    font-weight: var(--ds-weight-regular);
}

.participant-summary-count,
.summary-disclosure-count {
    white-space: nowrap;
}

.participant-summary-grid,
.summary-disclosure-grid {
    margin: 0;
    padding: 0 var(--ds-space-4) var(--ds-space-4);
}

.participant-summary-disclosure[open] > summary,
.trainer-session-disclosure[open] > summary,
.participant-history-disclosure[open] > summary,
.summary-disclosure[open] > summary {
    border-bottom: 1px solid var(--ds-border-soft);
}

.coordination-day > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding: 9px 12px;
    cursor: pointer;
    list-style: none;
    background: #0f766e;
    color: #ffffff;
}

.coordination-day > summary span {
    color: inherit;
    font-weight: var(--ds-weight-label);
}

.trainer-session-disclosure > summary,
.participant-history-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ds-space-3);
}

.trainer-session-disclosure > summary .attendance-count-pill {
    flex: 0 0 auto;
}

.trainer-tab-button {
    min-height: var(--ds-control-height);
    padding: 9px 14px;
    font-weight: var(--ds-weight-label);
    line-height: 1.2;
}

.trainer-tab-button:focus-visible,
.participant-summary-disclosure > summary:focus-visible,
.trainer-session-disclosure > summary:focus-visible,
.participant-history-disclosure > summary:focus-visible,
.trainer-filter-disclosure > summary:focus-visible,
.summary-disclosure > summary:focus-visible,
.coordination-day > summary:focus-visible {
    outline: 0;
    box-shadow: inset var(--ds-focus-ring);
}

.participant-tab-panel:focus-visible,
.trainer-tab-panel:focus-visible {
    outline: 0;
    box-shadow: var(--ds-focus-ring);
}

.trainer-filter-disclosure > summary span,
.trainer-session-context,
.trainer-session-meta :where(span, strong) {
    font-weight: var(--ds-weight-medium);
}

.trainer-session-context {
    line-height: 1.25;
}

.trainer-session-card-head strong.trainer-session-group {
    font-weight: var(--ds-weight-heading);
}

.attendance-category-button.is-active {
    border-color: var(--intervention);
    background: color-mix(in srgb, var(--intervention) 9%, var(--surface));
    color: #9a4d00;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--intervention) 28%, transparent);
}

.attendance-year-section {
    overflow: hidden;
}

.attendance-category-empty {
    display: grid;
    justify-items: start;
    gap: 4px;
    padding: 20px;
}

.attendance-category-empty h2,
.attendance-category-empty p {
    margin: 0;
}

.attendance-category-empty p {
    color: var(--muted);
}

.attendance-year-section-heading {
    gap: var(--ds-space-3);
}

.attendance-year-section-heading > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.attendance-year-section-heading .entity-kicker {
    justify-self: start;
}

.attendance-year-section > .responsive-table {
    border-top: 1px solid var(--ds-border-soft);
}

.attendance-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ds-space-3);
    padding: var(--ds-space-3);
    border-top: 1px solid var(--ds-border-soft);
}

.attendance-pagination > span,
.attendance-pagination strong {
    color: var(--muted);
    font-size: var(--ds-text-sm);
}

.attendance-pagination > div {
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
}

.attendance-pagination .is-disabled {
    cursor: default;
    opacity: 0.5;
}

.attendance-trainer-modal {
    width: min(760px, calc(100vw - 24px));
    max-height: min(820px, calc(100dvh - 24px));
}

.attendance-trainer-modal .modal-card {
    width: 100%;
    max-height: min(820px, calc(100dvh - 24px));
}

.attendance-trainer-modal .modal-body {
    display: grid;
    align-content: start;
    gap: var(--ds-space-3);
    overflow-y: auto;
}

.attendance-trainer-modal .attendance-trainer-grid {
    grid-template-columns: 1fr;
    align-content: start;
}

.attendance-trainer-modal-intro {
    margin: 0;
    padding: 0 var(--ds-space-3);
    color: var(--muted);
}

.home-hero,
.workspace-hero,
.intervention-hero {
    background:
        linear-gradient(90deg, rgba(15, 138, 112, 0.018), rgba(255, 255, 255, 0) 42%),
        var(--surface);
}

.center-card {
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.center-card:hover {
    border-color: #bed6d1;
    box-shadow: var(--ds-panel-shadow-strong);
    transform: translateY(-1px);
}

.center-card.is-active {
    transform: none;
}

@media (max-width: 680px) {

    .attendance-year-section-heading {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .attendance-year-section-heading p {
        display: none;
    }

    .attendance-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .attendance-pagination > div {
        justify-content: space-between;
    }

    .attendance-pagination strong {
        text-align: center;
    }

    .attendance-trainer-modal {
        width: calc(100vw - 12px);
        max-height: calc(100dvh - 12px);
    }

    .attendance-trainer-modal .modal-card {
        max-height: calc(100dvh - 12px);
    }
}

@media (min-width: 981px) {
    body.nav-collapsed .topbar {
        padding-left: 64px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 980px) {
    .app-shell {
        display: block;
        min-height: 100vh;
    }

    .side-nav {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 90;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: var(--ds-space-3);
        width: min(320px, 88vw);
        max-width: 88vw;
        height: 100dvh;
        max-height: none;
        padding: var(--ds-space-4);
        overflow: hidden;
        border-right: 1px solid var(--border);
        border-bottom: 0;
        box-shadow: 18px 0 48px rgba(24, 36, 36, 0.16);
        transform: translateX(0);
        transition: transform 0.2s ease;
    }

    body.nav-collapsed .side-nav,
    body:not(.nav-ready) .side-nav {
        display: flex;
        transform: translateX(-105%);
    }

    body.nav-ready:not(.nav-collapsed) {
        overflow: hidden;
    }

    .side-nav-header {
        position: static;
        z-index: 1;
        flex: 0 0 auto;
        margin: calc(var(--ds-space-4) * -1) calc(var(--ds-space-4) * -1) 0;
        padding: var(--ds-space-3) var(--ds-space-4);
        background: var(--surface);
        border-bottom: 1px solid var(--ds-border-soft);
    }

    .side-nav .nav-links {
        flex: 1 1 auto;
        align-content: start;
        min-height: 0;
        padding-right: 4px;
        display: grid;
        gap: var(--ds-space-1);
        max-width: none;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .side-nav .nav-link {
        width: 100%;
        white-space: normal;
    }

    .nav-scrim {
        position: fixed;
        inset: 0;
        z-index: 80;
    }

    body.nav-ready:not(.nav-collapsed) .nav-scrim {
        display: block;
    }

    .nav-restore-button {
        top: 12px;
        left: 12px;
        z-index: 70;
        border-radius: 10px;
        box-shadow: 0 6px 18px rgba(24, 36, 36, 0.1);
    }

    .workspace {
        gap: 14px;
        width: 100%;
        min-width: 0;
        padding: var(--ds-space-4);
    }

    .workspace-section-grid,
    .workspace-section-grid > .panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .people-scope-tree-panel,
    .responsive-table,
    .weekly-scroll {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .people-list-toolbar {
        align-items: stretch;
    }

    .people-search-form {
        flex-direction: row;
        align-items: center;
        flex-basis: auto;
        min-width: 0;
    }

    .people-search-form .search-box {
        width: auto;
    }

    .people-search-form .button {
        flex: 0 0 auto;
        width: auto;
    }

    .topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: var(--ds-space-2) var(--ds-space-3);
        min-height: 68px;
        margin: 0;
        padding: 10px 0 10px 52px;
    }

    .topbar-copy {
        min-width: 0;
    }

    .topbar .context-label {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar h1 {
        margin-top: 2px;
        font-size: 24px;
        font-weight: var(--ds-weight-heading);
        line-height: 1.15;
    }

    .topbar-actions {
        display: contents;
    }

    .topbar-page-actions {
        grid-row: 2;
        grid-column: 1 / -1;
        width: 100%;
    }

    .topbar-page-actions .button {
        justify-content: center;
    }

    .workspace-hero {
        min-height: 0;
        padding: var(--ds-space-4);
    }

    .participant-priority {
        align-items: flex-start;
        flex-direction: column;
    }

    .participant-priority-actions {
        width: 100%;
    }

    .metric {
        min-height: 92px;
    }
}

@media (max-width: 680px) {
    .side-nav {
        width: min(320px, 90vw);
        max-width: 90vw;
    }

    .workspace {
        gap: var(--ds-space-3);
        padding: var(--ds-space-3);
    }

    .operation-list-section {
        padding: var(--ds-space-3);
    }

    .workspace-section-grid > .panel {
        justify-self: stretch;
    }

    .topbar {
        min-height: 64px;
        padding-left: 52px;
    }

    .topbar h1 {
        font-size: 22px;
    }

    .topbar .context-label {
        font-size: 11px;
        letter-spacing: 0.02em;
    }

    .topbar-page-actions {
        gap: var(--ds-space-2);
        flex-wrap: wrap;
    }

    .topbar-page-actions .button {
        flex: 1 1 calc(50% - var(--ds-space-2));
        min-width: 0;
    }

    .topbar-page-actions .button:last-child:nth-child(odd) {
        flex-basis: 100%;
    }

    .workspace-hero {
        padding: 14px;
    }

    .people-table-wrap {
        max-width: 100%;
        overflow: visible;
        border-top: 0;
        background: transparent;
    }

    .people-table {
        display: block;
        min-width: 0;
    }

    .people-table thead {
        display: none;
    }

    .people-table tbody {
        display: grid;
        gap: var(--ds-space-2);
        padding: var(--ds-space-2);
    }

    .people-table tbody tr {
        display: grid;
        gap: 8px 12px;
        margin-bottom: 0;
        padding: 13px;
        overflow: hidden;
        border: 1px solid var(--ds-border-soft);
        border-radius: var(--ds-panel-radius);
        background: var(--surface);
    }

    .people-table.is-intervention-scope tbody tr {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "person state"
            "group role"
            "attendance attendance"
            "evaluation evaluation"
            "household household"
            "email email"
            "phone phone";
    }

    .people-table.is-general-scope tbody tr {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "person role"
            "evaluation evaluation"
            "household household"
            "email email"
            "phone phone"
            "context-primary context-primary"
            "context-secondary context-secondary";
    }

    .people-table tbody td {
        display: flex;
        align-items: center;
        min-width: 0;
        padding: 0;
        border: 0;
        background: transparent;
        font-size: 13px;
    }

    .people-table tbody tr:hover td {
        background: transparent;
    }

    .people-person-cell {
        grid-area: person;
    }

    .people-person-cell .table-link {
        /* La tarjeta movil comprime la fila, pero no por debajo del minimo
           AA de 24 px (WCAG 2.5.8). Antes anulaba la altura por completo. */
        min-height: 26px;
        line-height: 1.3;
    }

    .people-role-cell {
        grid-area: role;
        justify-self: end;
    }

    .people-id-column {
        display: none !important;
    }

    .people-email-cell {
        grid-area: email;
        min-width: 0;
        gap: 6px;
        color: var(--muted);
    }

    .people-phone-cell {
        grid-area: phone;
        min-width: 0;
        gap: 6px;
        color: var(--muted);
    }

    .people-evaluation-cell {
        grid-area: evaluation;
        min-width: 0;
        gap: 6px;
    }

    .people-household-cell {
        grid-area: household;
        min-width: 0;
        gap: 6px;
        color: var(--muted);
    }

    .people-responsive-table .people-email-cell::before,
    .people-responsive-table .people-phone-cell::before,
    .people-responsive-table .people-evaluation-cell::before,
    .people-responsive-table .people-household-cell::before {
        flex: 0 0 58px;
        color: var(--muted);
        content: attr(data-label);
        font-size: 11px;
        font-weight: var(--ds-weight-medium);
        text-transform: uppercase;
    }

    .people-context-primary {
        grid-area: context-primary;
    }

    .people-context-secondary {
        grid-area: context-secondary;
    }

    .people-table.is-intervention-scope .people-context-primary {
        grid-area: group;
    }

    .people-table.is-intervention-scope .people-context-secondary {
        grid-area: state;
        justify-self: end;
    }

    .people-attendance-cell {
        grid-area: attendance;
        gap: 6px;
    }

    .people-attendance-cell::before {
        color: var(--muted);
        content: "Asistencia";
        font-size: 11px;
        font-weight: var(--ds-weight-medium);
        text-transform: uppercase;
    }

    .people-group-cell {
        gap: 6px;
        color: var(--text);
        font-weight: var(--ds-weight-label);
    }

    .people-group-cell::before {
        content: "Grupo";
        color: var(--muted);
        font-size: 11px;
        font-weight: var(--ds-weight-medium);
        text-transform: uppercase;
    }

    .people-table.is-general-scope .people-context-primary,
    .people-table.is-general-scope .people-context-secondary {
        gap: 6px;
        color: var(--text);
    }

    .people-table.is-general-scope .people-context-primary::before,
    .people-table.is-general-scope .people-context-secondary::before {
        color: var(--muted);
        font-size: 11px;
        font-weight: var(--ds-weight-medium);
        text-transform: uppercase;
    }

    .people-table.is-general-scope .people-context-primary::before {
        content: "Centro";
    }

    .people-table.is-general-scope .people-context-secondary::before {
        content: "Intervencion";
    }

    .people-state-cell .people-assignment-status {
        justify-content: center;
        width: 20px;
        min-height: 20px;
        padding: 0;
        color: #ffffff;
        font-size: 0;
        line-height: 1;
    }

    .people-state-cell .people-assignment-status::before {
        font-size: 12px;
        font-weight: 900;
    }

    .people-state-cell .people-assignment-status.is-active {
        background: #15966f;
    }

    .people-state-cell .people-assignment-status.is-active::before {
        content: "✓";
    }

    .people-state-cell .people-assignment-status.is-ended {
        background: #c94f3d;
    }

    .people-state-cell .people-assignment-status.is-ended::before {
        content: "×";
    }

    .people-state-cell .people-assignment-status.is-pending {
        background: var(--muted);
    }

    .people-state-cell .people-assignment-status.is-pending::before {
        content: "–";
    }

    .people-table .people-empty-row {
        display: block;
    }

    .people-table .people-empty-row .empty-cell {
        display: block;
        padding: var(--ds-space-4);
        text-align: center;
    }

    .workspace-hero h2 {
        font-size: 22px;
    }

    .workspace-hero p {
        font-size: var(--ds-text-sm);
        font-weight: var(--ds-weight-regular);
    }

    .participant-priority {
        gap: var(--ds-space-3);
        padding: 14px;
    }

    .participant-priority h2 {
        font-size: 19px;
    }

    .participant-priority-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .participant-priority-actions .button:only-child {
        grid-column: 1 / -1;
    }

    .participant-summary-disclosure > summary {
        min-height: 56px;
        padding: 10px 14px;
    }

    .summary-disclosure > summary {
        min-height: 56px;
        padding: 10px 14px;
    }

    .summary-disclosure > summary p {
        display: none;
    }

    .participant-summary-disclosure > summary > div > span,
    .summary-disclosure > summary > div > span {
        display: none;
    }

    .participant-summary-count,
    .summary-disclosure-count {
        font-size: 12px !important;
    }

    .coordination-day > summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: var(--ds-control-height);
        padding: 9px 12px;
        cursor: pointer;
        list-style: none;
        background: #0f766e;
        color: #ffffff;
    }

    .coordination-day:not([open]) > summary {
        border-bottom: 0;
    }

    .coordination-board .coordination-mini-matrix {
        display: none;
    }

    .coordination-board.is-wide-compact,
    .coordination-board.is-week-compact {
        grid-template-columns: 1fr;
        align-items: start;
        overflow-x: hidden;
    }

    .coordination-aside-disclosure > summary.panel-heading {
        min-height: 64px;
    }

    .coordination-request-list > .button {
        width: 100%;
        justify-content: center;
    }

    .attendance-session-details > summary.panel-heading,
    .trainer-session-disclosure > summary.panel-heading {
        display: grid;
        align-items: center;
        gap: 10px;
        min-height: 68px;
        padding: 12px 14px;
    }

    .attendance-session-details > summary.panel-heading {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .trainer-session-disclosure > summary.panel-heading {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .attendance-session-details > summary.panel-heading p,
    .trainer-session-disclosure > summary.panel-heading p {
        display: none;
    }

    .attendance-session-details > summary.panel-heading::before {
        margin: 0;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--ds-space-2);
    }

    .metric-grid.coordination-overview-metrics {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--ds-space-2);
    }

    .coordination-overview-metrics .coordination-metric-group {
        min-height: 0;
    }

    .coordination-overview-metrics .coordination-metric-value span {
        overflow-wrap: normal;
    }

    .panel-heading {
        min-height: 0;
        padding: 14px;
    }

    .panel-heading h2 {
        font-size: 18px;
    }

    .panel-heading p {
        font-size: var(--ds-text-sm);
    }

    .metric {
        min-height: 82px;
        padding: 12px;
    }

    .metric strong {
        margin: 4px 0 2px;
        font-size: 28px;
    }

    .metric small {
        font-size: 12px;
    }

    .participant-summary-grid {
        padding: 0 var(--ds-space-3) var(--ds-space-3);
    }

    .participant-work-tabs {
        gap: var(--ds-space-2);
        margin-bottom: 0;
    }

    .trainer-tab-button {
        min-height: var(--ds-control-height);
        padding: 9px 10px;
    }

    .trainer-session-disclosure > summary {
        min-height: 68px;
    }

    .trainer-session-context {
        font-size: 11px;
        letter-spacing: 0.01em;
    }

    .form-grid,
    .padded-form,
    .edit-stack,
    .trainer-report-table-wrap,
    .group-list,
    .coordination-board-wrap {
        padding: 12px;
    }

    .responsive-table {
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
    }
}

@media (max-width: 680px) {
    .filter-toolbar .filter-search-form,
    .filter-toolbar .filter-search-row {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-toolbar .filter-search-form .button,
    .filter-toolbar .filter-search-row .button {
        width: 100%;
    }
}
