/* /public_html/assets/css/dashboard-students.css */

.student-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.student-membership-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .12);
  font-size: .9rem;
  flex: 0 0 auto;
}

.student-membership-icon--unpaid {
  color: #c62828;
  background: rgba(198, 40, 40, .12);
}

.student-membership-icon--pending,
.student-membership-icon--partial {
  color: #b26a00;
  background: rgba(255, 179, 0, .16);
}

.student-membership-icon--paid,
.student-membership-icon--covered {
  color: #1b7f3a;
  background: rgba(35, 164, 78, .14);
}

.student-membership-icon--waived {
  color: #3b5bdb;
  background: rgba(59, 91, 219, .12);
}

html[data-theme="dark"] .student-membership-icon {
  border-color: rgba(255, 255, 255, .12);
}

html[data-theme="dark"] .student-membership-icon--unpaid {
  color: #ff8a80;
  background: rgba(255, 138, 128, .16);
}

html[data-theme="dark"] .student-membership-icon--pending,
html[data-theme="dark"] .student-membership-icon--partial {
  color: #ffd166;
  background: rgba(255, 209, 102, .16);
}

html[data-theme="dark"] .student-membership-icon--paid,
html[data-theme="dark"] .student-membership-icon--covered {
  color: #8ce99a;
  background: rgba(140, 233, 154, .16);
}

html[data-theme="dark"] .student-membership-icon--waived {
  color: #9ec5fe;
  background: rgba(158, 197, 254, .16);
}

.student-filter-chips .filter-chip--membership {
  position: relative;
}

.student-filter-chips .filter-chip--membership.is-active {
  color: #fff;
  border-color: transparent;
}

.student-filter-chips .filter-chip--membership.filter-chip--membership-neutral {
  color: inherit;
}

.student-filter-chips .filter-chip--membership.filter-chip--membership-paid.is-active {
  background: #1b7f3a;
  box-shadow: 0 12px 28px rgba(27, 127, 58, .24);
}

.student-filter-chips .filter-chip--membership.filter-chip--membership-partial.is-active {
  background: #b26a00;
  box-shadow: 0 12px 28px rgba(178, 106, 0, .24);
}

.student-filter-chips .filter-chip--membership.filter-chip--membership-unpaid.is-active {
  background: #c62828;
  box-shadow: 0 12px 28px rgba(198, 40, 40, .22);
}

.student-membership-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 6px 0 10px;
}

.student-membership-filter-chip {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, .12);
  background: rgba(255, 255, 255, .92);
  color: var(--text-color, #0f172a);
  border-radius: 999px;
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease, color .15s ease;
}

.student-membership-filter-chip:hover,
.student-membership-filter-chip:focus-visible {
  border-color: rgba(15, 23, 42, .2);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
  transform: translateY(-1px);
  outline: none;
}

.student-membership-filter-chip__label--short {
  display: none;
}

.student-membership-filter-chip.is-active {
  color: #fff;
  border-color: transparent;
}

.student-membership-filter-chip--neutral.is-active {
  background: #1f2937;
}

.student-membership-filter-chip--paid.is-active {
  background: #1b7f3a;
}

.student-membership-filter-chip--partial.is-active {
  background: #b26a00;
}

.student-membership-filter-chip--unpaid.is-active {
  background: #c62828;
}

html[data-theme="dark"] .student-membership-filter-chip {
  background: rgba(20, 24, 38, .88);
  color: rgba(255, 255, 255, .94);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .26);
}

html[data-theme="dark"] .student-membership-filter-chip:hover,
html[data-theme="dark"] .student-membership-filter-chip:focus-visible {
  border-color: rgba(255, 255, 255, .22);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .32);
}

@media (max-width: 860px) {
  .student-membership-filter-chip {
    min-height: 38px;
    padding: 0 12px;
    font-size: .9rem;
  }

  .student-membership-filter-chip__label--full {
    display: none;
  }

  .student-membership-filter-chip__label--short {
    display: inline;
  }
}

@media (max-width: 640px) {
  .student-membership-filter-group {
    gap: 8px;
  }

  .student-membership-filter-chip {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }
}


/* ==========================================================================
   STUDENTS PANEL — shell modernisé S2.3
   ========================================================================== */

.students-panel-shell-body {
  --students-mobile-title-opacity: 1;
  padding-top: 0;
}

.students-panel-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  min-width: 0;
}

.students-panel-mobile-title {
  opacity: var(--panel-mobile-title-opacity, 1);
}

.students-loader-host {
  margin-bottom: 1rem;
}

.students-panel-list {
  min-height: 12rem;
}

.students-panel-list.is-loading .dashboard-layout {
  opacity: 0.38;
  pointer-events: none;
  filter: saturate(0.9);
  transition: opacity 180ms ease;
}

.students-panel-list.is-hidden-during-load {
  visibility: hidden;
  pointer-events: none;
  min-height: 0;
}

.students-filters-popup[hidden] {
  display: none !important;
}

.students-filters-popup {
  position: fixed;
  top: calc(var(--dashboard-floating-top-offset, 5.9rem) + 3.6rem);
  left: 50%;
  transform: translateX(-50%);
  width: min(52rem, calc(100vw - 5.25rem));
  max-height: calc(100vh - 8rem);
  z-index: 34;
  pointer-events: none;
}

