:root {
  --bg-app: #f5f7fa;
  --bg-auth: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #fafbfd;
  --surface-muted: #edf2f7;
  --border: #d9e1ea;
  --border-strong: #c5d0dc;
  --text: #182533;
  --text-soft: #667789;
  --text-faint: #8795a6;
  --primary: #1f6fd6;
  --primary-strong: #1554a5;
  --admin: #157f6f;
  --teacher: #2563eb;
  --student: #d97706;
  --danger: #c0392b;
  --danger-soft: #fff2f0;
  --success-soft: #eefaf6;
  --info-soft: #eff6ff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.08);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg-app);
  color: var(--text);
  font-family: "Pretendard", "Inter", "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

code {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 18px 22px;
  background: #0f172a;
  color: #f8fafc;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand,
.auth-brand {
  display: grid;
  gap: 6px;
}

.sidebar-brand strong,
.auth-brand strong {
  font-size: 1.15rem;
  line-height: 1.25;
}

.sidebar-brand-kicker,
.section-kicker,
.workspace-eyebrow,
.sidebar-group-label,
.sidebar-user-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar-brand-kicker,
.sidebar-group-label,
.sidebar-user-label,
.workspace-eyebrow,
.section-kicker {
  color: var(--text-faint);
}

.app-sidebar .sidebar-brand-kicker,
.app-sidebar .sidebar-group-label,
.app-sidebar .sidebar-user-label {
  color: rgba(248, 250, 252, 0.65);
}

.app-sidebar .sidebar-group-label {
  color: #ffffff;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: none;
  margin-bottom: 4px;
}

.sidebar-role-chip {
  align-self: flex-start;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font-size: 1.08rem;
  font-weight: 700;
}

.sidebar-nav {
  display: grid;
  gap: 20px;
  flex: 1;
  overflow: auto;
  padding-right: 4px;
}

.sidebar-group {
  display: grid;
  gap: 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  color: rgba(248, 250, 252, 0.78);
  font-size: 0.95rem;
  font-weight: 600;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar-link.is-active {
  background: #ffffff;
  color: #111827;
}

.sidebar-user-card {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-user-card strong {
  font-size: 1rem;
}

.sidebar-user-card span {
  color: rgba(248, 250, 252, 0.7);
  font-size: 0.9rem;
}

.sidebar-logout {
  margin-top: 8px;
  width: 100%;
}

.workspace-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-width: 0;
}

.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px 18px;
  background: rgba(245, 247, 250, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(219, 227, 234, 0.8);
}

.workspace-topbar h1 {
  margin: 6px 0 8px;
  font-size: clamp(1.75rem, 2.8vw, 2.4rem);
  line-height: 1.15;
}

.workspace-description {
  margin: 0;
  max-width: 760px;
  color: var(--text-soft);
  font-size: 0.98rem;
}

.workspace-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workspace-content {
  min-width: 0;
  padding: 24px 28px 36px;
}

.auth-page-shell {
  min-height: 100vh;
  background: var(--bg-auth);
}

.auth-topbar {
  padding: 28px 32px 0;
}

.auth-page-content {
  width: min(1240px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.page-section {
  margin-bottom: 24px;
}

.page-grid {
  display: grid;
  gap: 24px;
}

.page-grid.two-column {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.stack-layout {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.card,
.metric-card,
.callout-card,
.completion-card,
.subsection-card,
.template-detail-card,
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.card,
.completion-card {
  padding: 28px;
}

.subsection-card,
.template-detail-card {
  padding: 22px;
}

.card-header,
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.card-header h2,
.card-header h3,
.section-head h3,
.empty-state h3,
.modal-header h3,
.template-detail-card h3 {
  margin: 6px 0 0;
  line-height: 1.2;
}

.card-description,
.section-head p,
.empty-state p,
.login-lead,
.login-feature-item p,
.table-primary small,
.student-form-status,
.form-hint,
.metric-card small,
.template-detail-card p,
.info-item span,
.detail-block span {
  color: var(--text-soft);
}

.compact-header {
  align-items: center;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.metric-card {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.metric-card span {
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 600;
}

.metric-card strong {
  font-size: 2rem;
  line-height: 1;
}

.badge-row,
.row-actions,
.page-actions,
.pagination-actions,
.keyword-actions,
.keyword-controls,
.teacher-picker-controls,
.filter-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.inline-action-form {
  margin: 0;
}

.page-actions {
  margin-top: 20px;
}

.page-actions.align-right {
  justify-content: flex-end;
}

.page-actions-split {
  justify-content: space-between;
}

.primary-button,
.secondary-button,
.ghost-button-inline,
.tab-button,
.reference-toggle-button,
.reference-clear-button,
.modal-close,
.template-card-close {
  border: none;
  border-radius: 12px;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 700;
  transition: 0.18s ease;
}

.primary-button {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.primary-button:hover {
  background: var(--primary-strong);
}

.primary-button.admin {
  background: var(--admin);
}

.primary-button.teacher {
  background: var(--teacher);
}

.primary-button.student {
  background: var(--student);
}

.secondary-button,
.reference-toggle-button,
.reference-clear-button {
  background: var(--surface-muted);
  color: var(--text);
}

.secondary-button:hover,
.reference-toggle-button:hover,
.reference-clear-button:hover {
  background: #e5ebf1;
}

.compact-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.92rem;
}

.ghost-link,
.ghost-button-inline {
  color: var(--primary);
  background: transparent;
  padding: 0;
  min-height: auto;
}

.ghost-button-inline {
  border-radius: 0;
}

.ghost-button-inline:hover,
.ghost-link:hover {
  color: var(--primary-strong);
}

.delete-mark {
  color: var(--danger);
}

.status-badge,
.sidebar-role-chip,
.keyword-chip,
.panel-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.status-badge {
  background: #edf2f7;
  color: #314155;
}

.status-badge.is-admin {
  background: rgba(21, 127, 111, 0.12);
  color: var(--admin);
}

.status-badge.is-teacher {
  background: rgba(37, 99, 235, 0.12);
  color: var(--teacher);
}

.flash {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-weight: 600;
}

.flash-success {
  background: var(--success-soft);
  border-color: #cbe8db;
  color: #16684d;
}

.flash-error {
  background: var(--danger-soft);
  border-color: #f4c7c3;
  color: #a1362a;
}

.flash-info {
  background: var(--info-soft);
  border-color: #cfe0ff;
  color: #184f9a;
}

.stack-form,
.form-grid,
.info-grid,
.answer-grid,
.chip-grid,
.template-card-grid,
.master-detail-placeholder,
.outline-stack {
  display: grid;
  gap: 16px;
}

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

.form-field {
  display: grid;
  gap: 8px;
}

.form-field span {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.field-span-2 {
  grid-column: span 2;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  min-height: 46px;
  padding: 0 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

textarea {
  min-height: 110px;
  padding: 13px 14px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #8db3eb;
  box-shadow: 0 0 0 4px rgba(31, 111, 214, 0.12);
}

input:disabled,
select:disabled,
textarea:disabled,
button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.info-section-card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.section-head {
  margin-bottom: 16px;
}

.section-head h3 {
  font-size: 1.06rem;
}

.section-head p,
.card-description {
  margin: 8px 0 0;
}

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

.info-item {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.info-item span {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.info-item strong {
  font-size: 0.98rem;
  line-height: 1.45;
  word-break: break-word;
}

.info-item.is-stacked {
  gap: 8px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
}

.app-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #ffffff;
}

.app-table-wide {
  min-width: 1280px;
}

.app-table th,
.app-table td {
  padding: 15px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.app-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f9fc;
  color: #556677;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.app-table tbody tr:last-child td {
  border-bottom: none;
}

.app-table tbody tr:hover {
  background: #fafcff;
}

.table-primary {
  display: grid;
  gap: 4px;
}

.table-primary strong {
  line-height: 1.4;
}

.table-muted-action {
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 700;
}

.prewrap-cell,
.prewrap-text,
.detail-block p,
.answer-card p,
.outline-row p {
  white-space: pre-wrap;
  word-break: break-word;
}

.data-table-card {
  display: grid;
  gap: 14px;
}

.data-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.data-table-search {
  flex: 1 1 320px;
  max-width: 440px;
}

.data-table-meta,
.pagination-info {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.data-table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  gap: 28px;
  align-items: stretch;
}

.teacher-home-shell {
  display: grid;
  gap: 22px;
}

.teacher-home-hero {
  display: grid;
  gap: 8px;
}

.teacher-home-hero h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1.1;
}

.teacher-home-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 24px;
  align-items: start;
}

.teacher-home-side {
  display: grid;
  gap: 20px;
}

.teacher-frame,
.teacher-list-card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.teacher-frame-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  width: fit-content;
  margin-bottom: 18px;
  padding: 0 14px;
  border-radius: 999px;
  background: #edf4ff;
  border: 1px solid #d5e4ff;
  color: var(--teacher);
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: none;
}

.teacher-frame-badge-inline {
  position: static;
}

.teacher-info-stack {
  display: grid;
  gap: 16px;
}

.teacher-info-card,
.teacher-spotlight-card {
  display: grid;
  gap: 10px;
  min-height: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fbfcfe;
}

.teacher-info-card span,
.teacher-spotlight-card span {
  display: inline-flex;
  align-items: center;
  align-self: start;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(31, 111, 214, 0.1);
  color: var(--primary-strong);
  font-size: 0.9rem;
  font-weight: 800;
}

.teacher-info-card strong,
.teacher-spotlight-card strong {
  font-size: 1.02rem;
  line-height: 1.55;
  word-break: break-word;
}

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

.teacher-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.teacher-list-card {
  padding-top: 24px;
}

.teacher-program-table .table-wrap {
  margin-top: 6px;
}

.login-stage-shell {
  width: min(980px, calc(100vw - 40px));
  margin: 32px auto 0;
  display: grid;
  gap: 20px;
}

.login-stage-header {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.login-stage-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
}

.login-stage-lead {
  margin: 0;
  max-width: 720px;
  color: var(--text-soft);
  font-size: 1rem;
}

.login-stage-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.login-stage-tabbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px 0;
  background: transparent;
}

.login-stage-card .tab-button {
  min-height: 54px;
  border: 1px solid var(--border-strong);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  background: #f3f6f9;
  color: #415469;
  font-size: 1.06rem;
  font-weight: 700;
  box-shadow: none;
}

.login-stage-card .tab-button.is-active {
  background: #ffffff;
  color: var(--text);
}

.login-stage-card .tab-panel {
  padding: 32px 34px 28px;
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: #ffffff;
  min-height: 380px;
}

.login-stage-form {
  min-height: 320px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 24px;
}

.login-stage-body {
  width: min(760px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 28px;
  align-content: center;
}

.login-stage-field {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.login-stage-field-single {
  grid-template-columns: 1fr;
  gap: 12px;
}

.login-stage-field span {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 700;
}

.login-stage-field input {
  min-height: 64px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  padding: 0 20px;
  font-size: 1.06rem;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.login-stage-field-single input {
  text-align: center;
}

.login-stage-helper {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.98rem;
}

.login-stage-actions {
  display: flex;
  justify-content: flex-end;
}

.login-stage-actions .primary-button {
  min-width: 132px;
}

.login-side,
.login-card {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.login-side {
  padding: 40px;
  display: grid;
  gap: 22px;
  background:
    radial-gradient(circle at top right, rgba(31, 111, 214, 0.08), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.login-side h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
}

.login-card {
  padding: 30px;
}

.login-feature-list {
  display: grid;
  gap: 14px;
}

.login-feature-item {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
}

.login-feature-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.tabs {
  display: grid;
  gap: 16px;
}

.role-switch,
.tab-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  background: var(--surface-muted);
}

.tab-button {
  background: transparent;
  color: #42576c;
}

.tab-button.is-active {
  background: #ffffff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.tab-panel {
  display: none;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
}

.tab-panel.is-active {
  display: block;
}

.callout-card {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--teacher);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.callout-card strong {
  display: block;
  margin-bottom: 6px;
}

.student-question-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 20px;
  margin-top: 20px;
}

.student-writing-card,
.student-completion-card {
  max-width: 1120px;
  margin: 0 auto;
}

.student-start-card {
  max-width: 1020px;
  margin: 0 auto;
}

.student-start-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.student-start-heading h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1.1;
}

.student-stage-frame {
  position: relative;
  isolation: isolate;
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.student-stage-frame-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  margin-bottom: 18px;
  padding: 0 14px;
  border-radius: 999px;
  background: #edf4ff;
  border: 1px solid #d5e4ff;
  color: var(--teacher);
  font-size: 0.92rem;
  font-weight: 800;
  z-index: 1;
  box-shadow: none;
}

.student-stage-display-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

.student-stage-display-card {
  display: grid;
  gap: 10px;
  min-height: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fbfcfe;
}

.student-stage-display-card-wide {
  grid-column: 1 / -1;
  min-height: 120px;
}

.student-stage-display-card-double {
  grid-column: span 2;
}

.student-stage-display-label {
  display: inline-flex;
  align-items: center;
  align-self: start;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(31, 111, 214, 0.1);
  color: var(--primary-strong);
  font-size: 0.9rem;
  font-weight: 800;
}

.student-stage-display-card strong {
  font-size: 1.02rem;
  line-height: 1.55;
}

.student-stage-action-card {
  grid-column: 3;
}

.student-stage-action-stack {
  display: grid;
  align-content: center;
  gap: 10px;
}

.student-stage-action-stack .ghost-link {
  font-weight: 700;
}

.student-stage-input-grid {
  display: grid;
  gap: 18px;
}

.student-stage-input-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.student-stage-input-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  background: rgba(31, 111, 214, 0.1);
  color: var(--primary-strong);
  font-size: 1rem;
  font-weight: 800;
}

.student-stage-input-row input {
  min-height: 52px;
}

.student-writing-section {
  display: grid;
  gap: 22px;
}

.student-writing-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.student-writing-header h3 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  line-height: 1.15;
}

.student-writing-header p {
  margin: 8px 0 0;
  color: var(--text-soft);
}

.student-writing-split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 20px;
  align-items: start;
}

.student-section-panel {
  display: grid;
  gap: 16px;
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #ffffff;
}

.student-section-panel h4,
.student-question-panel h4 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
}

.student-curriculum-grid,
.student-guidance-grid {
  display: grid;
  gap: 14px;
}

.student-selection-launch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.student-selection-launch-card {
  display: grid;
  gap: 18px;
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.student-selection-launch-head {
  display: grid;
  gap: 8px;
}

.student-selection-launch-head h5 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
}

.student-selection-launch-head p {
  margin: 0;
  color: var(--text-soft);
}

.student-selection-summary-card {
  display: grid;
  gap: 14px;
  min-height: 156px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fbfcfe;
}

.student-selection-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.student-selection-summary-head strong {
  font-size: 0.98rem;
}

.student-selection-summary-head span,
.student-selection-inline-note {
  color: var(--text-faint);
  font-size: 0.92rem;
  font-weight: 700;
}

.student-selection-empty {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.student-selection-empty-centered {
  display: grid;
  place-items: center;
  min-height: 180px;
  text-align: center;
}

.student-selection-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.student-selection-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 600;
}

.student-selection-chip button {
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 800;
}

.student-selection-subject-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.student-selection-subject-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
}

.student-selection-subject-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.student-selection-subject-head strong {
  font-size: 0.98rem;
  line-height: 1.35;
}

.student-selection-subject-remove {
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--text-soft);
  font-size: 1rem;
  font-weight: 800;
}

.student-selection-modal {
  width: min(1040px, calc(100vw - 40px));
}

.student-selection-modal-panel {
  padding: 32px 32px 26px;
  border-radius: 28px;
}

.student-selection-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.student-selection-modal-header h3 {
  margin: 0;
  flex: 1;
  text-align: center;
  font-size: clamp(1.65rem, 2.4vw, 2.2rem);
  line-height: 1.2;
}

.student-selection-modal-close {
  border: none;
  background: transparent;
  color: #a1aab5;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-size: 2rem;
  line-height: 1;
}

.student-selection-modal-body {
  display: grid;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.student-selection-modal-section {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid #e8edf3;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #f4f7fb;
}

.student-selection-modal-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.student-selection-modal-section-head > div {
  display: grid;
  gap: 6px;
}

.student-selection-modal-section-head strong {
  font-size: 1.02rem;
  line-height: 1.3;
}

.student-selection-modal-section-head p {
  margin: 0;
  color: var(--text-soft);
}

.student-selection-modal-scroll {
  max-height: 300px;
  overflow: auto;
  padding-right: 6px;
}

.student-selection-modal-scroll-tall {
  min-height: 280px;
  max-height: 360px;
}

.student-selection-option-group {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.student-selection-option-group + .student-selection-option-group {
  margin-top: 16px;
}

.student-selection-option-group-label {
  margin: 0;
  color: var(--primary);
  font-size: 0.98rem;
  font-weight: 700;
}

.student-selection-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 12px;
  width: 100%;
  align-items: stretch;
}

.student-selection-option-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  color: #4b5563;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
  transition: 0.18s ease;
}

.student-selection-option-button:hover {
  border-color: #bfd4f3;
  background: #f8fbff;
}

.student-selection-option-button.is-selected {
  border-color: #3b82f6;
  background: #eef5ff;
  color: #1d4ed8;
}

.student-selection-accordion {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

.student-selection-accordion + .student-selection-accordion {
  margin-top: 10px;
}

.student-selection-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 18px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}

.student-selection-accordion summary::-webkit-details-marker {
  display: none;
}

.student-selection-accordion summary::after {
  content: "⌄";
  color: var(--text-faint);
  font-size: 1rem;
}

.student-selection-accordion[open] summary {
  background: #f8fbff;
}

.student-selection-accordion[open] summary::after {
  transform: rotate(180deg);
}

.student-selection-accordion-body {
  display: grid;
  gap: 0;
  border-top: 1px solid #edf2f7;
}

.student-selection-checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 18px;
  font-size: 0.98rem;
  font-weight: 600;
}

.student-selection-checkbox-row + .student-selection-checkbox-row {
  border-top: 1px solid #f1f5f9;
}

.student-selection-checkbox-row input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  flex: 0 0 20px;
  accent-color: var(--primary);
}

.student-selection-modal-footer {
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.student-selection-modal-footer .primary-button {
  width: 100%;
  min-height: 56px;
  border-radius: 16px;
}

.secondary-button.is-selected-toggle {
  border-color: #3b82f6;
  background: #eef5ff;
  color: #1d4ed8;
}

.evaluation-guide-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #d8e2f0;
  border-radius: 18px;
  background: #f8fbff;
}

.evaluation-guide-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.guideline-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-soft);
  display: grid;
  gap: 8px;
  line-height: 1.6;
}

