.student-layout.student-layout-admin { grid-template-columns: minmax(200px, 250px) minmax(0, 1fr); align-items: start; }
.student-layout-admin .student-list { position: sticky; top: 18px; max-height: 76vh; overflow-y: auto; }
.student-layout-admin .detail-hero { padding: 20px 24px; margin-bottom: 16px; }
.student-layout-admin > section { min-width: 0; }
.student-event-editor { background: var(--surface, #fff); color: var(--ink, #132033); border: 1px solid var(--line, #e4e7ec); border-radius: 18px; padding: 20px; }
.student-event-editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.student-event-editor h3, .student-event-panel h4 { margin: 0; font-size: 1rem; }
.student-event-editor-heading p, .student-event-panel header p { margin: 5px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.student-event-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.student-event-calendar-note { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line, #e4e7ec); border-left: 3px solid #588fcf; border-radius: 10px; background: var(--surface-2, #f6f8fb); color: var(--ink, #132033); font-size: .82rem; line-height: 1.5; }
.student-event-panel { min-width: 0; border: 1px solid var(--line, #e4e7ec); border-radius: 14px; background: var(--surface-2, #f6f8fb); transition: background .15s, box-shadow .15s; }
.student-event-panel > header { min-height: 84px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.student-event-panel.is-assigned > header { background: #edf4ff; color: #174579; border-radius: 14px 14px 0 0; }
.student-event-count { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 10px; background: var(--surface); font-weight: 750; }
.student-event-groups { max-height: 62vh; min-height: 310px; overflow-y: auto; padding: 12px; scrollbar-gutter: stable; }
.student-event-block + .student-event-block { margin-top: 18px; }
.student-event-block-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; margin: 0 2px 8px; }
.student-event-block-heading > strong { font-size: .8rem; }
.student-event-block-heading > span { color: var(--muted); font-size: .72rem; }
.student-event-block-heading > em { font-size: .72rem; color: #a73920; font-style: normal; font-weight: 650; }
.student-event-block-cards { display: grid; gap: 7px; }
.student-event-card { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 9px 8px; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 10px; cursor: grab; box-shadow: 0 1px 2px rgb(16 24 40 / 3%); }
.student-event-card.is-changed { border-color: #5a91d3; }
.student-event-card.is-dragging { opacity: .45; }
.student-event-grip { font-size: 1.15rem; color: var(--muted); flex-shrink: 0; }
.student-event-card-copy { display: grid; gap: 4px; min-width: 0; flex: 1; }
.student-event-card-copy > strong { font-size: .86rem; line-height: 1.35; overflow-wrap: anywhere; }
.student-event-card-copy a { color: inherit; text-decoration: none; }
.student-event-card-copy a:hover { text-decoration: underline; }
.student-event-card-copy a:focus-visible { outline: 3px solid #69a4e7; outline-offset: 2px; }
.student-event-card-copy > span { font-size: .72rem; line-height: 1.35; color: var(--muted); }
.student-event-move { flex-shrink: 0; min-height: 44px; padding: 7px; background: transparent; border: 1px solid transparent; border-radius: 7px; font: inherit; font-size: .72rem; font-weight: 650; color: #225d9c; cursor: pointer; }
.is-assigned .student-event-move { color: var(--muted); }
.student-event-move:hover:not(:disabled) { border-color: var(--line); background: var(--surface-2); }
.student-event-empty { padding: 13px 10px; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); font-size: .76rem; }
.student-event-panel.is-drop-target { box-shadow: 0 0 0 3px #588fcf; background: #e8f1ff; }
.student-event-feedback:empty { display: none; }
.student-event-warning, .student-event-error { border-radius: 9px; padding: 10px 12px; margin: 12px 0 0; font-size: .82rem; line-height: 1.5; }
.student-event-warning { background: #fff3da; color: #835208; }
.student-event-error { background: #ffebe8; color: #a12c23; }
.student-event-error button { background: transparent; color: inherit; border: 0; text-decoration: underline; font: inherit; cursor: pointer; }
.student-event-free { color: var(--muted); font-size: .8rem; margin: 14px 0 0; }
.student-event-savebar { position: sticky; bottom: 12px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--surface, #fff); border-top: 1px solid var(--line); margin-top: 16px; padding: 16px 0 4px; }
.student-event-savebar > div:first-child { display: grid; gap: 4px; font-size: .82rem; }
.student-event-savebar span { font-size: .75rem; color: var(--muted); }
.student-event-savebar > div:last-child { display: flex; gap: 8px; }
.student-event-savebar button { min-height: 44px; }
.student-event-editor button:disabled { opacity: .55; cursor: default; }
.student-event-editor button:focus-visible { outline: 3px solid #69a4e7; outline-offset: 2px; }
html[data-theme="dark"] .student-event-panel.is-assigned > header { background: #173452; color: #c1dcff; }
html[data-theme="dark"] .student-event-move { color: #a1c9f5; }
html[data-theme="dark"] .student-event-panel.is-drop-target { background: #173452; }
html[data-theme="dark"] .student-event-warning { background: #46381b; color: #f4d088; }
html[data-theme="dark"] .student-event-error { background: #4b2929; color: #ffb9b2; }
html[data-theme="dark"] .student-event-block-heading > em { color: #ffb9b2; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .student-event-panel.is-assigned > header { background: #173452; color: #c1dcff; }
  html:not([data-theme="light"]) .student-event-move { color: #a1c9f5; }
  html:not([data-theme="light"]) .student-event-panel.is-drop-target { background: #173452; }
  html:not([data-theme="light"]) .student-event-warning { background: #46381b; color: #f4d088; }
  html:not([data-theme="light"]) .student-event-error { background: #4b2929; color: #ffb9b2; }
  html:not([data-theme="light"]) .student-event-block-heading > em { color: #ffb9b2; }
}
@media (max-width: 1180px) { .student-layout.student-layout-admin { grid-template-columns: 200px minmax(0, 1fr); gap: 14px; } .student-event-editor { padding: 14px; } .student-event-board { gap: 10px; } .student-event-grip { display: none; } }
@media (max-width: 900px) { .student-layout.student-layout-admin { grid-template-columns: minmax(0, 1fr); } .student-layout-admin .student-list { position: static; max-height: 210px; } }
@media (max-width: 560px) { .student-event-board { grid-template-columns: minmax(0, 1fr); } .student-event-groups { max-height: 42vh; min-height: 160px; } .student-event-editor-heading { display: block; } .student-event-editor-heading .badge { margin-top: 10px; } .student-event-savebar { align-items: stretch; flex-direction: column; } .student-event-savebar > div:last-child { justify-content: flex-end; } }

.student-layout {
  --brain-tint: #eaf3ff; --brain-ink: #20568c; --brain-fill: #3c83c9;
  --build-tint: #fff3d9; --build-ink: #78500b; --build-fill: #dca43d;
  --other-tint: #f1f3f6; --other-ink: #505e70; --other-fill: #8996a7;
}
.student-layout .event-type-brain { --event-tint: var(--brain-tint); --event-color: var(--brain-ink); --event-fill: var(--brain-fill); }
.student-layout .event-type-build { --event-tint: var(--build-tint); --event-color: var(--build-ink); --event-fill: var(--build-fill); }
.student-layout .event-type-other { --event-tint: var(--other-tint); --event-color: var(--other-ink); --event-fill: var(--other-fill); }
.student-layout .student-event-card, .student-layout .event-chip.event-type-brain, .student-layout .event-chip.event-type-build, .student-layout .event-chip.event-type-other { background: var(--event-tint); border-left: 3px solid var(--event-fill); color: var(--event-color); }
.student-layout .student-event-card-copy > span { color: var(--event-color); }
.student-row-main { flex: 1; min-width: 0; }
.student-layout .student-row { align-items: flex-start; }
.student-layout .student-row > .badge { flex-shrink: 0; margin-top: 2px; }
.student-profile-name { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 4px; }
.student-profile-grade { border: 1px solid #ffffff4d; border-radius: 999px; background: #ffffff1a; color: #fff; padding: 5px 11px; font-size: .8rem; font-weight: 650; }
.student-event-mix { margin: 0 0 16px; padding: 16px 18px; background: var(--surface, #fff); border: 1px solid var(--line, #e4e7ec); border-radius: 14px; }
.student-event-editor .student-event-mix { background: var(--surface-2, #f6f8fb); }
.student-event-mix-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.student-event-mix-heading h3 { margin: 0; font-size: .95rem; }
.student-event-mix-heading > span { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.student-event-mix-caption { margin: 5px 0 12px; color: var(--muted); font-size: .75rem; }
.student-event-mix-track { display: flex; height: 16px; width: 100%; overflow: hidden; border-radius: 999px; background: var(--line, #e4e7ec); }
.student-event-mix-segment { display: block; height: 100%; flex-shrink: 0; background: var(--event-fill); }
.student-event-mix-segment + .student-event-mix-segment { box-shadow: inset 2px 0 var(--surface, #fff); }
.student-event-mix-legend { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 11px; }
.student-event-mix-legend > span { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; }
.student-event-mix-legend small { color: var(--muted); margin-left: 3px; font-size: .72rem; }
.student-event-mix-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--event-fill); }
.student-event-mix-empty { color: var(--muted); margin: 10px 0 0; font-size: .8rem; }
.student-event-mix-mini { margin-top: 9px; }
.student-event-mix-mini .student-event-mix-track { height: 6px; }
.student-event-mix-mini-label { display: block; color: var(--muted); font-size: .68rem; line-height: 1.4; margin-top: 4px; }
html[data-theme="dark"] .student-layout {
  --brain-tint: #17334f; --brain-ink: #c5e0ff; --brain-fill: #78b5ee;
  --build-tint: #3b301d; --build-ink: #ffe0a0; --build-fill: #e6b856;
  --other-tint: #263140; --other-ink: #d0d9e5; --other-fill: #9cabbf;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .student-layout {
    --brain-tint: #17334f; --brain-ink: #c5e0ff; --brain-fill: #78b5ee;
    --build-tint: #3b301d; --build-ink: #ffe0a0; --build-fill: #e6b856;
    --other-tint: #263140; --other-ink: #d0d9e5; --other-fill: #9cabbf;
  }
}
