/* 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;
}

.membership-enrollments__list-filters .membership-enrollments__facet-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
}

.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;
}

/* Person list — reuse member-planning name tones inside table cells */
.person-crud__table .member-planning-event__person {
  display: inline;
  padding: 0;
  border-radius: 0;
  max-width: none;
}

.person-crud__table .member-planning-event__person--female {
  color: #be185d;
}

.person-crud__table .member-planning-event__person--male {
  color: #1d4ed8;
}

.app-crud__week-separator td {
  padding: 0.55rem 0.65rem 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  background: rgba(243, 244, 246, 0.72);
  border-top: 2px solid #cbd5e1;
  border-bottom: none;
  cursor: default;
}

.app-crud__week-separator:first-child td {
  border-top: none;
  padding-top: 0.35rem;
}

.app-crud__week-separator--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__nav-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}

.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,
  .crud-layout--split .app-form-sections,
  .crud-layout--split .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__grid--stack {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.75rem;
}

.app-entity-form__grid--stack .app-entity-form__field {
  flex: unset;
  max-width: 100%;
  width: 100%;
}

.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-field-info-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.app-field-info-label label,
.app-field-info-label .app-entity-form__field-label {
  margin-bottom: 0;
}

.app-field-info {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.app-field-info__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #f9fafb;
  color: #6b7280;
  font-size: 0.65rem;
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  cursor: help;
}

.app-field-info__btn:hover,
.app-field-info__btn:focus-visible {
  border-color: #dc2626;
  color: #b91c1c;
  background: #fef2f2;
  outline: none;
}

.app-field-info__popover {
  position: absolute;
  z-index: 40;
  left: 0;
  top: calc(100% + 6px);
  min-width: min(18rem, 70vw);
  max-width: 22rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #374151;
  font-weight: 400;
}

.app-field-info__popover--floating {
  position: fixed;
  z-index: 3000;
  right: auto;
  bottom: auto;
}

.app-field-info__popover[hidden] {
  display: none !important;
}

.app-entity-form__field input,
.app-entity-form__field select,
.app-entity-form__field textarea,
.app-entity-form__field .searchable-select__input,
.app-entity-form__field .season-year-field__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,
.app-entity-form__field .season-year-field__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[readonly],
.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[readonly],
.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-form-section__lead {
  margin: -0.45rem 0 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.4;
}

/* Full-width section inside multi-column `.app-entity-form__body` / `.app-form-sections` grids */
.app-entity-form__body > .app-form-section--full,
.app-form-sections > .app-form-section--full {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

@container crud-detail (min-width: 640px) {
  .crud-layout--split .app-entity-form__body > .app-form-section--full,
  .crud-layout--fullscreen .app-entity-form__body > .app-form-section--full,
  .crud-layout--split .app-form-sections > .app-form-section--full,
  .crud-layout--fullscreen .app-form-sections > .app-form-section--full {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }
}

.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-club-form__tabs {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.65rem 1rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.app-club-form__tabs .app-entity-form__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: -1px;
  border-radius: 8px 8px 0 0;
}

.app-club-form__tabs .app-entity-form__tab--active {
  border-bottom-color: #fff;
  box-shadow: none;
}

.app-club-form .app-entity-form__body {
  grid-template-columns: 1fr;
}

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

.app-club-form__panel[hidden] {
  display: none;
}

.app-club-form__panel > .app-form-section--full {
  grid-column: 1 / -1;
}

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

  .crud-layout--split .app-club-form__panel,
  .crud-layout--fullscreen .app-club-form__panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.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: block;
  max-width: 100%;
}

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

.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__dropzone .app-image-field__preview-frame {
  border: none;
  border-radius: 0;
  background: transparent;
  pointer-events: none;
}

.app-image-field__dropzone .app-image-field__preview-frame--empty {
  display: none;
}

.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__drop-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 1 1 auto;
  width: 100%;
  min-height: inherit;
  padding: 1.1rem 1rem;
  box-sizing: border-box;
}

.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;
}

/* Image crop modal (Cropper.js) */
.ez-image-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.ez-image-crop-modal[hidden] {
  display: none !important;
}
.ez-image-crop-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}
.ez-image-crop-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(36rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  padding: 1rem 1.25rem 1.25rem;
}
.ez-image-crop-modal__title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}
.ez-image-crop-modal__stage {
  max-height: min(60vh, 28rem);
  background: #111827;
}
.ez-image-crop-modal__stage img {
  display: block;
  max-width: 100%;
}
.ez-image-crop-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}
.ez-image-crop-modal__btn {
  cursor: pointer;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
  background: #fff;
  padding: 0.4rem 0.85rem;
  font: inherit;
}
.ez-image-crop-modal__btn--primary {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

/* 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;
}

.training-stage-sessions__layout {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.training-stage-sessions__list-pane {
  flex: 0 0 min(100%, 20rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 14rem;
}

.training-stage-sessions__list {
  min-height: 10rem;
  max-height: 18rem;
  overflow: auto;
  border: 1px solid var(--app-border, #dbeafe);
  border-radius: 0.5rem;
  background: #fff;
}

.training-stage-sessions__empty {
  margin: 0;
  padding: 0.85rem 0.75rem;
  color: var(--app-muted, #64748b);
  font-size: 0.875rem;
}

.training-stage-sessions__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 0;
  border-bottom: 1px solid var(--app-border, #e2e8f0);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.training-stage-sessions__item:last-child {
  border-bottom: none;
}

.training-stage-sessions__item:hover {
  background: #f8fafc;
}

.training-stage-sessions__item--selected {
  background: #eff6ff;
  box-shadow: inset 3px 0 0 var(--app-blue, #2563eb);
}

.training-stage-sessions__item-dates {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--app-text, #0f172a);
}

.training-stage-sessions__item--selected .training-stage-sessions__item-dates {
  color: var(--app-blue, #1e40af);
}

.training-stage-sessions__item-audiences {
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--app-muted, #64748b);
}

.training-stage-sessions__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.training-stage-sessions__editor {
  flex: 1 1 auto;
  min-width: 0;
}

.training-stage-sessions__editor--disabled {
  opacity: 0.72;
}

.training-group-dual-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.training-group-dual-list__filter {
  display: block;
}

.training-group-dual-list__filter-input {
  width: 100%;
  max-width: 28rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--app-border, #cbd5e1);
  border-radius: 0.375rem;
  background: var(--app-surface, #fff);
  color: inherit;
}

.training-group-dual-list__filter-input:focus {
  outline: 2px solid var(--app-focus, #2563eb);
  outline-offset: 1px;
}

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

  .training-stage-sessions__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;
  }
}

/* Rich text in entity forms (Quill height fix + visible frame even before quill.snow.css) */
.app-entity-form__field .ez-rich-text {
  width: 100%;
  max-width: 100%;
}

.app-entity-form__field .ez-rich-text .ql-container.ql-snow {
  min-height: 10rem;
  height: auto !important;
}

.app-entity-form__field .ez-rich-text .ql-editor {
  min-height: 10rem;
}

/* Compact boolean toggles on entity forms (label above control, no full-width gap) */
.app-entity-form__visibility-panel {
  flex: 1 1 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.app-entity-form__visibility-panel > .app-entity-form__field-label {
  margin-bottom: 0;
}

.app-entity-form__visibility-panel--section {
  width: 100%;
}

.app-visibility-rows {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem 1.25rem;
}

.app-visibility-row {
  flex: 1 1 14rem;
  min-width: min(100%, 14rem);
  max-width: 22rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
}

.app-visibility-row__title {
  font-size: 0.8125rem;
  font-weight: 650;
  color: #334155;
  line-height: 1.3;
}

.app-visibility-row__hint {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.35;
  margin: 0;
}

.app-visibility-row .app-toggle {
  width: 100%;
  max-width: 14rem;
  justify-content: stretch;
}

.app-visibility-row .app-toggle__option {
  flex: 1 1 50%;
  text-align: center;
}

/* 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: nowrap;
  overflow: visible;
  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-instructors {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  margin: -0.35rem 0 0.85rem;
  padding: 0 0.15rem;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--app-muted, #64748b);
}

.rollcall-instructors__label {
  font-weight: 600;
  color: var(--app-text, #0f172a);
}

.rollcall-instructors__names {
  min-width: 0;
}

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

/* Sticky save needs a non-clipping ancestor; detail-panel defaults to overflow:hidden */
#rollcall-page.app-crud__detail-panel {
  overflow: visible;
}

.rollcall-save-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.45rem;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(var(--app-glass-blur, 6px));
  backdrop-filter: blur(var(--app-glass-blur, 6px));
  border-bottom: 1px solid var(--app-line, rgba(229, 231, 235, 0.65));
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.rollcall-save-bar__btn {
  min-height: 2.85rem;
  padding-inline: 1.15rem;
  font-weight: 700;
}

.rollcall-save-bar__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.rollcall-save-bar.is-dirty .rollcall-save-bar__btn:not(:disabled) {
  box-shadow: 0 2px 10px rgba(185, 28, 28, 0.28);
}

.rollcall-save-bar__status {
  font-size: 0.82rem;
  color: #64748b;
}

.rollcall-save-bar__bulk {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.45rem;
  width: 100%;
}

.rollcall-save-bar__bulk .rollcall-adherents__bulk {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 640px) {
  .rollcall-save-bar {
    top: 0;
    margin-left: -0.35rem;
    margin-right: -0.35rem;
    padding: 0.5rem 0.45rem;
    gap: 0.4rem;
  }

  .rollcall-save-bar__btn {
    flex: 1 1 100%;
    width: 100%;
    min-height: 2.45rem;
  }

  .rollcall-save-bar__bulk .rollcall-adherents__bulk {
    min-height: 2.2rem;
    padding: 0.32rem 0.45rem;
    font-size: 0.8rem;
  }
}

.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;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  flex: 1 1 260px;
  max-width: 420px;
}

