:root {
  --ink: #253237;
  --muted: #738087;
  --line: #e5e9e9;
  --accent: #247363;
  --soft: #edf5f2;
  --paper: #fff;
  --danger: #a8493c;
  font-family: 'Pretendard', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  color: var(--ink);
  font-size: 14px;
  background: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 3px;
}
button {
  cursor: pointer;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 550;
}
button:hover {
  background: #f5f7f7;
}
button:disabled {
  opacity: 0.42;
  cursor: default;
}
button.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
a {
  color: var(--accent);
  text-decoration: none;
}
input,
textarea,
select {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px;
  background: white;
}
textarea {
  line-height: 1.6;
  resize: vertical;
}
input[type='checkbox'] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  background: #f6f7f6;
  border-right: 1px solid var(--line);
  padding: 28px 16px;
  z-index: 20;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.6px;
  padding: 0 12px;
}
.brand > span {
  background: var(--accent);
  color: #fff;
  width: 34px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 21px;
}
.brand small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 1px;
  margin-top: 5px;
}
.workspace-name {
  padding: 36px 12px 18px;
  font-size: 12px;
  color: var(--muted);
}
.workspace-name span {
  float: right;
  background: #e4eeea;
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
}
.rail nav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 12px;
  margin: 3px 0;
  font-size: 15px;
  font-weight: 500;
  color: #64716e;
}
.rail nav button.active {
  background: #e5eeea;
  color: #245e50;
}
.rail nav button span {
  flex: 1;
}
.rail nav small {
  font-size: 11px;
  opacity: 0.7;
}
.rail hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 12px;
}
.rail-bottom {
  margin-top: auto;
  display: grid;
  gap: 16px;
  padding: 12px;
  font-size: 12px;
}
.rail-bottom a {
  color: var(--muted);
}
.rail-bottom button {
  border: 0;
  padding: 0;
  text-align: left;
  background: none;
  color: var(--muted);
  font-size: 12px;
}
main {
  margin-left: 236px;
}
.topbar {
  height: 72px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  color: var(--muted);
  font-size: 12px;
}
.login-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  font-size: 12px;
}
.login-identity button {
  padding: 5px 8px;
  font-size: 11px;
}
.student-counts {
  font-size: 12px;
  color: #73827b;
  margin-top: 8px;
}
.login-account-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.login-account-list small {
  display: block;
  color: #73827b;
  font-size: 12px;
  margin-top: 4px;
}
.class-colors {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  margin-top: 18px;
}
.class-colors label {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 5px;
}
@media (max-width: 600px) {
  .login-identity {
    gap: 5px;
    font-size: 11px;
  }
  .login-identity > span {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
.topbar label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar input {
  width: 125px;
  padding: 6px 8px;
  font-size: 12px;
}
.topbar strong {
  color: var(--ink);
  font-weight: 500;
}
.isolation {
  background: #f4f8f5;
  border-bottom: 1px solid #e2ebe5;
  padding: 12px 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #5c7469;
}
.isolation strong {
  white-space: nowrap;
  color: #3d6a51;
}
.isolation button {
  margin-left: auto;
  white-space: nowrap;
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font-size: 12px;
}
.status-dot {
  width: 6px;
  height: 6px;
  background: #779d70;
  border-radius: 50%;
  flex-shrink: 0;
}
.content {
  padding: 40px;
  max-width: 1900px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 20px;
}
.eyebrow {
  color: #8b9993;
  letter-spacing: 1.8px;
  font-size: 10px;
  margin-bottom: 12px;
}
h1 {
  font-size: 30px;
  letter-spacing: -1.2px;
  margin-bottom: 11px;
  font-weight: 700;
}
.page-heading p:last-child {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 0;
}
.subnav {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.subnav button {
  border: 0;
  border-radius: 0;
  padding: 10px 14px;
  color: var(--muted);
  background: none;
  border-bottom: 2px solid transparent;
}
.subnav button.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.search {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding-left: 10px;
  color: var(--muted);
}
.search input {
  border: 0;
  min-width: 230px;
}
.toolbar select {
  max-width: 220px;
}
.check {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 4px;
  color: var(--muted);
}
.spacer {
  flex: 1;
}
.more {
  position: relative;
  /* Keep the dropdown above the sticky save bar and frozen table columns. */
  z-index: 10;
}
.more summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.more > div {
  position: absolute;
  right: 0;
  top: 42px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px #1535221a;
  width: 190px;
  padding: 6px;
}
.more button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  font-size: 12px;
}
.table-help {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #8c9699;
  padding: 16px 0 10px;
  gap: 16px;
}
.savebar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #fafbfa;
  border: 1px solid var(--line);
  border-radius: 7px 7px 0 0;
  font-size: 12px;
  gap: 10px;
}
.savebar.dirty {
  background: #f3f7f1;
}
.savebar > div {
  display: flex;
  gap: 6px;
}
.savebar button {
  padding: 6px 10px;
  font-size: 12px;
}
.grid-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 7px 7px;
  max-height: 68vh;
  min-height: 180px;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
th,
td {
  text-align: left;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  position: sticky;
  top: 0;
  background: #f7f8f7;
  font-weight: 500;
  font-size: 12px;
  color: #6c7777;
  z-index: 2;
  white-space: nowrap;
  padding: 11px 12px;
}
th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fbfcfb;
  width: 44px;
  min-width: 44px;
  text-align: center;
  padding: 10px;
}
th:first-child {
  z-index: 4;
}
td {
  min-width: 140px;
  max-width: 280px;
  padding: 0;
  font-size: 13px;
  background: white;
}
td:nth-child(2) {
  min-width: 170px;
}
td textarea,
td input:not([type='checkbox']),
td select {
  border: 0;
  width: 100%;
  min-width: 135px;
  border-radius: 0;
  background: transparent;
  padding: 11px 12px;
  min-height: 42px;
  resize: none;
  line-height: 1.5;
  display: block;
  font-size: 13px;
  outline-offset: -2px;
}
td textarea {
  height: 44px;
  white-space: pre;
}
td textarea:focus {
  height: 84px;
  white-space: pre-wrap;
}
td textarea:focus,
td input:focus,
td select:focus {
  outline: 2px solid #72a998;
}
.cell-selected {
  background: #eaf2ee !important;
  box-shadow: inset 0 0 0 1px #b5cdc1;
}
.cell-dirty {
  background: #fffbed;
}
.cell-invalid {
  box-shadow: inset 0 -2px var(--danger);
}
.row-title {
  display: flex;
  align-items: center;
}
.row-title textarea {
  flex: 1;
  min-width: 115px;
}
.row-title button {
  border: 0;
  padding: 10px 6px;
  background: none;
  color: #9aa5a4;
}
.checkbox-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
}
.readonly {
  padding: 11px 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  min-width: 130px;
}
.empty {
  padding: 50px 24px !important;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.footer-note {
  margin-top: 14px;
  line-height: 1.8;
  color: var(--muted);
  font-size: 11px;
}
.message {
  border: 1px solid #e9cbbf;
  background: #fff6f1;
  padding: 12px 16px;
  color: #9b4b35;
  border-radius: 6px;
  margin: 15px 0;
  white-space: pre-wrap;
  line-height: 1.7;
}
.import-progress {
  background: var(--soft);
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  line-height: 1.8;
}
.issues-panel {
  background: #fffbf5;
  border: 1px solid #e9d7b6;
  padding: 16px;
  margin-top: 16px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.8;
}
.issues-panel h3 {
  font-size: 13px;
}
.issues-panel ul {
  padding-left: 20px;
  max-height: 200px;
  overflow: auto;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  width: min(880px, 94vw);
  max-height: 90vh;
  padding: 0;
  box-shadow: 0 24px 100px #142f3a30;
}
dialog::backdrop {
  background: #24332b55;
}
.modal-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
}
.modal-heading h2 {
  font-size: 19px;
  margin: 0;
  letter-spacing: -0.5px;
}
.modal-heading button {
  border: 0;
  font-size: 25px;
  background: none;
  padding: 0 4px;
}
#modal-body {
  padding: 24px 26px;
  line-height: 1.7;
}
#modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 26px;
  border-top: 1px solid var(--line);
  position: sticky;
  bottom: 0;
  background: white;
}
#modal-error {
  padding: 0 26px;
  color: var(--danger);
  white-space: pre-wrap;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
}
.form-grid .full {
  grid-column: 1/-1;
}
.form-grid textarea {
  min-height: 90px;
}
.form-grid textarea.body-editor {
  min-height: 300px;
  font-weight: 400;
}
.ref-options {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  max-height: 180px;
  overflow: auto;
  min-height: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ref-options label {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 6px 9px;
  background: #f5f7f6;
  border-radius: 4px;
  font-weight: 400;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.rich-preview {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
  margin-top: 10px;
  font-weight: 400;
  overflow-wrap: anywhere;
  line-height: 1.85;
}
.rich-preview h1 {
  font-size: 24px;
}
.rich-preview h2 {
  font-size: 20px;
}
.rich-preview h3 {
  font-size: 17px;
}
.rich-preview ul,
.rich-preview ol {
  padding-left: 22px;
}
.rich-preview img {
  max-width: 100%;
  max-height: 350px;
}
.rich-preview pre {
  white-space: pre-wrap;
  background: #f6f7f6;
  padding: 12px;
}
.rich-preview blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin-left: 0;
}
.rich-preview p {
  white-space: pre-wrap;
}
.formatbar {
  display: flex;
  gap: 5px;
}
.formatbar button {
  font-size: 12px;
  padding: 5px 10px;
}
.paste-area {
  width: 100%;
  min-height: 230px;
  white-space: pre;
  font-size: 12px;
}
.paste-summary {
  padding: 12px;
  background: var(--soft);
  border-radius: 5px;
  margin-top: 12px;
}
.backup-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 24px;
}
.card h2 {
  font-size: 17px;
  letter-spacing: -0.4px;
  margin-bottom: 12px;
}
.card p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}
.card .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.card.wide {
  grid-column: 1/-1;
}
.small-table th,
.small-table td {
  padding: 10px;
  position: static;
  font-size: 12px;
  min-width: 0;
  max-width: none;
}
.small-table td {
  background: transparent;
}
.small-table td:first-child {
  position: static;
  text-align: left;
}
.badge {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--accent);
  background: var(--soft);
}
.badge.warn {
  color: #9c6826;
  background: #fff4dd;
}
.badge.error {
  color: var(--danger);
  background: #fff0eb;
}
.preview-course {
  border: 1px solid var(--line);
  padding: 20px;
  margin-top: 15px;
  border-radius: 8px;
}
.preview-course h3 {
  font-size: 19px;
}
.preview-video {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.preview-video p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 12px;
}
.preview-video a {
  display: block;
  word-break: break-all;
  font-size: 12px;
}
.preview-student {
  padding: 18px;
  background: var(--soft);
  border-radius: 8px;
  margin: 20px 0;
}
.import-details {
  font-size: 12px;
  max-height: 220px;
  overflow: auto;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: #263d33;
  color: white;
  padding: 13px 22px;
  border-radius: 8px;
  box-shadow: 0 5px 25px #0002;
  max-width: 90vw;
  white-space: pre-wrap;
  font-size: 13px;
}
#mobile-menu {
  display: none;
}
.audit-metrics {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.audit-metrics div {
  display: grid;
  gap: 5px;
}
.audit-metrics strong {
  font-size: 24px;
  font-weight: 650;
}
.audit-metrics small {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1650px) {
  .content {
    padding: 48px 55px;
  }
}
@media (max-width: 1100px) {
  .rail {
    width: 200px;
    padding: 24px 10px;
  }
  main {
    margin-left: 200px;
  }
  .content {
    padding: 28px 24px;
  }
  .topbar,
  .isolation {
    padding-left: 24px;
    padding-right: 24px;
  }
  .isolation {
    flex-wrap: wrap;
  }
  .isolation button {
    margin-left: 0;
  }
  .table-help span:last-child {
    display: none;
  }
  .toolbar button,
  .toolbar summary {
    font-size: 12px;
  }
  .backup-cards {
    grid-template-columns: 1fr;
  }
  .search input {
    min-width: 170px;
  }
}
@media (max-width: 760px) {
  .rail {
    transform: translateX(-100%);
    transition: transform 0.15s;
    width: 236px;
    box-shadow: 12px 0 30px #0001;
  }
  .menu-open .rail {
    transform: none;
  }
  main {
    margin: 0;
  }
  .topbar {
    height: 60px;
    padding: 0 16px;
    gap: 12px;
  }
  .topbar > span {
    margin-right: auto;
  }
  .topbar label {
    font-size: 0;
  }
  .topbar input {
    width: 85px;
    font-size: 12px;
  }
  #mobile-menu {
    display: block;
    border: 0;
    padding: 2px;
    background: none;
  }
  .isolation {
    padding: 10px 16px;
    font-size: 11px;
    gap: 7px;
  }
  .isolation > span:nth-of-type(2) {
    width: calc(100% - 10px);
  }
  .content {
    padding: 26px 16px;
  }
  .page-heading {
    gap: 12px;
  }
  .page-heading button {
    font-size: 12px;
    white-space: nowrap;
  }
  h1 {
    font-size: 26px;
  }
  .page-heading p:last-child {
    font-size: 12px;
    line-height: 1.6;
  }
  .eyebrow {
    font-size: 9px;
  }
  .savebar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .savebar > div {
    width: 100%;
    justify-content: flex-end;
  }
  .savebar button {
    font-size: 11px;
    padding: 6px 8px;
  }
  .search {
    flex: 1;
  }
  .search input {
    min-width: 0;
    width: 100%;
  }
  .toolbar .spacer {
    display: none;
  }
  .toolbar select {
    max-width: 150px;
  }
  .toolbar > button {
    margin-left: auto;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  #modal-body {
    padding: 20px 16px;
  }
  .modal-heading {
    padding: 16px;
  }
  #modal-actions {
    padding: 12px 16px;
  }
  .small-table {
    min-width: 560px;
  }
  .card {
    padding: 18px;
    overflow: auto;
  }
  .grid-wrap {
    max-height: 65vh;
  }
  .subnav {
    overflow: auto;
    white-space: nowrap;
  }
}

