:root {
  --hud-bg-0: #060b17;
  --hud-bg-1: #091326;
  --hud-bg-2: #0d1b33;
  --hud-panel-a: #0b1629;
  --hud-panel-b: #0f1f39;
  --hud-panel-c: #121f34;
  --hud-line: rgba(127, 167, 230, 0.28);
  --hud-line-soft: rgba(127, 167, 230, 0.15);
  --hud-text: #e9f2ff;
  --hud-muted: #9fb1cd;
  --hud-shadow: 0 28px 70px rgba(2, 8, 18, 0.52);
  --hud-inner: inset 0 1px 0 rgba(199, 223, 255, 0.07), inset 0 -1px 0 rgba(18, 35, 63, 0.5);

  --accent-red: #ff4f64;
  --accent-orange: #ff9e47;
  --accent-yellow: #ffe161;
  --accent-green: #4de698;
  --accent-blue: #4ab3ff;
  --accent-indigo: #7484ff;
  --accent-violet: #b380ff;
}

* {
  box-sizing: border-box;
}

body.webapp-body {
  margin: 0;
  color: var(--hud-text);
  font-family: "Segoe UI", "Inter", "Roboto", sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(74, 179, 255, 0.14), transparent 32%),
    radial-gradient(circle at 88% 100%, rgba(116, 132, 255, 0.12), transparent 34%),
    linear-gradient(180deg, var(--hud-bg-0) 0%, var(--hud-bg-1) 34%, var(--hud-bg-2) 100%);
}

.webapp-header,
.webapp-page {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
}

.webapp-header {
  padding: 1.8rem 0 1rem;
}

.webapp-header > div {
  border-radius: 22px;
  padding: 1.1rem 1.25rem;
  background: linear-gradient(145deg, rgba(11, 22, 41, 0.94), rgba(16, 31, 54, 0.95));
  border: 1px solid var(--hud-line);
  box-shadow: var(--hud-shadow), var(--hud-inner);
}

.webapp-header h1,
.panel-card h2,
.panel-card h3,
.panel-card h4 {
  margin: 0;
}

.webapp-header h1 {
  font-size: clamp(1.5rem, 3.4vw, 2.35rem);
  line-height: 1.05;
}

.webapp-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.74rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8ea7ca;
  font-weight: 700;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.panel-grid--admin {
  margin-top: 1rem;
}

.panel-single {
  display: grid;
}

.panel-card {
  background: linear-gradient(160deg, rgba(11, 22, 41, 0.96), rgba(15, 31, 57, 0.95));
  border: 1px solid var(--hud-line);
  border-radius: 22px;
  padding: 1.1rem;
  box-shadow: var(--hud-shadow), var(--hud-inner);
}

.view-beheer .panel-card {
  background: linear-gradient(160deg, rgba(11, 22, 41, 0.96), rgba(13, 27, 50, 0.95));
}

.panel-card--form {
  max-width: 560px;
}

.stack-form {
  display: grid;
  gap: 0.7rem;
}

.stack-form label {
  font-weight: 700;
  color: #d9e9ff;
}

.stack-form input,
.stack-form select,
.stack-form textarea {
  width: 100%;
  padding: 0.78rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--hud-line-soft);
  background: linear-gradient(180deg, rgba(7, 14, 28, 0.92), rgba(11, 21, 39, 0.94));
  color: var(--hud-text);
  outline: none;
}

.webapp-body select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.5rem;
  border-radius: 12px;
  border: 1px solid var(--hud-line-soft);
  color: var(--hud-text);
  background-image:
    linear-gradient(45deg, transparent 50%, #8ec8ff 50%),
    linear-gradient(135deg, #8ec8ff 50%, transparent 50%),
    linear-gradient(180deg, rgba(7, 14, 28, 0.92), rgba(11, 21, 39, 0.94));
  background-position:
    calc(100% - 1.15rem) calc(50% - 3px),
    calc(100% - 0.85rem) calc(50% - 3px),
    0 0;
  background-size: 7px 7px, 7px 7px, 100% 100%;
  background-repeat: no-repeat;
}

.webapp-body select option {
  background: #101d33;
  color: #e9f2ff;
}

.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus {
  border-color: rgba(83, 190, 255, 0.64);
  box-shadow: 0 0 0 2px rgba(83, 190, 255, 0.18), 0 0 16px rgba(83, 190, 255, 0.2);
}

.submission-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.submission-toggle__button {
  border: 1px solid rgba(127, 167, 230, 0.3);
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(9, 18, 34, 0.92), rgba(12, 24, 45, 0.94));
  color: #dceaff;
  font-weight: 700;
  padding: 0.72rem 0.9rem;
  cursor: pointer;
  transition: box-shadow 120ms ease, transform 120ms ease, border-color 120ms ease;
}