.my-sessions-card__header {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
}

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

.my-sessions-card__place {
  margin: 0 0 0.15rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.3;
}

.my-sessions-card__people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.my-sessions-card__person {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  line-height: 1.3;
  color: #475569;
}

.my-sessions-card__person-bg--present,
.my-sessions-card__person-bg--absent,
.my-sessions-card__person-bg--late,
.my-sessions-card__person-bg--excused {
  align-self: flex-start;
  padding: 0.12rem 0.4rem 0.12rem 0.2rem;
  border-radius: 6px;
}

.my-sessions-card__person-bg--present {
  background: #bbf7d0;
  box-shadow: inset 0 0 0 1px #4ade80;
}

.my-sessions-card__person-bg--absent {
  background: #fecaca;
  box-shadow: inset 0 0 0 1px #f87171;
}

.my-sessions-card__person-bg--late {
  background: #fed7aa;
  box-shadow: inset 0 0 0 1px #fb923c;
}

.my-sessions-card__person-bg--excused {
  background: #fef08a;
  box-shadow: inset 0 0 0 1px #facc15;
}

.my-sessions-card__person-icon {
  flex-shrink: 0;
  width: 0.95rem;
  height: 0.95rem;
}

.my-sessions-card__person-icon.app-icon--clipboard {
  background-color: #2563eb;
}

.my-sessions-card__person-icon.app-icon--users-coach {
  background-color: #d97706;
}

.my-sessions-card__person--female .my-sessions-card__person-name {
  color: #be185d;
}

.my-sessions-card__person--male .my-sessions-card__person-name {
  color: #1d4ed8;
}

.my-sessions-card__person--neutral .my-sessions-card__person-name {
  color: #475569;
}

.my-sessions-card__person-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.my-sessions-card:hover {
  border-color: #94a3b8;
  filter: brightness(0.98);
}

.my-sessions-card--locked {
  opacity: 0.92;
}

.my-sessions-card--planned {
  background: #f0f9ff;
  border-color: #7dd3fc;
  border-left: 4px solid #0ea5e9;
}

.my-sessions-card--not-done {
  background: #fef2f2;
  border-color: #fca5a5;
  border-left: 4px solid #ef4444;
}

.my-sessions-card--completed {
  background: #f0fdf4;
  border-color: #86efac;
  border-left: 4px solid #22c55e;
}

.my-sessions-card--closed-completed {
  background: #ccfbf1;
  border-color: #2dd4bf;
  border-left: 4px solid #0f766e;
}

.my-sessions-card--closed-not-done {
  background: #fff7ed;
  border-color: #fdba74;
  border-left: 4px solid #ea580c;
}

.my-sessions-card--cancelled {
  background: #f8fafc;
  border-color: #cbd5e1;
  border-left: 4px solid #94a3b8;
}

.my-sessions-card--replaced {
  background: #eef2ff;
  border-color: #a5b4fc;
  border-left: 4px solid #6366f1;
}

.my-sessions-card--present {
  background: #f0fdf4;
  border-color: #86efac;
  border-left: 4px solid #22c55e;
}

.my-sessions-card--absent {
  background: #fef2f2;
  border-color: #fca5a5;
  border-left: 4px solid #ef4444;
}

.my-sessions-card--late {
  background: #fff7ed;
  border-color: #fdba74;
  border-left: 4px solid #ea580c;
}

.my-sessions-card--excused {
  background: #fefce8;
  border-color: #fde047;
  border-left: 4px solid #ca8a04;
}

.my-sessions-week__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.my-sessions-week__label {
  margin: 0;
}

.my-sessions-week__actions {
  margin: 0;
}

.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.15rem;
  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: #bae6fd;
  color: #075985;
}

.my-sessions-card__badge--not-done {
  background: #fecaca;
  color: #991b1b;
}

.my-sessions-card__badge--completed {
  background: #bbf7d0;
  color: #166534;
}

.my-sessions-card__badge--closed-completed {
  background: #0f766e;
  color: #ecfdf5;
}

.my-sessions-card__badge--closed-not-done {
  background: #c2410c;
  color: #fff7ed;
}

.my-sessions-card__badge--validated {
  background: #0f766e;
  color: #ecfdf5;
}

.my-sessions-card__badge--cancelled {
  background: #e2e8f0;
  color: #475569;
}

.my-sessions-card__badge--replaced {
  background: #c7d2fe;
  color: #3730a3;
}

.my-sessions-card__badge--present {
  background: #bbf7d0;
  color: #166534;
}

.my-sessions-card__badge--absent {
  background: #fecaca;
  color: #991b1b;
}

.my-sessions-card__badge--late {
  background: #fed7aa;
  color: #9a3412;
}

.my-sessions-card__badge--excused {
  background: #fef08a;
  color: #854d0e;
}

.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--with-week-actions .compensation-cal__head,
.compensation-cal--with-week-actions .compensation-cal__week {
  grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(8.5rem, 9.5rem);
}

.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;
}

a.compensation-cal-chip--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.compensation-cal-chip--link:hover {
  filter: brightness(0.97);
  border-color: #93c5fd;
}

.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;
}

.compensation-cal-chip--open {
  background: #eff6ff;
  border-color: #dbeafe;
}

.compensation-cal-chip--closed {
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.compensation-cal-chip--closed .compensation-cal-chip__hours {
  color: #047857;
}

.compensation-cal__week-actions {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.35rem 0.3rem;
  border-left: 1px solid #e5e7eb;
  background: #fafafa;
}

.compensation-cal__head-cell--actions {
  border-left: 1px solid #e5e7eb;
}

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

.member-planning-export {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin: 0 0 1rem;
}

.member-planning-export__hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.82rem;
}

.member-planning-export__link {
  font-size: 0.85rem;
}

.member-planning-event__agenda-link {
  margin-top: 0.35rem;
  padding: 0.15rem 0.45rem;
  min-height: auto;
  font-size: 0.75rem;
  align-self: flex-start;
}

.member-planning-event__agenda-link .app-icon--calendar {
  width: 1rem;
  height: 1rem;
}

.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--training-stage .member-planning-legend__icon {
  background-color: #7c3aed;
}

.member-planning-legend__item--enrolled::before,
.member-planning-legend__item--teaching::before,
.member-planning-legend__item--training-stage::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,
.member-planning-legend__item--training-stage::before {
  display: none;
}

