/* ── Jaarovergang (Studenten-tab, derde weergave) ─────────────────────── */

/* De Studenten-tab is normaal smal (640px); de overgangsrijen hebben meer
   ruimte nodig, dus alleen in deze weergave breder. */
#students-tab:has(> #jaarovergang-root:not([hidden])) { max-width: 960px; }

.jo-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--r-surface);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.jo-banner p { margin: 0; flex: 1; font-size: 0.92rem; }
.jo-banner-open {
  background: color-mix(in srgb, var(--honey) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--honey) 40%, transparent);
}
.jo-banner-done {
  background: color-mix(in srgb, var(--moss) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--moss) 35%, transparent);
}

.jo-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.jo-title { margin: 0; font-size: 1.3rem; }
.jo-subtitle { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.9rem; }
.jo-pick { display: flex; flex-direction: column; }
.jo-pick .field-label { margin-bottom: 4px; }
.jo-select { width: auto; min-width: 240px; cursor: pointer; }

.jo-error {
  margin: 0 0 12px;
  padding: 10px 16px;
  border-radius: var(--r-control);
  background: color-mix(in srgb, var(--berry) 10%, var(--surface));
  color: var(--berry);
  font-size: 0.9rem;
}

.jo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  box-shadow: var(--shadow-rest);
  padding: 8px 20px 12px;
  margin-bottom: 16px;
}
.jo-card-empty { padding: 20px; }
.jo-empty { margin: 0; color: var(--ink-soft); }

.jo-group-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 16px 0 4px;
}

.jo-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 64px 24px 352px;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
/* Oranje streepje: keuze wijkt af van het standaardvoorstel. */
.jo-row.jo-changed { box-shadow: inset 3px 0 0 var(--honey); padding-left: 12px; }
.jo-row.jo-saving { opacity: 0.6; }
.jo-row-new { grid-template-columns: 1fr auto; }

.jo-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.jo-name-text { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jo-now { font-weight: 700; color: var(--ink-soft); font-size: 0.9rem; text-align: center; }
.jo-arrow { color: var(--ink-soft); text-align: center; }
.jo-new-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--sunken);
  padding: 4px 12px;
  border-radius: var(--r-pill);
}

/* Segment-knoppen per student */
.jo-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  background: var(--sunken);
  border-radius: var(--r-pill);
  justify-self: end;
}
.jo-seg button {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--dur-color) ease, color var(--dur-color) ease, box-shadow var(--dur-color) ease;
}
.jo-seg button:hover { color: var(--ink); }
.jo-seg button:disabled { cursor: default; }
.jo-seg button.on.jo-opt-next,
.jo-seg button.on.jo-opt-grad { background: var(--moss-fill); color: #fff; }
.jo-seg button.on.jo-opt-repeat { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink-soft); }
.jo-seg button.on.jo-opt-stop { background: var(--berry-fill); color: #fff; }
.jo-seg button:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }


/* Telling + knop, blijft onderaan in beeld */
.jo-footer {
  position: sticky;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  box-shadow: var(--shadow-rest);
  padding: 12px 16px;
}
.jo-sum { display: flex; gap: 8px; flex-wrap: wrap; font-size: 0.85rem; }
.jo-footer-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.jo-sum span { background: var(--sunken); border-radius: var(--r-pill); padding: 4px 12px; font-weight: 600; }

/* Rij = naam · nu · pijl · keuzes heeft ~680px nodig; met de zijbalk (240px)
   erbij past dat pas vanaf ~980px schermbreedte. Daaronder de keuzes onder de naam. */
@media (max-width: 980px) {
  .jo-row { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .jo-arrow { display: none; }
  .jo-row .jo-seg { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 640px) {
  .jo-card { padding: 4px 16px 12px; }
  .jo-row .jo-seg { justify-self: stretch; flex-wrap: nowrap; }
  .jo-seg button { flex: 1 1 0; padding: 0 8px; min-width: 0; }
  .jo-opt-extra { display: none; }
  .jo-select { min-width: 0; width: 100%; }
  .jo-pick { flex: 1 1 100%; }
  .jo-footer-actions { width: 100%; }
  .jo-footer .btn { flex: 1; }
}
