/* App-shell split list + detail CRUD (JavaFX *CrudView / *FormView mirror) */

.app-crud__breadcrumb,
.person-crud__breadcrumb {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
}

.app-crud__breadcrumb a,
.person-crud__breadcrumb a {
  color: var(--app-blue, #1e40af);
  font-weight: 600;
  text-decoration: none;
}

.app-crud__breadcrumb a:hover,
.person-crud__breadcrumb a:hover {
  text-decoration: underline;
}

/* Layout shell: table-only | split + divider | form fullscreen */
.app-crud,
.person-crud {
  --crud-list-ratio: 38%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: calc(100vh - 220px);
  gap: 0;
}

.crud-layout--table .crud-layout__detail,
.crud-layout--table .crud-layout__divider {
  display: none;
}

.crud-layout--table .crud-layout__list {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}

.crud-layout--split .crud-layout__list {
  flex: 0 0 var(--crud-list-ratio);
  min-width: 280px;
  max-width: 85%;
}

.crud-layout--split .crud-layout__divider {
  display: block;
}

.crud-layout--split .crud-layout__detail {
  flex: 1 1 auto;
  min-width: 280px;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  container-type: inline-size;
  container-name: crud-detail;
}

.crud-layout--split .crud-layout__detail > .app-entity-form,
.crud-layout--split .crud-layout__detail > .person-form,
.crud-layout--split .crud-layout__detail > .app-course-form {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* Families: member block sits below the address form (sibling, not inside it). */
.crud-layout--split .crud-layout__detail:has(> .app-form-section),
.crud-layout--fullscreen .crud-layout__detail:has(> .app-form-section) {
  overflow: auto;
}

.crud-layout--split .crud-layout__detail > .app-entity-form:has(+ .app-form-section),
.crud-layout--fullscreen .crud-layout__detail > .app-entity-form:has(+ .app-form-section) {
  flex: 0 0 auto;
  min-height: auto;
  overflow: visible;
}

.crud-layout--split .crud-layout__detail > .app-form-section,
.crud-layout--fullscreen .crud-layout__detail > .app-form-section {
  flex: 0 0 auto;
  margin: 0 1rem 1rem;
}

.crud-layout--fullscreen .crud-layout__list,
.crud-layout--fullscreen .crud-layout__divider {
  display: none;
}

.crud-layout--fullscreen .crud-layout__detail {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  container-type: inline-size;
  container-name: crud-detail;
}

.crud-layout--fullscreen .crud-layout__detail > .app-entity-form,
.crud-layout--fullscreen .crud-layout__detail > .person-form,
.crud-layout--fullscreen .crud-layout__detail > .app-course-form {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.crud-layout__divider {
  flex: 0 0 6px;
  align-self: stretch;
  margin: 0.75rem 0;
  border-radius: 3px;
  background: #e5e7eb;
  cursor: col-resize;
  touch-action: none;
  position: relative;
  z-index: 3;
  flex-shrink: 0;
}

.crud-layout__divider:hover,
.crud-layout__divider--dragging {
  background: #dc2626;
}

.crud-layout__modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--app-line, rgba(229, 231, 235, 0.5));
  background: var(--app-glass-toolbar, rgba(249, 250, 251, 0.45));
  -webkit-backdrop-filter: blur(var(--app-glass-blur, 6px));
  backdrop-filter: blur(var(--app-glass-blur, 6px));
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.crud-layout__mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 34px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.crud-layout__mode-btn:hover {
  background: #f9fafb;
  border-color: #cbd5e1;
}

.crud-layout__mode-btn--active {
  background: #fef2f2;
  border-color: #dc2626;
  color: #dc2626;
}

/* Icon-only CRUD toolbar (JavaFX crud-button-icon-only parity) */
.app-btn.app-btn--icon,
a.app-btn.app-btn--icon {
  min-width: 38px;
  min-height: 34px;
  padding: 0.3rem 0.45rem;
  gap: 0;
}

.app-btn.app-btn--icon.app-btn--sm,
a.app-btn.app-btn--icon.app-btn--sm {
  min-width: 38px;
  min-height: 34px;
  padding: 0.3rem 0.45rem;
}

.app-btn--icon .crud-icon,
.crud-layout__mode-btn .crud-icon {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

.crud-layout__mode-btn .crud-icon--mode {
  width: 1.4rem;
  height: 1.4rem;
}

.app-btn--icon .crud-icon--danger,
.app-btn--danger.app-btn--icon {
  color: var(--app-red, #dc2626);
}

.app-btn--primary.app-btn--icon .crud-icon {
  color: #fff;
}

.app-btn--save-feedback.app-btn--save-ok .crud-icon,
.app-btn--save-feedback.app-btn--save-ko .crud-icon {
  color: #fff;
}

.app-crud__toolbar-main,
.person-crud__toolbar-main {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

body.crud-layout--dragging {
  user-select: none;
  cursor: col-resize;
}

body.crud-layout--dragging * {
  cursor: col-resize;
}

@media (max-width: 960px) {
  .app-crud,
  .person-crud {
    flex-direction: column;
    min-height: 0;
  }

  .crud-layout--split .crud-layout__list {
    flex: 0 0 auto;
    max-width: none;
    min-height: 280px;
  }

  .crud-layout--split .crud-layout__divider {
    display: none;
  }

  .crud-layout--split .crud-layout__detail {
    min-width: 0;
  }
}

.app-crud__list-panel,
.app-crud__detail-panel,
.person-crud__list-panel,
.person-crud__detail-panel {
  background: var(--app-glass, rgba(255, 255, 255, 0.3));
  border: 1px solid var(--app-line, rgba(229, 231, 235, 0.5));
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  -webkit-backdrop-filter: blur(var(--app-glass-blur, 6px));
  backdrop-filter: blur(var(--app-glass-blur, 6px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.app-crud__toolbar,
.person-crud__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--app-line, rgba(229, 231, 235, 0.5));
  background: var(--app-glass-toolbar, rgba(249, 250, 251, 0.45));
  -webkit-backdrop-filter: blur(var(--app-glass-blur, 6px));
  backdrop-filter: blur(var(--app-glass-blur, 6px));
}

.app-crud__toolbar-main,
.person-crud__toolbar-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.app-crud__filter,
.person-crud__filter {
  flex: 1 1 140px;
  min-width: 120px;
}

.app-crud__filter-input,
.person-crud__filter-input {
  width: 100%;
  padding: 0.4rem 0.65rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font: inherit;
  font-size: 0.8125rem;
}

.app-crud__facet-filters {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
}

.app-crud__facet-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #4b5563;
  white-space: nowrap;
}

.app-crud__facet-filter-label {
  font-weight: 600;
}

.app-crud__facet-filter-input {
  padding: 0.35rem 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font: inherit;
  font-size: 0.8125rem;
  background: #fff;
}

.app-crud__count,
.person-crud__count {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
}

.app-crud__table-wrap,
.person-crud__table-wrap {
  flex: 1 1 auto;
  overflow: auto;
}

.app-crud__table,
.person-crud__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.app-crud__table th,
.person-crud__table th {
  position: sticky;
  top: 0;
  background: var(--app-glass-header, rgba(243, 244, 246, 0.55));
  -webkit-backdrop-filter: blur(var(--app-glass-blur, 6px));
  backdrop-filter: blur(var(--app-glass-blur, 6px));
  text-align: left;
  padding: 0.5rem 0.65rem;
  font-weight: 700;
  color: #374151;
  border-bottom: 1px solid var(--app-line, rgba(229, 231, 235, 0.5));
  z-index: 1;
}

.app-crud__th--sortable {
  cursor: pointer;
  user-select: none;
  padding-right: 1.35rem;
  white-space: nowrap;
}

.app-crud__th--sortable:hover {
  background: rgba(233, 236, 241, 0.65);
}

.app-crud__th--sortable:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

.app-crud__th--sortable::after {
  content: "⇅";
  margin-left: 0.35rem;
  font-size: 0.65rem;
  opacity: 0.4;
}

.app-crud__th--sort-asc::after {
  content: "▲";
  opacity: 0.9;
}

.app-crud__th--sort-desc::after {
  content: "▼";
  opacity: 0.9;
}

.app-crud__table td,
.person-crud__table td {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.app-crud__row,
.person-crud__row {
  cursor: pointer;
}

.app-crud__row:hover,
.person-crud__row:hover {
  background: rgba(220, 38, 38, 0.18);
}

.app-crud__row--selected,
.person-crud__row--selected {
  background: rgba(220, 38, 38, 0.09);
}

.app-crud__row--selected:hover,
.person-crud__row--selected:hover {
  background: rgba(220, 38, 38, 0.22);
}

.app-crud__row--hidden,
.person-crud__row--hidden {
  display: none;
}

.app-crud__row--future {
  font-style: italic;
  color: var(--app-muted, #64748b);
}

.app-crud__row--expired {
  opacity: 0.7;
  color: var(--app-muted, #64748b);
}

.app-crud__row--expired td:nth-child(2) {
  text-decoration: line-through;
}

.app-crud__detail-panel,
.person-crud__detail-panel {
  min-width: 0;
}

.app-entity-form,
.person-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.app-entity-form__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--app-line, rgba(229, 231, 235, 0.5));
  background: var(--app-glass-toolbar, rgba(249, 250, 251, 0.45));
  -webkit-backdrop-filter: blur(var(--app-glass-blur, 6px));
  backdrop-filter: blur(var(--app-glass-blur, 6px));
}

.app-entity-form__header strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: #111827;
}

.app-entity-form__header-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.app-entity-form__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
  align-items: start;
}

fieldset.app-entity-form__body {
  border: none;
  margin: 0;
  min-width: 0;
}

.app-form-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
  align-items: start;
}

@container crud-detail (min-width: 640px) {
  .crud-layout--fullscreen .app-form-sections,
  .crud-layout--fullscreen .app-entity-form__body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.app-entity-form__grid,
.person-form__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: flex-start;
}

.app-entity-form__field--actions {
  align-self: flex-end;
  flex: 0 1 auto;
  max-width: none;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}

.app-entity-form__field--actions .app-btn {
  min-height: 2.4rem;
}

/* Person form: static logical groups — fields stay together across breakpoints */
.person-form__grid {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.85rem;
  align-items: stretch;
}

.person-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  min-width: 0;
}

.person-form__row {
  display: grid;
  gap: 0.65rem 1rem;
  width: 100%;
  min-width: 0;
}

.person-form__row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.person-form__row--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.person-form__row--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.person-form__row .person-form__field {
  flex: unset;
  max-width: none;
  width: 100%;
}

.person-form__row .person-form__field--compact {
  max-width: 14rem;
  justify-self: start;
}

@media (max-width: 56rem) {
  .person-form__row--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 30rem) {
  .person-form__row--4,
  .person-form__row--3,
  .person-form__row--2 {
    grid-template-columns: 1fr;
  }
}

.app-entity-form__field,
.person-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1 1 11rem;
  max-width: 18rem;
}

.app-entity-form__field[data-grade-obtenu-org]:not(.grade-obtenu-org--active),
.app-entity-form__field[data-context-scope-org]:not(.context-scope-org--active):not(.competition-organizer-org--active),
.app-entity-form__field[data-competition-organizer-org]:not(.competition-organizer-org--active):not(.context-scope-org--active) {
  display: none !important;
}

.app-entity-form__field--full,
.person-form__field--full {
  flex: 1 1 100%;
  max-width: 100%;
  width: 100%;
}

.app-entity-form__field--wide {
  flex: 1 1 14rem;
  max-width: 26rem;
}

.app-entity-form__row {
  display: grid;
  gap: 0.65rem 1rem;
  width: 100%;
  min-width: 0;
  flex: 1 1 100%;
  max-width: 100%;
}

.app-entity-form__row--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-entity-form__row .app-entity-form__field {
  flex: unset;
  max-width: none;
  width: 100%;
}

@media (max-width: 48rem) {
  .app-entity-form__row--3 {
    grid-template-columns: 1fr;
  }
}

.app-entity-form__field--compact,
.person-form__field--compact {
  flex: 0 1 auto;
  max-width: 14rem;
  min-width: 9rem;
}

.app-entity-form__field label,
.person-form__field label,
.app-entity-form__field-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b7280;
}