.member-planning-legend__item--enrolled,
.member-planning-legend__item--teaching,
.member-planning-legend__item--training-stage {
  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-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.member-planning-cal .compensation-cal {
  min-width: 52rem;
}

.member-planning-cal .compensation-cal__head,
.member-planning-cal .compensation-cal__week {
  grid-template-columns: repeat(7, minmax(6.75rem, 1fr));
}

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

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

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

.member-planning-event {
  position: relative;
  border-radius: 8px;
  padding: 0.48rem 1.65rem 0.42rem 0.5rem;
  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--training-stage {
  border-left: 3px solid #8b5cf6;
  background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 100%);
}

/* Same attendance palette as .my-sessions-card--* (overrides enrolled tint) */
.member-planning-event--planned {
  background: #f0f9ff;
  border-color: #7dd3fc;
  border-left: 4px solid #0ea5e9;
}

.member-planning-event--present {
  background: #f0fdf4;
  border-color: #86efac;
  border-left: 4px solid #22c55e;
}

.member-planning-event--absent {
  background: #fef2f2;
  border-color: #fca5a5;
  border-left: 4px solid #ef4444;
}

.member-planning-event--late {
  background: #fff7ed;
  border-color: #fdba74;
  border-left: 4px solid #ea580c;
}

.member-planning-event--excused {
  background: #fefce8;
  border-color: #fde047;
  border-left: 4px solid #ca8a04;
}

.member-planning-event--completed {
  background: #f0fdf4;
  border-color: #86efac;
  border-left: 4px solid #22c55e;
}

.member-planning-event--not-done {
  background: #fef2f2;
  border-color: #fca5a5;
  border-left: 4px solid #ef4444;
}

.member-planning-event--closed-completed {
  background: #ccfbf1;
  border-color: #2dd4bf;
  border-left: 4px solid #0f766e;
}

.member-planning-event--closed-not-done {
  background: #fff7ed;
  border-color: #fdba74;
  border-left: 4px solid #ea580c;
}

.member-planning-event--replaced {
  background: #eef2ff;
  border-color: #a5b4fc;
  border-left: 4px solid #6366f1;
}

.member-planning-event__badge {
  display: inline-block;
  margin-top: 0.28rem;
  max-width: 100%;
  white-space: normal;
  line-height: 1.2;
}

.member-planning-event__kind-icon {
  position: absolute;
  top: 0.34rem;
  right: 0.34rem;
  z-index: 1;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.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--training-stage .member-planning-event__kind-icon {
  background-color: #7c3aed;
}

.member-planning-event__content {
  min-width: 0;
}

.member-planning-event__header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.14rem;
  margin-bottom: 0.22rem;
}

.member-planning-event__course {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.member-planning-event__time {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 0.2rem;
  font-size: 0.74rem;
  font-weight: 650;
  color: #2563eb;
  line-height: 1.25;
}

.member-planning-event__time-sep {
  opacity: 0.85;
}

@media (max-width: 720px) {
  .member-planning-cal .compensation-cal-day {
    min-height: 8.5rem;
  }

  .member-planning-event {
    padding-right: 1.45rem;
  }

  .member-planning-event__time {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.04rem;
  }

  .member-planning-event__time-sep {
    display: none;
  }
}

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

.member-planning-event__person {
  padding: 0.18rem 0.4rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.25;
  color: #334155;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.member-planning-event__person--female {
  background: transparent;
  color: #be185d;
}

.member-planning-event__person--male {
  background: transparent;
  color: #1d4ed8;
}

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

.member-planning-event__person-bg--present,
.member-planning-event__person-bg--absent,
.member-planning-event__person-bg--late,
.member-planning-event__person-bg--excused {
  box-shadow: inset 0 0 0 1px transparent;
}

.member-planning-event__person-bg--present {
  background: #bbf7d0;
  box-shadow: inset 0 0 0 1px #4ade80;
}

.member-planning-event__person-bg--absent {
  background: #fecaca;
  box-shadow: inset 0 0 0 1px #f87171;
}

.member-planning-event__person-bg--late {
  background: #fed7aa;
  box-shadow: inset 0 0 0 1px #fb923c;
}

.member-planning-event__person-bg--excused {
  background: #fef08a;
  box-shadow: inset 0 0 0 1px #facc15;
}

.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 programme (/app/member/programme) */
.member-programme-page {
  width: 100%;
  max-width: none;
}

.member-programme-page__intro {
  margin-bottom: 1.25rem;
}

.member-programme-page__title {
  margin: 0 0 0.35rem;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.member-programme-page__lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  max-width: 72ch;
}

.member-programme-slots {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--app-border, #e2e8f0);
}

.member-programme-slots__title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.member-programme-slots__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.member-programme-slots__picker {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.member-programme-slots__person {
  max-width: 20rem;
  margin: 0;
  flex: 0 0 auto;
  min-height: 0;
}

.member-programme-slots__person label {
  margin-bottom: 0.25rem;
}

.member-programme-slots__hint {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
}

.member-programme-slots__days {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.member-programme-slots__day-title {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.01em;
}

.member-programme-slots__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0.65rem;
}

.member-programme-slot-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 4.75rem;
  padding: 0.7rem 0.8rem 0.7rem 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  user-select: none;
}

.member-programme-slot-card--selected {
  border-color: #16a34a;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.18);
}

.member-programme-slot-card--unselected {
  border-color: #cbd5e1;
}

.member-programme-slot-card--unselected .member-programme-slot-card__media,
.member-programme-slot-card--unselected .member-programme-slot-card__body {
  filter: grayscale(1);
  opacity: 0.72;
}

.member-programme-slot-card--unselected:hover .member-programme-slot-card__media,
.member-programme-slot-card--unselected:hover .member-programme-slot-card__body {
  opacity: 0.85;
}

.member-programme-slot-card--readonly {
  cursor: default;
}

.member-programme-slot-card__person {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.member-programme-slot-card__status {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
}

.member-programme-slot-card__status svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.member-programme-slot-card__status--selected {
  display: none;
  color: #fff;
  background: #16a34a;
}

.member-programme-slot-card__status--unselected {
  display: none;
  color: #fff;
  background: #dc2626;
}

.member-programme-slot-card--selected .member-programme-slot-card__status--selected {
  display: inline-flex;
}

.member-programme-slot-card--unselected .member-programme-slot-card__status--unselected {
  display: inline-flex;
}

.member-programme-slot-card__media {
  flex: 0 0 auto;
}

.member-programme-slot-card__logo {
  display: block;
  width: 3rem;
  height: 3rem;
  border-radius: 0.55rem;
  object-fit: cover;
}

.member-programme-slot-card__logo--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: #475569;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.member-programme-slot-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  padding-right: 1.5rem;
}

.member-programme-slot-card__course {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.member-programme-slot-card__time {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.3;
}

.member-programme-slots__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

/* 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-occasional {
  margin-top: 1.5rem;
}

.rollcall-occasional__separator {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 0 0 0.85rem;
}

.rollcall-occasional__title {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #64748b;
}

.rollcall-row--occasional {
  grid-template-columns: minmax(0, 1fr) auto;
}

.rollcall-occasional--locked .rollcall-row--occasional {
  opacity: 0.72;
}

.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],
.course-affectations__row.rollcall-row--adhesion-unpaid,
.course-affectations__row.rollcall-row--adhesion-unpaid > td {
  background: #fee2e2;
}

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

.course-affectations__row.rollcall-row--adhesion-unpaid > td:first-child {
  box-shadow: inset 3px 0 0 #f87171;
}

.rollcall-row--adhesion-not-validated,
.rollcall-row--adhesion-not-validated[data-status],
.course-affectations__row.rollcall-row--adhesion-not-validated,
.course-affectations__row.rollcall-row--adhesion-not-validated > td {
  background: #ffedd5;
}

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

.course-affectations__row.rollcall-row--adhesion-not-validated > td:first-child {
  box-shadow: inset 3px 0 0 #fb923c;
}

.rollcall-row--adhesion-not-licensed,
.rollcall-row--adhesion-not-licensed[data-status],
.course-affectations__row.rollcall-row--adhesion-not-licensed,
.course-affectations__row.rollcall-row--adhesion-not-licensed > td {
  background: #fef9c3;
}

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

.course-affectations__row.rollcall-row--adhesion-not-licensed > td:first-child {
  box-shadow: inset 3px 0 0 #facc15;
}

.course-affectations__name-line {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
}

.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-height: 18px;
}

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

.rollcall-row__cycle {
  display: none;
}

.rollcall-cycle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.38rem 0.55rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-weight: 650;
  font-size: 0.78rem;
  line-height: 1.1;
  cursor: pointer;
  box-sizing: border-box;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.rollcall-cycle-btn--pressing {
  transform: scale(0.98);
  filter: brightness(0.96);
}

.rollcall-cycle-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.rollcall-cycle-btn__icon {
  flex-shrink: 0;
}

.rollcall-cycle-btn__label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rollcall-cycle-btn--unset {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}

.rollcall-cycle-btn--present {
  background: #15803d;
  color: #fff;
  border-color: #15803d;
  box-shadow: 0 2px 8px rgba(21, 128, 61, 0.22);
}

.rollcall-cycle-btn--excused {
  background: #ca8a04;
  color: #fff;
  border-color: #ca8a04;
  box-shadow: 0 2px 8px rgba(202, 138, 4, 0.22);
}

.rollcall-cycle-btn--late {
  background: #ea580c;
  color: #fff;
  border-color: #ea580c;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.24);
}

.rollcall-cycle-btn--absent {
  background: #b91c1c;
  color: #fff;
  border-color: #b91c1c;
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.22);
}

.rollcall-adherents--locked .rollcall-cycle-btn,
.rollcall-occasional--locked .rollcall-cycle-btn {
  cursor: default;
  opacity: 0.72;
}

.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: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem 0.75rem;
  }

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

  .rollcall-adherents__bulk {
    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.35rem;
    margin-bottom: 0.5rem;
  }

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

  .rollcall-adherents__toolbar {
    display: none;
  }

  .rollcall-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.35rem;
    overflow: visible;
  }

  .rollcall-row__identity {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
  }

  .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: none;
  }

  /* Scope to rollcall div rows only — course-affectations <tr> reuse adhesion modifiers */
  .rollcall-row.rollcall-row--adhesion-unpaid,
  .rollcall-row.rollcall-row--adhesion-not-validated,
  .rollcall-row.rollcall-row--adhesion-not-licensed,
  .rollcall-row.rollcall-row--occasional {
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: none;
    grid-template-areas: none;
  }

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

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

  .rollcall-row__adhesion-warning {
    width: 1.15rem;
    height: 1.15rem;
    font-size: 0.7rem;
  }

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

  .rollcall-row__grade-bandeau {
    height: 14px;
    max-height: 14px;
  }

  .rollcall-row__status {
    display: none;
  }

  .rollcall-row__cycle {
    display: flex;
    flex: 1 1 6.5rem;
    min-width: 0;
    max-width: none;
  }

  .rollcall-cycle-btn {
    min-height: 2.65rem;
    font-size: 0.8rem;
    padding-inline: 0.65rem;
  }

  .rollcall-cycle-btn__icon {
    width: 1.15rem;
    height: 1.15rem;
  }

  .rollcall-row__note-btn {
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
  }

  .rollcall-row__note-icon {
    width: 1.1rem;
    height: 1.1rem;
  }

  .rollcall-row__note {
    flex: 1 0 100%;
    order: 10;
  }

  .app-toggle--attendance {
    display: flex;
    flex-wrap: nowrap;
    width: auto;
    max-width: none;
    flex-shrink: 0;
    overflow: visible;
    border-radius: 10px;
    gap: 0.2rem;
    padding: 0;
    background: transparent;
  }

  .app-toggle--attendance .app-toggle__option {
    flex: 0 0 2rem;
    min-width: 2rem;
  }

  /* Same footprint as .rollcall-row__note-btn */
  .app-toggle--attendance-icons .app-toggle__option--stacked {
    flex: 0 0 2rem;
    box-sizing: border-box;
    width: 2rem;
    min-width: 2rem;
    max-width: 2rem;
    min-height: 2rem;
    height: 2rem;
    padding: 0;
    gap: 0;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
  }

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

  .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__note-btn,
  .app-toggle--attendance-icons .app-toggle__option--stacked {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
  }

  .app-toggle--attendance .app-toggle__option,
  .app-toggle--attendance-icons .app-toggle__option--stacked {
    flex: 0 0 2rem;
    max-width: 2rem;
  }

  .rollcall-row__note-icon,
  .app-toggle__attendance-icon {
    width: 1.1rem;
    height: 1.1rem;
  }

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

/* 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 {
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
  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__item--encashed {
  font-weight: 700;
}

.enrollment-payments__item-lock {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.35rem;
  vertical-align: -0.1em;
  background-repeat: no-repeat;
  background-size: contain;
  flex-shrink: 0;
}

.enrollment-payments__item--encashed.enrollment-payments__item--selected {
  font-weight: 700;
}

.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;
}

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

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

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

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

.enrollment-payments__unencash-message,
.enrollment-payments__unencash-warning {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.enrollment-payments__unencash-warning {
  color: var(--app-danger, #b91c1c);
  font-weight: 600;
}

.enrollment-payments__unencash-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;
  }
}

/* SIKADA copy panel (membership enrollments) */
.sikada-panel {
  margin: 1rem 0 1.25rem;
  padding: 0.65rem 0.9rem 0.75rem;
  border: 1px solid var(--app-border, #c9d3e0);
  border-radius: 8px;
  background: var(--app-surface, #f7f9fc);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.sikada-panel__header {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.sikada-panel__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sikada-panel__header-flash {
  width: 100%;
  font-size: 0.8rem;
}

.sikada-panel__header-flash[hidden] {
  display: none;
}

.sikada-panel__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.sikada-panel__toggle-label {
  font-size: 0.78rem;
  color: var(--app-muted, #5b6b7c);
  text-decoration: underline;
}

.sikada-panel__header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.sikada-panel__title {
  font-size: 0.95rem;
}

.sikada-panel__body {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--app-border, #d5dde8);
}

.sikada-panel__howto {
  margin: 0.55rem 0;
  padding: 0.55rem 0.7rem;
}

.sikada-panel__howto-title {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
}

.sikada-panel__howto-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.8rem;
}

.sikada-panel__howto-list li + li {
  margin-top: 0.2rem;
}

.sikada-panel__hint {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
}

.sikada-panel__setup {
  margin-top: 0.75rem;
  font-size: 0.8rem;
}

.sikada-panel__setup > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--app-muted, #5b6b7c);
}

.sikada-panel__bookmarklet {
  margin: 0.55rem 0 0;
  padding: 0.65rem 0.75rem;
  border: 1px dashed var(--app-border, #c9d3e0);
  border-radius: 6px;
  background: #fff;
}

.sikada-panel__bookmarklet-title {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
}

.sikada-panel__bookmarklet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0.45rem 0 0.55rem;
}

.sikada-panel__bookmarklet-drag {
  cursor: grab;
  user-select: none;
}

.sikada-panel__bookmarklet-drag:active {
  cursor: grabbing;
}

.sikada-panel__flash {
  margin: 0 0 0.5rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
}

.sikada-panel__sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem 1rem;
}

.sikada-panel__section-title {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--app-muted, #5b6b7c);
}

.sikada-panel__grid {
  display: grid;
  grid-template-columns: minmax(6.5rem, 38%) 1fr;
  gap: 0.15rem 0.45rem;
  margin: 0;
  font-size: 0.8rem;
}

.sikada-panel__grid dt {
  margin: 0;
  color: var(--app-muted, #5b6b7c);
  align-self: center;
}

.sikada-panel__grid dd {
  margin: 0;
}

.sikada-panel__value {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.15rem 0.35rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sikada-panel__value:hover:not(:disabled),
.sikada-panel__value:focus-visible:not(:disabled) {
  border-color: var(--app-accent, #2f6fed);
  outline: none;
}

.sikada-panel__value--empty,
.sikada-panel__value:disabled {
  color: #9aa7b5;
  background: transparent;
  cursor: default;
}

.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+). Lock painted height (red center line stays constant);
 * width follows intrinsic aspect ratio — never scale down via max-width + uniform contain.
 */
.person-grade-icon {
  height: 25px;
  max-height: 25px;
  width: auto;
  vertical-align: middle;
  display: inline-block;
}

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

.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;
  max-height: 25px;
  /* Fixed height; stretch horizontally to segment width (no uniform zoom). */
  object-fit: fill;
  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;
}

.app-image-field--read-only .app-image-field__preview-frame--person-portrait {
  width: 100%;
  max-width: 11rem;
  min-height: 10rem;
  height: auto;
}

.app-image-field--read-only .app-image-field__preview-frame--person-portrait .app-image-field__preview {
  max-height: 10rem;
  object-fit: contain;
}

.app-image-field__preview-frame--person-portrait.app-image-field__preview-frame--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-image-field__preview-frame--person-portrait .app-image-field__empty-message {
  display: block;
  padding: 0.75rem;
  font-size: 0.8125rem;
  text-align: center;
  line-height: 1.35;
}

.app-image-field__preview-frame--person-portrait:not(.app-image-field__preview-frame--empty) .app-image-field__empty-message {
  display: none;
}

.app-image-field__preview-frame--person-portrait.app-image-field__preview-frame--empty .app-image-field__preview,
.app-image-field__preview-frame--person-portrait.app-image-field__preview-frame--empty img[data-licence-person-photo-img] {
  display: none !important;
}

.app-entity-form__inline-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--app-blue, #1e40af);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.app-entity-form__inline-link:hover {
  color: #1d4ed8;
}

.app-entity-form__inline-link:disabled {
  color: #9ca3af;
  cursor: not-allowed;
  text-decoration: none;
}

.app-form-hint--tight {
  margin-top: 0.35rem;
}

.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 — collapsible strip under toolbar, above table */
.app-crud__filters-zone,
.app-crud__filters-block {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--app-glass-filters, rgba(243, 244, 246, 0.55));
  -webkit-backdrop-filter: blur(var(--app-glass-blur, 6px));
  backdrop-filter: blur(var(--app-glass-blur, 6px));
  box-shadow: none;
  overflow: visible;
  max-width: 100%;
  box-sizing: border-box;
}

.app-crud__filters-zone {
  padding: 0.45rem 1rem;
  border-bottom: 1px solid var(--app-line, rgba(229, 231, 235, 0.5));
}

/* Toolbar + open zone read as one header chrome */
.app-crud__toolbar:has(+ .app-crud__filters-zone:not([hidden])),
.person-crud__toolbar:has(+ .app-crud__filters-zone:not([hidden])) {
  border-bottom-color: transparent;
  padding-bottom: 0.55rem;
}

.app-crud__filters-zone-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
  width: 100%;
  min-width: 0;
}

.app-crud__filters-zone-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
}

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