.submission-toggle__button:hover {
  transform: translateY(-1px);
}

.submission-toggle__button.is-active {
  border-color: rgba(83, 190, 255, 0.64);
  box-shadow: inset 0 0 0 1px rgba(83, 190, 255, 0.25), 0 0 16px rgba(83, 190, 255, 0.22);
}

.rubric-card {
  border: 1px solid var(--hud-line-soft);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(8, 17, 32, 0.8), rgba(13, 25, 45, 0.82));
  padding: 0.8rem;
  display: grid;
  gap: 0.6rem;
}

.rubric-level-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.rubric-level-btn {
  border: 1px solid rgba(127, 167, 230, 0.34);
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(9, 18, 34, 0.92), rgba(12, 24, 45, 0.94));
  color: #dceaff;
  padding: 0.46rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.rubric-level-btn.is-active {
  border-color: rgba(83, 190, 255, 0.66);
  box-shadow: inset 0 0 0 1px rgba(83, 190, 255, 0.24), 0 0 14px rgba(83, 190, 255, 0.25);
}

.rubric-read__body {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.55rem;
}

.rubric-read__body article {
  border: 1px solid var(--hud-line-soft);
  border-radius: 12px;
  padding: 0.6rem 0.68rem;
  background: linear-gradient(180deg, rgba(9, 18, 34, 0.85), rgba(12, 24, 45, 0.88));
  min-height: 118px;
}

.rubric-read__body h5 {
  margin: 0 0 0.25rem;
  font-size: 0.88rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.08rem;
  border-radius: 12px;
  border: 1px solid rgba(92, 205, 255, 0.35);
  background: linear-gradient(180deg, rgba(44, 157, 210, 0.98), rgba(27, 116, 165, 0.98));
  color: #eaf8ff;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(34, 152, 214, 0.25);
}

.button--ghost {
  background: linear-gradient(180deg, rgba(11, 24, 46, 0.94), rgba(9, 19, 36, 0.95));
  border-color: rgba(127, 167, 230, 0.35);
  color: #d4e6ff;
}

.button--danger {
  background: linear-gradient(180deg, rgba(179, 42, 73, 0.96), rgba(128, 28, 52, 0.96));
  border-color: rgba(255, 124, 149, 0.42);
  color: #ffe4ea;
}

.button-row,
.table-actions,
.class-pill-row,
.section-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.7rem;
}

.metric-card {
  border: 1px solid var(--hud-line-soft);
  border-radius: 14px;
  padding: 0.8rem;
  background: linear-gradient(165deg, rgba(10, 20, 37, 0.9), rgba(13, 27, 48, 0.92));
}

.metric-card strong {
  display: block;
  font-size: 1.68rem;
  line-height: 1;
  color: #8fe6ff;
}

.metric-card span,
.muted,
.hint {
  color: var(--hud-muted);
}

.notice {
  border-radius: 12px;
  padding: 0.78rem 0.9rem;
  margin-bottom: 0.9rem;
}

.notice--success {
  color: #bdfadb;
  background: linear-gradient(180deg, rgba(19, 88, 68, 0.35), rgba(14, 63, 49, 0.45));
  border: 1px solid rgba(77, 230, 152, 0.35);
}

.notice--error {
  color: #ffd3db;
  background: linear-gradient(180deg, rgba(113, 33, 50, 0.36), rgba(82, 22, 36, 0.48));
  border: 1px solid rgba(255, 113, 143, 0.35);
}