.app-entity-form__field-label {
  display: block;
  margin-bottom: 0.25rem;
}

.app-entity-form__field input,
.app-entity-form__field select,
.app-entity-form__field textarea,
.app-entity-form__field .searchable-select__input,
.person-form__field input,
.person-form__field select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font: inherit;
  font-size: 0.875rem;
  color: #111827;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-entity-form__field input:focus,
.app-entity-form__field select:focus,
.app-entity-form__field textarea:focus,
.app-entity-form__field .searchable-select__input:focus,
.person-form__field input:focus,
.person-form__field select:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.app-entity-form__field input[readonly],
.app-entity-form__field input:disabled:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.app-entity-form__field select:disabled,
.app-entity-form__field textarea:disabled,
.app-entity-form__field .searchable-select__input:disabled,
.person-form__field input[readonly],
.person-form__field input:disabled:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.person-form__field select:disabled,
.person-form__field textarea:disabled,
.person-form__field .searchable-select__input:disabled {
  --app-field-lock-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%239ca3af' d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E");
  background-color: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
  padding-right: 2.25rem;
  background-image: var(--app-field-lock-icon);
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  background-size: 0.85rem 0.85rem;
}

.app-entity-form__field select:disabled,
.person-form__field select:disabled {
  padding-right: 2.5rem;
  background-position: right 1.65rem center;
}

.searchable-select:has(.searchable-select__input:disabled) .searchable-select__actions {
  display: none;
}

.app-form-section,
.person-form__card {
  padding: 1.125rem 1.25rem;
  border: 1px solid var(--app-line, rgba(229, 231, 235, 0.5));
  border-radius: 14px;
  background: var(--app-glass-strong, rgba(255, 255, 255, 0.42));
  -webkit-backdrop-filter: blur(var(--app-glass-blur, 6px));
  backdrop-filter: blur(var(--app-glass-blur, 6px));
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.03);
}

.app-form-section__title,
.person-form__card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #111827;
}

.app-form-section__subtitle {
  margin: 1.25rem 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: #111827;
}

.app-org-fn-scope-mandates {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
}

.app-form-section:has(.app-org-fn-scope-mandates) {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
}

.app-entity-form:has(.app-org-fn-scope-mandates) .app-entity-form__body {
  grid-template-columns: 1fr;
}

.app-entity-form__tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.app-entity-form__tab {
  margin: 0;
  padding: 0.55rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #6b7280;
  cursor: pointer;
}

.app-entity-form__tab:hover {
  color: #111827;
  background: rgba(255, 255, 255, 0.7);
}

.app-entity-form__tab--active {
  background: #fff;
  color: #111827;
  border-color: #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.app-org-fn-scope-mandates__panels {
  margin-top: 0.85rem;
  width: 100%;
  min-width: 0;
}

.app-org-fn-scope-mandates__panel {
  width: 100%;
  min-width: 0;
}

.app-org-fn-scope-mandates .app-dual-list {
  max-width: none;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.app-org-fn-scope-mandates .app-dual-list__column {
  width: 100%;
}

.app-org-fn-scope-mandates .app-dual-list__select {
  width: 100%;
  min-height: 40rem;
  max-height: min(90vh, 80rem);
}

.app-form-section__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.app-entity-form__subsection {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.app-entity-form__subsection-title {
  margin: 0 0 0.85rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #374151;
}

.app-entity-form__section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #111827;
  grid-column: 1 / -1;
}

.app-entity-form__section-title .app-icon {
  width: 20px;
  height: 20px;
}

.person-form__tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--app-line, rgba(229, 231, 235, 0.5));
  background: var(--app-glass-toolbar, rgba(249, 250, 251, 0.45));
  -webkit-backdrop-filter: blur(var(--app-glass-blur, 6px));
  backdrop-filter: blur(var(--app-glass-blur, 6px));
}

.person-form__tab {
  margin: 0;
  padding: 0.55rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #6b7280;
  cursor: pointer;
}

.person-form__tab:hover {
  color: #111827;
  background: rgba(255, 255, 255, 0.7);
}

.person-form__tab--active {
  background: #fff;
  color: #111827;
  border-color: #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.person-form__tab-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.person-form__panels {
  flex: 1 1 auto;
  overflow: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}

.person-form__credential-strip {
  flex-shrink: 0;
  padding: 0.75rem 1rem 0;
}

.person-form__card--credential {
  margin-bottom: 0;
}

.person-form__card--credential .person-form__card-title {
  margin-bottom: 0.5rem;
}

.person-form__credential-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.person-form__field--credential-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.person-form__credential-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--app-blue, #1e40af);
  text-decoration: none;
}

.person-form__credential-link:hover {
  text-decoration: underline;
}

@container crud-detail (min-width: 520px) {
  .person-form__credential-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .person-form__field--credential-actions {
    grid-column: 1 / -1;
  }
}

.crud-layout--split .crud-layout__detail > .person-form__credential-strip,
.crud-layout--fullscreen .crud-layout__detail > .person-form__credential-strip {
  flex-shrink: 0;
}

.person-form__panel[hidden] {
  display: none !important;
}

.person-form__hint,
.app-entity-form__hint {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: #6b7280;
}

.app-page-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--app-line, rgba(229, 231, 235, 0.5));
  border-radius: 12px;
  background: var(--app-glass, rgba(255, 255, 255, 0.3));
  -webkit-backdrop-filter: blur(var(--app-glass-blur, 6px));
  backdrop-filter: blur(var(--app-glass-blur, 6px));
}

.app-page-tabs__tab {
  margin: 0;
  padding: 0.55rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #6b7280;
  text-decoration: none;
  cursor: pointer;
}

.app-page-tabs__tab:hover {
  color: #111827;
  background: rgba(255, 255, 255, 0.7);
}

.app-page-tabs__tab--active {
  background: #fff;
  color: #111827;
  border-color: #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.app-entity-form__field--checkbox label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
  color: #374151;
}

.person-form__checks {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
}

.person-form__checks label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
  color: #374151;
}

.app-flash {
  margin: 0 0 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
}

.app-flash--success {
  background: rgba(34, 197, 94, 0.15);
  color: #166534;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.app-flash--info {
  background: rgba(59, 130, 246, 0.12);
  color: #1e40af;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.app-flash--error {
  background: rgba(220, 38, 38, 0.12);
  color: #991b1b;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.app-image-field,
.club-logo-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
}

.app-image-field__preview-frame,
.club-logo-field__preview-frame {
  flex: 0 0 auto;
  width: 6.5rem;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  padding: 0.25rem;
  box-sizing: border-box;
}

.app-image-field__preview-frame--empty,
.club-logo-field__preview-frame--empty {
  background: #f9fafb;
  border-style: dashed;
}

.app-image-field--badge .app-image-field__preview-frame {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.2rem;
}

.app-image-field__preview,
.club-logo-field__preview {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.app-image-field__body,
.club-logo-field__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.app-image-field__toolbar,
.club-logo-field__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  position: relative;
}

.app-image-field__toolbar input[type="file"],
.club-logo-field__toolbar input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.app-image-field__clear,
.club-logo-field__clear {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.2;
  white-space: nowrap;
}

.app-image-field__clear::before,
.club-logo-field__clear::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1.25rem;
  margin-right: 0.125rem;
  background: #e5e7eb;
}

.app-image-field__hint,
.club-logo-field__hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
}