.app-crud__filters-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.app-crud__filters-toggle .crud-icon {
  width: 1rem;
  height: 1rem;
}

.app-crud__filters-toggle-label {
  font-weight: 700;
  font-size: 0.8125rem;
}

.app-crud__filters-toggle-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}

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

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

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

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

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

.app-crud__range-filter-inputs {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.app-crud__range-filter-input {
  width: 4rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font: inherit;
  font-size: 0.8125rem;
  background: #fff;
}

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

.app-crud__filters-zone .app-crud__filters {
  padding: 0;
}

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

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

.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-row .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-zone,
.crud-layout__detail .app-crud__filters-block,
.crud-layout__detail .app-crud__filters-bridge,
.crud-layout__detail .app-crud__filters-toggle {
  display: none !important;
}

.crud-layout--fullscreen .app-crud__filters-zone,
.crud-layout--fullscreen .app-crud__filters-block,
.crud-layout--fullscreen .app-crud__filters-bridge,
.crud-layout--fullscreen .app-crud__filters-toggle {
  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;
}

/* Legacy bridge (kept for pages not yet migrated) */
.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));
  }
}

/* Membership category form: description + visibility left; images right; catalog full width. */
.app-membership-category-form .app-entity-form__body {
  gap: 0.65rem;
}

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

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