.portal-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1rem;
}

.portal-sidebar {
  display: grid;
  align-content: start;
  gap: 0.85rem;
}

.portal-content {
  min-height: 520px;
}

.portal-nav {
  display: grid;
  gap: 0.6rem;
}

.portal-nav__item {
  display: block;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid rgba(127, 167, 230, 0.22);
  background: linear-gradient(165deg, rgba(9, 18, 34, 0.9), rgba(12, 24, 45, 0.92));
  color: #dceaff;
  font-weight: 600;
}

.portal-nav__item.is-disabled {
  opacity: 0.58;
  pointer-events: none;
}

.portal-nav__item.is-active {
  border-color: rgba(91, 211, 255, 0.65);
  box-shadow: inset 0 0 0 1px rgba(106, 217, 255, 0.3), 0 0 16px rgba(70, 179, 255, 0.22);
}

.portal-nav__item.is-red { --accent: var(--accent-red); }
.portal-nav__item.is-orange { --accent: var(--accent-orange); }
.portal-nav__item.is-yellow { --accent: var(--accent-yellow); }
.portal-nav__item.is-green { --accent: var(--accent-green); }
.portal-nav__item.is-blue { --accent: var(--accent-blue); }
.portal-nav__item.is-indigo { --accent: var(--accent-indigo); }
.portal-nav__item.is-violet { --accent: var(--accent-violet); }

.portal-nav__item.is-red,
.portal-nav__item.is-orange,
.portal-nav__item.is-yellow,
.portal-nav__item.is-green,
.portal-nav__item.is-blue,
.portal-nav__item.is-indigo,
.portal-nav__item.is-violet {
  border-left: 4px solid var(--accent);
}

.portal-nav__item.is-red.is-active { box-shadow: inset 0 0 0 1px rgba(255, 79, 100, 0.32), 0 0 18px rgba(255, 79, 100, 0.28); }
.portal-nav__item.is-orange.is-active { box-shadow: inset 0 0 0 1px rgba(255, 158, 71, 0.32), 0 0 18px rgba(255, 158, 71, 0.28); }
.portal-nav__item.is-yellow.is-active { box-shadow: inset 0 0 0 1px rgba(255, 225, 97, 0.35), 0 0 18px rgba(255, 225, 97, 0.25); }
.portal-nav__item.is-green.is-active { box-shadow: inset 0 0 0 1px rgba(77, 230, 152, 0.33), 0 0 18px rgba(77, 230, 152, 0.24); }
.portal-nav__item.is-blue.is-active { box-shadow: inset 0 0 0 1px rgba(74, 179, 255, 0.33), 0 0 18px rgba(74, 179, 255, 0.24); }
.portal-nav__item.is-indigo.is-active { box-shadow: inset 0 0 0 1px rgba(116, 132, 255, 0.33), 0 0 18px rgba(116, 132, 255, 0.24); }
.portal-nav__item.is-violet.is-active { box-shadow: inset 0 0 0 1px rgba(179, 128, 255, 0.33), 0 0 18px rgba(179, 128, 255, 0.24); }

.student-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

.student-banner {
  padding: 0.85rem;
}

.view-leerlingportaal .panel-single {
  margin-bottom: 1rem;
}

.view-leerlingportaal .webapp-page {
  padding-top: 1rem;
}

.student-banner__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 0.55fr);
  grid-auto-rows: 220px;
  gap: 0.7rem;
  align-items: stretch;
}

.student-banner__name {
  font-size: clamp(1.08rem, 2vw, 1.5rem);
  line-height: 1.05;
  word-break: break-word;
}

.avatar {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(127, 208, 255, 0.45);
  box-shadow: 0 0 18px rgba(71, 171, 238, 0.28);
}

.avatar--large {
  width: 100%;
  height: 136px;
  border-radius: 12px;
}

.avatar--placeholder {
  display: grid;
  place-items: center;
  color: var(--hud-muted);
  background: linear-gradient(180deg, rgba(9, 18, 35, 0.9), rgba(12, 24, 45, 0.9));
  font-weight: 700;
}