.sort-column {
  border: 0;
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
  font-weight: inherit;
}

/* Spreadsheet interaction: the cell is selected first; text editing is explicit. */
#grid {
  table-layout: fixed;
  min-width: 100%;
}
#grid th,
#grid td {
  min-width: 0;
  max-width: none;
}
#grid th {
  padding: 0;
  height: 43px;
}
#grid .row-check {
  width: 44px;
  padding: 12px 10px;
}
#grid th.pinned-name,
#grid td.pinned-name {
  position: sticky;
  left: 44px;
  z-index: 4;
  background: #fff;
  box-shadow: 2px 0 0 #e1e7e4;
}
#grid th.pinned-name {
  z-index: 7;
  background: #f7f8f7;
}
#grid th.row-check {
  z-index: 8;
}
#grid td.pinned-name.cell-dirty {
  background: #fffbed;
}
.cell-content {
  min-height: 44px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: none;
  cursor: cell;
}
.cell-title-text {
  flex: 1;
  min-width: 0;
}
.cell-placeholder {
  color: #a0aaa7;
  font-size: 11px;
}
.cell-content:not(:hover) > .cell-placeholder {
  opacity: 0.6;
}
#grid .open-page {
  flex-shrink: 0;
  padding: 4px;
  border: 0;
  background: none;
  color: #247363;
  font-size: 11px;
}
#grid td:focus {
  outline: 2px solid #4b92cd;
  outline-offset: -2px;
}
#grid .cell-selected {
  background: #edf5ff !important;
  box-shadow: inset 0 0 0 1px #c7ddf5;
}
.selecting-cells,
.selecting-cells * {
  cursor: cell !important;
  user-select: none !important;
}
#grid textarea.active-cell-editor,
#grid input.active-cell-editor {
  height: 70px;
  min-height: 44px;
  padding: 10px 12px;
  margin: 0;
  white-space: pre-wrap;
  background: white;
  outline: 2px solid #4b92cd;
}
#grid .column-menu {
  border: 0;
  background: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  width: 100%;
  height: 43px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: grab;
  text-align: left;
}
.column-grip {
  margin-right: 6px;
  color: #9aa7a3;
}
.column-chevron {
  margin-left: auto;
  padding-left: 6px;
  color: #9aa7a3;
}
.column-resize {
  position: absolute;
  width: 12px;
  top: 0;
  bottom: 0;
  right: 0;
  cursor: col-resize;
  z-index: 9;
  touch-action: none;
}
.column-resize::after {
  content: '';
  position: absolute;
  right: 0;
  top: 7px;
  bottom: 7px;
  width: 2px;
  background: #c9d4d0;
}
.column-resize:hover::after,
.column-resize:focus::after,
.column-resize.is-resizing::after {
  width: 3px;
  background: #348dcb;
}
.resizing-column,
.resizing-column * {
  cursor: col-resize !important;
  user-select: none !important;
}
#grid .cell-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px 8px;
  min-height: 36px;
  border: 1px solid #d1d9d6;
  border-radius: 7px;
  background: #f4f6f5;
  color: #56635e;
  font-size: 12px;
  white-space: nowrap;
}
#grid td:has(.cell-toggle) .cell-content {
  padding: 4px;
}
#grid .cell-toggle.is-on {
  color: #176655;
  background: #e9f5ef;
  border-color: #95c5b4;
}
.toggle-track {
  display: inline-flex;
  align-items: center;
  width: 30px;
  height: 18px;
  padding: 2px;
  border-radius: 12px;
  background: #9ca8a3;
}
.toggle-track > span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
}
.is-on .toggle-track {
  background: #237763;
}
.is-on .toggle-track > span {
  transform: translateX(12px);
}
.school-picker {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid #d7e0dc;
  border-radius: 9px;
  box-shadow: 0 8px 28px #18372a26;
  background: white;
  color: var(--ink);
  overflow: hidden;
}
.school-picker:popover-open {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.school-picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.school-picker-heading button {
  border: 0;
  padding: 2px 8px;
  font-size: 18px;
}
.school-picker input {
  width: 100%;
  min-width: 0;
  flex-shrink: 0;
  font-size: 13px;
}
#school-options {
  overflow-y: auto;
  min-height: 40px;
}
#school-options button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  border: 0;
  padding: 6px 8px;
  text-align: left;
  font-size: 12px;
}
#school-options .is-active {
  background: #f3f6f4;
}
#school-options [aria-selected='true'] {
  background: #eaf5ee;
}
.school-check {
  margin-left: auto;
  color: #207260;
  font-size: 17px;
  font-weight: 700;
}
.school-picker-status {
  font-size: 11px;
  color: #387160;
  padding: 2px 4px;
}
[data-school-clear] {
  font-size: 11px;
  padding: 5px 8px;
  align-self: flex-start;
}
#school-options button:hover {
  background: #edf4f0;
}
#grid th.column-drop {
  box-shadow: inset 4px 0 #3c88d0;
}
.dragging-column {
  opacity: 0.4;
}
#add-column {
  border: 0;
  padding: 10px;
  background: none;
}
#grid tfoot td {
  position: static;
  width: auto;
  text-align: left;
  padding: 0;
  background: #fcfdfc;
}
#append-row {
  text-align: left;
  width: 100%;
  border: 0;
  padding: 12px 18px;
  color: #7c8983;
  background: transparent;
}
.cell-tag {
  display: inline-block;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 12px;
  line-height: 1.6;
}
.tag-gray {
  background: #eeefed;
  color: #565d58;
}
.tag-green {
  background: #deeee5;
  color: #2d6b4b;
}
.tag-blue {
  background: #dceefa;
  color: #305d81;
}
.tag-yellow {
  background: #f7ebc6;
  color: #7c6733;
}
.tag-orange {
  background: #f9e4d1;
  color: #936332;
}
.tag-pink {
  background: #f7dfe9;
  color: #915571;
}
.tag-purple {
  background: #eae0f5;
  color: #785e99;
}
.tag-red {
  background: #f5deda;
  color: #965149;
}
.inherited-courses {
  width: 100%;
  font-size: 10px;
  color: #768d82;
}
.column-actions,
.choice-options {
  display: grid;
  gap: 6px;
}
.column-actions button {
  text-align: left;
  padding: 12px;
}
.choice-options {
  max-height: 340px;
  overflow: auto;
  margin: 12px 0;
}
.choice-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 5px;
}
.choice-options label:hover {
  background: #f6f8f6;
}
.choice-options label span {
  flex: 1;
}
.choice-options small {
  display: block;
  color: #82908a;
  font-size: 11px;
  margin-top: 3px;
}
.choice-options label[hidden],
.property-list [hidden] {
  display: none;
}
.choice-options input {
  flex-shrink: 0;
}
.new-choice {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}
.option-editor-row,
.sort-rule {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.option-editor-row input,
.sort-rule select:first-child {
  flex: 1;
  min-width: 0;
}
#property-choices {
  margin: 24px 0;
}
.property-list {
  display: grid;
  gap: 6px;
}
.property-list > div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.property-list label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.course-guide {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px;
  border: 1px solid #dce9e1;
  border-radius: 8px;
  background: #f5f9f6;
  margin-bottom: 20px;
}
.course-guide p {
  margin: 8px 0 0;
  color: #6e8076;
  font-size: 12px;
}
.course-guide button {
  white-space: nowrap;
}
.course-page-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.course-page-tools button {
  font-size: 12px;
}
.course-public {
  font-size: 11px;
  color: #8a8f8c;
  padding: 6px 10px;
}
.course-public.is-public {
  color: #287456;
  background: #e7f3e9;
  border-radius: 20px;
}
.course-banner {
  padding: 22px 28px;
  background: #f4f7f7;
  border: 1px solid #e3e9e6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.course-icon {
  font-size: 38px;
  color: #347b84;
}
.course-banner small {
  display: block;
  color: #6a8383;
  letter-spacing: 0.7px;
  font-size: 11px;
  margin-bottom: 8px;
}
.course-banner strong {
  font-size: 22px;
  color: #2e4651;
}
.course-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0 18px;
  align-items: center;
}
.course-section-tabs button {
  border: none;
  font-size: 13px;
}
.course-section-tabs button.active {
  border-radius: 6px;
  background: #e9f1ed;
  color: #2b735b;
}
.course-section-tabs small {
  opacity: 0.6;
  margin-left: 6px;
}
.enrollment-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 26px;
}
.enrollment-grid h3 {
  font-size: 14px;
}
.current-course-note {
  padding: 12px;
  background: #edf4f0;
  border-radius: 5px;
  color: #38745a;
  font-size: 12px;
}
@media (max-width: 720px) {
  .course-guide {
    align-items: stretch;
    flex-direction: column;
  }
  .enrollment-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .course-banner {
    padding: 16px;
  }
  .course-banner strong {
    font-size: 17px;
  }
  .option-editor-row {
    flex-wrap: wrap;
  }
  .toolbar button {
    font-size: 12px;
  }
}