.char-counter-field {
  gap: 10px;
}

.char-counter-meta,
.char-counter-static {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.char-counter-meta strong,
.char-counter-static strong {
  color: var(--text);
}

.char-counter-field.is-under .char-counter-meta strong {
  color: #b45309;
}

.char-counter-field.is-target .char-counter-meta strong {
  color: #166534;
}

.char-counter-field.is-over .char-counter-meta strong {
  color: var(--danger);
}

.submission-card .answer-grid {
  align-items: stretch;
}

.student-selection-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.student-selection-column {
  display: grid;
  gap: 18px;
}

.student-selector-group {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
}

.student-selector-group h5,
.student-career-panel h5 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.student-selector-group p,
.student-career-panel p,
.student-selector-summary,
.student-career-summary,
.student-career-major-list {
  margin: 0;
  color: var(--text-soft);
}

.student-selector-toolbar {
  display: flex;
  justify-content: flex-end;
}

.student-career-panel {
  display: grid;
  gap: 16px;
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #ffffff;
}

.student-career-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.student-career-major-list {
  min-height: 92px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.student-form-field {
  min-width: 0;
}

.student-summary-list,
.student-keyword-list {
  display: grid;
  gap: 12px;
}

.student-summary-row,
.keyword-list-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
}

.student-summary-index,
.keyword-list-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #e7f0ff;
  color: var(--primary-strong);
  font-size: 1rem;
  font-weight: 800;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 0 6px #ffffff;
}