.banner-tile {
  display: grid;
  align-content: space-between;
  min-height: 220px;
  height: 220px;
}

.banner-avatar-form {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.banner-avatar-trigger {
  display: grid;
  gap: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  align-content: stretch;
  min-height: 220px;
  height: 100%;
}

.banner-avatar-trigger::after {
  content: "Avatar wijzigen";
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d9f0ff;
  background: rgba(6, 14, 28, 0.72);
  border: 1px solid rgba(137, 199, 255, 0.4);
  border-radius: 8px;
  padding: 0.2rem 0.4rem;
  pointer-events: none;
}

.banner-avatar-trigger:hover {
  filter: brightness(1.04);
}

.banner-avatar-trigger .avatar {
  justify-self: stretch;
  height: 100%;
  min-height: 220px;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.mini-chart-card {
  grid-template-rows: auto 1fr;
  align-content: stretch;
  justify-items: center;
  overflow: hidden;
}

.mini-chart-card canvas {
  width: auto;
  height: 172px;
  max-width: 100%;
  display: block;
  align-self: center;
}

.banner-name-plain {
  display: grid;
  align-content: center;
  gap: 0.5rem;
  min-height: 220px;
  height: 220px;
  padding: 0.4rem 0.2rem;
}

.banner-opdrachten-link {
  min-height: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #c8f6ff;
  text-decoration: none;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  background: linear-gradient(180deg, rgba(16, 37, 64, 0.9), rgba(10, 23, 43, 0.95));
  border-color: rgba(118, 186, 255, 0.38);
  box-shadow: inset 0 0 0 1px rgba(136, 199, 255, 0.16), 0 0 24px rgba(54, 141, 220, 0.22);
}

.banner-opdrachten-link:hover {
  filter: brightness(1.09);
  box-shadow: inset 0 0 0 1px rgba(136, 199, 255, 0.28), 0 0 28px rgba(54, 141, 220, 0.33);
}

.banner-announcements {
  gap: 0.6rem;
  align-content: start;
  box-shadow: inset 0 0 0 1px rgba(255, 235, 130, 0.2), 0 0 24px rgba(255, 225, 97, 0.26);
  border-color: rgba(255, 225, 97, 0.42);
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 0.9rem;
}

.corner-plus-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(127, 167, 230, 0.36);
  background: linear-gradient(180deg, rgba(11, 24, 46, 0.94), rgba(9, 19, 36, 0.95));
  color: #d4e6ff;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(127, 167, 230, 0.16), 0 8px 20px rgba(2, 10, 24, 0.32);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.corner-plus-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(83, 190, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(83, 190, 255, 0.24), 0 0 16px rgba(83, 190, 255, 0.24);
}

.period-switch {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.view-leerlingportaal .period-switch__button,
.view-beheer .period-switch__button {
  border: 1px solid rgba(255, 95, 118, 0.36);
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(28, 12, 20, 0.92), rgba(52, 16, 27, 0.94));
  color: #ffe7ec;
  font-weight: 700;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 100, 120, 0.14), 0 0 14px rgba(255, 79, 100, 0.14);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.view-leerlingportaal .period-switch__button:hover,
.view-beheer .period-switch__button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 110, 131, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255, 110, 131, 0.26), 0 0 20px rgba(255, 79, 100, 0.28);
}

.view-leerlingportaal .period-switch__button.is-active,
.view-beheer .period-switch__button.is-active {
  border-color: rgba(255, 115, 136, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 120, 140, 0.32), 0 0 24px rgba(255, 79, 100, 0.42);
}

.view-leerlingportaal .period-switch__button.is-disabled,
.view-leerlingportaal .period-switch__button:disabled,
.view-beheer .period-switch__button.is-disabled,
.view-beheer .period-switch__button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  border-color: rgba(127, 167, 230, 0.22);
  background: linear-gradient(165deg, rgba(11, 18, 31, 0.9), rgba(14, 23, 38, 0.92));
  box-shadow: none;
}

.submitted-period-panel {
  display: grid;
  gap: 0.8rem;
}

.self-period-panel {
  display: grid;
  gap: 0.8rem;
}