/* Course form — time slot list + editor */
.course-time-slots__layout {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.course-time-slots__list-pane {
  flex: 0 0 min(100%, 18rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 12rem;
}

.course-time-slots__list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 10rem;
  max-height: 16rem;
  overflow: auto;
  border: 1px solid var(--app-border, #dbeafe);
  border-radius: 0.5rem;
  background: #fff;
}

.course-time-slots__item {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--app-border, #e2e8f0);
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.35;
}

.course-time-slots__item:last-child {
  border-bottom: none;
}

.course-time-slots__item:hover {
  background: #f8fafc;
}

.course-time-slots__item--selected {
  background: #eff6ff;
  color: var(--app-blue, #1e40af);
  font-weight: 600;
}

.course-time-slots__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.course-time-slots__editor {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 720px) {
  .course-time-slots__layout {
    flex-direction: column;
  }

  .course-time-slots__list-pane {
    flex-basis: auto;
  }
}

/* Function rows — list-editor (FK + dates) */
.function-rows__layout {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.function-rows__list-pane {
  flex: 0 0 min(100%, 18rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 12rem;
}

.function-rows__list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 10rem;
  max-height: 16rem;
  overflow: auto;
  border: 1px solid var(--app-border, #dbeafe);
  border-radius: 0.5rem;
  background: #fff;
}

.function-rows__item {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--app-border, #e2e8f0);
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.35;
}

.function-rows__item:last-child {
  border-bottom: none;
}

.function-rows__item:hover {
  background: #f8fafc;
}

.function-rows__item--selected {
  background: #eff6ff;
  color: var(--app-blue, #1e40af);
  font-weight: 600;
}

.function-rows__item--future {
  font-style: italic;
  color: var(--app-muted, #64748b);
}

.function-rows__item--expired {
  opacity: 0.65;
  text-decoration: line-through;
  color: var(--app-muted, #64748b);
}

.function-rows__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.function-rows__editor {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 720px) {
  .function-rows__layout {
    flex-direction: column;
  }

  .function-rows__list-pane {
    flex-basis: auto;
  }
}

/* Competition category rows — list-editor (referential category pick) */
.competition-category-checkboxes {
  display: grid;
  gap: 0.4rem;
}

.competition-category-checkboxes__item {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.competition-category-rows__layout {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.competition-category-rows__list-pane {
  flex: 0 0 min(100%, 18rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 12rem;
}

.competition-category-rows__list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 10rem;
  max-height: 16rem;
  overflow: auto;
  border: 1px solid var(--app-border, #dbeafe);
  border-radius: 0.5rem;
  background: #fff;
}

.competition-category-rows__item {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--app-border, #e2e8f0);
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.35;
}

.competition-category-rows__item:last-child {
  border-bottom: none;
}

.competition-category-rows__item:hover {
  background: #f8fafc;
}

.competition-category-rows__item--selected {
  background: #eff6ff;
  color: var(--app-blue, #1e40af);
  font-weight: 600;
}

.competition-category-rows__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.competition-category-rows__editor {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 720px) {
  .competition-category-rows__layout {
    flex-direction: column;
  }

  .competition-category-rows__list-pane {
    flex-basis: auto;
  }
}

/* Compact boolean toggle (filters / general) — smaller than .app-validation-switch */
.app-toggle {
  display: inline-flex;
  align-items: stretch;
  gap: 0.12rem;
  padding: 0.14rem;
  border: 1px solid var(--app-border, #dbeafe);
  border-radius: 999px;
  background: #fff;
  min-width: 0;
  width: max-content;
  max-width: 100%;
}

.app-toggle__option {
  flex: 0 1 auto;
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.2;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
}

.app-toggle__option:hover:not(.app-toggle__option--active) {
  background: #f1f5f9;
}

.app-toggle__option--active {
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.2);
}

.app-toggle__option--primary {
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.2);
}

.app-toggle--locked {
  pointer-events: none;
}

.app-toggle--locked .app-toggle__option {
  cursor: not-allowed;
  opacity: 0.65;
}

.app-toggle--locked .app-toggle__option--active,
.app-toggle--locked .app-toggle__option--primary {
  opacity: 1;
}

.app-toggle__option:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.18);
}

.app-toggle--success-danger .app-toggle__option[data-toggle-option="true"].app-toggle__option--active {
  background: #15803d;
  color: #fff;
  box-shadow: 0 2px 8px rgba(21, 128, 61, 0.22);
}

.app-toggle--success-danger .app-toggle__option[data-toggle-option="false"].app-toggle__option--active {
  background: #b91c1c;
  color: #fff;
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.22);
}

.app-toggle--success .app-toggle__option--active {
  background: #15803d;
  color: #fff;
  box-shadow: 0 2px 8px rgba(21, 128, 61, 0.22);
}

.app-toggle--danger .app-toggle__option--active {
  background: #b91c1c;
  color: #fff;
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.22);
}

.app-toggle--attendance {
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;
  width: 100%;
  max-width: none;
  flex-shrink: 1;
}

.app-toggle--attendance .app-toggle__option {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.28rem 0.18rem;
  font-size: 0.68rem;
  text-align: center;
}

.app-toggle--attendance-icons .app-toggle__option--stacked {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.15rem;
  line-height: 1.1;
}

.app-toggle__attendance-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.app-toggle__attendance-icon[data-icon="present"] {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
}

.app-toggle__attendance-icon[data-icon="excused"] {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zm-4.2-5.71-1.41-1.41-3.29 3.3-1.29-1.29-1.41 1.41 2.7 2.7 4.7-4.71z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zm-4.2-5.71-1.41-1.41-3.29 3.3-1.29-1.29-1.41 1.41 2.7 2.7 4.7-4.71z'/%3E%3C/svg%3E");
}

.app-toggle__attendance-icon[data-icon="late"] {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z'/%3E%3C/svg%3E");
}

.app-toggle__attendance-icon[data-icon="absent"] {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z'/%3E%3C/svg%3E");
}

.app-toggle__attendance-label {
  font-size: 0.62rem;
  font-weight: 650;
  line-height: 1.05;
}

.app-toggle--attendance .app-toggle__option[data-toggle-option="PRESENT"].app-toggle__option--active {
  background: #15803d;
  color: #fff;
  box-shadow: 0 2px 8px rgba(21, 128, 61, 0.22);
}

.app-toggle--attendance .app-toggle__option[data-toggle-option="EXCUSED"].app-toggle__option--active {
  background: #ca8a04;
  color: #fff;
  box-shadow: 0 2px 8px rgba(202, 138, 4, 0.22);
}

.app-toggle--attendance .app-toggle__option[data-toggle-option="LATE"].app-toggle__option--active {
  background: #ea580c;
  color: #fff;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.24);
}

.app-toggle--attendance .app-toggle__option[data-toggle-option="ABSENT"].app-toggle__option--active {
  background: #b91c1c;
  color: #fff;
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.22);
}

.app-toggle--fluid {
  width: 100%;
  max-width: 100%;
}

.app-toggle--fluid .app-toggle__option {
  flex: 1 1 0;
  text-align: center;
}

/* Teacher roll-call (mobile-first) */
.rollcall-hero {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--app-border, #dbeafe);
  border-radius: 14px;
  background: #fff;
}

.rollcall-hero__logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e2e8f0;
}

.rollcall-hero__logo--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: #1d4ed8;
  background: #dbeafe;
}

.rollcall-hero__body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.85rem;
  min-width: 0;
  flex: 1 1 auto;
}

.rollcall-hero__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.2;
  color: #0f172a;
}

.rollcall-hero__when {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}

.rollcall-hero__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.rollcall-hero__icon {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
  flex-shrink: 0;
}

.course-session-detail__status {
  margin: -0.35rem 0 1rem;
}

.course-session-detail__section {
  margin-bottom: 1.25rem;
}

.course-session-detail__section-title {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.course-session-detail__section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.course-session-detail__section-header .course-session-detail__section-title {
  margin-bottom: 0;
}

.course-session-detail__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.course-session-detail__substitute-action {
  border: 1px solid #374151;
  background: #fff;
  color: #1f2937;
}

.course-session-detail__substitute-action:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #1f2937;
  color: #111827;
}

.course-session-detail__substitute-action--active {
  background: #f3f4f6;
  border-color: #1f2937;
}

.course-session-detail__substitute {
  margin: -0.35rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
}

.course-session-detail__substitute-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 0.75rem;
}

.course-session-detail__substitute-field {
  flex: 1 1 10rem;
  min-width: 0;
  margin: 0;
}

.course-session-detail__substitute-submit {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  padding-bottom: 0.1rem;
}

/* Inline label + value rows (statut, métadonnées) — see ui/inline-row-alignment */
.app-inline-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.75rem;
  margin: 0;
  padding: 0.2rem 0.35rem 0.75rem;
}

.app-inline-facts > div {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 1.5rem;
}

.app-inline-facts dt {
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
  color: var(--app-muted, #6b7280);
  font-weight: 500;
  line-height: 1.3;
}

.app-inline-facts dd {
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
}

.app-inline-facts .my-sessions-card__badge,
.app-inline-facts .app-badge {
  margin: 0;
}

.course-session-detail__rollcall-summary {
  margin-bottom: 0.75rem;
}

.course-session-detail__rollcall-badge {
  font-size: 0.78rem;
}

.course-session-detail__attendance-status {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
}

.course-session-detail__attendance-status--present {
  background: #dcfce7;
  color: #166534;
}

.course-session-detail__attendance-status--excused {
  background: #fef9c3;
  color: #854d0e;
}

.course-session-detail__attendance-status--late {
  background: #ffedd5;
  color: #9a3412;
}

.course-session-detail__attendance-status--absent {
  background: #fee2e2;
  color: #991b1b;
}

.course-session-detail__attendance-status--unset {
  background: transparent;
  color: var(--app-muted, #6b7280);
  font-weight: 500;
  padding-left: 0;
}

.course-session-detail__comment {
  font-size: 0.88rem;
  color: #374151;
  white-space: pre-wrap;
}

.rollcall-toggles {
  display: grid;
  gap: 0.65rem;
  margin: 0.25rem 0.45rem 1.15rem;
  padding: 0.15rem 0.1rem;
}

.rollcall-toggles .app-toggle {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  padding: 0.22rem;
  gap: 0.18rem;
}

.rollcall-toggles .app-toggle__option {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.85rem;
  margin: 0.06rem;
  padding-block: 0.72rem;
  padding-inline: 0.65rem;
  font-size: 0.92rem;
  line-height: 1.25;
  text-align: center;
}

.rollcall-lock {
  margin: 0;
  font-size: 0.8rem;
  color: #b45309;
}

.rollcall-adherents--locked {
  padding: 0.55rem 0.5rem;
  border-radius: 12px;
  background: #f1f5f9;
  opacity: 0.72;
  pointer-events: none;
  user-select: none;
}

.rollcall-adherents--locked .rollcall-row {
  background: #e2e8f0;
}

/* My sessions list */
.my-sessions-months {
  display: grid;
  gap: 1.25rem;
}

.my-sessions-month__title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
}

.my-sessions-month__weeks {
  display: grid;
  gap: 1rem;
}

.my-sessions-week__label {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.my-sessions-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
}

.my-sessions-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  flex: 1 1 260px;
  max-width: 420px;
}

.my-sessions-card:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.my-sessions-card--locked {
  background: #f8fafc;
}

.my-sessions-card__logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e2e8f0;
}

.my-sessions-card__logo--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: #1d4ed8;
  background: #dbeafe;
}

.my-sessions-card__body {
  min-width: 0;
  flex: 1 1 auto;
}

.my-sessions-card__title {
  font-weight: 650;
  margin: 0 0 0.2rem;
  line-height: 1.25;
}

.my-sessions-card__meta {
  margin: 0;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.35;
}

.my-sessions-card__badge {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
}

.my-sessions-card__badge--planned {
  background: #e0f2fe;
  color: #0369a1;
}

.my-sessions-card__badge--not-done {
  background: #fee2e2;
  color: #b91c1c;
}