.app-membership-category-form .app-form-section--visibility .app-entity-form__visibility-panel--section {
  padding: 0.5rem 0.6rem;
}

@container crud-detail (min-width: 640px) {
  .crud-layout--fullscreen .app-membership-category-form .app-entity-form__body,
  .crud-layout--split .app-membership-category-form .app-entity-form__body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "mc-description mc-images"
      "mc-visibility mc-images"
      "mc-catalog mc-catalog";
    align-items: start;
  }

  .app-membership-category-form .app-form-section--description {
    grid-area: mc-description;
  }

  .app-membership-category-form .app-form-section--images {
    grid-area: mc-images;
  }

  .app-membership-category-form .app-form-section--visibility {
    grid-area: mc-visibility;
  }

  .app-membership-category-form .app-form-section--full {
    grid-area: mc-catalog;
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }

  .app-membership-category-form .app-form-section--full .app-club-dual-list,
  .app-membership-category-form .app-form-section--full .app-dual-list {
    width: 100%;
    max-width: none;
  }
}

@container crud-detail (min-width: 640px) {
  .crud-layout--split .app-membership-option-form .app-entity-form__body,
  .crud-layout--fullscreen .app-membership-option-form .app-entity-form__body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "mo-option mo-pricing"
      "mo-slots mo-slots";
    align-items: start;
  }

  .app-membership-option-form .app-form-section--description {
    grid-area: mo-option;
  }

  .app-membership-option-form .app-form-section--pricing {
    grid-area: mo-pricing;
  }

  .app-membership-option-form .app-form-section--full {
    grid-area: mo-slots;
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }

  .app-membership-option-form .app-form-section--full .app-club-dual-list,
  .app-membership-option-form .app-form-section--full .app-dual-list {
    width: 100%;
    max-width: none;
  }
}

/* Membership reduction form: général + montant side by side; catalogue and conditions full width. */
.app-membership-reduction-form .app-entity-form__body {
  gap: 0.65rem;
}

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

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

.app-membership-reduction-form .app-entity-form__field--full .app-field-info-label {
  margin-bottom: 0.35rem;
}

@container crud-detail (min-width: 640px) {
  .crud-layout--split .app-membership-reduction-form .app-entity-form__body,
  .crud-layout--fullscreen .app-membership-reduction-form .app-entity-form__body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "mr-general mr-pricing"
      "mr-conditions mr-conditions"
      "mr-categories mr-categories";
    align-items: start;
  }

  .app-membership-reduction-form .app-form-section--general {
    grid-area: mr-general;
  }

  .app-membership-reduction-form .app-form-section--pricing {
    grid-area: mr-pricing;
  }

  .app-membership-reduction-form .app-form-section--categories,
  .app-membership-reduction-form .app-form-section--full {
    grid-area: mr-categories;
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }

  .app-membership-reduction-form .app-form-section--conditions {
    grid-area: mr-conditions;
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }

  .app-membership-reduction-form .app-form-section--full .app-club-dual-list,
  .app-membership-reduction-form .app-form-section--full .app-dual-list {
    width: 100%;
    max-width: none;
  }
}

/* Licence form: stacked sections — split/fullscreen CRUD uses a 2-col grid on
   `.app-entity-form__body`, which places short + tall sections side-by-side and
   leaves a large dead band before the next section in column 1. Flex column wins
   over that grid regardless of container width. */
.app-licence-form .app-entity-form__body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
}

.app-licence-form .app-form-section {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  padding: 0.85rem 1rem;
  box-sizing: border-box;
}

/* 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;
}

/* 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;
}

/* Annual forecast balance — compact 16:9 layout */
.forecast-balance {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: calc(100vh - 7.5rem);
  min-height: 0;
}

.forecast-balance__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.forecast-balance__title {
  margin: 0;
  font-size: 1.05rem;
}

.forecast-balance__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
}

.forecast-balance__filters select {
  min-width: 9rem;
}

.forecast-balance__meta {
  margin: 0;
  font-size: 0.8rem;
}

.forecast-balance__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0.55rem;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 0.25rem;
}

.forecast-card {
  border: 1px solid var(--kd-line, #e2e8f0);
  border-radius: 0.4rem;
  background: #fff;
  padding: 0.45rem 0.55rem 0.35rem;
}

.forecast-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
}

.forecast-card__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  line-height: 1.25;
}

.forecast-card__table td {
  padding: 0.12rem 0;
  vertical-align: top;
}

.forecast-card__amt {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  padding-left: 0.5rem;
}

.forecast-card__amt--neg {
  color: #b91c1c;
}