/* Shared management navigation; the original rail remains hidden for its counters. */
.studio-app .rail,
.studio-app .topbar {
  display: none;
}
.operations-page.studio-app > main {
  margin: 0;
  min-width: 0;
  max-width: none;
}
.studio-app .isolation {
  margin: 0;
  padding: 12px 28px;
  flex-wrap: wrap;
}
.studio-app .content {
  padding: 24px 28px;
}
.studio-app .ops-sidebar {
  overflow-y: auto;
}
.studio-app .ops-nav a {
  padding: 10px 14px;
}
.studio-app .ops-brand {
  margin-bottom: 20px;
}
.student-links-panel {
  display: grid;
  gap: 14px;
}
.student-links-panel input {
  width: 100%;
}
.student-links-panel .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.studio-app .student-counts {
  font-size: 12px;
}
.studio-app .savebar {
  z-index: 12;
}
.studio-app .toolbar .more[open] {
  z-index: 25;
}
.quick-class {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.quick-class input {
  flex: 1;
  min-width: 150px;
}
@media (max-width: 850px) {
  .studio-app .content {
    padding: 18px 12px;
  }
  .studio-app .isolation {
    padding: 10px 12px;
  }
  .studio-app .toolbar .search {
    flex: 1 0 100%;
  }
  .studio-app .toolbar .search input {
    width: 100%;
  }
  .studio-app .toolbar > select {
    flex: 1;
  }
}
/* Class setup is a compact, explicit list, separate from course assignments. */
.class-management { margin-top: 16px; }
.class-management-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:12px; }
.class-list-wrap { overflow-x:auto; border:1px solid #dce3ec; border-radius:10px; background:#fff; }
.class-list { width:100%; border-collapse:collapse; min-width:650px; table-layout:auto; }
.class-list th:first-child,.class-list td:first-child { position:static; width:24%; min-width:150px; max-width:none; text-align:left; }
.class-list .cell-tag { white-space:nowrap; }
.class-list th:last-child,.class-list td:last-child { width:290px; }
.class-list th { text-align:left; background:#f5f7fb; color:#334c68; font-size:13px; }
.class-list td,.class-list th { padding:15px 18px; border-bottom:1px solid #e5eaf1; vertical-align:middle; }
.class-list tr:last-child td { border-bottom:0; }
.class-list small { display:block; margin-top:5px; color:#7c899b; white-space:pre-line; }
.class-list .class-save-pending { color:#ab6516; }
.class-actions { display:flex; flex-wrap:wrap; gap:6px; }
.class-actions button { font-size:12px; padding:7px 10px; white-space:nowrap; }
.class-actions .class-delete { color:#b64040; border-color:#ead2d2; }
.watch-tools { display:flex; align-items:center; gap:8px; }
#watch-update { color:#78879a; font-size:12px; }
@media(max-width:600px) { .class-management-head { align-items:flex-start; } .class-list td,.class-list th { padding:12px; } }