.is-hidden {
  display: none !important;
}

.submitted-export {
  display: flex;
  justify-content: flex-start;
}

.submission-list,
.period-list {
  display: grid;
  gap: 0.75rem;
}

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

.rubric-phase-stack {
  display: grid;
  gap: 0.65rem;
}

.self-group-card {
  border-radius: 14px;
  border: 1px solid var(--hud-line-soft);
  background: linear-gradient(165deg, rgba(8, 17, 32, 0.76), rgba(13, 25, 45, 0.8));
  padding: 0.7rem;
}

.self-group-card--toggle > summary {
  cursor: pointer;
  font-weight: 700;
  color: #dceaff;
  margin-bottom: 0.55rem;
}

.self-phase-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.self-phase-tab {
  border: 1px solid rgba(255, 95, 118, 0.34);
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(28, 12, 20, 0.9), rgba(52, 16, 27, 0.92));
  color: #ffe7ec;
  padding: 0.62rem 0.72rem;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 100, 120, 0.12), 0 0 14px rgba(255, 79, 100, 0.12);
}

.self-phase-tab:hover {
  border-color: rgba(255, 110, 131, 0.56);
  box-shadow: inset 0 0 0 1px rgba(255, 110, 131, 0.24), 0 0 18px rgba(255, 79, 100, 0.22);
}

.self-phase-tab.is-active {
  border-color: rgba(255, 115, 136, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 120, 140, 0.32), 0 0 22px rgba(255, 79, 100, 0.34);
}

.self-phase-panels {
  display: grid;
  gap: 0.6rem;
}

.period-block,
.submission-group,
.submission-card {
  border-radius: 16px;
  border: 1px solid var(--hud-line-soft);
  background: linear-gradient(165deg, rgba(8, 17, 32, 0.9), rgba(13, 25, 45, 0.9));
}

.period-block,
.submission-group {
  padding: 0.72rem 0.8rem;
}

.submission-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  padding: 0.7rem;
  border: 1px solid var(--hud-line-soft);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(8, 17, 32, 0.55), rgba(13, 25, 45, 0.55));
}

.submission-card__meta,
.submission-card__actions {
  display: grid;
  gap: 0.4rem;
}

.submission-card__actions {
  --submission-unit-size: 148px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  justify-content: flex-start;
  width: var(--submission-unit-size);
}

.submission-card__actions form {
  flex: 1 1 0;
  display: flex;
  margin: 0;
}

.submission-card__actions .button {
  flex: 1 1 0;
  justify-content: center;
  padding: 0.36rem 0.52rem;
  font-size: 0.72rem;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.submission-preview-frame {
  border: 1px solid rgba(127, 167, 230, 0.3);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(10, 20, 37, 0.9), rgba(13, 27, 48, 0.92));
  width: 148px;
  height: 148px;
  justify-self: start;
}

.submission-preview-thumb {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  display: block;
  cursor: pointer;
}

.submission-preview-thumb img,
.submission-preview-thumb iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}

.submission-preview-thumb--file {
  display: grid;
  place-items: center;
  gap: 0.2rem;
  color: #dceaff;
}

.submission-preview-thumb--file span {
  font-weight: 700;
}