.forecast-card__amt--pos {
  color: #15803d;
}

.forecast-card__subtotal td {
  border-top: 1px solid var(--kd-line, #e2e8f0);
  padding-top: 0.28rem;
  font-weight: 600;
}

.forecast-balance__footer {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-top: 1px solid var(--kd-line, #e2e8f0);
  padding-top: 0.45rem;
}

.forecast-balance__summary {
  max-width: 28rem;
}

.forecast-balance__totals {
  max-width: 32rem;
  margin-bottom: 0.25rem;
}

.forecast-balance__totals-head td {
  padding-bottom: 0.15rem;
}

.forecast-balance__manual {
  margin: 0;
  font-size: 0.75rem;
}

.forecast-balance__grand {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.95rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.35rem;
  background: #f8fafc;
}

.forecast-balance__grand--pos {
  background: #f0fdf4;
  color: #15803d;
}

.forecast-balance__grand--neg {
  background: #fef2f2;
  color: #b91c1c;
}

@media (min-width: 1100px) {
  .forecast-balance__grid {
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  }
}


/* --- File drop zone (FFKDA / SIKADA import) --- */
.file-drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1.5rem 1.25rem;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
  user-select: none;
}

.file-drop-zone--lg {
  min-height: 13.5rem;
  padding: 2.25rem 1.5rem;
  gap: 0.6rem;
}

.file-drop-zone:hover,
.file-drop-zone:focus-visible {
  border-color: var(--app-accent, #2f6fed);
  background: #f0f6ff;
  outline: none;
}

.file-drop-zone--dragover {
  border-color: var(--app-accent, #2f6fed);
  border-style: solid;
  background: #dbeafe;
  box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.22);
  transform: scale(1.01);
}

.file-drop-zone--dragover .file-drop-zone__icon {
  color: var(--app-accent, #2f6fed);
  transform: translateY(2px);
}

.file-drop-zone--has-file {
  border-style: solid;
  border-color: #16a34a;
  background: #f0fdf4;
}

.file-drop-zone--error {
  border-style: solid;
  border-color: #dc2626;
  background: #fef2f2;
}

.file-drop-zone__icon {
  color: #94a3b8;
  line-height: 0;
  transition: color 0.18s ease, transform 0.18s ease;
}

.file-drop-zone:hover .file-drop-zone__icon,
.file-drop-zone:focus-visible .file-drop-zone__icon {
  color: var(--app-accent, #2f6fed);
}

.file-drop-zone--has-file .file-drop-zone__icon {
  color: #16a34a;
}

.file-drop-zone__input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* HTML hidden attribute alone is enough; keep rules for browsers that still paint file inputs. */
.file-drop-zone__input[hidden] {
  display: none !important;
}

.file-drop-zone__title {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
}

.file-drop-zone__hint {
  margin: 0;
  font-size: 0.92rem;
  color: #64748b;
}

.file-drop-zone__browse-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--app-accent, #2f6fed);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.file-drop-zone__browse-link:hover,
.file-drop-zone__browse-link:focus-visible {
  color: #1d4ed8;
}

.file-drop-zone__filename {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #166534;
  min-height: 1.25rem;
}

.file-drop-zone--error .file-drop-zone__filename {
  color: #b91c1c;
}

.file-drop-zone__idle-hint {
  margin: 0;
  font-size: 0.82rem;
  color: #94a3b8;
}

.ffkda-import-lead {
  margin: 0 0 1rem;
  font-size: 0.98rem;
  line-height: 1.45;
  color: #334155;
}

.ffkda-import-result {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.ffkda-import-result__title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.ffkda-import-result__stats {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.55;
  color: #475569;
}

.ffkda-import-result__warnings {
  margin-top: 0.75rem;
}

.ffkda-import-result__warnings p {
  margin: 0 0 0.35rem;
}

.ffkda-import-result__warnings ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: #64748b;
  max-height: 200px;
  overflow: auto;
}

.ffkda-divergences {
  margin-top: 1.25rem;
}

.ffkda-divergences__intro {
  margin-bottom: 0.75rem;
}

.ffkda-divergences__title {
  margin: 0 0 0.35rem;
  font-weight: 700;
}

.ffkda-divergences__intro p {
  margin: 0;
  line-height: 1.45;
}

.ffkda-divergence-card {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}

.ffkda-divergence-card > summary {
  cursor: pointer;
  font-size: 0.95rem;
}

.ffkda-divergence-card__count {
  color: #64748b;
  font-weight: 500;
}

.ffkda-divergence-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 0.25rem;
}

.ffkda-divergence-legend {
  margin: 0.65rem 0 0.5rem;
  font-size: 0.88rem;
  color: #64748b;
}

.ffkda-divergence-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ffkda-divergence-table th,
.ffkda-divergence-table td {
  border-top: 1px solid #e5e7eb;
  padding: 0.5rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

.ffkda-divergence-table th {
  color: #64748b;
  font-weight: 600;
  font-size: 0.8rem;
}

.ffkda-divergence-table__old {
  color: #94a3b8;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.ffkda-divergence-table__arrow {
  width: 1.5rem;
  color: #64748b;
  text-align: center;
  font-weight: 700;
}

.ffkda-divergence-table__will-write {
  color: #166534;
  font-weight: 600;
  background: #f0fdf4;
}

/* Season year field — combobox (form + compact filter) */
.season-year-field {
  --sy-height: 2.15rem;
  --sy-radius: 8px;
  --sy-border: #e5e7eb;
  --sy-ink: var(--app-ink, #111827);
  --sy-muted: var(--app-muted, #6b7280);
  --sy-accent: var(--app-red, #dc2626);
  position: relative;
  display: block;
  min-width: 0;
  z-index: 1;
}

.season-year-field--open {
  z-index: 3000;
}

.season-year-field__control {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.season-year-field__input {
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  height: var(--sy-height);
  box-sizing: border-box;
  padding: 0 3.85rem 0 0.7rem;
  border: 1px solid var(--sy-border);
  border-radius: var(--sy-radius);
  background: #fff;
  color: var(--sy-ink);
  font: inherit;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1.2;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.season-year-field__input::placeholder {
  color: #9ca3af;
  font-weight: 400;
  letter-spacing: 0;
}

.season-year-field__input:hover {
  border-color: #d1d5db;
}

.season-year-field__input:focus {
  outline: none;
  border-color: var(--sy-accent);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.season-year-field--open .season-year-field__input {
  border-color: var(--sy-accent);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.season-year-field__actions {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.1rem;
  padding-right: 0.3rem;
  pointer-events: none;
}

.season-year-field__clear,
.season-year-field__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  line-height: 1;
  pointer-events: auto;
  transition: background 0.12s ease, color 0.12s ease;
}

.season-year-field__clear:hover,
.season-year-field__toggle:hover {
  background: #f3f4f6;
  color: var(--sy-ink);
}

.season-year-field__clear:focus-visible,
.season-year-field__toggle:focus-visible {
  outline: 2px solid var(--sy-accent);
  outline-offset: 1px;
}

.season-year-field__clear[hidden] {
  display: none !important;
}

.season-year-field__toggle-icon {
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -2px);
  transition: transform 0.15s ease;
}

.season-year-field--open .season-year-field__toggle-icon {
  transform: rotate(225deg) translate(-1px, -1px);
}

.season-year-field__list {
  position: absolute;
  z-index: 3000;
  left: 0;
  right: auto;
  top: calc(100% + 0.3rem);
  width: 100%;
  min-width: 0;
  max-width: none;
  max-height: 15.5rem;
  overflow: auto;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  /* Solid opaque — sticky glass table headers must not show through */
  background: #ffffff;
  background-color: #ffffff;
  opacity: 1;
  isolation: isolate;
  box-sizing: border-box;
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.06),
    0 14px 28px -8px rgba(15, 23, 42, 0.18);
  scrollbar-width: thin;
}

.season-year-field__option {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.42rem 0.65rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--sy-ink);
  line-height: 1.25;
  transition: background 0.1s ease, color 0.1s ease;
}

.season-year-field__option:hover,
.season-year-field__option:focus-visible {
  background: #f3f4f6;
  outline: none;
}

.season-year-field__option--active {
  background: rgba(220, 38, 38, 0.1);
  color: var(--sy-accent);
  font-weight: 650;
  outline: none;
}

.season-year-field__option--selected {
  background: rgba(220, 38, 38, 0.08);
  color: var(--sy-accent);
  font-weight: 650;
}

.season-year-field__option--selected:hover,
.season-year-field__option--selected:focus-visible,
.season-year-field__option--selected.season-year-field__option--active {
  background: rgba(220, 38, 38, 0.12);
}

.season-year-field__option--all {
  color: var(--sy-muted);
  font-weight: 600;
  font-variant-numeric: normal;
  margin-bottom: 0.15rem;
  position: relative;
}

.season-year-field__option--all::after {
  content: "";
  display: block;
  position: absolute;
  left: 0.4rem;
  right: 0.4rem;
  bottom: -0.2rem;
  border-bottom: 1px solid #f3f4f6;
  pointer-events: none;
}

.season-year-field__option--all + .season-year-field__option {
  margin-top: 0.35rem;
}

/* Compact toolbar / list-filter variant */
.season-year-field--filter {
  --sy-height: 1.95rem;
  display: inline-block;
  vertical-align: middle;
  width: 10.25rem;
  flex: 0 0 auto;
}

.season-year-field--filter .season-year-field__input {
  padding-left: 0.55rem;
  padding-right: 3.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.92);
}

.season-year-field--filter .season-year-field__list {
  width: 100%;
  max-height: 14rem;
}

.season-year-field--filter .season-year-field__clear,
.season-year-field--filter .season-year-field__toggle {
  width: 1.4rem;
  height: 1.4rem;
}

.app-crud__season-filter,
.person-crud__season-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  flex: 0 0 auto;
}

.app-crud__season-filter-label,
.app-crud__season-filter > label,
.person-crud__season-filter > label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4b5563;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.forecast-balance__filters .season-year-field {
  width: 12.5rem;
}

.forecast-balance__filters .season-year-field__input,
.course-affectations__filters .season-year-field__input {
  font-weight: 600;
}

.grades-obtenus__filters-row .season-year-field--filter {
  width: 10.5rem;
}

.cheque-encashment-period.compensation-month-bar {
  margin: 0 0 1rem;
}

.cheque-encashment-period input[type="month"] {
  min-width: 11rem;
}

.cheque-encashment__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0.75rem 0 1rem;
}

.cheque-encashment__selection-actions,
.cheque-encashment__bulk-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.cheque-encashment__col-check {
  width: 2.5rem;
}

.cheque-encashment__row--done {
  opacity: 0.72;
}

.compensation-statements__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0.75rem 0 1rem;
}

.compensation-statements__selection-actions,
.compensation-statements__bulk-actions,
.compensation-statements__bulk-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.compensation-statements__col-check {
  width: 2.5rem;
}

.professor-payments__progress {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 10rem;
  flex: 1 1 10rem;
}

.professor-payments__progress-label {
  font-size: 0.85rem;
  color: var(--app-muted);
}

.professor-payments__progress-bar {
  height: 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--app-line) 70%, transparent);
  overflow: hidden;
}

.professor-payments__progress-fill {
  display: block;
  height: 100%;
  background: color-mix(in srgb, var(--app-ink) 55%, #2f9e6c);
  border-radius: inherit;
  transition: width 0.2s ease;
}

.professor-payments__layout {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
  gap: 1.5rem 2.75rem;
  margin-top: 0.75rem;
  align-items: start;
}

@media (max-width: 720px) {
  .professor-payments__layout {
    grid-template-columns: 1fr;
  }
}

.professor-payments__queue {
  border: 1px solid var(--app-line);
  border-radius: 0.75rem;
  background: var(--app-glass);
  padding: 0.75rem;
  max-height: 32rem;
  overflow: auto;
}

.professor-payments__queue-title,
.professor-payments__section-title {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--app-ink);
}

.professor-payments__queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.professor-payments__queue-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem 0.5rem 0.75rem;
  border-radius: 0.55rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--app-line);
  background: color-mix(in srgb, var(--app-glass) 90%, white);
  box-shadow: inset 3px 0 0 transparent;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.professor-payments__queue-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--app-red, #dc2626) 55%, white);
  outline-offset: 2px;
}