.my-sessions-card__badge--completed {
  background: #dcfce7;
  color: #15803d;
}

.my-sessions-card__badge--validated {
  background: #ede9fe;
  color: #6d28d9;
}

.my-sessions-card__badge--cancelled {
  background: #f1f5f9;
  color: #64748b;
}

.course-sessions-panel {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.course-sessions-panel__hint {
  margin: 0 0 0.75rem;
}

.course-sessions-period__dates.app-entity-form__grid {
  align-items: flex-end;
}

.course-sessions-generate__actions .app-btn {
  min-height: 2.4rem;
}

.course-sessions-generate__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.65rem;
  flex: 1 1 auto;
  max-width: none;
}

.course-sessions-date-spin {
  display: flex;
  align-items: stretch;
  gap: 0.2rem;
  width: 100%;
}

.course-sessions-date-spin input[type="date"] {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
}

.course-sessions-date-spin__btns {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 1px;
}

.course-sessions-date-spin__btn {
  appearance: none;
  flex: 1 1 0;
  min-width: 1.55rem;
  padding: 0 0.35rem;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  color: #334155;
  font-size: 0.55rem;
  line-height: 1;
  cursor: pointer;
}

.course-sessions-date-spin__btn:first-child {
  border-radius: 6px 6px 0 0;
}

.course-sessions-date-spin__btn:last-child {
  border-radius: 0 0 6px 6px;
}

.course-sessions-date-spin__btn:hover {
  background: #e2e8f0;
}

.course-sessions-date-spin__btn:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 1px;
  z-index: 1;
}

.compensation-month-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.65rem;
  margin: 0 0 1rem;
}

.compensation-month-bar__nav {
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  text-decoration: none;
}

.compensation-month-bar__select {
  min-width: 12rem;
  margin: 0;
}

.compensation-month-bar__professor {
  min-width: 14rem;
  margin: 0;
}

.compensation-month-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: auto;
}

.compensation-sessions {
  margin: 0 0 1.5rem;
}

.compensation-sessions__title,
.compensation-statements__title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.compensation-cal-wrap {
  overflow-x: auto;
}

.compensation-cal {
  min-width: 36rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.compensation-cal__head,
.compensation-cal__week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.compensation-cal__head {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.compensation-cal__head-cell {
  padding: 0.35rem 0.25rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 650;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.compensation-cal__week + .compensation-cal__week {
  border-top: 1px solid #e5e7eb;
}

.compensation-cal-day {
  min-height: 3.4rem;
  padding: 0.28rem 0.32rem;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: #fff;
}

.compensation-cal-day:last-child {
  border-right: none;
}

.compensation-cal-day--out {
  background: #f8fafc;
}

.compensation-cal-day--weekend {
  background: #fafafa;
}

.compensation-cal-day--out .compensation-cal-day__num,
.compensation-cal-day--weekend .compensation-cal-day__num {
  color: #94a3b8;
}

.compensation-cal-day--active {
  background: #fff;
}

.compensation-cal-day__num {
  font-size: 0.78rem;
  font-weight: 650;
  color: #334155;
  line-height: 1.1;
}

.compensation-cal-day__chips {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  max-height: 4.8rem;
  overflow-y: auto;
}

.compensation-cal-chip {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.12rem 0.28rem;
  border-radius: 6px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  font-size: 0.68rem;
  line-height: 1.2;
}

.compensation-cal-chip__text {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1e293b;
}

.compensation-cal-chip__hours {
  flex-shrink: 0;
  font-weight: 700;
  color: #1d4ed8;
  white-space: nowrap;
}

/* Member planning (/app/member/courses) */
.member-planning-page {
  max-width: 72rem;
}

.member-planning-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  margin: 0 0 0.85rem;
}

.member-planning-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.member-planning-legend__icon {
  width: 0.9rem;
  height: 0.9rem;
  background-color: #64748b;
}

.member-planning-legend__item--enrolled .member-planning-legend__icon {
  background-color: #2563eb;
}

.member-planning-legend__item--teaching .member-planning-legend__icon {
  background-color: #d97706;
}

.member-planning-legend__item--enrolled::before,
.member-planning-legend__item--teaching::before,
.member-planning-legend__item--female::before,
.member-planning-legend__item--male::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  flex-shrink: 0;
}

.member-planning-legend__item--enrolled::before,
.member-planning-legend__item--teaching::before {
  display: none;
}

.member-planning-legend__item--enrolled,
.member-planning-legend__item--teaching {
  padding: 0.28rem 0.45rem;
}

.member-planning-legend__item--female::before {
  background: #ffe8df;
  border: 1px solid #fdba74;
}

.member-planning-legend__item--male::before {
  background: #e8ebff;
  border: 1px solid #a5b4fc;
}

.member-planning-cal .compensation-cal__week {
  align-items: stretch;
}

.member-planning-cal .compensation-cal-day {
  min-height: 11rem;
  height: auto;
}

.member-planning-day__events {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.member-planning-event {
  border-radius: 8px;
  padding: 0.36rem 0.4rem 0.32rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.member-planning-event--enrolled {
  border-left: 3px solid #60a5fa;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.member-planning-event--teaching {
  border-left: 3px solid #f59e0b;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
}

.member-planning-event__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.22rem;
}

.member-planning-event__kind-icon {
  width: 0.82rem;
  height: 0.82rem;
}

.member-planning-event--enrolled .member-planning-event__kind-icon {
  background-color: #2563eb;
}

.member-planning-event--teaching .member-planning-event__kind-icon {
  background-color: #d97706;
}

.member-planning-event__course {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.member-planning-event__time {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 650;
  color: #2563eb;
  white-space: nowrap;
  justify-self: end;
}

.member-planning-event__people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.member-planning-event__person {
  padding: 0.16rem 0.34rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  color: #334155;
}

.member-planning-event__person--female {
  background: #ffe8df;
  color: #9a3412;
}

.member-planning-event__person--male {
  background: #e8ebff;
  color: #3730a3;
}

.member-planning-event__person--neutral {
  background: #f1f5f9;
  color: #475569;
}

.member-planning-event--cancelled {
  opacity: 0.78;
}

.member-planning-event__course--cancelled,
.member-planning-event__time--cancelled,
.member-planning-event__person--cancelled {
  text-decoration: line-through;
}

/* Member adhesions (/app/member/adhesions) */
.member-adhesions-page {
  max-width: 52rem;
  min-height: auto;
}

.member-adhesions-page .app-entity-form__header {
  justify-content: space-between;
}

.member-adhesions-page__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

.member-adhesion-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "identity status"
    "amounts amounts"
    "actions actions";
  gap: 0.65rem 1rem;
  align-items: start;
  margin: 0;
  border-left-width: 4px;
  border-left-style: solid;
  border-left-color: #cbd5e1;
}

.member-adhesion-card__identity {
  grid-area: identity;
  min-width: 0;
}

.member-adhesion-card__person {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.3;
}

.member-adhesion-card__club,
.member-adhesion-card__ref {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  color: var(--app-muted, #6b7280);
  line-height: 1.35;
}

.member-adhesion-card__ref {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: #4b5563;
}

.member-adhesion-card__status {
  grid-area: status;
  justify-self: end;
  align-self: start;
  white-space: normal;
  text-align: right;
}

.member-adhesion-card__amounts {
  grid-area: amounts;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0;
}

.member-adhesion-card__amount {
  margin: 0;
}

.member-adhesion-card__amount dt {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--app-muted, #6b7280);
}

.member-adhesion-card__amount dd {
  margin: 0.1rem 0 0;
  font-size: 0.9375rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: #111827;
}

.member-adhesion-card__amount--due dd {
  color: #b91c1c;
}

.member-adhesion-card__actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.member-adhesion-card--pending-payment {
  border-left-color: #dc2626;
  background: rgba(220, 38, 38, 0.05);
}

.member-adhesion-card--partially-paid {
  border-left-color: #c2410c;
  background: rgba(194, 65, 12, 0.05);
}

.member-adhesion-card--pending-check {
  border-left-color: #ea580c;
  background: rgba(234, 88, 12, 0.05);
}

.member-adhesion-card--pending-validation {
  border-left-color: #ca8a04;
  background: rgba(202, 138, 4, 0.06);
}

.member-adhesion-card--confirmed-pending-licence,
.member-adhesion-card--confirmed {
  border-left-color: #65a30d;
  background: rgba(101, 163, 13, 0.06);
}

.member-adhesion-card--licensed {
  border-left-color: #16a34a;
  background: rgba(22, 163, 74, 0.06);
}

.member-adhesion-card--external {
  border-left-color: #0891b2;
  background: rgba(8, 145, 178, 0.06);
}

.member-adhesion-card--cancelled {
  border-left-color: #9ca3af;
  background: rgba(156, 163, 175, 0.08);
}

@media (min-width: 640px) {
  .member-adhesion-card {
    grid-template-columns: minmax(10rem, 1.4fr) auto minmax(8rem, 0.7fr) auto;
    grid-template-areas: "identity status amounts actions";
    align-items: center;
  }

  .member-adhesion-card__amounts {
    justify-content: flex-end;
  }

  .member-adhesion-card__actions {
    justify-content: flex-end;
  }
}

.compensation-statements__header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.compensation-statements__header form {
  margin: 0;
}

.compensation-row--draft {
  background: #f8fafc;
}

.compensation-row--validated {
  background: #eff6ff;
}

.compensation-row--paid {
  background: #f0fdf4;
}

.compensation-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: flex-start;
}

.compensation-row-actions form,
.compensation-row-actions details {
  margin: 0;
}

.compensation-row-actions summary {
  display: inline-block;
  cursor: pointer;
  list-style: none;
}

.compensation-row-actions summary::-webkit-details-marker {
  display: none;
}

.compensation-payment-panel {
  margin-top: 0.5rem;
  min-width: 16rem;
}

.compensation-statement-recap {
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
}

.compensation-payment-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}

.compensation-rate-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  margin: 0;
}

.compensation-rate-row input[type="number"] {
  width: 6.5rem;
}

.rollcall-adherents__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem 0.75rem;
  margin: 0 0 0.75rem;
}

.rollcall-adherents__stats {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 650;
  color: #475569;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
}

.rollcall-adherents__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0.55rem;
  width: 100%;
}

.rollcall-adherents__bulk {
  flex: 1 1 0;
  min-height: 2.55rem;
  padding: 0.42rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.2;
  border-radius: 999px;
  white-space: nowrap;
}

.rollcall-adherents__bulk--present:not(:disabled) {
  color: #15803d;
  border-color: #86efac;
  background: #f0fdf4;
}