.submission-preview-thumb--file small {
  color: var(--hud-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.submission-preview-dialog__form {
  gap: 0.8rem;
}

.submission-preview-dialog__body {
  border-radius: 14px;
  border: 1px solid var(--hud-line-soft);
  background: rgba(6, 12, 24, 0.7);
  min-height: 62vh;
  overflow: hidden;
}

.submission-preview-dialog__image,
.submission-preview-dialog__frame {
  width: 100%;
  height: 72vh;
  border: 0;
  display: block;
  object-fit: contain;
  background: rgba(3, 8, 16, 0.92);
}

.period-block summary,
.submission-group summary {
  cursor: pointer;
  font-weight: 700;
}

.period-block__body {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.75rem;
}

.inline-fieldset {
  margin: 0;
  border-radius: 12px;
  border: 1px solid var(--hud-line-soft);
  padding: 0.72rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(8, 16, 30, 0.86), rgba(10, 20, 37, 0.86));
}

.rubric-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.rubric-choice-tile {
  border: 1px solid var(--hud-line-soft);
  border-radius: 12px;
  padding: 0.62rem 0.7rem;
  text-align: left;
  background: linear-gradient(180deg, rgba(9, 18, 34, 0.85), rgba(12, 24, 45, 0.88));
  color: var(--hud-text);
  cursor: pointer;
  min-height: 138px;
}

.rubric-choice-tile h5 {
  margin: 0 0 0.35rem;
  font-size: 0.84rem;
}

.rubric-choice-tile .muted {
  font-size: 0.78rem;
}

.rubric-choice-tile:hover {
  border-color: rgba(83, 190, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(83, 190, 255, 0.2), 0 0 12px rgba(83, 190, 255, 0.18);
}

.rubric-choice-tile.is-active {
  border-color: rgba(83, 190, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(83, 190, 255, 0.32), 0 0 18px rgba(83, 190, 255, 0.28);
}

.dynamic-fields,
.dynamic-fields__rows {
  display: grid;
  gap: 0.6rem;
}

.dynamic-fields__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.dynamic-fields__row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.6rem;
}

.extra-fields {
  margin: 0;
  padding-left: 1rem;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--hud-line-soft);
  background: linear-gradient(180deg, rgba(9, 18, 34, 0.85), rgba(12, 24, 45, 0.88));
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.76rem 0.84rem;
  border-bottom: 1px solid rgba(127, 167, 230, 0.13);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: #8ea7ca;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.admin-student-open {
  border: 0;
  padding: 0;
  background: transparent;
  color: #8ec8ff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(142, 200, 255, 0.45);
  text-underline-offset: 3px;
}

.admin-student-open:hover {
  color: #d5ecff;
}

.admin-student-dialog {
  width: min(1220px, 96vw);
}

.admin-student-dialog__form {
  gap: 1rem;
}

.class-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 999px;
  padding: 0.66rem 0.9rem;
  border: 1px solid var(--hud-line-soft);
  background: linear-gradient(180deg, rgba(10, 20, 37, 0.88), rgba(13, 27, 49, 0.88));
}

.class-pill--active {
  border-color: rgba(100, 214, 255, 0.52);
  box-shadow: 0 0 14px rgba(69, 173, 236, 0.24);
}

.badge-image {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--hud-line-soft);
  background: linear-gradient(180deg, rgba(7, 14, 28, 0.9), rgba(11, 22, 40, 0.92));
}

.source-tile {
  display: grid;
  gap: 0.55rem;
}

.source-thumb {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--hud-line-soft);
}

.source-thumb--placeholder {
  display: grid;
  place-items: center;
  color: var(--hud-muted);
  background: linear-gradient(180deg, rgba(7, 14, 28, 0.9), rgba(11, 22, 40, 0.92));
}

dialog {
  border: 1px solid rgba(127, 167, 230, 0.32);
  border-radius: 18px;
  padding: 1rem;
  background: linear-gradient(160deg, rgba(10, 21, 40, 0.98), rgba(14, 28, 50, 0.98));
  color: var(--hud-text);
  box-shadow: 0 22px 64px rgba(1, 8, 18, 0.62), inset 0 0 0 1px rgba(146, 182, 240, 0.12);
  width: min(780px, 92vw);
}

dialog::backdrop {
  background: rgba(3, 8, 18, 0.72);
}

/* admin rustiger dan leerlingomgeving */
.view-beheer .portal-nav__item,
.view-beheer .panel-card {
  filter: saturate(0.92);
}

@media (max-width: 900px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .panel-grid,
  .submission-card,
  .dynamic-fields__row {
    grid-template-columns: 1fr;
  }

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

  .rubric-level-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rubric-read__body {
    grid-template-columns: 1fr;
  }

  .rubric-choice-grid {
    grid-template-columns: 1fr;
  }

  .self-phase-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .student-banner__grid {
    grid-template-columns: 1fr;
  }

  .banner-opdrachten-link {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    min-height: 68px;
    height: 68px;
    letter-spacing: 0.12em;
  }
}