.professor-payments__queue-list li:not(.is-active) .professor-payments__queue-link:hover {
  border-color: color-mix(in srgb, var(--app-red, #dc2626) 28%, var(--app-line));
  background: rgba(220, 38, 38, 0.1);
}

.professor-payments__queue-list li.is-active .professor-payments__queue-link {
  border-color: color-mix(in srgb, var(--app-red, #dc2626) 65%, var(--app-line));
  background: rgba(220, 38, 38, 0.14);
  box-shadow: inset 3px 0 0 var(--app-red, #dc2626);
}

.professor-payments__queue-list li.is-active .professor-payments__queue-link:hover {
  background: rgba(220, 38, 38, 0.22);
}

.professor-payments__queue-list li.is-active .professor-payments__queue-name {
  color: var(--app-ink);
}

.professor-payments__queue-list li.is-active .professor-payments__queue-amount {
  color: var(--app-ink);
  font-weight: 600;
}

.professor-payments__queue-list li.is-done:not(.is-active) {
  opacity: 0.82;
}

.professor-payments__queue-list li.is-done.is-active {
  opacity: 1;
}

.professor-payments__queue-link--settled .professor-payments__queue-name {
  font-weight: 600;
}

.professor-payments__queue-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.professor-payments__queue-amount {
  font-variant-numeric: tabular-nums;
  color: var(--app-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.professor-payments__queue-badge {
  font-size: 0.75rem;
  color: #1f7a4d;
  font-weight: 600;
}

.professor-payments__card {
  border: 1px solid var(--app-line);
  border-radius: 0.75rem;
  background: var(--app-glass);
  padding: 1rem 1.1rem 1.15rem;
}

.professor-payments__card--empty {
  display: flex;
  align-items: center;
  min-height: 8rem;
}

.professor-payments__card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.professor-payments__bank {
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--app-line);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--app-glass) 88%, transparent);
}

.professor-payments__bank-dl {
  display: grid;
  gap: 0.35rem 1rem;
  margin: 0.5rem 0 0;
}

.professor-payments__bank-dl div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: baseline;
}

.professor-payments__bank-dl dt {
  margin: 0;
  font-size: 0.85rem;
  color: var(--app-muted);
}

.professor-payments__bank-dl dd {
  margin: 0;
  font-size: 0.92rem;
}

.professor-payments__bank-hint {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
}

.professor-payments__card-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--app-ink);
}

.professor-payments__card-meta {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
}

.professor-payments__amounts {
  margin-bottom: 1rem;
}

.professor-payments__remaining {
  color: #1f7a4d;
  font-size: 1.1rem;
}

.professor-payments__remaining.is-bad,
.professor-payments__net .is-bad {
  color: #a33a2c;
}

.professor-payments__net {
  margin: 0.85rem 0 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--app-line);
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--app-glass) 70%, white);
}

.professor-payments__transfer-line {
  display: none;
}

.professor-payments__lines-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.professor-payments__line-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.professor-payments__lines {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.professor-payments__line {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--app-line);
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--app-glass) 80%, white);
}

.professor-payments__line-remove {
  align-self: end;
}

.professor-payments__form-footer {
  margin-bottom: 0.85rem;
}

.professor-payments__diff.is-ok {
  color: #1f7a4d;
}

.professor-payments__diff.is-bad {
  color: #a33a2c;
}

.professor-payments__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.professor-payments__recorded {
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--app-line);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--app-glass) 88%, transparent);
}

.professor-payments__payment-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.92rem;
}

.professor-payments__form--deductions {
  margin-bottom: 1.25rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--app-line);
}

.professor-payments__settlement {
  margin-top: 0.35rem;
}

.professor-payments__tabs {
  margin: 0 0 0.85rem;
  gap: 0.45rem;
}