.student-summary-body,
.keyword-list-body {
  display: grid;
  gap: 4px;
}

.student-summary-body strong,
.keyword-list-body strong {
  font-size: 0.98rem;
  line-height: 1.4;
}

.student-summary-body p,
.keyword-list-body p,
.student-inline-note p {
  margin: 0;
  color: var(--text-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.student-inline-note {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(31, 111, 214, 0.06);
  border: 1px solid rgba(31, 111, 214, 0.12);
}

.student-inline-note strong {
  font-size: 0.92rem;
}

.student-keyword-input-stack {
  display: grid;
  gap: 14px;
}

.student-inline-actions {
  margin-top: 0;
}

.student-keyword-list .teacher-picker-empty {
  margin: 0;
  padding: 22px 18px;
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  background: var(--surface-soft);
  text-align: center;
}

.keyword-list-remove {
  border: none;
  background: rgba(192, 57, 43, 0.08);
  color: var(--danger);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
}

.student-writing-body-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.student-question-panel {
  position: relative;
  min-height: 320px;
  padding: 26px 22px 22px;
}

.student-question-panel textarea {
  min-height: 230px;
}

.student-identity-inline-spaced {
  justify-content: space-between;
}

.student-submit-actions {
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.student-submit-actions > * {
  min-width: 180px;
}

.student-submit-note {
  margin: 14px 0 0;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.student-completion-frame {
  margin-top: 4px;
  padding-top: 24px;
}

.student-stage-frame-badge-centered {
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

.student-completion-actions {
  margin-top: 22px;
}

.student-question-main,
.student-question-side {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.question-block-card,
.keyword-editor-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
}

.student-identity-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.student-identity-inline span {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.keyword-editor {
  display: grid;
  gap: 14px;
}

.reference-search-row {
  display: grid;
}

.keyword-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.keyword-chip {
  padding-right: 8px;
  background: rgba(31, 111, 214, 0.08);
  color: var(--primary-strong);
}

.keyword-chip button {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0 4px;
  min-height: auto;
}

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

.answer-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
}

.answer-section-label {
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.answer-card strong {
  display: block;
  margin: 6px 0 8px;
}

.subsection-card {
  background: var(--surface-soft);
}

.chip-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.chip-card {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.chip-card.is-active {
  border-color: rgba(37, 99, 235, 0.36);
  background: rgba(37, 99, 235, 0.05);
}

.outline-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.outline-row:last-child {
  border-bottom: none;
}

.outline-row strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--surface-muted);
}

.detail-block {
  display: grid;
  gap: 8px;
}

.detail-block span {
  font-size: 0.84rem;
  font-weight: 700;
}

.teacher-picker {
  display: grid;
  gap: 12px;
}

.teacher-picker-controls > input {
  flex: 1 1 220px;
}

.selected-teacher-list,
.assignment-chip-list {
  display: grid;
  gap: 10px;
}

.teacher-chip,
.assignment-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.teacher-chip-text,
.assignment-chip-main {
  display: grid;
  gap: 4px;
}

.teacher-chip-remove {
  border: none;
  background: transparent;
  color: var(--danger);
  font-size: 1rem;
  font-weight: 700;
}

.teacher-picker-empty {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.assignment-control {
  display: grid;
  gap: 10px;
}

.template-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.template-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.template-card-top small {
  color: var(--text-soft);
}

.template-card-close {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  background: var(--surface-muted);
  color: var(--text);
  border-radius: 10px;
}

.template-card-close.is-disabled {
  background: #f2f4f7;
  color: var(--text-faint);
}

.admin-panel-page {
  max-width: 1180px;
  margin: 0 auto;
}

.admin-panel-stack {
  display: grid;
  gap: 24px;
}

.admin-surface-card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.admin-surface-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  width: fit-content;
  margin-bottom: 18px;
  padding: 0 14px;
  border-radius: 999px;
  background: #eef8f4;
  border: 1px solid #d5ebe2;
  color: var(--admin);
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: none;
}

.admin-wire-form {
  display: grid;
  gap: 26px;
}

.admin-wire-grid {
  display: grid;
  gap: 18px;
}

.admin-wire-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-wire-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 16px;
  background: rgba(31, 111, 214, 0.1);
  color: var(--primary-strong);
  font-size: 1rem;
  font-weight: 800;
}

.admin-wire-controls {
  display: grid;
  gap: 14px;
}

.admin-wire-controls-split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-wire-controls-triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-wire-field {
  margin: 0;
}

.admin-wire-note {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(21, 127, 111, 0.12);
  background: rgba(21, 127, 111, 0.05);
}

.admin-wire-note strong {
  font-size: 0.95rem;
}

.admin-wire-note p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.admin-wire-actions {
  margin-top: 4px;
}

.admin-list-shell .data-table-card {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-teacher-picker {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
}

.admin-assignment-toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px) auto;
}

.admin-floating-search {
  justify-self: end;
  width: min(100%, 320px);
}

.admin-x-button {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1.15rem;
  font-weight: 800;
}

.table-action-cell {
  width: 68px;
  text-align: right;
}

.table-assignment-stack {
  min-width: 220px;
}

.table-assignment-action {
  gap: 12px;
}

.table-assignment-action .admin-x-button {
  flex-shrink: 0;
}

.empty-state {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 180px;
  padding: 28px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: 18px;
  background: var(--surface-soft);
}

.compact-empty {
  min-height: 120px;
}

.master-detail-placeholder {
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
}

.reference-enhancer {
  display: grid;
  gap: 12px;
}

.reference-choice-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.reference-toggle-button.is-active {
  background: rgba(31, 111, 214, 0.12);
  color: var(--primary-strong);
}

.reference-select-grid {
  display: grid;
  gap: 12px;
}

.reference-select-grid-school,
.reference-select-grid-curriculum {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reference-select-field {
  display: grid;
  gap: 8px;
}

.reference-select-label {
  font-size: 0.8rem;
  color: var(--text-soft);
  font-weight: 700;
}

.reference-summary-text,
.reference-inline-help {
  margin: 0;
}

.reference-summary-text {
  font-weight: 700;
}

.data-table-hidden {
  display: none;
}

.app-modal {
  width: min(760px, calc(100vw - 32px));
  padding: 0;
  border: none;
  border-radius: 24px;
  background: transparent;
}

.app-modal::backdrop {
  background: rgba(15, 23, 42, 0.44);
}

body:has(dialog[open]) {
  overflow: hidden;
}

.modal-panel {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  margin-bottom: 18px;
}

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.modal-close {
  background: var(--surface-muted);
  color: var(--text);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.44);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(520px, calc(100vw - 40px));
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.completion-card {
  max-width: 880px;
}

.compact-top {
  margin-top: 18px;
}

.hidden-submit {
  display: none;
}

@media (max-width: 1280px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-wire-row {
    grid-template-columns: 1fr;
  }

  .student-question-layout,
  .student-writing-split,
  .student-selection-launch-grid,
  .student-selection-layout,
  .teacher-home-grid,
  .page-grid.two-column,
  .master-detail-placeholder {
    grid-template-columns: 1fr;
  }

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

  .student-stage-display-grid-3,
  .student-writing-body-grid,
  .teacher-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-stage-action-card {
    grid-column: 2;
  }

  .student-stage-display-card-double {
    grid-column: span 2;
  }

  .student-selection-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-stage-input-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: relative;
    height: auto;
  }

  .workspace-topbar,
  .workspace-content {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 820px) {
  .auth-topbar {
    padding: 20px 20px 0;
  }

  .auth-page-content {
    width: calc(100vw - 24px);
    padding: 16px 0 28px;
  }

  .login-shell,
  .form-grid,
  .info-grid,
  .answer-grid,
  .modal-grid,
  .admin-wire-controls-split,
  .admin-wire-controls-triple,
  .student-stage-display-grid,
  .student-stage-display-grid-3,
  .student-writing-body-grid,
  .teacher-spotlight-grid,
  .teacher-metrics-grid,
  .student-career-grid,
  .reference-select-grid-school,
  .reference-select-grid-curriculum {
    grid-template-columns: 1fr;
  }

  .student-stage-action-card {
    grid-column: auto;
  }

  .student-stage-display-card-double {
    grid-column: auto;
  }

  .student-selection-modal {
    width: calc(100vw - 24px);
  }

  .student-selection-modal-panel {
    padding: 22px 18px 18px;
  }

  .student-selection-modal-header h3 {
    font-size: 1.4rem;
  }

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

  .field-span-2 {
    grid-column: auto;
  }

  .login-side,
  .login-card,
  .card,
  .completion-card,
  .admin-surface-card {
    padding: 22px;
  }

  .login-stage-shell {
    width: calc(100vw - 24px);
  }

  .login-stage-tabbar {
    padding: 16px 16px 0;
  }

  .login-stage-card .tab-button {
    min-height: 48px;
    font-size: 0.98rem;
  }

  .login-stage-card .tab-panel,
  .login-stage-form {
    min-height: auto;
  }

  .login-stage-card .tab-panel {
    padding: 24px 18px 20px;
  }

  .login-stage-body {
    width: 100%;
    gap: 18px;
  }

  .login-stage-field {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .login-stage-field span {
    font-size: 1.05rem;
  }

  .login-stage-field input,
  .login-stage-field-single input {
    min-height: 56px;
    font-size: 1rem;
    text-align: left;
  }

  .login-stage-actions {
    justify-content: center;
  }

  .login-stage-actions .primary-button {
    width: 100%;
  }

  .student-stage-frame {
    padding: 20px 18px;
  }

  .student-stage-input-row span {
    justify-content: flex-start;
  }

  .teacher-frame,
  .teacher-list-card {
    padding: 20px 18px;
  }

  .student-summary-row,
  .keyword-list-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .keyword-list-remove {
    width: 100%;
  }

  .page-actions-split {
    justify-content: stretch;
  }

  .page-actions-split > * {
    flex: 1 1 100%;
  }

  .workspace-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .student-submit-actions > * {
    min-width: 0;
    flex: 1 1 100%;
  }

  .workspace-actions {
    justify-content: flex-start;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .app-table {
    min-width: 640px;
  }
}

/* 2026-06 Setam admin tone refresh */

:root {
  --bg-app: #f4f7fb;
  --bg-auth: #f6f8fc;
  --surface: #ffffff;
  --surface-soft: #fbfcff;
  --surface-muted: #f3f6fb;
  --border: #e4eaf3;
  --border-strong: #d5ddea;
  --text: #1f2937;
  --text-soft: #667085;
  --text-faint: #94a3b8;
  --primary: #2f77e2;
  --primary-strong: #1c63cd;
  --admin: #2f77e2;
  --teacher: #2f77e2;
  --student: #2f77e2;
  --danger: #d63939;
  --danger-soft: #fff4f4;
  --success-soft: #eef8f2;
  --info-soft: #eef4ff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 16px 36px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 52px rgba(15, 23, 42, 0.08);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
}

body {
  background:
    radial-gradient(circle at top left, rgba(47, 119, 226, 0.06), transparent 28%),
    linear-gradient(180deg, #f7f9fd 0%, #f4f7fb 100%);
  color: var(--text);
}

.dashboard-shell {
  grid-template-columns: 288px minmax(0, 1fr);
  background: transparent;
}

.app-sidebar {
  gap: 20px;
  padding: 24px 18px;
  background: linear-gradient(180deg, #f7faff 0%, #f2f6fd 100%);
  color: var(--text);
  border-right: 1px solid var(--border);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.7);
}

.sidebar-brand,
.auth-brand {
  gap: 8px;
}

.sidebar-brand {
  padding: 18px 18px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.sidebar-brand strong,
.auth-brand strong {
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.sidebar-brand-kicker,
.workspace-eyebrow,
.section-kicker,
.sidebar-user-label {
  color: #7c8aa5;
  letter-spacing: 0.16em;
}

.sidebar-brand-copy {
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.55;
}

.sidebar-role-chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #d7e5ff;
  background: #edf4ff;
  color: var(--primary-strong);
  font-size: 0.92rem;
  font-weight: 800;
}

.sidebar-nav {
  gap: 18px;
}

.sidebar-group {
  gap: 10px;
}

.sidebar-group-label {
  display: inline-flex;
  align-items: center;
  align-self: start;
  min-height: 42px;
  margin: 0;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--primary);
  color: #ffffff;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  box-shadow: var(--shadow-sm);
}

.sidebar-group-links {
  display: grid;
  gap: 8px;
}

.sidebar-link {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #4d5f79;
  font-size: 0.98rem;
  font-weight: 700;
}

.sidebar-link:hover {
  background: rgba(47, 119, 226, 0.08);
  border-color: rgba(47, 119, 226, 0.14);
  color: var(--primary-strong);
}

.sidebar-link.is-active {
  background: #ffffff;
  border-color: #cfe0ff;
  color: var(--primary-strong);
  box-shadow: var(--shadow-sm);
}

.sidebar-user-card {
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.sidebar-user-card span {
  color: var(--text-soft);
}

.workspace-topbar {
  top: 0;
  padding: 26px 32px 18px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.workspace-topbar h1 {
  margin-top: 8px;
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}

.workspace-description {
  color: var(--text-soft);
  font-size: 0.97rem;
  line-height: 1.65;
}

.workspace-content {
  padding: 28px 32px 40px;
}

.auth-topbar {
  width: min(1240px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 28px 0 0;
}

.auth-brand {
  max-width: 520px;
}

.card,
.metric-card,
.callout-card,
.completion-card,
.subsection-card,
.template-detail-card,
.modal-card,
.teacher-frame,
.teacher-list-card,
.student-stage-frame,
.admin-surface-card {
  border-color: var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.card,
.completion-card,
.admin-surface-card,
.teacher-frame,
.teacher-list-card,
.student-stage-frame {
  background: rgba(255, 255, 255, 0.96);
}

.admin-panel-page {
  max-width: 1280px;
}

.admin-teacher-list-page-section {
  max-width: none;
}

.admin-teacher-list-page .workspace-content {
  padding-inline: 20px;
}

.admin-teacher-list-page .admin-list-shell {
  padding: 20px;
}

.teacher-management-table {
  table-layout: fixed;
}

.teacher-management-table .teacher-col-name { width: 8%; }
.teacher-management-table .teacher-col-id { width: 9%; }
.teacher-management-table .teacher-col-password { width: 10%; }
.teacher-management-table .teacher-col-code { width: 10%; }
.teacher-management-table .teacher-col-school { width: 11%; }
.teacher-management-table .teacher-col-department { width: 10%; }
.teacher-management-table .teacher-col-assignment { width: 20%; }
.teacher-management-table .teacher-col-unassign { width: 13%; }
.teacher-management-table .teacher-col-delete { width: 9%; }

.app-table.teacher-management-table {
  min-width: 920px;
}

.app-table.teacher-management-table thead th,
.app-table.teacher-management-table tbody td {
  padding: 14px 10px;
  overflow-wrap: anywhere;
}

.teacher-management-table td code {
  font-size: 0.82rem;
}

.teacher-management-table .table-assignment-stack,
.teacher-management-table .assignment-chip-main {
  min-width: 0;
}

.teacher-management-table .assignment-chip {
  padding: 8px;
  gap: 6px;
}

.teacher-management-table .table-assignment-action {
  flex-wrap: wrap;
}

/* Keep the destructive action discoverable even on a narrow, scrollable table. */
.teacher-management-table .teacher-delete-column {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #ffffff;
  border-left: 1px solid var(--border);
  text-align: center;
  white-space: nowrap;
}

.teacher-management-table thead .teacher-delete-column {
  z-index: 3;
  background: #f8fbff;
}

@media (min-width: 1181px) {
  .admin-teacher-list-page .dashboard-shell {
    grid-template-columns: 256px minmax(0, 1fr);
  }
}

.panel-copy-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.panel-copy-stack.compact-copy {
  margin-bottom: 16px;
}

.panel-title {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.panel-description {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.admin-surface-badge,
.teacher-frame-badge,
.student-stage-frame-badge {
  min-height: 36px;
  margin-bottom: 18px;
  padding: 0 14px;
  border: 1px solid #d7e5ff;
  border-radius: 14px;
  background: #edf4ff;
  color: var(--primary-strong);
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.96);
  position: relative;
  z-index: 2;
}

.admin-wire-form {
  gap: 24px;
}

.admin-wire-grid {
  gap: 16px;
}

.admin-wire-row {
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
}

.admin-wire-label,
.student-stage-input-row span {
  min-height: 52px;
  border: 1px solid #d7e5ff;
  border-radius: 14px;
  background: #edf4ff;
  color: var(--primary-strong);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.admin-wire-note {
  border: 1px solid #dce7fb;
  background: #f7faff;
}

.teacher-picker.admin-teacher-picker {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fbfdff;
}

.data-table-card {
  gap: 16px;
}

.data-table-toolbar {
  align-items: center;
}

.data-table-search {
  max-width: 460px;
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
  overflow-x: auto;
}

.app-table {
  min-width: 820px;
  border-collapse: separate;
  border-spacing: 0;
}

.app-table thead th {
  padding: 15px 18px;
  background: #f8fbff;
  color: #425466;
  font-size: 0.92rem;
  font-weight: 800;
  border-bottom: 1px solid var(--border);
}

.app-table tbody td {
  padding: 18px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
}

.app-table tbody tr:hover {
  background: #fbfdff;
}

.table-primary {
  gap: 6px;
}

.table-primary strong {
  color: var(--text);
}

.table-primary small {
  color: var(--text-soft);
}

.pagination-info,
.data-table-meta {
  color: var(--text-soft);
}

.assignment-chip,
.chip-card,
.student-stage-display-card,
.teacher-info-card,
.teacher-spotlight-card,
.student-section-panel,
.answer-card,
.question-block-card {
  border-color: var(--border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: none;
}

.assignment-chip {
  background: #fbfdff;
}

.assignment-chip-main small,
.chip-card span {
  color: var(--text-soft);
}

.info-item,
.detail-block,
.outline-row {
  border-color: var(--border);
  background: #fbfdff;
}

.metric-card {
  gap: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.metric-card strong {
  letter-spacing: -0.03em;
}

.status-badge {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #dbe5f3;
  background: #f5f8fc;
  color: #44566f;
  font-size: 0.8rem;
}

.status-badge.is-admin,
.status-badge.is-teacher {
  border-color: #d7e5ff;
  background: #edf4ff;
  color: var(--primary-strong);
}

.primary-button,
.secondary-button,
.compact-button,
.ghost-button-inline,
.tab-button,
.reference-toggle-button,
.reference-clear-button,
.modal-close,
.template-card-close {
  border-radius: 14px;
}

.primary-button {
  background: var(--primary);
  box-shadow: none;
}

.primary-button.admin,
.primary-button.teacher,
.primary-button.student {
  background: var(--primary);
}

.primary-button:hover,
.primary-button.admin:hover,
.primary-button.teacher:hover,
.primary-button.student:hover {
  background: var(--primary-strong);
}

.secondary-button,
.reference-toggle-button,
.reference-clear-button {
  border: 1px solid var(--border);
  background: #ffffff;
  color: #425466;
}

.secondary-button:hover,
.reference-toggle-button:hover,
.reference-clear-button:hover {
  background: #f8fbff;
  border-color: #d7e5ff;
  color: var(--primary-strong);
}

.ghost-link,
.ghost-button-inline {
  color: var(--primary);
  font-weight: 700;
}

input,
select,
textarea {
  border-color: var(--border-strong);
  border-radius: 14px;
  background: #ffffff;
  min-height: 50px;
  padding: 0 15px;
  box-shadow: none;
}

textarea {
  min-height: 120px;
  padding: 14px 15px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #93baff;
  box-shadow: 0 0 0 4px rgba(47, 119, 226, 0.1);
}

.login-stage-shell {
  width: min(1040px, calc(100vw - 40px));
  gap: 24px;
}

.login-stage-header {
  justify-items: start;
  text-align: left;
}

.login-stage-lead {
  max-width: 760px;
  font-size: 1rem;
  line-height: 1.7;
}

.login-stage-card {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-md);
}

.login-stage-tabbar {
  gap: 14px;
  padding: 22px 24px 0;
}

.login-stage-card .tab-button {
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fbff;
  color: #50627b;
  font-size: 1.04rem;
  font-weight: 800;
}

.login-stage-card .tab-button.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.login-stage-card .tab-panel {
  min-height: 340px;
  padding: 34px 36px 30px;
  border-top: none;
  background: transparent;
}

.login-stage-form {
  min-height: 280px;
}

.login-stage-body {
  width: min(780px, 100%);
  gap: 24px;
}

.login-stage-field {
  grid-template-columns: 92px minmax(0, 1fr);
}

.login-stage-field span {
  font-size: 1.18rem;
  font-weight: 800;
}

.login-stage-field input,
.login-stage-field-single input {
  min-height: 60px;
  border-radius: 16px;
  font-size: 1.02rem;
}

.login-stage-field-single input {
  text-align: left;
}

.login-stage-actions {
  justify-content: flex-end;
}

.login-stage-actions .primary-button {
  min-width: 154px;
  min-height: 54px;
}

.login-company-footer {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.8;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.login-company-footer p {
  margin: 0;
}

.student-start-heading,
.teacher-home-hero {
  gap: 10px;
}

.student-start-heading h2,
.teacher-home-hero h2 {
  letter-spacing: -0.03em;
}

.student-stage-frame,
.teacher-frame,
.teacher-list-card {
  padding: 24px;
}

.student-stage-display-card,
.teacher-info-card,
.teacher-spotlight-card {
  gap: 12px;
  padding: 18px;
}

.student-stage-display-label,
.teacher-info-card span,
.teacher-spotlight-card span {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #d7e5ff;
  border-radius: 12px;
  background: #edf4ff;
  color: var(--primary-strong);
  font-size: 0.88rem;
  font-weight: 800;
}

.student-stage-action-card {
  display: grid;
  align-content: space-between;
}

.student-writing-header p,
.student-form-status,
.callout-card p {
  line-height: 1.65;
}

.callout-card {
  border: 1px solid #dce7fb;
  background: #f8fbff;
}

.app-modal.student-selection-modal {
  width: min(1040px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.student-selection-modal-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  max-height: calc(100dvh - 32px);
  padding: 20px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.student-selection-modal-header,
.student-selection-modal-actions {
  flex-shrink: 0;
}

.student-selection-modal-actions {
  padding-top: 16px;
}

.student-selection-modal-footer {
  padding-top: 0;
}

.student-selection-modal-header h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  letter-spacing: -0.03em;
}

.student-selection-modal-close {
  border: 1px solid transparent;
  color: #98a2b3;
}

.student-selection-modal-close:hover {
  background: #f5f8fc;
  border-color: var(--border);
}

.student-selection-modal-section {
  min-width: 0;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #f7f9fc;
}

.student-selection-modal-section-head strong {
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.student-selection-modal-section-head p {
  line-height: 1.6;
}

.student-selection-modal-scroll {
  min-width: 0;
  max-height: 300px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.student-selection-modal-scroll-tall {
  min-height: 180px;
  max-height: 300px;
}

.student-selection-option-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.student-selection-option-button {
  min-width: 0;
  min-height: 50px;
  padding: 12px 16px;
  border-color: var(--border);
  border-radius: 10px;
  color: #49566b;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.45;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  writing-mode: horizontal-tb;
}

.student-selection-option-button:hover {
  border-color: #bfd4f3;
  background: #f8fbff;
}

.student-selection-option-button.is-selected {
  border-color: #3b82f6;
  background: #eef5ff;
  color: #1d4ed8;
}

.student-selection-accordion {
  border-color: var(--border);
  border-radius: 18px;
}

.student-selection-accordion summary {
  min-height: 58px;
  padding: 0 18px;
  font-size: 1rem;
  color: #425466;
}

.student-selection-accordion[open] summary {
  background: #f8fbff;
  color: var(--primary-strong);
}

.student-selection-checkbox-row {
  min-height: 54px;
  padding: 12px 16px;
  font-size: 1rem;
  color: #44566f;
}

.student-selection-checkbox-row span {
  line-height: 1.5;
  word-break: keep-all;
}

.student-selection-chip {
  border-radius: 999px;
  background: #f5f7fb;
  color: #46566d;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.student-selection-chip span {
  min-width: 0;
}

.student-selection-chip button {
  flex-shrink: 0;
}

.student-selection-subject-groups {
  display: block;
  min-width: 0;
}

.student-selection-option-button[hidden],
.student-selection-option-group[hidden],
.camp-teacher-option[hidden] {
  display: none;
}

.student-selection-modal-section-head {
  flex-wrap: wrap;
}

.camp-teacher-edit {
  justify-self: start;
  margin-top: 6px;
}

.camp-teachers-modal .modal-panel {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}

.camp-teachers-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.camp-teachers-header h2 { margin: 0; }
.camp-teachers-header p { color: var(--text-soft); }
.camp-teachers-search { display: grid; gap: 8px; margin: 16px 0; }
.camp-teachers-options { max-height: 320px; overflow-y: auto; }
.camp-teacher-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.camp-teacher-option input {
  width: 20px;
  min-height: 20px;
  height: 20px;
  flex: 0 0 20px;
  accent-color: var(--primary);
}
.camp-teacher-option span { display: grid; gap: 4px; }
.camp-teacher-option small { color: var(--text-soft); }
.camp-teacher-option:has(input:checked) { background: #eef5ff; }

@media (min-width: 861px) {
  .student-curriculum-modal .student-selection-modal-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .student-curriculum-modal .student-selection-modal-section:last-child {
    grid-column: 1 / -1;
  }
  .student-curriculum-modal .student-selection-modal-section:nth-child(-n + 2) {
    display: flex;
    flex-direction: column;
    height: clamp(240px, calc(100dvh - 340px), 420px);
  }
  .student-curriculum-modal .student-selection-modal-section-head,
  .student-curriculum-modal [data-subject-search] {
    flex-shrink: 0;
  }
  .student-curriculum-modal .student-selection-modal-scroll {
    flex: 1;
    min-height: 0;
    max-height: none;
  }
  .student-curriculum-modal .student-selection-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.template-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.template-card-top h3 {
  margin: 0 0 6px;
}

.template-card-top p,
.template-card-top small {
  color: var(--text-soft);
}

.reference-search-row input {
  background: #ffffff;
}

@media (max-width: 1180px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: relative;
    height: auto;
  }

  .workspace-topbar,
  .workspace-content {
    padding-left: 24px;
    padding-right: 24px;
  }

  .teacher-home-grid,
  .page-grid.two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .login-stage-header {
    text-align: center;
    justify-items: center;
  }

  .login-stage-field {
    grid-template-columns: 1fr;
  }

  .admin-wire-row,
  .student-stage-input-row {
    grid-template-columns: 1fr;
  }

  .student-stage-display-grid,
  .student-stage-display-grid-3,
  .teacher-spotlight-grid,
  .metrics-grid.teacher-metrics-grid {
    grid-template-columns: 1fr;
  }

  .student-stage-display-card-double,
  .student-stage-action-card {
    grid-column: auto;
  }

  .student-selection-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-selection-modal-panel {
    padding: 16px;
  }

  .student-selection-modal-section {
    padding: 14px;
  }

  .student-selection-option-button {
    padding: 10px;
    font-size: 0.875rem;
  }

  .student-selection-modal-section-head strong {
    font-size: 1rem;
  }
}