.rollcall-adherents__bulk--present:not(:disabled):hover {
  background: #dcfce7;
}

.rollcall-adherents__bulk--absent:not(:disabled) {
  color: #b91c1c;
  border-color: #fca5a5;
  background: #fef2f2;
}

.rollcall-adherents__bulk--absent:not(:disabled):hover {
  background: #fee2e2;
}

.rollcall-adherents__bulk--present:disabled {
  opacity: 1;
  cursor: default;
  pointer-events: none;
  color: #15803d;
  border-color: #86efac;
  background: #dcfce7;
}

.rollcall-adherents__bulk--absent:disabled {
  opacity: 1;
  cursor: default;
  pointer-events: none;
  color: #b91c1c;
  border-color: #fca5a5;
  background: #fee2e2;
}

.rollcall-adherents__bulk:disabled {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.rollcall-row {
  display: grid;
  grid-template-columns: minmax(5rem, 0.85fr) minmax(0, 4fr) auto;
  align-items: center;
  column-gap: 0.45rem;
  row-gap: 0.35rem;
  padding: 0.55rem 0.5rem;
  margin-bottom: 0.35rem;
  border-radius: 10px;
  background: #fff;
  transition: background-color 0.15s ease;
}

.rollcall-row[data-status="PRESENT"] {
  background: #f0fdf4;
}

.rollcall-row[data-status="EXCUSED"] {
  background: #fefce8;
}

.rollcall-row[data-status="LATE"] {
  background: #fff7ed;
}

.rollcall-row[data-status="ABSENT"] {
  background: #fef2f2;
}

.rollcall-row--adhesion-unpaid,
.rollcall-row--adhesion-unpaid[data-status] {
  background: #fee2e2;
  box-shadow: inset 3px 0 0 #f87171;
}

.rollcall-row--adhesion-not-validated,
.rollcall-row--adhesion-not-validated[data-status] {
  background: #ffedd5;
  box-shadow: inset 3px 0 0 #fb923c;
}

.rollcall-row--adhesion-not-licensed,
.rollcall-row--adhesion-not-licensed[data-status] {
  background: #fef9c3;
  box-shadow: inset 3px 0 0 #facc15;
}

.rollcall-row__identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
}

.rollcall-row__name {
  min-width: 0;
  font-weight: 650;
  font-size: 0.88rem;
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: break-word;
}

.rollcall-row__name-line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.rollcall-row__name-line .rollcall-row__name {
  flex: 1 1 auto;
  min-width: 0;
}