.professor-payments__tabs .app-page-tabs__tab {
  min-width: 8rem;
  justify-content: center;
  font-weight: 700;
  border: 1px solid var(--app-line);
  background: color-mix(in srgb, var(--app-glass) 70%, #fff);
  color: var(--app-muted, #6b7280);
}

.professor-payments__tabs .app-page-tabs__tab--active {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--app-ink, #111827) 14%, transparent);
}

.professor-payments__tabs .app-page-tabs__tab[data-settlement-tab="transfer"].app-page-tabs__tab--active,
.professor-payments__tabs .app-page-tabs__tab[data-settlement-mode-tab="TRANSFER"].app-page-tabs__tab--active {
  color: #1d4ed8;
  background: color-mix(in srgb, #3b82f6 18%, white);
  border-color: color-mix(in srgb, #2563eb 55%, var(--app-line));
  box-shadow: 0 0 0 2px color-mix(in srgb, #3b82f6 28%, transparent);
}

.professor-payments__tabs .app-page-tabs__tab[data-settlement-tab="donation"].app-page-tabs__tab--active,
.professor-payments__tabs .app-page-tabs__tab[data-settlement-mode-tab="DON"].app-page-tabs__tab--active {
  color: #92400e;
  background: color-mix(in srgb, #eab308 22%, white);
  border-color: color-mix(in srgb, #ca8a04 55%, var(--app-line));
  box-shadow: 0 0 0 2px color-mix(in srgb, #eab308 32%, transparent);
}

.professor-payments__mode-banner {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.55rem;
  border: 1px solid var(--app-line);
  font-size: 0.9rem;
  font-weight: 600;
}

.professor-payments__mode-banner--transfer {
  color: #1d4ed8;
  background: color-mix(in srgb, #3b82f6 12%, white);
  border-color: color-mix(in srgb, #3b82f6 35%, var(--app-line));
}

.professor-payments__mode-banner--donation {
  color: #92400e;
  background: color-mix(in srgb, #eab308 16%, white);
  border-color: color-mix(in srgb, #ca8a04 40%, var(--app-line));
}

.professor-payments__mode-banner strong {
  font-weight: 800;
}

.professor-payments__settlement-panel {
  margin-top: 0.25rem;
}

.professor-payments__recorded-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}

.professor-payments__recorded-header .professor-payments__section-title {
  margin: 0;
}

.professor-payments__mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid var(--app-line);
}

.professor-payments__mode-badge[data-mode="TRANSFER"],
.professor-payments__mode-badge[data-mode-label="Virement"],
.professor-payments__mode-badge--transfer {
  color: #1d4ed8;
  background: color-mix(in srgb, #3b82f6 14%, white);
  border-color: color-mix(in srgb, #3b82f6 35%, var(--app-line));
}

.professor-payments__mode-badge[data-mode="DON"],
.professor-payments__mode-badge[data-mode-label="Don au club"],
.professor-payments__mode-badge--donation {
  color: #a16207;
  background: color-mix(in srgb, #eab308 16%, white);
  border-color: color-mix(in srgb, #ca8a04 40%, var(--app-line));
}

.professor-payments__mode-badge[data-mode="CHEQUE"],
.professor-payments__mode-badge[data-mode-label="Chèque"],
.professor-payments__mode-badge--cheque {
  color: #6d28d9;
  background: color-mix(in srgb, #8b5cf6 14%, white);
  border-color: color-mix(in srgb, #7c3aed 35%, var(--app-line));
}

.professor-payments__mode-badge[data-mode="CASH"],
.professor-payments__mode-badge[data-mode-label="Espèces"],
.professor-payments__mode-badge--cash {
  color: #047857;
  background: color-mix(in srgb, #10b981 14%, white);
  border-color: color-mix(in srgb, #059669 35%, var(--app-line));
}

.professor-payments__mode-badge--inline {
  padding: 0.05rem 0.4rem;
  font-size: 0.75rem;
  vertical-align: baseline;
}

.professor-payments__mode-toggle-field {
  margin: 0 0 0.85rem;
}

.professor-payments__mode-toggle {
  width: 100%;
  max-width: 36rem;
}

.professor-payments__settled-edit {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--app-line);
}

.professor-payments__settled-edit .professor-payments__form--correction {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.professor-payments__settled-edit .professor-payments__revoke {
  display: none;
}

.professor-payments__actions--settled {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.85rem;
}

.professor-payments__transfer-label {
  margin: 0.75rem 0 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--app-line);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--app-glass) 88%, transparent);
}

.professor-payments__copy-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.5rem;
}

.professor-payments__transfer-message {
  flex: 1 1 12rem;
  margin: 0;
  padding: 0.35rem 0.55rem;
  border-radius: 0.4rem;
  background: color-mix(in srgb, var(--app-glass) 70%, white);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.professor-payments__form--transfer {
  margin-top: 0.35rem;
}

.professor-payments__form--correction {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--app-line);
}

.professor-payments__revoke {
  margin-top: 0.75rem;
}

.professor-payments__amount--deduction,
.compensation-payment-amount--deduction {
  color: var(--app-danger, #b42318);
  font-weight: 600;
}

/* Accounting balance / config (Gestion financière) */
.accounting-config__toolbar,
.accounting-balance__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.accounting-config__hint {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}

.accounting-balance__period.compensation-month-bar {
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.accounting-balance__summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.accounting-balance__kpi {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--app-line);
  border-radius: 0.5rem;
  background: var(--app-glass);
}

.accounting-balance__kpi-value {
  font-size: 1.15rem;
  font-weight: 650;
}

.accounting-balance__kpi-value--in {
  color: #1b7a3d;
}

.accounting-balance__kpi-value--out {
  color: #a33b3b;
}

.accounting-balance__facet-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  align-items: flex-end;
}

.accounting-balance__facet-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.accounting-balance__facet-field--combo {
  flex: 0 1 14rem;
}

.accounting-balance__facet-field--wide {
  flex: 1 1 20rem;
}

.accounting-balance__facet-field .searchable-select__control {
  min-width: 12rem;
}

.accounting-balance__source-multi .searchable-multi-select__selected:not(:empty) {
  margin-bottom: 0.35rem;
}

.accounting-balance__list-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.accounting-balance__table .accounting-balance__in {
  color: #1b7a3d;
}

.accounting-balance__table .accounting-balance__out {
  color: #a33b3b;
}

.accounting-balance__tabs {
  margin-top: 0.25rem;
}

.accounting-balance__tabs .app-page-tabs__tab {
  font-family: inherit;
}

.accounting-balance__panel[hidden] {
  display: none !important;
}

.accounting-balance__gaps-hint {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.accounting-balance__manual {
  margin-top: 1.25rem;
}

.accounting-balance__actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.25rem;
}

.accounting-balance__section-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 650;
}

.accounting-balance__gaps {
  margin-bottom: 1.25rem;
}

.accounting-balance__gaps-table {
  margin-bottom: 0;
}

.accounting-balance__gap-warn {
  color: #a33b3b;
  font-weight: 600;
}

.accounting-balance__season-cell {
    min-width: 11rem;
    vertical-align: top;
}

.accounting-balance__season-edit {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.35rem;
}

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

.accounting-balance__season-edit .season-year-field {
    flex: 1 1 8rem;
    min-width: 8rem;
}

.accounting-balance__exercise-section {
    margin-bottom: 1.25rem;
}

.accounting-balance__exercise-title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.accounting-balance__delete-form {
  margin: 0;
}

/* Multi-choice poll — inline options editor */
.poll-options-editor {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.poll-options-editor__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.poll-options-editor__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--app-border, #dbeafe);
  border-radius: 0.5rem;
  background: #fff;
}

.poll-options-editor__handle {
  flex: 0 0 1.5rem;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--app-blue, #1e40af);
  font-size: 0.75rem;
  font-weight: 700;
}

.poll-options-editor__label {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.poll-options-editor__row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  flex: 0 0 auto;
}

.poll-options-editor__add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.poll-options-editor__add-input {
  flex: 1 1 14rem;
  min-width: 10rem;
  margin: 0;
}

.poll-options-editor__empty {
  margin: 0;
  color: var(--app-muted, #64748b);
  font-size: 0.875rem;
}

.poll-options-editor__hint {
  margin: 0;
  color: var(--app-muted, #64748b);
  font-size: 0.8125rem;
}

@media (max-width: 640px) {
  .poll-options-editor__row {
    flex-wrap: wrap;
  }

  .poll-options-editor__row-actions {
    width: 100%;
    justify-content: flex-end;
  }
}