.students-filters-popup__glass {
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1rem 1.05rem;
  border-radius: 1.6rem;
  border: 1px solid color-mix(in srgb, var(--color-border-subtle) 70%, rgba(255,255,255,0.6));
  background: color-mix(in srgb, var(--color-surface-soft) 78%, rgba(255,255,255,0.65));
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(14px) saturate(1.04);
  -webkit-backdrop-filter: blur(14px) saturate(1.04);
  pointer-events: auto;
  max-height: inherit;
  overflow: auto;
}

.students-filters-popup.is-open .students-filters-popup__glass {
  animation: students-filters-pop-in 220ms ease;
}

.students-filters-popup__search {
  width: 100%;
  grid-column: 1 / -1;
  justify-self: stretch;
}

.students-filters-popup__search .student-search-field,
.students-filters-popup__search .student-search-field.ui-search,
.students-filters-popup__search .ui-search {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.students-filters-popup__search .ui-search__input {
  width: 100%;
  min-width: 0;
}

.students-filters-popup__search .ui-search {
  min-height: 3.35rem;
  border-radius: 999px;
}

.students-filters-popup__chips .student-filter-chip {
  max-width: 100%;
}

@media (max-width: 719px) {
  .students-filters-popup__chips {
    grid-template-columns: 1fr;
  }

  .students-filters-popup__chips .student-filter-chip {
    width: 100%;
    justify-content: flex-start;
    padding-inline: 1rem;
  }
}

.students-filters-popup__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 0.8rem;
  align-items: flex-start;
  justify-content: flex-start;
}

.students-filters-toggle-btn.is-open {
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.students-reset-filters-btn .ui-btn__icon {
  color: inherit;
}

.students-filters-popup .filter-chip {
  min-height: 2.65rem;
  padding-inline: 1rem;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 800;
}

.students-filters-popup .filter-chip i {
  font-size: 1rem;
  line-height: 1;
}

.students-filters-popup .filter-chip:hover,
.students-filters-popup .filter-chip:focus-visible {
  transform: translateY(-1px);
}

@media (max-width: 719px) {
  .students-filters-popup__chips {
    display: grid;
    grid-template-columns: 1fr;
  }

  .students-filters-popup .filter-chip {
    width: 100%;
    justify-content: flex-start;
    padding-inline: 1rem;
  }
}

.students-panel-list .dashboard-layout.dashboard-layout--students[data-card-count="1"],
.students-panel-list .dashboard-layout.dashboard-layout--students[data-card-count="2"],
.students-panel-list .dashboard-layout.dashboard-layout--students[data-card-count="3"] {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: var(--space-3);
}

.students-panel-list .dashboard-layout.dashboard-layout--students[data-card-count="1"] > .student-card,
.students-panel-list .dashboard-layout.dashboard-layout--students[data-card-count="2"] > .student-card,
.students-panel-list .dashboard-layout.dashboard-layout--students[data-card-count="3"] > .student-card {
  flex: 1 1 min(22rem, 100%);
  max-width: min(22rem, 100%);
}

@keyframes students-filters-pop-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

html[data-theme="dark"] .students-filters-popup__glass {
  background: color-mix(in srgb, rgba(17,24,39,0.88) 84%, rgba(30,41,59,0.8));
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 24px 56px rgba(0,0,0,0.32);
}

html[data-theme="dark"] .student-filter-chip {
  background: rgba(17, 24, 39, 0.72);
  border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.96);
}

html[data-theme="dark"] .student-filter-chip--toggle:not(.is-active),
html[data-theme="dark"] .student-filter-chip--cycle.student-filter-chip--neutral,
html[data-theme="dark"] .student-filter-chip--membership.student-filter-chip--neutral {
  background: rgba(15, 23, 42, 0.62);
  color: rgba(226, 232, 240, 0.82);
  border-color: rgba(255,255,255,0.12);
}

@media (min-width: 1500px) {
  .students-panel-list .dashboard-layout.dashboard-layout--students {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .students-panel-list .dashboard-layout.dashboard-layout--students[data-card-count="1"] > .student-card,
  .students-panel-list .dashboard-layout.dashboard-layout--students[data-card-count="2"] > .student-card,
  .students-panel-list .dashboard-layout.dashboard-layout--students[data-card-count="3"] > .student-card {
    flex: 0 1 calc((100% - (var(--space-3) * 3)) / 4);
    max-width: calc((100% - (var(--space-3) * 3)) / 4);
  }
}

@media (max-width: 719px) {

  .students-filters-popup {
    top: calc(var(--dashboard-floating-top-offset, 5.9rem) + 3.4rem);
    width: min(26rem, calc(100vw - 2rem));
  }

  .students-filters-popup__glass {
    padding: 0.9rem 0.9rem 1rem;
    border-radius: 1.45rem;
  }

  .students-filters-popup__chips {
    gap: 0.65rem;
  }

  .student-filter-chip {
    min-height: 2.55rem;
    font-size: 0.92rem;
    padding-inline: 0.88rem;
  }
}

@media (min-width: 720px) {
  .students-filters-popup {
    top: calc(var(--dashboard-floating-top-offset, 5.75rem) + 4.1rem);
  }
}