.rollcall-row__adhesion-warning {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.rollcall-row__adhesion-warning--unpaid {
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.rollcall-row__adhesion-warning--not-validated {
  color: #c2410c;
  background: #ffedd5;
  border: 1px solid #fdba74;
}

.rollcall-row__adhesion-warning--not-validated svg,
.rollcall-row__adhesion-warning--not-licensed svg {
  width: 0.86rem;
  height: 0.86rem;
  fill: currentColor;
}

.rollcall-row__adhesion-warning--not-licensed {
  color: #a16207;
  background: #fef9c3;
  border: 1px solid #fde047;
}

.rollcall-adherents--locked .rollcall-row--adhesion-unpaid {
  background: #fee2e2;
}

.rollcall-adherents--locked .rollcall-row--adhesion-not-validated {
  background: #ffedd5;
}

.rollcall-adherents--locked .rollcall-row--adhesion-not-licensed {
  background: #fef9c3;
}

.rollcall-row__grade-icon {
  min-width: 0;
  max-width: 100%;
  line-height: 0;
}

.rollcall-row__grade-bandeau {
  height: 18px;
  max-width: 4.5rem;
}

.rollcall-row__status {
  min-width: 0;
  width: 100%;
  container-type: inline-size;
  container-name: rollcall-status;
}

.rollcall-row__note-btn {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rollcall-row__note-btn:hover,
.rollcall-row__note-btn.is-open {
  background: #f1f5f9;
  color: #1d4ed8;
}

.rollcall-row__note-btn.has-comment {
  color: #1d4ed8;
}

.rollcall-row__note-icon {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

.rollcall-row__note {
  grid-column: 1 / -1;
}

.rollcall-row__note textarea {
  width: 100%;
  min-height: 3.2rem;
  resize: vertical;
}

@media (min-width: 641px) {
  .rollcall-toggles {
    margin-inline: 0.65rem;
    padding-inline: 0.25rem;
  }

  .rollcall-toggles .app-toggle__option {
    font-size: 0.96rem;
    min-height: 3rem;
    padding-block: 0.78rem;
  }

  .rollcall-adherents__header {
    display: grid;
    grid-template-columns: minmax(5rem, 0.85fr) minmax(0, 4fr) 2.5rem;
    align-items: center;
    column-gap: 0.45rem;
    row-gap: 0.55rem;
  }

  .rollcall-adherents__stats {
    grid-column: 1;
    flex: unset;
    white-space: normal;
  }

  .rollcall-adherents__toolbar {
    grid-column: 2;
    width: auto;
    max-width: 100%;
    justify-content: center;
    flex-wrap: nowrap;
  }

  .rollcall-adherents__bulk {
    flex: 1 1 0;
    min-width: 0;
    min-height: 2.65rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 640px) {
  .rollcall-hero {
    padding: 0.55rem 0.6rem;
  }

  .rollcall-toggles {
    margin-inline: 0.35rem;
  }

  .rollcall-toggles .app-toggle__option {
    flex: 1 1 7rem;
    white-space: normal;
    font-size: 0.88rem;
    min-height: 2.85rem;
    padding-block: 0.72rem;
    padding-inline: 0.45rem;
  }

  .rollcall-adherents__header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .rollcall-adherents__stats {
    white-space: normal;
    flex: unset;
    width: 100%;
  }

  .rollcall-adherents__toolbar {
    justify-content: stretch;
    width: 100%;
  }

  .rollcall-adherents__bulk {
    padding: 0.38rem 0.55rem;
    font-size: 0.84rem;
    min-height: 2.45rem;
  }

  .rollcall-row {
    grid-template-columns: minmax(3rem, 5.75rem) minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.3rem;
  }

  .rollcall-row__identity {
    max-width: 5.75rem;
  }

  .rollcall-row--adhesion-unpaid .rollcall-row__identity,
  .rollcall-row--adhesion-not-validated .rollcall-row__identity,
  .rollcall-row--adhesion-not-licensed .rollcall-row__identity {
    max-width: 6.35rem;
  }

  .rollcall-row--adhesion-unpaid,
  .rollcall-row--adhesion-not-validated,
  .rollcall-row--adhesion-not-licensed {
    grid-template-columns: minmax(3.25rem, 6.35rem) minmax(0, 1fr) auto;
  }

  .rollcall-row__name {
    font-size: 0.82rem;
  }

  .rollcall-row__name-line {
    gap: 0.28rem;
  }

  .rollcall-row__adhesion-warning {
    width: 1.55rem;
    height: 1.55rem;
    font-size: 0.9rem;
  }

  .rollcall-row__adhesion-warning--not-validated svg,
  .rollcall-row__adhesion-warning--not-licensed svg {
    width: 0.95rem;
    height: 0.95rem;
  }

  .rollcall-row__grade-bandeau {
    height: 16px;
    max-width: 3.75rem;
  }

  .rollcall-row__note-btn {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
  }

  .app-toggle--attendance {
    border-radius: 12px;
  }

  .app-toggle--attendance-icons .app-toggle__option--stacked {
    flex: 1 1 2.15rem;
    min-width: 2.15rem;
    min-height: 2.25rem;
    padding: 0.18rem 0.08rem;
    gap: 0;
  }

  .app-toggle__attendance-icon {
    width: 1.15rem;
    height: 1.15rem;
  }

  .app-toggle__attendance-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (max-width: 380px) {
  .rollcall-row {
    grid-template-columns: minmax(2.75rem, 4.25rem) minmax(0, 1fr) auto;
  }

  .rollcall-row__identity {
    max-width: 4.25rem;
  }
}

@media (max-width: 330px) {
  .app-toggle--attendance-icons .app-toggle__option--stacked {
    flex: 1 1 calc(50% - 0.08rem);
    min-width: calc(50% - 0.08rem);
  }
}

@container rollcall-status (max-width: 10.5rem) {
  .app-toggle--attendance-icons .app-toggle__option--stacked {
    flex: 1 1 calc(50% - 0.08rem);
    min-width: calc(50% - 0.08rem);
  }
}

/* Enrollment validation switch */
.app-validation-switch {
  display: inline-flex;
  align-items: stretch;
  gap: 0.2rem;
  padding: 0.28rem;
  border: 1px solid var(--app-border, #dbeafe);
  border-radius: 999px;
  background: #fff;
  min-width: 18rem;
}

.app-validation-switch--three {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.app-validation-switch__option {
  flex: 1 1 50%;
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.app-validation-switch--three .app-validation-switch__option {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.75rem 0.85rem;
  font-size: 0.88rem;
  line-height: 1.25;
}

.app-validation-switch__option:hover:not(.app-validation-switch__option--active) {
  background: #f1f5f9;
}

.app-validation-switch__option--active[data-validation-option="false"],
.app-validation-switch__option--active[data-validation-option="NONE"] {
  background: #b91c1c;
  color: #fff;
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.22);
}

.app-validation-switch__option--active[data-validation-option="CANCELLED"] {
  background: #d1d5db;
  color: #374151;
  box-shadow: 0 4px 14px rgba(209, 213, 219, 0.35);
}

.app-validation-switch__option--active[data-validation-option="true"],
.app-validation-switch__option--active[data-validation-option="EDITED"] {
  background: #15803d;
  color: #fff;
  box-shadow: 0 4px 14px rgba(21, 128, 61, 0.22);
}

.app-validation-switch__option--active[data-validation-option="EXTERNAL"] {
  background: #ea580c;
  color: #fff;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.24);
}

.app-club-bool-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  align-items: start;
}

.app-club-bool {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.app-club-bool .app-validation-switch {
  width: 100%;
  min-width: 0;
}

@media (max-width: 720px) {
  .app-club-bool-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.enrollment-payments__check-detail--hidden {
  display: none !important;
}

.enrollment-payments__encashed-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
}

.enrollment-payments__encashed-label input {
  width: 1rem;
  height: 1rem;
}

/* Enrollment payments list + editor */
.enrollment-payments__summary {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.enrollment-payments__layout {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.enrollment-payments__list-pane {
  flex: 0 0 min(100%, 18rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 12rem;
}

.enrollment-payments__list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 10rem;
  max-height: 16rem;
  overflow: auto;
  border: 1px solid var(--app-border, #dbeafe);
  border-radius: 0.5rem;
  background: #fff;
}

.enrollment-payments__item {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--app-border, #e2e8f0);
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.35;
}

.enrollment-payments__item:last-child {
  border-bottom: none;
}

.enrollment-payments__item:hover {
  background: #f8fafc;
}

.enrollment-payments__item--selected {
  background: #eff6ff;
  color: var(--app-blue, #1e40af);
  font-weight: 600;
}

.enrollment-payments__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.enrollment-payments__editor {
  flex: 1 1 auto;
  min-width: 0;
}

.enrollment-payments__refund-dialog {
  border: 1px solid var(--app-border, #dbeafe);
  border-radius: 0.5rem;
  padding: 0;
  max-width: 22rem;
}

.enrollment-payments__refund-dialog::backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.enrollment-payments__refund-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

.enrollment-payments__refund-title {
  margin: 0;
  font-size: 1rem;
}

.enrollment-payments__refund-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.enrollment-payments__refund-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.enrollment-payments__refund-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

@media (max-width: 720px) {
  .enrollment-payments__layout {
    flex-direction: column;
  }

  .enrollment-payments__list-pane {
    flex-basis: auto;
  }
}

/* Hour / minute picker (web) */
.hour-minute-input {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
}

.hour-minute-input__hour,
.hour-minute-input__minute {
  width: auto;
  min-width: 4.25rem;
  flex: 0 1 auto;
}

.hour-minute-input__sep {
  font-weight: 700;
  color: #6b7280;
  user-select: none;
}

.hour-minute-input[data-disabled="true"] {
  opacity: 0.65;
}

.app-dl-grid {
  display: grid;
  grid-template-columns: minmax(8rem, auto) 1fr;
  gap: 0.35rem 1rem;
  margin: 0 0 1rem;
}

.app-dl-grid dt {
  margin: 0;
  color: #6b7280;
  font-weight: 600;
}

.app-dl-grid dd {
  margin: 0;
}

.app-simple-list {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

.app-simple-list li {
  margin: 0.25rem 0;
}

.app-subcard {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}

.app-entity-form__placeholder {
  padding: 1.5rem;
}

/* Enrollment edit: long form (options, réductions, documents) — single column + scrollable body */
.app-enrollment-edit .app-entity-form__body {
  grid-template-columns: 1fr;
}

.app-enrollment-edit__adhesion-blocks,
.app-enrollment-edit [data-enrollment-reductions-host] {
  grid-column: 1 / -1;
}

.app-enrollment-edit .adhesion-form-section,
.app-enrollment-edit .adhesion-subsection {
  margin: 0;
}

.app-enrollment-edit__category-field {
  margin-bottom: 1rem;
}

.app-entity-form__field .searchable-select {
  width: 100%;
}

.app-entity-form__field .searchable-select__input {
  cursor: pointer;
  background-color: #fff;
  padding-right: 4.25rem;
}

.app-entity-form__field .searchable-select__input::placeholder {
  color: #9ca3af;
}

.app-enrollment-edit__authorizations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-enrollment-edit__authorizations-grid--single {
  grid-template-columns: 1fr;
}

.app-enrollment-edit__public-payment {
  margin-top: 0.5rem;
}

.app-enrollment-edit__payment-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.app-enrollment-edit__payment-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
}

.app-enrollment-edit__payment-stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
}

.app-enrollment-edit__payment-stat-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}

/* Progression dossier adhésion (rouge → vert) */
.app-enrollment-workflow {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}

.app-enrollment-workflow__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.app-enrollment-workflow__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #374151;
}

.app-enrollment-workflow__track {
  height: 0.45rem;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.app-enrollment-workflow__fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.app-enrollment-workflow__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-enrollment-workflow__steps--five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.app-enrollment-workflow__steps--six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.app-enrollment-workflow__steps li {
  font-size: 0.6875rem;
  font-weight: 600;
  text-align: center;
  color: #9ca3af;
}

.app-enrollment-workflow__steps li.app-enrollment-workflow__step--reached {
  color: #4b5563;
}

.app-enrollment-workflow__steps li.app-enrollment-workflow__step--current {
  color: #111827;
  font-weight: 800;
}

.app-enrollment-workflow__steps li.app-enrollment-workflow__step--cancelled {
  color: #6b7280;
  font-weight: 700;
}

.app-enrollment-status-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.app-enrollment-status-badge--pending-payment {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.app-enrollment-status-badge--partially-paid {
  background: rgba(194, 65, 12, 0.14);
  color: #9a3412;
}

.app-enrollment-status-badge--overpaid {
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
}

.app-enrollment-status-badge--pending-check {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
}

.app-enrollment-status-badge--pending-validation {
  background: rgba(202, 138, 4, 0.14);
  color: #a16207;
}

.app-enrollment-status-badge--confirmed-pending-licence {
  background: rgba(101, 163, 13, 0.14);
  color: #4d7c0f;
}

.app-enrollment-status-badge--confirmed {
  background: rgba(101, 163, 13, 0.14);
  color: #4d7c0f;
}

.app-enrollment-status-badge--licensed {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.app-enrollment-status-badge--external {
  background: rgba(8, 145, 178, 0.12);
  color: #0e7490;
}

.app-enrollment-status-badge--cancelled {
  background: rgba(156, 163, 175, 0.20);
  color: #4b5563;
}

.app-crud__table .app-enrollment-status-badge {
  font-size: 0.75rem;
}

.app-form-actions--centered {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding-top: 0.5rem;
}

@media (max-width: 900px) {
  .app-enrollment-edit__authorizations-grid,
  .app-enrollment-edit__payment-stats {
    grid-template-columns: 1fr;
  }

  .app-enrollment-workflow__steps--five,
  .app-enrollment-workflow__steps--six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .app-enrollment-edit__payment-stats {
    grid-template-columns: 1fr;
  }
}

.searchable-select {
  position: relative;
}

.searchable-select__control {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.searchable-select__input {
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 4.25rem;
  box-sizing: border-box;
}

.searchable-select__input::-webkit-search-cancel-button,
.searchable-select__input::-webkit-search-decoration {
  display: none;
}

.searchable-select__actions {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding-right: 0.35rem;
  pointer-events: none;
}

.searchable-select__clear,
.searchable-select__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1;
  pointer-events: auto;
}

.searchable-select__clear:hover,
.searchable-select__toggle:hover {
  background: #f3f4f6;
  color: #111827;
}

.searchable-select__clear:focus-visible,
.searchable-select__toggle:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 1px;
}

.searchable-select__clear[hidden] {
  display: none;
}

.searchable-select__toggle-icon {
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -2px);
}

.searchable-select--single-option .searchable-select__input {
  padding-right: 0.65rem;
}

.searchable-select__actions[hidden] {
  display: none;
}

.app-secret-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.app-secret-field__control {
  position: relative;
  display: flex;
  align-items: stretch;
}

.app-secret-field__input {
  width: 100%;
  padding-right: 2.5rem;
}

.app-secret-field__unlock {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.app-secret-field__unlock:hover {
  background: #f3f4f6;
  color: #111827;
}

.app-secret-field__unlock:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 1px;
}

.app-secret-field__unlock-icon {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.app-secret-field__unlock-icon--masked {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h2c0-1.66 1.34-3 3-3s3 1.34 3 3v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h2c0-1.66 1.34-3 3-3s3 1.34 3 3v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E");
}

.app-secret-field__unlock-icon--visible {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E");
}

.app-secret-field__hint {
  margin: 0;
  font-size: 0.8125rem;
}

.searchable-select__list {
  position: fixed;
  z-index: 3000;
  left: 0;
  right: auto;
  min-width: 12rem;
  max-height: 12rem;
  overflow: auto;
  margin: 0.25rem 0 0;
  padding: 0.25rem 0;
  list-style: none;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.searchable-select__option {
  display: block;
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.searchable-select__option--with-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.searchable-select__option-icon,
.searchable-select__selected-icon {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  border-radius: 3px;
}

.searchable-select[data-icon-size="28"] .searchable-select__option-icon,
.searchable-select[data-icon-size="28"] .searchable-select__selected-icon {
  width: 1.75rem;
  height: 1.75rem;
}

.searchable-select__control--with-icon .searchable-select__selected-icon {
  align-self: center;
  margin-left: 0.5rem;
}

.searchable-select__control--with-icon .searchable-select__input {
  padding-left: 0.35rem;
}

.searchable-select__option:hover,
.searchable-select__option:focus {
  background: #f3f4f6;
}

.grade-ref-picker__row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.grade-ref-picker__select {
  flex: 1 1 auto;
  min-width: 0;
}

.passage-grade-batch__grade-row {
  align-items: flex-end;
}

.passage-grade-group__heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 1.25rem 0 0.35rem;
}

.passage-grade-group__preview {
  width: 4.5rem;
  height: 3rem;
}

.passage-grade-group__heading .app-form-section__subtitle {
  margin: 0;
}

.passage-grade-batch__remove {
  flex: 0 0 auto;
  white-space: nowrap;
}

.grade-ref-picker__preview {
  flex: 0 0 auto;
  width: 6.5rem;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  overflow: hidden;
}

.grade-ref-picker__preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.grade-ref-picker__preview-empty {
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
  padding: 0.35rem;
}

/*
 * Bandeaux are wide strips (~4:1+). A fixed 50×25 box with object-fit:contain
 * collapses painted height to ~12px. Lock height; let width follow aspect ratio.
 */
.person-grade-icon {
  height: 25px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
}

.app-crud__cell--grade-icon,
.app-crud__col--grade-icon {
  width: 7rem;
  min-width: 7rem;
  text-align: center;
}

.app-crud__cell--season-grades {
  width: 12rem;
  min-width: 12rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.season-grade-snapshot {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 25px;
  overflow: hidden;
  border-radius: 2px;
  background: #f3f4f6;
}

.season-grade-snapshot__item {
  flex: 1 1 0;
  min-width: 0;
  height: 25px;
  overflow: hidden;
}

.season-grade-snapshot__item + .season-grade-snapshot__item {
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.45);
}

.season-grade-snapshot__bandeau {
  display: block;
  width: 100%;
  height: 25px;
  object-fit: cover;
  object-position: left center;
}

.kata-ref__icon {
  display: block;
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.kata-ref__media-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}

.kata-ref__media-row {
  display: grid;
  grid-template-columns: auto 5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.kata-ref__embusen-thumb {
  display: block;
  width: 5rem;
  height: 3.25rem;
  object-fit: contain;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
}

.person-form__photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
  align-items: start;
}

.latest-grade-preview {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.latest-grade-preview > label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #4b5563;
}

.latest-grade-preview__frame {
  width: 100%;
  max-width: 11rem;
  min-height: 7.5rem;
}

.latest-grade-preview__img {
  max-height: 7.5rem;
}

.latest-grade-preview__label {
  margin: 0;
  font-size: 0.8125rem;
}

.searchable-multi__list {
  margin-top: 0.5rem;
}

.searchable-multi-select__selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.searchable-multi-select__selected:empty {
  display: none;
  margin-bottom: 0;
}

.searchable-multi-select__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  max-width: 100%;
  padding: 0.2rem 0.45rem;
  font-size: 0.875rem;
  line-height: 1.3;
  border-radius: 999px;
  background: #e5e7eb;
  color: #111827;
}

.searchable-multi-select__chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.searchable-multi-select__chip-remove {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0 0.15rem;
  line-height: 1;
  font-size: 1rem;
  color: #6b7280;
}

.searchable-multi-select__chip-remove:hover,
.searchable-multi-select__chip-remove:focus {
  color: #111827;
}

.list-add-field {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.list-add-field__empty-hint {
  margin: 0;
}

.list-add-field__empty-hint[hidden] {
  display: none;
}

.list-add-field__table-wrap[hidden] {
  display: none;
}

.list-add-field__table {
  margin: 0;
}

.list-add-field__actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.list-add-field__add-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
}

.list-add-field__picker {
  flex: 1 1 14rem;
  min-width: 0;
}

.list-add-field__add-action {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  padding-bottom: 0.15rem;
}

.searchable-select--add-picker .searchable-select__input {
  padding-right: 2.25rem;
}

.course-affectations__filters-block,
.course-affectations__results-block {
  border: 1px solid var(--app-line, rgba(229, 231, 235, 0.5));
  border-radius: 14px;
  background: var(--app-glass, rgba(255, 255, 255, 0.3));
  -webkit-backdrop-filter: blur(var(--app-glass-blur, 6px));
  backdrop-filter: blur(var(--app-glass-blur, 6px));
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.03);
}

.course-affectations__filters-block {
  margin: 0;
  overflow: visible;
}

.course-affectations__filters-block[hidden] {
  display: none !important;
}

.course-affectations__filters {
  margin: 0;
  padding: 1rem 1.1rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.course-affectations__bridge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.15rem 0;
  padding: 0.45rem 0.25rem;
}

.course-affectations__bridge-line {
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d1d5db 12%, #d1d5db 88%, transparent);
}

.course-affectations__bridge-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.4rem 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.course-affectations__bridge-toggle:hover {
  border-color: #fca5a5;
  color: #b91c1c;
  background: #fef2f2;
}

.course-affectations__bridge-toggle:focus-visible {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.course-affectations__bridge-toggle[aria-expanded="false"] {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fef2f2;
}

/* Shared CRUD list filters (grades obtenus, etc.) — same bridge pattern as affectations */
.app-crud__filters-block {
  margin: 0 0 0.15rem;
  border: 1px solid var(--app-line, rgba(229, 231, 235, 0.5));
  border-radius: 14px;
  background: var(--app-glass, rgba(255, 255, 255, 0.3));
  -webkit-backdrop-filter: blur(var(--app-glass-blur, 6px));
  backdrop-filter: blur(var(--app-glass-blur, 6px));
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.03);
  overflow: visible;
  max-width: 100%;
  box-sizing: border-box;
}

.app-crud__filters-block[hidden] {
  display: none !important;
}

.app-crud__filters {
  margin: 0;
  padding: 1rem 1.1rem;
  border: 0;
  min-width: 0;
}

.app-crud__filters-rows {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.app-crud__filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.app-crud__filters-row--single {
  flex-wrap: wrap;
}

.app-crud__filters-row .app-entity-form__field {
  margin: 0;
  min-width: 10rem;
  flex: 0 1 14rem;
}

.app-crud__filters-row .app-entity-form__field--grow {
  flex: 1 1 12rem;
  min-width: 0;
}

.crud-layout--split .app-crud__filters-row--single {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.crud-layout--split .app-crud__filters-row .app-entity-form__field,
.crud-layout--split .app-crud__filters-row .app-entity-form__field--grow,
.crud-layout--split .app-crud__filters-row .app-toggle,
.crud-layout--split .app-crud__filters-inline {
  width: 100%;
  max-width: 100%;
}

.crud-layout--split .app-crud__filters-inline {
  justify-content: space-between;
}

.crud-layout--split .app-crud__filters-inline > select {
  min-width: 0;
  flex: 1 1 auto;
}

.crud-layout__detail .app-crud__filters-block,
.crud-layout__detail .app-crud__filters-bridge {
  display: none !important;
}

.crud-layout--fullscreen .app-crud__filters-block,
.crud-layout--fullscreen .app-crud__filters-bridge {
  display: none !important;
}

.crud-layout--split .grades-obtenus__list-filters,
.crud-layout--split .grades-obtenus__list-filters-bridge {
  max-width: 100%;
  overflow: hidden;
  contain: paint;
}

.crud-layout--split .grades-obtenus__filters-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.app-crud__filters-row .app-toggle {
  align-self: center;
  margin-bottom: 0;
  flex: 0 0 auto;
}

.app-crud__filters-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.app-crud__filters-inline > label {
  margin: 0;
  white-space: nowrap;
  font-weight: 600;
  color: #374151;
}

.app-crud__filters-inline > select {
  min-width: 7rem;
}

.app-crud__filters-bridge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.15rem 0 0.65rem;
  padding: 0.45rem 0.25rem;
}

.app-crud__filters-bridge-line {
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d1d5db 12%, #d1d5db 88%, transparent);
}

.app-crud__filters-bridge-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.4rem 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.app-crud__filters-bridge-toggle:hover {
  border-color: #fca5a5;
  color: #b91c1c;
  background: #fef2f2;
}

.app-crud__filters-bridge-toggle:focus-visible {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.app-crud__filters-bridge-toggle[aria-expanded="false"] {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fef2f2;
}

.app-crud__filters-actions {
  display: flex;
  align-items: flex-end;
  padding-bottom: 0.15rem;
}

.course-affectations__results-block {
  margin: 0;
  padding: 0.85rem 0 0.75rem;
  overflow: hidden;
}

.course-affectations .app-crud__list-panel {
  overflow: visible;
}

.course-affectations__filters-block .app-entity-form__field input,
.course-affectations__filters-block .app-entity-form__field select,
.course-affectations__filters-block .membership-filter-select,
.course-affectations__filters-block .audience-picker__search-input {
  padding: 0.65rem 0.85rem;
  min-height: 2.65rem;
  line-height: 1.35;
  box-sizing: border-box;
}

.course-affectations__filters-block .app-entity-form__field .searchable-select__input {
  padding: 0.65rem 4.25rem 0.65rem 0.85rem;
  min-height: 2.65rem;
  line-height: 1.35;
  box-sizing: border-box;
}

.course-affectations__filters-block .searchable-select--single-option .searchable-select__input {
  padding-right: 0.85rem;
}

.course-affectations__course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.35rem 0.75rem;
  margin: 0.5rem 0 0.75rem;
}

.course-affectations__course-option {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.875rem;
  line-height: 1.35;
}

.course-affectations__filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.course-affectations__table-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 0.75rem;
  margin: 0 0 0.5rem;
  padding: 0 1rem 0 1rem;
}

.course-affectations__table-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-left: auto;
}

.course-affectations__table-header-spacer {
  flex: 1 1 2rem;
  min-width: 1rem;
}

.course-affectations__table-filter {
  flex: 0 1 18rem;
  min-width: 10rem;
  max-width: 22rem;
  margin: 0;
}

.course-affectations__filtered-count {
  color: #b91c1c;
  background: #fef2f2;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.course-affectations__total-count {
  margin: 0.65rem 0 0;
  padding: 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #6b7280;
}

body.app-shell-body:has(.course-affectations) .app-topbar__intro {
  max-width: 96ch;
}

.app-crud__context-menu {
  position: fixed;
  z-index: 1200;
  min-width: 11rem;
  padding: 0.35rem 0;
  margin: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.app-crud__context-menu-item {
  display: block;
  width: 100%;
  padding: 0.45rem 0.85rem;
  border: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}

.app-crud__context-menu-item:hover:not(:disabled),
.app-crud__context-menu-item:focus-visible:not(:disabled) {
  background: rgba(220, 38, 38, 0.18);
  color: #7f1d1d;
  outline: none;
}

.app-crud__context-menu-item:disabled {
  opacity: 0.45;
  cursor: default;
}

.app-crud__context-menu-separator {
  height: 1px;
  margin: 0.35rem 0;
  background: #e5e7eb;
}

.app-family-members {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.app-family-members__table {
  margin: 0;
}

.app-family-members__cell--inactive {
  font-style: italic;
  color: var(--app-muted, #6b7280);
}

.app-family-members__actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.app-family-members__actions form {
  margin: 0;
}

.app-family-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.app-family-form__main {
  display: contents;
}

.app-family-form__body {
  display: contents;
}

.app-family-form__header {
  order: 0;
}

.app-family-form__members {
  order: 1;
}

.app-family-form__add-member {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.app-family-form__address {
  order: 2;
}

.app-course-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: auto;
}

.app-course-form__main {
  display: contents;
}

.app-course-form__body {
  display: contents;
}

.app-course-form__header {
  order: 0;
}

.app-course-form__course,
.app-course-form__instructors,
.app-course-form__planning,
.app-course-form > .app-form-section {
  width: 100%;
  max-width: none;
  min-width: 0;
  align-self: stretch;
  box-sizing: border-box;
}

.app-course-form__course {
  order: 1;
}

.app-course-form__instructors {
  order: 2;
}

.app-course-form__add-instructor {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  width: 100%;
  max-width: none;
}

.app-course-form__planning {
  order: 3;
}

.app-course-form > .app-form-section,
.app-course-form > .app-entity-form__header {
  margin-left: 1rem;
  margin-right: 1rem;
}

.app-course-form > .app-form-section:first-of-type,
.app-course-form > .app-entity-form__header + .app-form-section {
  margin-top: 0;
}

.app-course-form > .app-form-section {
  margin-bottom: 1rem;
}

.app-course-form > .app-entity-form__header {
  margin-top: 0;
  margin-bottom: 0;
  padding: 1rem 1rem 0;
}

.app-course-instructors,
.app-course-form__instructors .list-add-field {
  width: 100%;
  max-width: none;
}

.app-course-instructors__table,
.app-course-form__instructors .list-add-field__table {
  width: 100%;
}

.app-course-form__instructors .list-add-field__add-row {
  width: 100%;
}

.app-course-form__instructors .list-add-field__picker,
.app-course-form__add-instructor .list-add-field__picker {
  flex: 1 1 auto;
  min-width: 0;
}

@container crud-detail (min-width: 640px) {
  .crud-layout--fullscreen .app-entity-form__body.app-course-form__body,
  .crud-layout--split .app-entity-form__body.app-course-form__body {
    display: contents;
  }
}

/* Entity edit dialog (person popup from licence / adhesion) */
.app-entity-dialog-root {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.app-entity-dialog-root.is-open {
  display: flex !important;
}

body.person-edit-dialog-open {
  overflow: hidden;
}

.app-entity-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.app-entity-dialog__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(960px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  min-height: 24rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.app-entity-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.app-entity-dialog__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.app-entity-dialog__close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}

.app-entity-dialog__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.5rem 0.75rem 0.75rem;
}

.person-form--dialog .person-form__panels {
  max-height: none;
}

.person-form__dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 0 0.25rem;
  border-top: 1px solid #e5e7eb;
  margin-top: 0.5rem;
}

.app-entity-form__field-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.app-entity-form__field-row [data-searchable-select] {
  flex: 1 1 16rem;
  min-width: 12rem;
}

.app-entity-form__style-discipline-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@container crud-detail (min-width: 520px) {
  .app-entity-form__style-discipline-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Licence form: keep sections stacked (heights differ) and tighten vertical rhythm. */
.app-licence-form .app-entity-form__body {
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.app-licence-form .app-form-section {
  padding: 0.85rem 1rem;
}

/* Grade obtenu form: stacked logical sections (grade / jury / style). */
.app-grade-obtenu-form .app-entity-form__body {
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.app-grade-obtenu-form .app-form-section {
  padding: 0.85rem 1rem;
}

.app-grade-obtenu-form .app-entity-form__style-discipline-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem 1rem;
  width: 100%;
}

.app-grade-obtenu-form .app-entity-form__style-discipline-row .app-entity-form__field {
  flex: unset;
  max-width: none;
  width: 100%;
}

.app-grade-obtenu-form .app-entity-form__style-discipline-row .app-entity-form__field--compact {
  max-width: 14rem;
}

@container crud-detail (min-width: 520px) {
  .app-grade-obtenu-form .app-entity-form__style-discipline-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container crud-detail (min-width: 720px) {
  .app-grade-obtenu-form .app-entity-form__style-discipline-row {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 9rem);
  }
}

.app-licence-form .app-form-section__title {
  margin: 0 0 0.65rem;
}

@container crud-detail (min-width: 640px) {
  .crud-layout--fullscreen .app-licence-form .app-entity-form__body,
  .crud-layout--split .app-licence-form .app-entity-form__body {
    grid-template-columns: 1fr;
  }
}

/* Competition form: equal-height side-by-side sections (Compétition | Catégories de poids). */
.app-competition-form .app-entity-form__body {
  align-items: stretch;
}

@container crud-detail (min-width: 640px) {
  .crud-layout--fullscreen .app-competition-form .app-entity-form__body,
  .crud-layout--split .app-competition-form .app-entity-form__body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
}

.app-competition-form .app-form-section {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 0;
  box-sizing: border-box;
}

.app-competition-form .app-form-section:last-of-type {
  overflow: hidden;
}

.app-competition-form .app-competition-weight-dual-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.app-competition-form .app-competition-weight-dual-list .app-dual-list {
  flex: 1 1 auto;
  max-width: none;
  align-items: stretch;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.app-competition-form .app-competition-weight-dual-list .app-dual-list__column {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.app-competition-form .app-competition-weight-dual-list .app-dual-list__select {
  width: 100%;
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: none;
  min-height: var(--app-dual-list-select-min-height, 0);
  box-sizing: border-box;
}

/* Standalone account / settings forms (outside CRUD split layout) */
.app-account-page {
  max-width: 760px;
}

.app-account-page__intro {
  margin-bottom: 1rem;
}

.app-account-page__title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
}

.app-account-page__sections {
  display: grid;
  gap: 1rem;
}

.app-entity-form--standalone {
  border: 1px solid var(--app-line, rgba(229, 231, 235, 0.5));
  border-radius: 14px;
  background: var(--app-glass, rgba(255, 255, 255, 0.3));
  -webkit-backdrop-filter: blur(var(--app-glass-blur, 6px));
  backdrop-filter: blur(var(--app-glass-blur, 6px));
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.03);
  overflow: hidden;
}

.app-entity-form--standalone .app-entity-form__body {
  padding: 0 1rem 1rem;
}

.app-entity-form--standalone .app-form-section {
  border: 0;
  box-shadow: none;
  padding: 0.85rem 0 0;
  background: transparent;
}

.app-entity-form__checkbox-label {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.875rem;
  line-height: 1.45;
  cursor: pointer;
}

.app-entity-form__checkbox-label input {
  margin-top: 0.15rem;
}

.app-account-page__error {
  color: #b91c1c;
  font-weight: 600;
}

/* Club deletion impact confirmation */
.app-crud-delete-impact-dialog {
  border: none;
  padding: 0;
  max-width: min(36rem, calc(100vw - 2rem));
  width: 100%;
  border-radius: 0.75rem;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
  background: transparent;
}

.app-crud-delete-impact-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
}

.app-crud-delete-impact-dialog__panel {
  margin: 0;
  padding: 1.25rem 1.35rem 1.1rem;
  background: #fff;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.app-crud-delete-impact-dialog__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
}

.app-crud-delete-impact-dialog__body {
  max-height: min(50vh, 22rem);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.app-crud-delete-impact-dialog__club h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: #1f2937;
}

.app-crud-delete-impact-dialog__subtitle {
  margin: 0 0 0.35rem;
  color: #4b5563;
  font-size: 0.92rem;
}

.app-crud-delete-impact-dialog__list {
  margin: 0;
  padding-left: 1.15rem;
  color: #111827;
}

.app-crud-delete-impact-dialog__list li {
  margin: 0.2rem 0;
}

.app-crud-delete-impact-dialog__empty {
  margin: 0;
  color: #6b7280;
  font-style: italic;
}

.app-crud-delete-impact-dialog__warning {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 0.55rem;
  border: 2px solid #b91c1c;
  background: #fef2f2;
  color: #7f1d1d;
  font-size: 0.98rem;
  line-height: 1.45;
}

.app-crud-delete-impact-dialog__warning strong {
  display: inline-block;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.app-crud-delete-impact-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.course-instructor-remove-dialog__role {
  color: var(--app-muted, #64748b);
}

.course-instructor-remove-dialog__intro {
  margin: 0;
}

.course-instructor-remove-dialog__list {
  margin-top: 0.35rem;
}

.course-sessions-delete-dialog__blocked {
  color: var(--app-color-danger, #b91c1c);
  margin-top: 0.75rem;
}

/* Register competition workflow step bar (arrow chevrons) */
.app-workflow-steps {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  overflow-x: auto;
}

.app-workflow-steps--arrow .app-workflow-steps__item {
  position: relative;
  flex: 1 1 0;
  min-width: 5.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: -10px;
  padding: 0.55rem 1.35rem 0.55rem 1.15rem;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
  background: #e2e8f0;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.app-workflow-steps--arrow .app-workflow-steps__item:first-child {
  padding-left: 0.85rem;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}

.app-workflow-steps--arrow .app-workflow-steps__item:last-child {
  margin-right: 0;
  padding-right: 0.85rem;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%);
}

.app-workflow-steps__item--active {
  background: var(--kd-red, #b91c1c);
  color: #fff;
  z-index: 2;
}

.app-workflow-steps__item--visited:not(.app-workflow-steps__item--active) {
  background: #dbeafe;
  color: #1d4ed8;
  z-index: 1;
}

.app-workflow-steps__item a {
  color: inherit;
  text-decoration: none;
}

.app-workflow-nav {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  align-items: center;
}

.app-register-competition-tiles {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.app-register-competition-tile {
  position: relative;
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) 1fr minmax(8rem, 12rem);
  gap: 0.75rem;
  align-items: stretch;
  padding: 0;
  border: 2px solid var(--kd-line, #e2e8f0);
  border-radius: 0.5rem;
  cursor: pointer;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-register-competition-tile:hover {
  border-color: rgba(185, 28, 28, 0.35);
}

.app-register-competition-tile--selected,
.app-register-competition-tile:has(input:checked) {
  border-color: var(--kd-red, #b91c1c);
  box-shadow: 0 0 0 1px rgba(185, 28, 28, 0.25);
}

.app-register-competition-tile input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.app-register-competition-tile__date {
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.app-register-competition-tile__date-block {
  background: #ede9fe;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem 0 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 100%;
}

.app-register-competition-tile__location {
  font-size: 0.8125rem;
  color: #475569;
}

.app-register-competition-tile__name {
  display: flex;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e3a8a;
  padding: 0.85rem 0.5rem;
}

.app-register-competition-tile__meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.85rem 1rem 0.85rem 0;
  text-align: right;
}

.app-register-competition-tile__type {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #b91c1c;
}

.app-register-competition-tile__categories {
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.35;
}

.app-register-competition__intro {
  margin: 0 0 1rem;
  color: #64748b;
  line-height: 1.45;
}

.app-register-competition__filters {
  margin-bottom: 0.5rem;
}

.app-register-competition-month {
  margin: 1.25rem 0 0.65rem;
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
}

.app-register-competition-month:first-child {
  margin-top: 0;
}

.app-register-competition .app-crud-lead {
  margin: 0 0 1rem;
  color: #64748b;
}

.app-register-competition-checklist {
  display: grid;
  gap: 0.5rem;
}

.app-register-competition-checklist__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--kd-line, #e2e8f0);
  border-radius: 0.45rem;
  background: #fff;
}

.app-register-competition-candidates {
  display: grid;
  gap: 0.85rem;
}

.app-register-competition-candidate {
  padding: 0.75rem;
  border: 1px solid var(--kd-line, #e2e8f0);
  border-radius: 0.5rem;
  background: #fff;
}

.app-register-competition-candidate__header {
  margin-bottom: 0.45rem;
}

.app-register-competition-candidate__select {
  width: 100%;
  min-height: 4.5rem;
}
